aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2023-03-31 10:54:08 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2023-03-31 12:28:07 +0300
commitfc1cffcfa7f0497a1f97b384a24bcbf23362f3be (patch)
treec15f7ab5b9e9b20fd0ef8fc07d598d28e8b32004
parent8a749596d40e91c896a1907afcd108d9221fbde1 (diff)
downloadydb-fc1cffcfa7f0497a1f97b384a24bcbf23362f3be.tar.gz
Ydb stable 23-1-1923.1.19
x-stable-origin-commit: c5d5a396e89d0a72e0267a55e93d8404d4fb54fe
-rw-r--r--conanfile.txt2
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp48
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp263
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp37
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp336
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp138
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp21
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp31
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h6
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/work_serializer.cc21
-rw-r--r--contrib/libs/grpc/src/cpp/server/server_cc.cc23
-rw-r--r--contrib/libs/libxml/CMakeLists.darwin.txt2
-rw-r--r--contrib/libs/libxml/CMakeLists.linux-aarch64.txt2
-rw-r--r--contrib/libs/libxml/CMakeLists.linux.txt2
-rw-r--r--contrib/restricted/boost/context/include/boost/context/stack_context.hpp72
-rw-r--r--contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm205
-rw-r--r--contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm163
-rw-r--r--contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm207
-rw-r--r--contrib/restricted/boost/context/src/windows/stack_traits.cpp98
-rw-r--r--contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp102
-rw-r--r--library/cpp/CMakeLists.darwin.txt1
-rw-r--r--library/cpp/CMakeLists.linux-aarch64.txt1
-rw-r--r--library/cpp/CMakeLists.linux.txt1
-rw-r--r--library/cpp/actors/core/actorsystem.h16
-rw-r--r--library/cpp/actors/core/config.h12
-rw-r--r--library/cpp/actors/core/executor_pool.h14
-rw-r--r--library/cpp/actors/core/executor_pool_basic.cpp19
-rw-r--r--library/cpp/actors/core/executor_pool_basic.h3
-rw-r--r--library/cpp/actors/core/executor_pool_basic_ut.cpp2
-rw-r--r--library/cpp/actors/core/executor_pool_united_ut.cpp2
-rw-r--r--library/cpp/actors/core/harmonizer.cpp65
-rw-r--r--library/cpp/actors/core/harmonizer.h1
-rw-r--r--library/cpp/actors/core/mon_stats.h9
-rw-r--r--library/cpp/actors/core/worker_context.h3
-rw-r--r--library/cpp/actors/helpers/pool_stats_collector.h11
-rw-r--r--library/cpp/actors/interconnect/events_local.h15
-rw-r--r--library/cpp/actors/interconnect/handshake_broker.h78
-rw-r--r--library/cpp/actors/interconnect/interconnect_handshake.cpp88
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp8
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp7
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_proxy.h28
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_session.cpp30
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_session.h12
-rw-r--r--library/cpp/actors/interconnect/watchdog_timer.h13
-rw-r--r--library/cpp/actors/util/rc_buf.h7
-rw-r--r--library/cpp/charset/CMakeLists.darwin.txt2
-rw-r--r--library/cpp/charset/CMakeLists.linux-aarch64.txt2
-rw-r--r--library/cpp/charset/CMakeLists.linux.txt2
-rw-r--r--library/cpp/charset/iconv.cpp8
-rw-r--r--library/cpp/grpc/server/grpc_request.h6
-rw-r--r--library/cpp/grpc/server/grpc_request_base.h3
-rw-r--r--library/cpp/grpc/server/grpc_server.cpp37
-rw-r--r--library/cpp/grpc/server/grpc_server.h80
-rw-r--r--library/cpp/unified_agent_client/CMakeLists.darwin.txt63
-rw-r--r--library/cpp/unified_agent_client/CMakeLists.linux-aarch64.txt65
-rw-r--r--library/cpp/unified_agent_client/CMakeLists.linux.txt65
-rw-r--r--library/cpp/unified_agent_client/CMakeLists.txt15
-rw-r--r--library/cpp/unified_agent_client/async_joiner.h42
-rw-r--r--library/cpp/unified_agent_client/backend.cpp112
-rw-r--r--library/cpp/unified_agent_client/backend.h27
-rw-r--r--library/cpp/unified_agent_client/backend_creator.cpp63
-rw-r--r--library/cpp/unified_agent_client/backend_creator.h25
-rw-r--r--library/cpp/unified_agent_client/client.h256
-rw-r--r--library/cpp/unified_agent_client/client_impl.cpp1274
-rw-r--r--library/cpp/unified_agent_client/client_impl.h364
-rw-r--r--library/cpp/unified_agent_client/client_proto_weighing.h75
-rw-r--r--library/cpp/unified_agent_client/clock.cpp48
-rw-r--r--library/cpp/unified_agent_client/clock.h37
-rw-r--r--library/cpp/unified_agent_client/counters.cpp36
-rw-r--r--library/cpp/unified_agent_client/counters.h38
-rw-r--r--library/cpp/unified_agent_client/duration_counter.cpp41
-rw-r--r--library/cpp/unified_agent_client/duration_counter.h43
-rw-r--r--library/cpp/unified_agent_client/dynamic_counters_wrapper.h34
-rw-r--r--library/cpp/unified_agent_client/enum.h30
-rw-r--r--library/cpp/unified_agent_client/examples/ua_grpc_client/main.cpp122
-rw-r--r--library/cpp/unified_agent_client/f_maybe.h23
-rw-r--r--library/cpp/unified_agent_client/grpc_io.cpp161
-rw-r--r--library/cpp/unified_agent_client/grpc_io.h141
-rw-r--r--library/cpp/unified_agent_client/grpc_status_code.cpp56
-rw-r--r--library/cpp/unified_agent_client/helpers.cpp12
-rw-r--r--library/cpp/unified_agent_client/helpers.h9
-rw-r--r--library/cpp/unified_agent_client/logger.cpp130
-rw-r--r--library/cpp/unified_agent_client/logger.h157
-rw-r--r--library/cpp/unified_agent_client/proto/CMakeLists.darwin.txt45
-rw-r--r--library/cpp/unified_agent_client/proto/CMakeLists.linux-aarch64.txt46
-rw-r--r--library/cpp/unified_agent_client/proto/CMakeLists.linux.txt46
-rw-r--r--library/cpp/unified_agent_client/proto/CMakeLists.txt15
-rw-r--r--library/cpp/unified_agent_client/proto/unified_agent.proto101
-rw-r--r--library/cpp/unified_agent_client/proto_weighing.cpp99
-rw-r--r--library/cpp/unified_agent_client/proto_weighing.h138
-rw-r--r--library/cpp/unified_agent_client/registrar.cpp8
-rw-r--r--library/cpp/unified_agent_client/throttling.cpp67
-rw-r--r--library/cpp/unified_agent_client/throttling.h30
-rw-r--r--library/cpp/unified_agent_client/variant.h18
-rw-r--r--ydb/apps/dstool/lib/commands.py11
-rw-r--r--ydb/apps/dstool/lib/common.py28
-rw-r--r--ydb/apps/dstool/lib/dstool_cmd_cluster_workload_run.py3
-rw-r--r--ydb/apps/dstool/lib/dstool_cmd_group_decommit.py42
-rw-r--r--ydb/apps/dstool/lib/dstool_cmd_group_list.py42
-rw-r--r--ydb/apps/dstool/lib/dstool_cmd_group_virtual_create.py77
-rw-r--r--ydb/apps/dstool/lib/dstool_cmd_pdisk_list.py6
-rw-r--r--ydb/apps/dstool/lib/dstool_cmd_pool_create_virtual.py23
-rw-r--r--ydb/apps/ydbd/CMakeLists.darwin.txt1
-rw-r--r--ydb/apps/ydbd/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/apps/ydbd/CMakeLists.linux.txt1
-rw-r--r--ydb/apps/ydbd/log_backend.cpp31
-rw-r--r--ydb/apps/ydbd/log_backend.h13
-rw-r--r--ydb/apps/ydbd/main.cpp2
-rw-r--r--ydb/core/CMakeLists.txt1
-rw-r--r--ydb/core/audit/CMakeLists.darwin.txt3
-rw-r--r--ydb/core/audit/CMakeLists.linux-aarch64.txt3
-rw-r--r--ydb/core/audit/CMakeLists.linux.txt3
-rw-r--r--ydb/core/audit/audit_log.cpp11
-rw-r--r--ydb/core/audit/audit_log.h47
-rw-r--r--ydb/core/audit/audit_log_impl.cpp99
-rw-r--r--ydb/core/audit/audit_log_json_impl.cpp65
-rw-r--r--ydb/core/audit/audit_log_txt_impl.cpp62
-rw-r--r--ydb/core/base/appdata.h2
-rw-r--r--ydb/core/base/blobstorage.h24
-rw-r--r--ydb/core/base/feature_flags.h10
-rw-r--r--ydb/core/base/tablet.h9
-rw-r--r--ydb/core/base/tablet_pipecache.h13
-rw-r--r--ydb/core/base/ticket_parser.h11
-rw-r--r--ydb/core/blob_depot/CMakeLists.darwin.txt3
-rw-r--r--ydb/core/blob_depot/CMakeLists.linux-aarch64.txt3
-rw-r--r--ydb/core/blob_depot/CMakeLists.linux.txt3
-rw-r--r--ydb/core/blob_depot/agent.cpp50
-rw-r--r--ydb/core/blob_depot/agent/CMakeLists.darwin.txt2
-rw-r--r--ydb/core/blob_depot/agent/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/core/blob_depot/agent/CMakeLists.linux.txt2
-rw-r--r--ydb/core/blob_depot/agent/agent.cpp4
-rw-r--r--ydb/core/blob_depot/agent/agent_impl.h136
-rw-r--r--ydb/core/blob_depot/agent/blob_mapping_cache.cpp163
-rw-r--r--ydb/core/blob_depot/agent/blob_mapping_cache.h15
-rw-r--r--ydb/core/blob_depot/agent/blocks.cpp8
-rw-r--r--ydb/core/blob_depot/agent/channel_kind.cpp7
-rw-r--r--ydb/core/blob_depot/agent/comm.cpp28
-rw-r--r--ydb/core/blob_depot/agent/metrics.cpp16
-rw-r--r--ydb/core/blob_depot/agent/proxy.cpp43
-rw-r--r--ydb/core/blob_depot/agent/query.cpp36
-rw-r--r--ydb/core/blob_depot/agent/read.cpp174
-rw-r--r--ydb/core/blob_depot/agent/request.cpp27
-rw-r--r--ydb/core/blob_depot/agent/resolved_value.cpp66
-rw-r--r--ydb/core/blob_depot/agent/resolved_value.h47
-rw-r--r--ydb/core/blob_depot/agent/storage_discover.cpp70
-rw-r--r--ydb/core/blob_depot/agent/storage_get.cpp57
-rw-r--r--ydb/core/blob_depot/agent/storage_put.cpp19
-rw-r--r--ydb/core/blob_depot/agent/storage_range.cpp85
-rw-r--r--ydb/core/blob_depot/assimilator.cpp117
-rw-r--r--ydb/core/blob_depot/assimilator.h6
-rw-r--r--ydb/core/blob_depot/blob_depot.cpp37
-rw-r--r--ydb/core/blob_depot/blob_depot_tablet.h24
-rw-r--r--ydb/core/blob_depot/blocks.cpp5
-rw-r--r--ydb/core/blob_depot/closed_interval_set.h270
-rw-r--r--ydb/core/blob_depot/closed_interval_set_ut.cpp154
-rw-r--r--ydb/core/blob_depot/coro_tx.cpp200
-rw-r--r--ydb/core/blob_depot/coro_tx.h33
-rw-r--r--ydb/core/blob_depot/data.cpp96
-rw-r--r--ydb/core/blob_depot/data.h303
-rw-r--r--ydb/core/blob_depot/data_decommit.cpp366
-rw-r--r--ydb/core/blob_depot/data_load.cpp153
-rw-r--r--ydb/core/blob_depot/data_mon.cpp1
-rw-r--r--ydb/core/blob_depot/data_resolve.cpp410
-rw-r--r--ydb/core/blob_depot/events.h2
-rw-r--r--ydb/core/blob_depot/garbage_collection.cpp10
-rw-r--r--ydb/core/blob_depot/given_id_range_ut.cpp177
-rw-r--r--ydb/core/blob_depot/group_metrics_exchange.cpp53
-rw-r--r--ydb/core/blob_depot/op_commit_blob_seq.cpp17
-rw-r--r--ydb/core/blob_depot/space_monitor.cpp32
-rw-r--r--ydb/core/blob_depot/space_monitor.h4
-rw-r--r--ydb/core/blob_depot/types.h21
-rw-r--r--ydb/core/blob_depot/ut/CMakeLists.darwin.txt44
-rw-r--r--ydb/core/blob_depot/ut/CMakeLists.linux-aarch64.txt47
-rw-r--r--ydb/core/blob_depot/ut/CMakeLists.linux.txt49
-rw-r--r--ydb/core/blob_depot/ut/CMakeLists.txt15
-rw-r--r--ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp4
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy.h50
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_assimilate.cpp4
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_block.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_collect.cpp4
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_discover_m3dc.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_discover_m3of4.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_get.cpp4
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_get_impl.h11
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_impl.h1
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_indexrestoreget.cpp4
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_multicollect.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_multiget.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp6
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_put.cpp8
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_put_impl.h9
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_range.cpp10
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_request.cpp1
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_status.cpp2
-rw-r--r--ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.cpp25
-rw-r--r--ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp2
-rw-r--r--ydb/core/blobstorage/nodewarden/node_warden_impl.cpp29
-rw-r--r--ydb/core/blobstorage/nodewarden/node_warden_impl.h3
-rw-r--r--ydb/core/blobstorage/nodewarden/node_warden_pdisk.cpp10
-rw-r--r--ydb/core/blobstorage/nodewarden/node_warden_pipe.cpp2
-rw-r--r--ydb/core/blobstorage/nodewarden/node_warden_proxy.cpp5
-rw-r--r--ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp18
-rw-r--r--ydb/core/blobstorage/pdisk/blobstorage_pdisk_config.h12
-rw-r--r--ydb/core/blobstorage/testing/group_overseer/group_state.cpp102
-rw-r--r--ydb/core/blobstorage/testing/group_overseer/group_state.h1
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/CMakeLists.darwin.txt4
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux-aarch64.txt4
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux.txt4
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/assimilation.cpp3
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp2
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/defrag.cpp38
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/race.cpp4
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp7
-rw-r--r--ydb/core/blobstorage/ut_blobstorage/sync.cpp2
-rw-r--r--ydb/core/blobstorage/ut_testshard/main.cpp6
-rw-r--r--ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugerecovery.cpp23
-rw-r--r--ydb/core/blobstorage/vdisk/query/assimilation.cpp14
-rw-r--r--ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp24
-rw-r--r--ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine.h35
-rw-r--r--ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine_ut.cpp4
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/blobstorage_db.h4
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp9
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor.cpp97
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor_ut.cpp88
-rw-r--r--ydb/core/blobstorage/vdisk/syncer/syncer_job_task.cpp2
-rw-r--r--ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp2
-rw-r--r--ydb/core/client/client_ut.cpp3
-rw-r--r--ydb/core/client/flat_ut.cpp22
-rw-r--r--ydb/core/client/server/msgbus_server_db.cpp4
-rw-r--r--ydb/core/client/server/msgbus_server_persqueue.cpp49
-rw-r--r--ydb/core/client/server/msgbus_server_persqueue.h15
-rw-r--r--ydb/core/client/server/msgbus_server_pq_metacache.cpp213
-rw-r--r--ydb/core/client/server/msgbus_server_pq_metacache.h17
-rw-r--r--ydb/core/client/server/msgbus_server_pq_metarequest.cpp31
-rw-r--r--ydb/core/cms/cms.cpp18
-rw-r--r--ydb/core/cms/cms_impl.h2
-rw-r--r--ydb/core/cms/cms_ut.cpp77
-rw-r--r--ydb/core/cms/cms_ut_common.cpp3
-rw-r--r--ydb/core/cms/console/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/cms/console/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/cms/console/CMakeLists.linux.txt1
-rw-r--r--ydb/core/cms/console/configs_dispatcher.cpp20
-rw-r--r--ydb/core/cms/console/configs_dispatcher.h2
-rw-r--r--ydb/core/cms/console/console__remove_tenant.cpp2
-rw-r--r--ydb/core/cms/console/console_ut_tenants.cpp474
-rw-r--r--ydb/core/cms/console/grpc_library_helper.cpp45
-rw-r--r--ydb/core/cms/console/grpc_library_helper.h12
-rw-r--r--ydb/core/cms/console/http.cpp20
-rw-r--r--ydb/core/cms/console/log_settings_configurator.cpp5
-rw-r--r--ydb/core/cms/console/logger.cpp2
-rw-r--r--ydb/core/cms/console/shared_cache_configurator.cpp13
-rw-r--r--ydb/core/cms/erasure_checkers.cpp63
-rw-r--r--ydb/core/cms/erasure_checkers.h18
-rw-r--r--ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp13
-rw-r--r--ydb/core/driver_lib/run/CMakeLists.darwin.txt2
-rw-r--r--ydb/core/driver_lib/run/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/core/driver_lib/run/CMakeLists.linux.txt2
-rw-r--r--ydb/core/driver_lib/run/config.h2
-rw-r--r--ydb/core/driver_lib/run/config_parser.cpp1
-rw-r--r--ydb/core/driver_lib/run/factories.h5
-rw-r--r--ydb/core/driver_lib/run/kikimr_services_initializers.cpp342
-rw-r--r--ydb/core/driver_lib/run/kikimr_services_initializers.h10
-rw-r--r--ydb/core/driver_lib/run/log_backend.cpp32
-rw-r--r--ydb/core/driver_lib/run/log_backend.h29
-rw-r--r--ydb/core/driver_lib/run/run.cpp90
-rw-r--r--ydb/core/driver_lib/run/version.cpp5
-rw-r--r--ydb/core/engine/minikql/change_collector_iface.h41
-rw-r--r--ydb/core/engine/minikql/minikql_engine_host.cpp61
-rw-r--r--ydb/core/engine/minikql/minikql_engine_host.h7
-rw-r--r--ydb/core/engine/mkql_proto.cpp159
-rw-r--r--ydb/core/engine/mkql_proto.h2
-rw-r--r--ydb/core/formats/arrow_helpers.cpp37
-rw-r--r--ydb/core/formats/arrow_helpers.h14
-rw-r--r--ydb/core/formats/program.cpp11
-rw-r--r--ydb/core/formats/ssa_runtime_version.h6
-rw-r--r--ydb/core/formats/ut_program_step.cpp317
-rw-r--r--ydb/core/grpc_services/base/base.h67
-rw-r--r--ydb/core/grpc_services/base/base_service.h51
-rw-r--r--ydb/core/grpc_services/cancelation/cancelation.cpp9
-rw-r--r--ydb/core/grpc_services/cancelation/cancelation.h2
-rw-r--r--ydb/core/grpc_services/cancelation/cancelation_event.h8
-rw-r--r--ydb/core/grpc_services/cancelation/protos/event.proto3
-rw-r--r--ydb/core/grpc_services/grpc_request_check_actor.h22
-rw-r--r--ydb/core/grpc_services/grpc_request_proxy.cpp11
-rw-r--r--ydb/core/grpc_services/grpc_request_proxy.h14
-rw-r--r--ydb/core/grpc_services/grpc_request_proxy_simple.cpp2
-rw-r--r--ydb/core/grpc_services/local_rate_limiter.cpp2
-rw-r--r--ydb/core/grpc_services/local_rpc/local_rpc.h19
-rw-r--r--ydb/core/grpc_services/query/rpc_execute_query.cpp4
-rw-r--r--ydb/core/grpc_services/rpc_alter_table.cpp4
-rw-r--r--ydb/core/grpc_services/rpc_calls.cpp4
-rw-r--r--ydb/core/grpc_services/rpc_calls.h1
-rw-r--r--ydb/core/grpc_services/rpc_cms.cpp4
-rw-r--r--ydb/core/grpc_services/rpc_common.h8
-rw-r--r--ydb/core/grpc_services/rpc_create_session.cpp2
-rw-r--r--ydb/core/grpc_services/rpc_execute_data_query.cpp105
-rw-r--r--ydb/core/grpc_services/rpc_fq.cpp2
-rw-r--r--ydb/core/grpc_services/rpc_fq_internal.cpp2
-rw-r--r--ydb/core/grpc_services/rpc_get_operation.cpp2
-rw-r--r--ydb/core/grpc_services/rpc_get_shard_locations.cpp4
-rw-r--r--ydb/core/grpc_services/rpc_kh_describe.cpp6
-rw-r--r--ydb/core/grpc_services/rpc_kh_snapshots.cpp6
-rw-r--r--ydb/core/grpc_services/rpc_kqp_base.h4
-rw-r--r--ydb/core/grpc_services/rpc_load_rows.cpp8
-rw-r--r--ydb/core/grpc_services/rpc_long_tx.cpp135
-rw-r--r--ydb/core/grpc_services/rpc_read_columns.cpp6
-rw-r--r--ydb/core/grpc_services/rpc_read_table.cpp241
-rw-r--r--ydb/core/grpc_services/rpc_request_base.h2
-rw-r--r--ydb/core/grpc_services/rpc_scheme_base.h2
-rw-r--r--ydb/core/grpc_services/rpc_yq.cpp2
-rw-r--r--ydb/core/health_check/health_check.cpp28
-rw-r--r--ydb/core/health_check/health_check_ut.cpp22
-rw-r--r--ydb/core/http_proxy/CMakeLists.darwin.txt2
-rw-r--r--ydb/core/http_proxy/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/core/http_proxy/CMakeLists.linux.txt2
-rw-r--r--ydb/core/http_proxy/custom_metrics.h2
-rw-r--r--ydb/core/http_proxy/events.h13
-rw-r--r--ydb/core/http_proxy/exceptions_mapping.cpp175
-rw-r--r--ydb/core/http_proxy/exceptions_mapping.h24
-rw-r--r--ydb/core/http_proxy/http_req.cpp192
-rw-r--r--ydb/core/http_proxy/http_req.h15
-rw-r--r--ydb/core/http_proxy/http_service.cpp4
-rw-r--r--ydb/core/http_proxy/json_proto_conversion.h18
-rw-r--r--ydb/core/io_formats/csv_arrow.cpp8
-rw-r--r--ydb/core/kqp/common/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/kqp/common/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/kqp/common/CMakeLists.linux.txt1
-rw-r--r--ydb/core/kqp/common/kqp.h253
-rw-r--r--ydb/core/kqp/common/kqp_event_impl.cpp95
-rw-r--r--ydb/core/kqp/common/kqp_prepared_query.cpp5
-rw-r--r--ydb/core/kqp/common/kqp_prepared_query.h8
-rw-r--r--ydb/core/kqp/common/kqp_yql.h2
-rw-r--r--ydb/core/kqp/compile_service/kqp_compile_actor.cpp16
-rw-r--r--ydb/core/kqp/compile_service/kqp_compile_request.cpp33
-rw-r--r--ydb/core/kqp/compile_service/kqp_compile_service.cpp35
-rw-r--r--ydb/core/kqp/compile_service/kqp_compile_service.h5
-rw-r--r--ydb/core/kqp/compute_actor/kqp_compute_actor.cpp6
-rw-r--r--ydb/core/kqp/compute_actor/kqp_compute_actor.h2
-rw-r--r--ydb/core/kqp/compute_actor/kqp_compute_actor_helpers.cpp33
-rw-r--r--ydb/core/kqp/compute_actor/kqp_compute_actor_impl.h5
-rw-r--r--ydb/core/kqp/compute_actor/kqp_pure_compute_actor.cpp5
-rw-r--r--ydb/core/kqp/compute_actor/kqp_scan_compute_actor.cpp7
-rw-r--r--ydb/core/kqp/compute_actor/kqp_scan_compute_manager.cpp2
-rw-r--r--ydb/core/kqp/compute_actor/kqp_scan_compute_manager.h9
-rw-r--r--ydb/core/kqp/compute_actor/kqp_scan_compute_stat.h2
-rw-r--r--ydb/core/kqp/counters/kqp_counters.cpp43
-rw-r--r--ydb/core/kqp/counters/kqp_counters.h19
-rw-r--r--ydb/core/kqp/executer_actor/kqp_data_executer.cpp204
-rw-r--r--ydb/core/kqp/executer_actor/kqp_executer.h3
-rw-r--r--ydb/core/kqp/executer_actor/kqp_executer_impl.cpp44
-rw-r--r--ydb/core/kqp/executer_actor/kqp_executer_impl.h154
-rw-r--r--ydb/core/kqp/executer_actor/kqp_executer_stats.cpp7
-rw-r--r--ydb/core/kqp/executer_actor/kqp_literal_executer.cpp5
-rw-r--r--ydb/core/kqp/executer_actor/kqp_locks_helper.cpp45
-rw-r--r--ydb/core/kqp/executer_actor/kqp_locks_helper.h2
-rw-r--r--ydb/core/kqp/executer_actor/kqp_partition_helper.cpp15
-rw-r--r--ydb/core/kqp/executer_actor/kqp_planner.cpp370
-rw-r--r--ydb/core/kqp/executer_actor/kqp_planner.h66
-rw-r--r--ydb/core/kqp/executer_actor/kqp_planner_strategy.cpp8
-rw-r--r--ydb/core/kqp/executer_actor/kqp_planner_strategy.h2
-rw-r--r--ydb/core/kqp/executer_actor/kqp_scan_executer.cpp86
-rw-r--r--ydb/core/kqp/executer_actor/kqp_table_resolver.cpp12
-rw-r--r--ydb/core/kqp/executer_actor/kqp_table_resolver.h3
-rw-r--r--ydb/core/kqp/executer_actor/kqp_tasks_graph.cpp20
-rw-r--r--ydb/core/kqp/gateway/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/kqp/gateway/CMakeLists.linux.txt1
-rw-r--r--ydb/core/kqp/gateway/kqp_gateway.h6
-rw-r--r--ydb/core/kqp/gateway/kqp_ic_gateway.cpp146
-rw-r--r--ydb/core/kqp/gateway/kqp_metadata_loader.cpp20
-rw-r--r--ydb/core/kqp/gateway/kqp_metadata_loader.h8
-rw-r--r--ydb/core/kqp/host/kqp_type_ann.cpp2
-rw-r--r--ydb/core/kqp/node_service/kqp_node_service.cpp46
-rw-r--r--ydb/core/kqp/node_service/kqp_node_state.h90
-rw-r--r--ydb/core/kqp/opt/kqp_opt.cpp6
-rw-r--r--ydb/core/kqp/opt/kqp_opt_kql.cpp6
-rw-r--r--ydb/core/kqp/opt/logical/kqp_opt_log.cpp19
-rw-r--r--ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp10
-rw-r--r--ydb/core/kqp/opt/logical/kqp_opt_log_join.cpp84
-rw-r--r--ydb/core/kqp/opt/logical/kqp_opt_log_ranges.cpp106
-rw-r--r--ydb/core/kqp/opt/logical/kqp_opt_log_rules.h3
-rw-r--r--ydb/core/kqp/opt/logical/kqp_opt_log_sqlin.cpp2
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy.cpp17
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp86
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_helpers.cpp83
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_impl.h6
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp86
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp207
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp49
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_rules.h7
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_sort.cpp135
-rw-r--r--ydb/core/kqp/provider/yql_kikimr_datasource.cpp3
-rw-r--r--ydb/core/kqp/provider/yql_kikimr_exec.cpp13
-rw-r--r--ydb/core/kqp/provider/yql_kikimr_gateway.h4
-rw-r--r--ydb/core/kqp/provider/yql_kikimr_settings.cpp2
-rw-r--r--ydb/core/kqp/provider/yql_kikimr_settings.h8
-rw-r--r--ydb/core/kqp/provider/yql_kikimr_type_ann.cpp2
-rw-r--r--ydb/core/kqp/proxy_service/kqp_proxy_service.cpp143
-rw-r--r--ydb/core/kqp/proxy_service/kqp_proxy_service.h1
-rw-r--r--ydb/core/kqp/query_compiler/kqp_query_compiler.cpp47
-rw-r--r--ydb/core/kqp/rm_service/kqp_rm_service.cpp58
-rw-r--r--ydb/core/kqp/runtime/kqp_read_actor.cpp912
-rw-r--r--ydb/core/kqp/runtime/kqp_read_actor.h14
-rw-r--r--ydb/core/kqp/runtime/kqp_scan_data.cpp10
-rw-r--r--ydb/core/kqp/runtime/kqp_scan_data.h2
-rw-r--r--ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp527
-rw-r--r--ydb/core/kqp/runtime/kqp_stream_lookup_actor.h4
-rw-r--r--ydb/core/kqp/runtime/kqp_stream_lookup_factory.cpp6
-rw-r--r--ydb/core/kqp/runtime/kqp_stream_lookup_factory.h3
-rw-r--r--ydb/core/kqp/session_actor/kqp_session_actor.cpp770
-rw-r--r--ydb/core/kqp/session_actor/kqp_tx.cpp58
-rw-r--r--ydb/core/kqp/session_actor/kqp_tx.h126
-rw-r--r--ydb/core/kqp/session_actor/kqp_worker_actor.cpp6
-rw-r--r--ydb/core/kqp/session_actor/kqp_worker_common.cpp19
-rw-r--r--ydb/core/kqp/session_actor/kqp_worker_common.h3
-rw-r--r--ydb/core/kqp/ut/common/kqp_ut_common.cpp33
-rw-r--r--ydb/core/kqp/ut/common/kqp_ut_common.h1
-rw-r--r--ydb/core/kqp/ut/effects/kqp_immediate_effects_ut.cpp38
-rw-r--r--ydb/core/kqp/ut/effects/kqp_inplace_update_ut.cpp21
-rw-r--r--ydb/core/kqp/ut/indexes/kqp_indexes_multishard_ut.cpp61
-rw-r--r--ydb/core/kqp/ut/indexes/kqp_indexes_ut.cpp237
-rw-r--r--ydb/core/kqp/ut/join/kqp_index_lookup_join_ut.cpp17
-rw-r--r--ydb/core/kqp/ut/join/kqp_join_ut.cpp34
-rw-r--r--ydb/core/kqp/ut/olap/kqp_olap_ut.cpp691
-rw-r--r--ydb/core/kqp/ut/opt/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/kqp/ut/opt/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/kqp/ut/opt/CMakeLists.linux.txt1
-rw-r--r--ydb/core/kqp/ut/opt/kqp_agg_ut.cpp94
-rw-r--r--ydb/core/kqp/ut/opt/kqp_merge_ut.cpp7
-rw-r--r--ydb/core/kqp/ut/opt/kqp_ne_ut.cpp360
-rw-r--r--ydb/core/kqp/ut/opt/kqp_ranges_ut.cpp36
-rw-r--r--ydb/core/kqp/ut/opt/kqp_sort_ut.cpp26
-rw-r--r--ydb/core/kqp/ut/opt/kqp_sqlin_ut.cpp37
-rw-r--r--ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp26
-rw-r--r--ydb/core/kqp/ut/query/kqp_explain_ut.cpp86
-rw-r--r--ydb/core/kqp/ut/query/kqp_limits_ut.cpp44
-rw-r--r--ydb/core/kqp/ut/query/kqp_query_ut.cpp56
-rw-r--r--ydb/core/kqp/ut/query/kqp_stats_ut.cpp47
-rw-r--r--ydb/core/kqp/ut/scan/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/kqp/ut/scan/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/kqp/ut/scan/CMakeLists.linux.txt1
-rw-r--r--ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp4
-rw-r--r--ydb/core/kqp/ut/scan/kqp_scan_ut.cpp42
-rw-r--r--ydb/core/kqp/ut/scan/kqp_split_ut.cpp646
-rw-r--r--ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp29
-rw-r--r--ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp15
-rw-r--r--ydb/core/kqp/ut/sysview/kqp_sys_view_ut.cpp22
-rw-r--r--ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp46
-rw-r--r--ydb/core/kqp/ut/tx/kqp_tx_ut.cpp20
-rw-r--r--ydb/core/load_test/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/load_test/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/load_test/CMakeLists.linux.txt1
-rw-r--r--ydb/core/log_backend/CMakeLists.darwin.txt23
-rw-r--r--ydb/core/log_backend/CMakeLists.linux-aarch64.txt24
-rw-r--r--ydb/core/log_backend/CMakeLists.linux.txt24
-rw-r--r--ydb/core/log_backend/CMakeLists.txt15
-rw-r--r--ydb/core/log_backend/log_backend.cpp141
-rw-r--r--ydb/core/log_backend/log_backend.h22
-rw-r--r--ydb/core/log_backend/log_backend_build.cpp51
-rw-r--r--ydb/core/log_backend/log_backend_build.h21
-rw-r--r--ydb/core/mind/bscontroller/bsc.cpp20
-rw-r--r--ydb/core/mind/bscontroller/cmds_box.cpp3
-rw-r--r--ydb/core/mind/bscontroller/cmds_drive_status.cpp226
-rw-r--r--ydb/core/mind/bscontroller/cmds_storage_pool.cpp142
-rw-r--r--ydb/core/mind/bscontroller/config.cpp119
-rw-r--r--ydb/core/mind/bscontroller/config.h6
-rw-r--r--ydb/core/mind/bscontroller/config_fit_groups.cpp76
-rw-r--r--ydb/core/mind/bscontroller/config_fit_pdisks.cpp505
-rw-r--r--ydb/core/mind/bscontroller/error.h1
-rw-r--r--ydb/core/mind/bscontroller/impl.h42
-rw-r--r--ydb/core/mind/bscontroller/load_everything.cpp27
-rw-r--r--ydb/core/mind/bscontroller/monitoring.cpp22
-rw-r--r--ydb/core/mind/bscontroller/register_node.cpp119
-rw-r--r--ydb/core/mind/bscontroller/scheme.h5
-rw-r--r--ydb/core/mind/bscontroller/self_heal.cpp2
-rw-r--r--ydb/core/mind/bscontroller/storage_stats_calculator.cpp2
-rw-r--r--ydb/core/mind/bscontroller/ut_bscontroller/main.cpp25
-rw-r--r--ydb/core/mind/bscontroller/virtual_group.cpp194
-rw-r--r--ydb/core/mind/hive/monitoring.cpp67
-rw-r--r--ydb/core/mind/local.cpp2
-rw-r--r--ydb/core/mon/mon.cpp2
-rw-r--r--ydb/core/node_whiteboard/node_whiteboard.h3
-rw-r--r--ydb/core/persqueue/CMakeLists.darwin.txt3
-rw-r--r--ydb/core/persqueue/CMakeLists.linux-aarch64.txt3
-rw-r--r--ydb/core/persqueue/CMakeLists.linux.txt3
-rw-r--r--ydb/core/persqueue/events/global.h3
-rw-r--r--ydb/core/persqueue/events/internal.h31
-rw-r--r--ydb/core/persqueue/partition.cpp505
-rw-r--r--ydb/core/persqueue/partition.h65
-rw-r--r--ydb/core/persqueue/partition_types.h10
-rw-r--r--ydb/core/persqueue/pq_impl.cpp34
-rw-r--r--ydb/core/persqueue/pq_impl.h3
-rw-r--r--ydb/core/persqueue/quota_tracker.cpp52
-rw-r--r--ydb/core/persqueue/quota_tracker.h29
-rw-r--r--ydb/core/persqueue/read_balancer.cpp323
-rw-r--r--ydb/core/persqueue/read_balancer.h115
-rw-r--r--ydb/core/persqueue/type_codecs_defs.h4
-rw-r--r--ydb/core/persqueue/type_coders.h2
-rw-r--r--ydb/core/persqueue/user_info.cpp31
-rw-r--r--ydb/core/persqueue/user_info.h198
-rw-r--r--ydb/core/persqueue/ut/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/persqueue/ut/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/persqueue/ut/CMakeLists.linux.txt1
-rw-r--r--ydb/core/persqueue/ut/common/pq_ut_common.cpp65
-rw-r--r--ydb/core/persqueue/ut/common/pq_ut_common.h48
-rw-r--r--ydb/core/persqueue/ut/counters_ut.cpp46
-rw-r--r--ydb/core/persqueue/ut/make_config.cpp38
-rw-r--r--ydb/core/persqueue/ut/partition_ut.cpp1058
-rw-r--r--ydb/core/persqueue/ut/quota_tracker_ut.cpp54
-rw-r--r--ydb/core/persqueue/ut/resources/counters_datastreams.html16
-rw-r--r--ydb/core/persqueue/ut/user_action_processor_ut.cpp1
-rw-r--r--ydb/core/persqueue/utils.cpp22
-rw-r--r--ydb/core/persqueue/utils.h10
-rw-r--r--ydb/core/protos/blob_depot.proto8
-rw-r--r--ydb/core/protos/blobstorage.proto13
-rw-r--r--ydb/core/protos/blobstorage_config.proto24
-rw-r--r--ydb/core/protos/blockstore_config.proto8
-rw-r--r--ydb/core/protos/config.proto80
-rw-r--r--ydb/core/protos/counters_bs_controller.proto2
-rw-r--r--ydb/core/protos/counters_datashard.proto3
-rw-r--r--ydb/core/protos/counters_schemeshard.proto37
-rw-r--r--ydb/core/protos/counters_testshard.proto1
-rw-r--r--ydb/core/protos/flat_tx_scheme.proto1
-rw-r--r--ydb/core/protos/kqp.proto6
-rw-r--r--ydb/core/protos/kqp_stats.proto5
-rw-r--r--ydb/core/protos/msgbus_pq.proto1
-rw-r--r--ydb/core/protos/node_whiteboard.proto1
-rw-r--r--ydb/core/protos/out/out.cpp4
-rw-r--r--ydb/core/protos/pqconfig.proto26
-rw-r--r--ydb/core/protos/services.proto12
-rw-r--r--ydb/core/protos/ssa.proto6
-rw-r--r--ydb/core/protos/stream.proto2
-rw-r--r--ydb/core/protos/subdomains.proto9
-rw-r--r--ydb/core/protos/tx_columnshard.proto7
-rw-r--r--ydb/core/protos/tx_datashard.proto62
-rw-r--r--ydb/core/protos/tx_proxy.proto1
-rw-r--r--ydb/core/public_http/CMakeLists.darwin.txt2
-rw-r--r--ydb/core/public_http/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/core/public_http/CMakeLists.linux.txt2
-rw-r--r--ydb/core/public_http/grpc_request_context_wrapper.h1
-rw-r--r--ydb/core/public_http/http_req.cpp88
-rw-r--r--ydb/core/security/secure_request.h13
-rw-r--r--ydb/core/security/ticket_parser_impl.h69
-rw-r--r--ydb/core/sys_view/processor/db_counters.cpp25
-rw-r--r--ydb/core/sys_view/service/sysview_service.cpp3
-rw-r--r--ydb/core/sys_view/ut_common.cpp4
-rw-r--r--ydb/core/sys_view/ut_common.h13
-rw-r--r--ydb/core/sys_view/ut_kqp.cpp12
-rw-r--r--ydb/core/sys_view/ut_labeled.cpp98
-rw-r--r--ydb/core/tablet/labeled_counters_merger.h16
-rw-r--r--ydb/core/tablet/private/labeled_db_counters.cpp12
-rw-r--r--ydb/core/tablet/private/labeled_db_counters.h29
-rw-r--r--ydb/core/tablet/resource_broker.cpp10
-rw-r--r--ydb/core/tablet/tablet_pipecache.cpp13
-rw-r--r--ydb/core/tablet/tablet_sys.cpp4
-rw-r--r--ydb/core/tablet_flat/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/tablet_flat/CMakeLists.linux.txt1
-rw-r--r--ydb/core/tablet_flat/flat_cxx_database.h4
-rw-r--r--ydb/core/tablet_flat/flat_database.cpp16
-rw-r--r--ydb/core/tablet_flat/flat_database.h21
-rw-r--r--ydb/core/tablet_flat/flat_dbase_apply.cpp47
-rw-r--r--ydb/core/tablet_flat/flat_executor.cpp203
-rw-r--r--ydb/core/tablet_flat/flat_executor.h11
-rw-r--r--ydb/core/tablet_flat/flat_mem_warm.h6
-rw-r--r--ydb/core/tablet_flat/ut/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/tablet_flat/ut/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/tablet_flat/ut/CMakeLists.linux.txt1
-rw-r--r--ydb/core/tablet_flat/ut_util/CMakeLists.darwin.txt43
-rw-r--r--ydb/core/tablet_flat/ut_util/CMakeLists.linux-aarch64.txt46
-rw-r--r--ydb/core/tablet_flat/ut_util/CMakeLists.linux.txt48
-rw-r--r--ydb/core/tablet_flat/ut_util/CMakeLists.txt15
-rw-r--r--ydb/core/tablet_flat/util_pool.h18
-rw-r--r--ydb/core/tablet_flat/util_pool_ut.cpp19
-rw-r--r--ydb/core/test_tablet/load_actor_read_validate.cpp5
-rw-r--r--ydb/core/test_tablet/test_shard_impl.h3
-rw-r--r--ydb/core/testlib/actors/test_runtime.cpp11
-rw-r--r--ydb/core/testlib/actors/test_runtime.h3
-rw-r--r--ydb/core/testlib/basics/appdata.cpp9
-rw-r--r--ydb/core/testlib/basics/feature_flags.h16
-rw-r--r--ydb/core/testlib/cs_helper.cpp56
-rw-r--r--ydb/core/testlib/cs_helper.h20
-rw-r--r--ydb/core/testlib/tenant_runtime.cpp2
-rw-r--r--ydb/core/testlib/test_client.cpp122
-rw-r--r--ydb/core/testlib/test_client.h2
-rw-r--r--ydb/core/tx/columnshard/blob.h24
-rw-r--r--ydb/core/tx/columnshard/blob_cache.cpp305
-rw-r--r--ydb/core/tx/columnshard/blob_cache.h12
-rw-r--r--ydb/core/tx/columnshard/blob_manager.cpp32
-rw-r--r--ydb/core/tx/columnshard/blob_manager.h8
-rw-r--r--ydb/core/tx/columnshard/blob_manager_db.cpp20
-rw-r--r--ydb/core/tx/columnshard/columnshard.cpp16
-rw-r--r--ydb/core/tx/columnshard/columnshard.h53
-rw-r--r--ydb/core/tx/columnshard/columnshard__export.cpp73
-rw-r--r--ydb/core/tx/columnshard/columnshard__forget.cpp6
-rw-r--r--ydb/core/tx/columnshard/columnshard__init.cpp44
-rw-r--r--ydb/core/tx/columnshard/columnshard__progress_tx.cpp97
-rw-r--r--ydb/core/tx/columnshard/columnshard__propose_transaction.cpp18
-rw-r--r--ydb/core/tx/columnshard/columnshard__read_blob_ranges.cpp14
-rw-r--r--ydb/core/tx/columnshard/columnshard__scan.cpp12
-rw-r--r--ydb/core/tx/columnshard/columnshard__write.cpp41
-rw-r--r--ydb/core/tx/columnshard/columnshard__write_index.cpp126
-rw-r--r--ydb/core/tx/columnshard/columnshard_common.cpp59
-rw-r--r--ydb/core/tx/columnshard/columnshard_impl.cpp106
-rw-r--r--ydb/core/tx/columnshard/columnshard_impl.h18
-rw-r--r--ydb/core/tx/columnshard/columnshard_private_events.h42
-rw-r--r--ydb/core/tx/columnshard/columnshard_ut_common.h11
-rw-r--r--ydb/core/tx/columnshard/compaction_actor.cpp2
-rw-r--r--ydb/core/tx/columnshard/defs.h1
-rw-r--r--ydb/core/tx/columnshard/engines/column_engine.h12
-rw-r--r--ydb/core/tx/columnshard/engines/column_engine_logs.cpp92
-rw-r--r--ydb/core/tx/columnshard/engines/column_engine_logs.h20
-rw-r--r--ydb/core/tx/columnshard/engines/index_info.cpp4
-rw-r--r--ydb/core/tx/columnshard/engines/indexed_read_data.cpp187
-rw-r--r--ydb/core/tx/columnshard/engines/indexed_read_data.h15
-rw-r--r--ydb/core/tx/columnshard/engines/portion_info.h12
-rw-r--r--ydb/core/tx/columnshard/engines/tier_info.h16
-rw-r--r--ydb/core/tx/columnshard/engines/ut_logs_engine.cpp26
-rw-r--r--ydb/core/tx/columnshard/eviction_actor.cpp2
-rw-r--r--ydb/core/tx/columnshard/export_actor.cpp6
-rw-r--r--ydb/core/tx/columnshard/indexing_actor.cpp7
-rw-r--r--ydb/core/tx/columnshard/inflight_request_tracker.h7
-rw-r--r--ydb/core/tx/columnshard/read_actor.cpp2
-rw-r--r--ydb/core/tx/columnshard/ut_rw/ut_columnshard_read_write.cpp206
-rw-r--r--ydb/core/tx/columnshard/ut_schema/ut_columnshard_schema.cpp165
-rw-r--r--ydb/core/tx/datashard/CMakeLists.darwin.txt4
-rw-r--r--ydb/core/tx/datashard/CMakeLists.linux-aarch64.txt4
-rw-r--r--ydb/core/tx/datashard/CMakeLists.linux.txt4
-rw-r--r--ydb/core/tx/datashard/alter_cdc_stream_unit.cpp9
-rw-r--r--ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp28
-rw-r--r--ydb/core/tx/datashard/build_index.cpp (renamed from ydb/core/tx/datashard/datashard__build_index.cpp)20
-rw-r--r--ydb/core/tx/datashard/build_index.h (renamed from ydb/core/tx/datashard/datashard_build_index.h)6
-rw-r--r--ydb/core/tx/datashard/cdc_stream_scan.cpp689
-rw-r--r--ydb/core/tx/datashard/cdc_stream_scan.h63
-rw-r--r--ydb/core/tx/datashard/change_collector.cpp179
-rw-r--r--ydb/core/tx/datashard/change_collector.h23
-rw-r--r--ydb/core/tx/datashard/change_collector_async_index.cpp30
-rw-r--r--ydb/core/tx/datashard/change_collector_async_index.h7
-rw-r--r--ydb/core/tx/datashard/change_collector_base.cpp170
-rw-r--r--ydb/core/tx/datashard/change_collector_base.h67
-rw-r--r--ydb/core/tx/datashard/change_collector_cdc_stream.cpp184
-rw-r--r--ydb/core/tx/datashard/change_collector_cdc_stream.h12
-rw-r--r--ydb/core/tx/datashard/change_record.cpp6
-rw-r--r--ydb/core/tx/datashard/change_record.h6
-rw-r--r--ydb/core/tx/datashard/change_record_body_serializer.cpp94
-rw-r--r--ydb/core/tx/datashard/change_record_body_serializer.h29
-rw-r--r--ydb/core/tx/datashard/check_data_tx_unit.cpp2
-rw-r--r--ydb/core/tx/datashard/check_scheme_tx_unit.cpp2
-rw-r--r--ydb/core/tx/datashard/create_cdc_stream_unit.cpp8
-rw-r--r--ydb/core/tx/datashard/datashard.cpp254
-rw-r--r--ydb/core/tx/datashard/datashard.h52
-rw-r--r--ydb/core/tx/datashard/datashard__engine_host.cpp215
-rw-r--r--ydb/core/tx/datashard/datashard__engine_host.h8
-rw-r--r--ydb/core/tx/datashard/datashard__init.cpp11
-rw-r--r--ydb/core/tx/datashard/datashard__kqp_scan.cpp7
-rw-r--r--ydb/core/tx/datashard/datashard__monitoring.cpp11
-rw-r--r--ydb/core/tx/datashard/datashard__read_columns.cpp9
-rw-r--r--ydb/core/tx/datashard/datashard__read_iterator.cpp450
-rw-r--r--ydb/core/tx/datashard/datashard_active_transaction.h6
-rw-r--r--ydb/core/tx/datashard/datashard_common_upload.cpp13
-rw-r--r--ydb/core/tx/datashard/datashard_common_upload.h7
-rw-r--r--ydb/core/tx/datashard/datashard_direct_erase.cpp13
-rw-r--r--ydb/core/tx/datashard/datashard_direct_erase.h9
-rw-r--r--ydb/core/tx/datashard/datashard_direct_transaction.cpp2
-rw-r--r--ydb/core/tx/datashard/datashard_direct_transaction.h4
-rw-r--r--ydb/core/tx/datashard/datashard_direct_upload.cpp2
-rw-r--r--ydb/core/tx/datashard/datashard_direct_upload.h2
-rw-r--r--ydb/core/tx/datashard/datashard_impl.h143
-rw-r--r--ydb/core/tx/datashard/datashard_kqp.cpp13
-rw-r--r--ydb/core/tx/datashard/datashard_kqp.h2
-rw-r--r--ydb/core/tx/datashard/datashard_kqp_compute.cpp3
-rw-r--r--ydb/core/tx/datashard/datashard_kqp_compute.h5
-rw-r--r--ydb/core/tx/datashard/datashard_kqp_lookup_table.cpp6
-rw-r--r--ydb/core/tx/datashard/datashard_kqp_read_table.cpp6
-rw-r--r--ydb/core/tx/datashard/datashard_pipeline.cpp52
-rw-r--r--ydb/core/tx/datashard/datashard_pipeline.h7
-rw-r--r--ydb/core/tx/datashard/datashard_split_src.cpp2
-rw-r--r--ydb/core/tx/datashard/datashard_subdomain_path_id.cpp108
-rw-r--r--ydb/core/tx/datashard/datashard_trans_queue.cpp5
-rw-r--r--ydb/core/tx/datashard/datashard_txs.h2
-rw-r--r--ydb/core/tx/datashard/datashard_user_db.cpp17
-rw-r--r--ydb/core/tx/datashard/datashard_user_db.h26
-rw-r--r--ydb/core/tx/datashard/datashard_user_table.cpp31
-rw-r--r--ydb/core/tx/datashard/datashard_user_table.h4
-rw-r--r--ydb/core/tx/datashard/datashard_ut_change_collector.cpp23
-rw-r--r--ydb/core/tx/datashard/datashard_ut_change_exchange.cpp147
-rw-r--r--ydb/core/tx/datashard/datashard_ut_common.cpp18
-rw-r--r--ydb/core/tx/datashard/datashard_ut_common.h49
-rw-r--r--ydb/core/tx/datashard/datashard_ut_common_kqp.h8
-rw-r--r--ydb/core/tx/datashard/datashard_ut_erase_rows.cpp69
-rw-r--r--ydb/core/tx/datashard/datashard_ut_followers.cpp1
-rw-r--r--ydb/core/tx/datashard/datashard_ut_init.cpp42
-rw-r--r--ydb/core/tx/datashard/datashard_ut_kqp_errors.cpp18
-rw-r--r--ydb/core/tx/datashard/datashard_ut_kqp_scan.cpp25
-rw-r--r--ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp151
-rw-r--r--ydb/core/tx/datashard/datashard_ut_minstep.cpp28
-rw-r--r--ydb/core/tx/datashard/datashard_ut_order.cpp332
-rw-r--r--ydb/core/tx/datashard/datashard_ut_read_iterator.cpp743
-rw-r--r--ydb/core/tx/datashard/datashard_ut_read_table.cpp24
-rw-r--r--ydb/core/tx/datashard/datashard_ut_replication.cpp14
-rw-r--r--ydb/core/tx/datashard/datashard_ut_snapshot.cpp348
-rw-r--r--ydb/core/tx/datashard/datashard_ut_upload_rows.cpp28
-rw-r--r--ydb/core/tx/datashard/datashard_ut_volatile.cpp1043
-rw-r--r--ydb/core/tx/datashard/drop_cdc_stream_unit.cpp15
-rw-r--r--ydb/core/tx/datashard/execute_data_tx_unit.cpp3
-rw-r--r--ydb/core/tx/datashard/execute_distributed_erase_tx_unit.cpp18
-rw-r--r--ydb/core/tx/datashard/execute_kqp_data_tx_unit.cpp42
-rw-r--r--ydb/core/tx/datashard/finalize_build_index_unit.cpp2
-rw-r--r--ydb/core/tx/datashard/initiate_build_index_unit.cpp2
-rw-r--r--ydb/core/tx/datashard/move_index_unit.cpp6
-rw-r--r--ydb/core/tx/datashard/move_table_unit.cpp6
-rw-r--r--ydb/core/tx/datashard/operation.cpp14
-rw-r--r--ydb/core/tx/datashard/operation.h12
-rw-r--r--ydb/core/tx/datashard/read_iterator.h2
-rw-r--r--ydb/core/tx/datashard/read_table_scan_unit.cpp22
-rw-r--r--ydb/core/tx/datashard/remove_lock_change_records.cpp9
-rw-r--r--ydb/core/tx/datashard/snapshot_key.h4
-rw-r--r--ydb/core/tx/datashard/ut_kqp/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/tx/datashard/ut_kqp/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/tx/datashard/ut_kqp/CMakeLists.linux.txt1
-rw-r--r--ydb/core/tx/datashard/volatile_tx.cpp201
-rw-r--r--ydb/core/tx/datashard/volatile_tx.h67
-rw-r--r--ydb/core/tx/long_tx_service/commit_impl.cpp159
-rw-r--r--ydb/core/tx/scheme_board/cache.cpp9
-rw-r--r--ydb/core/tx/scheme_board/events.h111
-rw-r--r--ydb/core/tx/scheme_board/populator.cpp127
-rw-r--r--ydb/core/tx/scheme_board/replica.cpp281
-rw-r--r--ydb/core/tx/scheme_board/subscriber.cpp50
-rw-r--r--ydb/core/tx/scheme_cache/scheme_cache.h4
-rw-r--r--ydb/core/tx/schemeshard/CMakeLists.darwin.txt3
-rw-r--r--ydb/core/tx/schemeshard/CMakeLists.linux-aarch64.txt3
-rw-r--r--ydb/core/tx/schemeshard/CMakeLists.linux.txt3
-rw-r--r--ydb/core/tx/schemeshard/operation_queue_timer.h15
-rw-r--r--ydb/core/tx/schemeshard/schemeshard.h14
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__find_subdomain_path_id.cpp118
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__init.cpp135
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__init_root.cpp10
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation.cpp42
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp40
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_alter_cdc_stream.cpp60
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp4
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_alter_pq.cpp53
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_common.cpp2
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_common.h54
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_consistent_copy_tables.cpp57
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp61
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_create_pq.cpp46
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_create_subdomain.cpp2
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp19
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_drop_bsv.cpp33
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp108
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_drop_extsubdomain.cpp2
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp33
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_modify_acl.cpp86
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_move_index.cpp8
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp12
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_part.h4
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp143
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__stats.h132
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__stats_impl.h142
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__table_stats.cpp162
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_audit_log.cpp121
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_audit_log.h16
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp139
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.h9
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp458
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_export.cpp26
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_impl.cpp111
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_impl.h131
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_info_types.cpp35
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_info_types.h98
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_path.cpp8
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_path_describer.cpp18
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_private.h20
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_schema.h37
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_tx_infly.h4
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_types.cpp6
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_types.h15
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_utils.cpp7
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_utils.h8
-rw-r--r--ydb/core/tx/schemeshard/ut_base.cpp460
-rw-r--r--ydb/core/tx/schemeshard/ut_bsvolume.cpp98
-rw-r--r--ydb/core/tx/schemeshard/ut_bsvolume_reboots.cpp4
-rw-r--r--ydb/core/tx/schemeshard/ut_cdc_stream.cpp531
-rw-r--r--ydb/core/tx/schemeshard/ut_cdc_stream_reboots.cpp46
-rw-r--r--ydb/core/tx/schemeshard/ut_compaction.cpp10
-rw-r--r--ydb/core/tx/schemeshard/ut_export.cpp42
-rw-r--r--ydb/core/tx/schemeshard/ut_extsubdomain.cpp5
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux.txt1
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/helpers.cpp28
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/helpers.h4
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp45
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/ls_checks.h8
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/test_env.cpp1
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/test_env.h1
-rw-r--r--ydb/core/tx/schemeshard/ut_move.cpp2
-rw-r--r--ydb/core/tx/schemeshard/ut_split_merge.cpp430
-rw-r--r--ydb/core/tx/schemeshard/ut_stats.cpp286
-rw-r--r--ydb/core/tx/schemeshard/ut_subdomain.cpp108
-rw-r--r--ydb/core/tx/tiering/common.h4
-rw-r--r--ydb/core/tx/tiering/manager.cpp5
-rw-r--r--ydb/core/tx/tiering/manager.h6
-rw-r--r--ydb/core/tx/tiering/rule/initializer.cpp6
-rw-r--r--ydb/core/tx/tiering/rule/manager.cpp6
-rw-r--r--ydb/core/tx/tiering/rule/object.cpp6
-rw-r--r--ydb/core/tx/tiering/s3_actor.cpp108
-rw-r--r--ydb/core/tx/tiering/tier/initializer.cpp4
-rw-r--r--ydb/core/tx/tiering/tier/manager.cpp4
-rw-r--r--ydb/core/tx/tiering/tier/object.cpp4
-rw-r--r--ydb/core/tx/tiering/ut/ut_tiers.cpp31
-rw-r--r--ydb/core/tx/tx_proxy/proxy_ext_tenant_ut.cpp62
-rw-r--r--ydb/core/tx/tx_proxy/proxy_ut_helpers.h20
-rw-r--r--ydb/core/tx/tx_proxy/schemereq.cpp1
-rw-r--r--ydb/core/tx/tx_proxy/upload_rows_common_impl.h40
-rw-r--r--ydb/core/util/operation_queue.h61
-rw-r--r--ydb/core/util/operation_queue_ut.cpp40
-rw-r--r--ydb/core/viewer/content/v2/storage.js32
-rw-r--r--ydb/core/viewer/content/v2/storage_view.js15
-rw-r--r--ydb/core/wrappers/s3_storage.h4
-rw-r--r--ydb/core/ydb_convert/table_description.cpp20
-rw-r--r--ydb/core/ymq/actor/action.h88
-rw-r--r--ydb/core/ymq/actor/proxy_actor.cpp17
-rw-r--r--ydb/core/ymq/actor/proxy_actor.h18
-rw-r--r--ydb/core/ymq/actor/queue_leader.cpp45
-rw-r--r--ydb/core/ymq/actor/queue_leader.h2
-rw-r--r--ydb/core/ymq/base/CMakeLists.darwin.txt1
-rw-r--r--ydb/core/ymq/base/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/ymq/base/CMakeLists.linux.txt1
-rw-r--r--ydb/core/ymq/base/action.cpp22
-rw-r--r--ydb/core/ymq/base/action.h19
-rw-r--r--ydb/core/ymq/base/counters.cpp18
-rw-r--r--ydb/core/ymq/base/counters.h3
-rw-r--r--ydb/core/yq/libs/init/init.cpp2
-rw-r--r--ydb/core/yq/libs/logs/log.cpp4
-rw-r--r--ydb/core/yq/libs/result_formatter/result_formatter.cpp12
-rw-r--r--ydb/library/aclib/aclib.cpp9
-rw-r--r--ydb/library/aclib/aclib.h6
-rw-r--r--ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionAvg.h13
-rw-r--r--ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionCount.h18
-rw-r--r--ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionMinMaxAny.h18
-rw-r--r--ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionSum.h50
-rw-r--r--ydb/library/arrow_clickhouse/AggregateFunctions/IAggregateFunction.h22
-rw-r--r--ydb/library/arrow_clickhouse/Columns/ColumnsCommon.cpp24
-rw-r--r--ydb/library/arrow_clickhouse/arrow_clickhouse_types.h1
-rw-r--r--ydb/library/arrow_kernels/operations.h3
-rw-r--r--ydb/library/mkql_proto/mkql_proto.cpp87
-rw-r--r--ydb/library/mkql_proto/mkql_proto.h2
-rw-r--r--ydb/library/persqueue/topic_parser/counters.cpp14
-rw-r--r--ydb/library/persqueue/topic_parser/counters.h2
-rw-r--r--ydb/library/persqueue/topic_parser/topic_parser.cpp16
-rw-r--r--ydb/library/persqueue/topic_parser/topic_parser.h5
-rw-r--r--ydb/library/yql/core/common_opt/yql_co_extr_members.cpp2
-rw-r--r--ydb/library/yql/core/common_opt/yql_flatmap_over_join.cpp4
-rw-r--r--ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp11
-rw-r--r--ydb/library/yql/core/type_ann/type_ann_core.cpp20
-rw-r--r--ydb/library/yql/core/type_ann/type_ann_list.cpp2
-rw-r--r--ydb/library/yql/core/yql_expr_type_annotation.cpp2
-rw-r--r--ydb/library/yql/core/yql_type_annotation.h4
-rw-r--r--ydb/library/yql/core/yql_udf_resolver.h2
-rw-r--r--ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io.h8
-rw-r--r--ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h35
-rw-r--r--ydb/library/yql/dq/actors/protos/dq_events.proto12
-rw-r--r--ydb/library/yql/dq/opt/dq_opt.cpp26
-rw-r--r--ydb/library/yql/dq/opt/dq_opt.h2
-rw-r--r--ydb/library/yql/dq/opt/dq_opt_phy.cpp53
-rw-r--r--ydb/library/yql/dq/runtime/dq_input_producer.cpp36
-rw-r--r--ydb/library/yql/dq/runtime/dq_input_producer.h27
-rw-r--r--ydb/library/yql/dq/runtime/dq_tasks_runner.cpp198
-rw-r--r--ydb/library/yql/dq/runtime/dq_tasks_runner.h3
-rw-r--r--ydb/library/yql/dq/runtime/dq_transport.cpp38
-rw-r--r--ydb/library/yql/dq/runtime/dq_transport.h13
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node.cpp2
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node.h2
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp10
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node_holders.cpp8
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node_holders.h2
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node_impl.cpp4
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_pattern_cache.h125
-rw-r--r--ydb/library/yql/minikql/dom/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/minikql/dom/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/minikql/dom/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/minikql/mkql_alloc.cpp44
-rw-r--r--ydb/library/yql/minikql/mkql_alloc.h11
-rw-r--r--ydb/library/yql/minikql/mkql_runtime_version.h10
-rw-r--r--ydb/library/yql/minikql/mkql_type_builder.cpp22
-rw-r--r--ydb/library/yql/minikql/mkql_type_builder.h15
-rw-r--r--ydb/library/yql/parser/pg_wrapper/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/parser/pg_wrapper/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/parser/pg_wrapper/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/providers/common/proto/udf_resolver.proto2
-rw-r--r--ydb/library/yql/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp2
-rw-r--r--ydb/library/yql/providers/common/udf_resolve/yql_simple_udf_resolver.cpp3
-rw-r--r--ydb/library/yql/providers/dq/actors/task_controller.cpp1
-rw-r--r--ydb/library/yql/providers/dq/api/protos/task_command_executor.proto10
-rw-r--r--ydb/library/yql/providers/dq/runtime/task_command_executor.cpp17
-rw-r--r--ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp13
-rw-r--r--ydb/library/yql/providers/dq/task_runner/tasks_runner_local.h1
-rw-r--r--ydb/library/yql/providers/dq/task_runner/tasks_runner_pipe.cpp71
-rw-r--r--ydb/library/yql/public/udf/udf_helpers.h6
-rw-r--r--ydb/library/yql/public/udf/udf_type_builder.h25
-rw-r--r--ydb/library/yql/public/udf/udf_version.h2
-rw-r--r--ydb/library/yql/sql/v1/aggregation.cpp1
-rw-r--r--ydb/library/yql/udfs/common/datetime/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/datetime/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/datetime/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/datetime/datetime_udf.cpp124
-rw-r--r--ydb/library/yql/udfs/common/datetime2/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/datetime2/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/datetime2/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp102
-rw-r--r--ydb/library/yql/udfs/common/digest/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/digest/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/digest/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/digest/digest_udf.cpp51
-rw-r--r--ydb/library/yql/udfs/common/histogram/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/histogram/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/histogram/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/histogram/histogram_udf.cpp3
-rw-r--r--ydb/library/yql/udfs/common/hyperloglog/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/hyperloglog/hyperloglog_udf.cpp3
-rw-r--r--ydb/library/yql/udfs/common/ip_base/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/ip_base/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/ip_base/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h8
-rw-r--r--ydb/library/yql/udfs/common/json/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/json/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/json/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/json/json_udf.cpp2
-rw-r--r--ydb/library/yql/udfs/common/json2/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/json2/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/json2/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/json2/as_json_node.h2
-rw-r--r--ydb/library/yql/udfs/common/json2/sql_exists.h3
-rw-r--r--ydb/library/yql/udfs/common/json2/sql_query.h2
-rw-r--r--ydb/library/yql/udfs/common/json2/sql_value.h2
-rw-r--r--ydb/library/yql/udfs/common/math/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/math/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/math/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/math/math_udf.cpp9
-rw-r--r--ydb/library/yql/udfs/common/re2/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/re2/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/re2/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/re2/re2_udf.cpp4
-rw-r--r--ydb/library/yql/udfs/common/set/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/set/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/set/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/set/set_udf.cpp13
-rw-r--r--ydb/library/yql/udfs/common/stat/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/stat/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/stat/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/stat/static/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/stat/static/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/stat/static/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/stat/static/stat_udf.h8
-rw-r--r--ydb/library/yql/udfs/common/string/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/string/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/string/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/string/string_udf.cpp223
-rw-r--r--ydb/library/yql/udfs/common/yson2/CMakeLists.darwin.txt2
-rw-r--r--ydb/library/yql/udfs/common/yson2/CMakeLists.linux-aarch64.txt2
-rw-r--r--ydb/library/yql/udfs/common/yson2/CMakeLists.linux.txt2
-rw-r--r--ydb/library/yql/udfs/common/yson2/yson2_udf.cpp36
-rw-r--r--ydb/public/api/grpc/ydb_topic_v1.proto2
-rw-r--r--ydb/public/api/protos/draft/datastreams.proto2
-rw-r--r--ydb/public/api/protos/draft/persqueue_error_codes.proto2
-rw-r--r--ydb/public/api/protos/persqueue_error_codes_v1.proto8
-rw-r--r--ydb/public/api/protos/ydb_table.proto11
-rw-r--r--ydb/public/api/protos/ydb_topic.proto36
-rw-r--r--ydb/public/lib/deprecated/kicli/cpp_ut.cpp1
-rw-r--r--ydb/public/lib/validation/main.cpp17
-rw-r--r--ydb/public/lib/ydb_cli/commands/click_bench_schema.sql104
-rw-r--r--ydb/public/lib/ydb_cli/commands/ydb_service_scheme.cpp5
-rw-r--r--ydb/public/lib/ydb_cli/commands/ydb_service_topic.cpp2
-rw-r--r--ydb/public/lib/ydb_cli/import/import.cpp22
-rw-r--r--ydb/public/lib/ydb_cli/import/import.h3
-rw-r--r--ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.h8
-rw-r--r--ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.ipp24
-rw-r--r--ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/retry_policy_ut.cpp3
-rw-r--r--ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/ut_utils/sdk_test_setup.h2
-rw-r--r--ydb/public/sdk/cpp/client/ydb_table/table.cpp31
-rw-r--r--ydb/public/sdk/cpp/client/ydb_table/table.h6
-rw-r--r--ydb/public/sdk/cpp/client/ydb_table/table_enum.h8
-rw-r--r--ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.darwin.txt1
-rw-r--r--ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux.txt1
-rw-r--r--ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp111
-rw-r--r--ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp102
-rw-r--r--ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.h47
-rw-r--r--ydb/public/tools/lib/cmds/__init__.py6
-rw-r--r--ydb/public/tools/local_ydb/__main__.py4
-rw-r--r--ydb/services/bg_tasks/abstract/task.cpp69
-rw-r--r--ydb/services/bg_tasks/abstract/task.h56
-rw-r--r--ydb/services/bg_tasks/ds_table/add_tasks.cpp12
-rw-r--r--ydb/services/bg_tasks/ds_table/assign_tasks.cpp6
-rw-r--r--ydb/services/bg_tasks/ds_table/fetch_tasks.cpp12
-rw-r--r--ydb/services/bg_tasks/ds_table/finish_task.cpp6
-rw-r--r--ydb/services/bg_tasks/ds_table/initialization.cpp6
-rw-r--r--ydb/services/bg_tasks/ds_table/interrupt.cpp6
-rw-r--r--ydb/services/bg_tasks/ds_table/lock_pinger.cpp6
-rw-r--r--ydb/services/bg_tasks/ds_table/task_enabled.cpp6
-rw-r--r--ydb/services/bg_tasks/service.cpp6
-rw-r--r--ydb/services/bg_tasks/service.h2
-rw-r--r--ydb/services/datastreams/datastreams_codes.h35
-rw-r--r--ydb/services/datastreams/datastreams_proxy.cpp183
-rw-r--r--ydb/services/datastreams/datastreams_proxy.h1
-rw-r--r--ydb/services/datastreams/datastreams_ut.cpp30
-rw-r--r--ydb/services/datastreams/put_records_actor.h17
-rw-r--r--ydb/services/datastreams/shard_iterator.h3
-rw-r--r--ydb/services/kesus/grpc_service.cpp2
-rw-r--r--ydb/services/lib/actors/pq_schema_actor.cpp143
-rw-r--r--ydb/services/lib/actors/pq_schema_actor.h58
-rw-r--r--ydb/services/lib/actors/type_definitions.h4
-rw-r--r--ydb/services/metadata/abstract/decoder.cpp37
-rw-r--r--ydb/services/metadata/initializer/behaviour.cpp4
-rw-r--r--ydb/services/metadata/initializer/initializer.cpp4
-rw-r--r--ydb/services/metadata/initializer/object.cpp4
-rw-r--r--ydb/services/metadata/manager/modification.h4
-rw-r--r--ydb/services/metadata/manager/object.cpp4
-rw-r--r--ydb/services/metadata/manager/ydb_value_operator.cpp33
-rw-r--r--ydb/services/metadata/manager/ydb_value_operator.h12
-rw-r--r--ydb/services/metadata/secret/access.cpp6
-rw-r--r--ydb/services/metadata/secret/initializer.cpp12
-rw-r--r--ydb/services/metadata/secret/manager.cpp16
-rw-r--r--ydb/services/metadata/secret/secret.cpp6
-rw-r--r--ydb/services/metadata/service.cpp16
-rw-r--r--ydb/services/metadata/service.h4
-rw-r--r--ydb/services/persqueue_v1/actors/CMakeLists.darwin.txt1
-rw-r--r--ydb/services/persqueue_v1/actors/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/services/persqueue_v1/actors/CMakeLists.linux.txt1
-rw-r--r--ydb/services/persqueue_v1/actors/commit_offset_actor.cpp190
-rw-r--r--ydb/services/persqueue_v1/actors/commit_offset_actor.h89
-rw-r--r--ydb/services/persqueue_v1/actors/partition_actor.cpp5
-rw-r--r--ydb/services/persqueue_v1/actors/persqueue_utils.cpp2
-rw-r--r--ydb/services/persqueue_v1/actors/persqueue_utils.h1
-rw-r--r--ydb/services/persqueue_v1/actors/read_info_actor.cpp4
-rw-r--r--ydb/services/persqueue_v1/actors/read_init_auth_actor.cpp11
-rw-r--r--ydb/services/persqueue_v1/actors/read_init_auth_actor.h4
-rw-r--r--ydb/services/persqueue_v1/actors/read_session_actor.h2
-rw-r--r--ydb/services/persqueue_v1/actors/read_session_actor.ipp42
-rw-r--r--ydb/services/persqueue_v1/actors/schema_actors.cpp12
-rw-r--r--ydb/services/persqueue_v1/actors/write_session_actor.h2
-rw-r--r--ydb/services/persqueue_v1/actors/write_session_actor.ipp33
-rw-r--r--ydb/services/persqueue_v1/grpc_pq_read.cpp21
-rw-r--r--ydb/services/persqueue_v1/grpc_pq_read.h2
-rw-r--r--ydb/services/persqueue_v1/persqueue_compat_ut.cpp165
-rw-r--r--ydb/services/persqueue_v1/persqueue_ut.cpp451
-rw-r--r--ydb/services/persqueue_v1/topic.cpp4
-rw-r--r--ydb/services/ydb/ydb_bulk_upsert_olap_ut.cpp87
-rw-r--r--ydb/services/ydb/ydb_olapstore_ut.cpp142
-rw-r--r--ydb/services/ydb/ydb_table.cpp71
-rw-r--r--ydb/services/ydb/ydb_table.h17
-rw-r--r--ydb/services/ydb/ydb_table_split_ut.cpp8
-rw-r--r--ydb/services/ydb/ydb_table_ut.cpp6
-rw-r--r--ydb/services/ydb/ydb_ut.cpp2
-rw-r--r--ydb/tests/functional/api/test_session_grace_shutdown.py38
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan4
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan2
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_composite.sql-plan_/pk_predicate_pk_predicate_composite.sql.plan18
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_point_range_rp.sql-plan_/pk_predicate_pk_predicate_point_range_rp.sql.plan6
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_nonkey_rp.sql-plan_/pk_predicate_pk_predicate_range_nonkey_rp.sql.plan3
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp.sql-plan_/pk_predicate_pk_predicate_range_rp.sql.plan3
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp_1.sql-plan_/pk_predicate_pk_predicate_range_rp_1.sql.plan3
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_single_rp.sql-plan_/pk_predicate_pk_predicate_range_single_rp.sql.plan3
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_1.sql-plan_/pk_predicate_pk_predicate_ranges_1.sql.plan40
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int.sql-plan_/pk_predicate_pk_predicate_ranges_int.sql.plan6
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int_1.sql-plan_/pk_predicate_pk_predicate_ranges_int_1.sql.plan7
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp.sql-plan_/pk_predicate_pk_predicate_ranges_rp.sql.plan15
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp_1.sql-plan_/pk_predicate_pk_predicate_ranges_rp_1.sql.plan23
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_reverse_1.sql-plan_/pk_predicate_pk_predicate_reverse_1.sql.plan6
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range.sql-plan_/topsort_topsort_multi_range.sql.plan19
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_pk.sql-plan_/topsort_topsort_multi_range_pk.sql.plan17
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_skip.sql-plan_/topsort_topsort_multi_range_skip.sql.plan17
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage.script-script_/write_multi_usage.script.plan8
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage_key.script-script_/write_multi_usage_key.script.plan2
-rw-r--r--ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_write_group_by.script-script_/write_write_group_by.script.plan2
-rw-r--r--ydb/tests/functional/canonical/test_sql.py10
-rw-r--r--ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_bs_controller_/flat_bs_controller.schema8
-rw-r--r--ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_datashard_/flat_datashard.schema86
-rw-r--r--ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_schemeshard_/flat_schemeshard.schema121
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_146.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_147.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_148.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_149.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_150.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_151.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_152.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_153.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_154.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_155.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_156.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_157.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_158.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_146.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_147.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_146.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_147.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_146.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_147.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_148.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_149.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_150.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_151.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_152.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_153.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_10.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_100.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_101.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_102.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_105.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_106.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_107.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_108.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_109.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_11.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_110.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_111.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_112.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_113.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_114.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_117.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_118.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_119.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_12.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_120.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_121.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_122.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_123.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_124.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_125.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_126.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_127.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_128.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_129.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_13.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_130.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_131.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_132.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_133.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_134.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_135.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_136.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_137.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_138.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_139.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_14.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_140.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_141.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_142.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_143.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_144.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_145.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_146.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_147.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_148.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_149.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_15.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_150.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_16.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_17.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_18.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_19.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_2.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_20.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_21.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_22.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_23.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_24.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_25.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_26.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_27.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_28.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_29.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_3.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_30.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_31.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_32.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_33.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_34.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_35.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_36.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_37.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_38.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_39.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_4.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_40.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_41.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_42.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_43.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_44.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_45.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_46.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_47.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_48.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_49.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_5.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_50.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_51.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_52.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_53.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_54.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_55.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_56.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_57.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_58.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_59.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_6.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_60.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_61.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_62.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_63.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_64.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_65.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_66.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_67.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_68.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_69.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_70.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_71.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_72.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_73.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_74.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_75.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_76.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_77.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_78.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_79.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_8.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_80.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_81.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_82.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_83.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_84.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_85.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_86.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_87.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_88.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_89.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_9.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_90.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_91.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_92.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_93.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_94.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_95.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_96.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_97.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_98.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_99.plan2
-rw-r--r--ydb/tests/functional/suite_tests/test_base.py2
-rw-r--r--ydb/tests/functional/tenants/test_dynamic_tenants.py19
-rw-r--r--ydb/tests/library/harness/daemon.py27
-rw-r--r--ydb/tests/library/harness/kikimr_config.py21
-rw-r--r--ydb/tests/library/harness/kikimr_runner.py13
-rw-r--r--ydb/tests/library/harness/resources/default_yaml.yml2
4141 files changed, 39576 insertions, 16612 deletions
diff --git a/conanfile.txt b/conanfile.txt
index 88573fa08b..b9155fca32 100644
--- a/conanfile.txt
+++ b/conanfile.txt
@@ -1,14 +1,12 @@
[requires]
bison/3.5.3
c-ares/1.18.1
-libiconv/1.15
openssl/1.1.1s
ragel/6.10
yasm/1.3.0
zlib/1.2.12
[options]
-libiconv:shared=True
[imports]
bin, *yasm* -> ./bin
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp
deleted file mode 100644
index b1ec65b5df..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-
-#include <WinSock2.h>
-#include <cassert>
-#include <aws/core/utils/logging/LogMacros.h>
-
-namespace Aws
-{
- namespace Net
- {
- static bool s_globalNetworkInitiated = false;
-
- bool IsNetworkInitiated()
- {
- return s_globalNetworkInitiated;
- }
-
- void InitNetwork()
- {
- if (IsNetworkInitiated())
- {
- return;
- }
- // Initialize Winsock( requires winsock version 2.2)
- WSADATA wsaData;
- int result = WSAStartup(MAKEWORD(2, 2), &wsaData);
- assert(result == NO_ERROR);
- if (result != NO_ERROR)
- {
- AWS_LOGSTREAM_ERROR("WinSock2", "Failed to Initate WinSock2.2");
- s_globalNetworkInitiated = false;
- }
- else
- {
- s_globalNetworkInitiated = true;
- }
- }
-
- void CleanupNetwork()
- {
- WSACleanup();
- s_globalNetworkInitiated = false;
- }
- }
-}
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp
deleted file mode 100644
index f6e36077ec..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-
-#include <WinSock2.h>
-#include <Ws2ipdef.h>
-#include <Ws2tcpip.h>
-#include <cassert>
-#include <aws/core/net/SimpleUDP.h>
-#include <aws/core/utils/logging/LogMacros.h>
-namespace Aws
-{
- namespace Net
- {
- static const char ALLOC_TAG[] = "SimpleUDP";
- static const char IPV4_LOOP_BACK_ADDRESS[] = "127.0.0.1";
- static const char IPV6_LOOP_BACK_ADDRESS[] = "::1";
-
- static inline bool IsValidIPAddress(const char* ip, int addressFamily/*AF_INET or AF_INET6*/)
- {
- char buffer[128];
- return inet_pton(addressFamily, ip, (void*)buffer) == 1 ?true :false;
- }
-
- static bool GetASockAddrFromHostName(const char* hostName, void* sockAddrBuffer, size_t& addrLength, int& addressFamily)
- {
- struct addrinfo hints, *res;
-
- memset(&hints, 0, sizeof(hints));
-
- hints.ai_family = PF_UNSPEC;
- hints.ai_socktype = SOCK_DGRAM;
- if (getaddrinfo(hostName, nullptr, &hints, &res))
- {
- return false;
- }
-
- memcpy(sockAddrBuffer, res->ai_addr, res->ai_addrlen);
- addrLength = res->ai_addrlen;
- addressFamily = res->ai_family;
- freeaddrinfo(res);
- return true;
- }
-
- static sockaddr_in BuildAddrInfoIPV4(const char* hostIP, short port)
- {
- sockaddr_in addrinfo {};
- addrinfo.sin_family = AF_INET;
- addrinfo.sin_port = htons(port);
- inet_pton(AF_INET, hostIP, &addrinfo.sin_addr);
- return addrinfo;
- }
-
- static sockaddr_in6 BuildAddrInfoIPV6(const char* hostIP, short port)
- {
- sockaddr_in6 addrinfo {};
- addrinfo.sin6_family = AF_INET6;
- addrinfo.sin6_port = htons(port);
- inet_pton(AF_INET6, hostIP, &addrinfo.sin6_addr);
- return addrinfo;
- }
-
- SimpleUDP::SimpleUDP(int addressFamily, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking):
- m_addressFamily(addressFamily), m_connected(false), m_socket(-1), m_port(0)
- {
- CreateSocket(addressFamily, sendBufSize, receiveBufSize, nonBlocking);
- }
-
- SimpleUDP::SimpleUDP(bool IPV4, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking) :
- m_addressFamily(IPV4 ? AF_INET : AF_INET6), m_connected(false), m_socket(-1), m_port(0)
- {
- CreateSocket(m_addressFamily, sendBufSize, receiveBufSize, nonBlocking);
- }
-
- SimpleUDP::SimpleUDP(const char* host, unsigned short port, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking) :
- m_addressFamily(AF_INET), m_connected(false), m_socket(-1), m_port(port)
- {
- if (IsValidIPAddress(host, AF_INET))
- {
- m_addressFamily = AF_INET;
- m_hostIP = Aws::String(host);
- }
- else if (IsValidIPAddress(host, AF_INET6))
- {
- m_addressFamily = AF_INET6;
- m_hostIP = Aws::String(host);
- }
- else
- {
- char sockAddrBuffer[100];
- char hostBuffer[100];
- size_t addrLength = 0;
- if (GetASockAddrFromHostName(host, (void*)sockAddrBuffer, addrLength, m_addressFamily))
- {
- if (m_addressFamily == AF_INET)
- {
- struct sockaddr_in* sockaddr = reinterpret_cast<struct sockaddr_in*>(sockAddrBuffer);
- inet_ntop(m_addressFamily, &(sockaddr->sin_addr), hostBuffer, sizeof(hostBuffer));
- }
- else
- {
- struct sockaddr_in6* sockaddr = reinterpret_cast<struct sockaddr_in6*>(sockAddrBuffer);
- inet_ntop(m_addressFamily, &(sockaddr->sin6_addr), hostBuffer, sizeof(hostBuffer));
- }
- m_hostIP = Aws::String(hostBuffer);
- }
- else
- {
- AWS_LOGSTREAM_ERROR(ALLOC_TAG, "Can't retrieve a valid ip address based on provided host: " << host);
- }
- }
- CreateSocket(m_addressFamily, sendBufSize, receiveBufSize, nonBlocking);
- }
-
- SimpleUDP::~SimpleUDP()
- {
- closesocket(GetUnderlyingSocket());
- }
-
- void SimpleUDP::CreateSocket(int addressFamily, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking)
- {
- SOCKET sock = socket(addressFamily, SOCK_DGRAM, IPPROTO_UDP);
- assert(sock != INVALID_SOCKET);
-
- // Try to set sock to nonblocking mode.
- if (nonBlocking)
- {
- u_long enable = 1;
- ioctlsocket(sock, FIONBIO, &enable);
- }
-
- // if sendBufSize is not zero, try to set send buffer size
- if (sendBufSize)
- {
- int ret = setsockopt(sock, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<const char*>(&sendBufSize), sizeof(sendBufSize));
- if (ret)
- {
- AWS_LOGSTREAM_WARN(ALLOC_TAG, "Failed to set UDP send buffer size to " << sendBufSize << " for socket " << sock << " error code: " << WSAGetLastError());
- }
- assert(ret == 0);
- }
-
- // if receiveBufSize is not zero, try to set receive buffer size
- if (receiveBufSize)
- {
- int ret = setsockopt(sock, SOL_SOCKET, SO_RCVBUF, reinterpret_cast<const char*>(&receiveBufSize), sizeof(receiveBufSize));
- if (ret)
- {
- AWS_LOGSTREAM_WARN(ALLOC_TAG, "Failed to set UDP receive buffer size to " << receiveBufSize << " for socket " << sock << " error code: " << WSAGetLastError());
- }
- assert(ret == 0);
- }
-
- SetUnderlyingSocket(static_cast<int>(sock));
- }
-
- int SimpleUDP::Connect(const sockaddr* address, size_t addressLength)
- {
- int ret = connect(GetUnderlyingSocket(), address, static_cast<socklen_t>(addressLength));
- m_connected = ret ? false : true;
- return ret;
- }
-
- int SimpleUDP::ConnectToHost(const char* hostIP, unsigned short port) const
- {
- int ret;
- if (m_addressFamily == AF_INET6)
- {
- sockaddr_in6 addrinfo = BuildAddrInfoIPV6(hostIP, port);
- ret = connect(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in6));
- }
- else
- {
- sockaddr_in addrinfo = BuildAddrInfoIPV4(hostIP, port);
- ret = connect(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in));
- }
- m_connected = ret ? false : true;
- return ret;
- }
-
- int SimpleUDP::ConnectToLocalHost(unsigned short port) const
- {
- if (m_addressFamily == AF_INET6)
- {
- return ConnectToHost(IPV6_LOOP_BACK_ADDRESS, port);
- }
- else
- {
- return ConnectToHost(IPV4_LOOP_BACK_ADDRESS, port);
- }
- }
-
- int SimpleUDP::Bind(const sockaddr* address, size_t addressLength) const
- {
- return bind(GetUnderlyingSocket(), address, static_cast<socklen_t>(addressLength));
- }
-
- int SimpleUDP::BindToLocalHost(unsigned short port) const
- {
- if (m_addressFamily == AF_INET6)
- {
- sockaddr_in6 addrinfo = BuildAddrInfoIPV6(IPV6_LOOP_BACK_ADDRESS, port);
- return bind(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in6));
- }
- else
- {
- sockaddr_in addrinfo = BuildAddrInfoIPV4(IPV4_LOOP_BACK_ADDRESS, port);
- return bind(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in));
- }
- }
-
- int SimpleUDP::SendData(const uint8_t* data, size_t dataLen) const
- {
- if (!m_connected)
- {
- ConnectToHost(m_hostIP.c_str(), m_port);
- }
- return send(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0);
- }
-
- int SimpleUDP::SendDataTo(const sockaddr* address, size_t addressLength, const uint8_t* data, size_t dataLen) const
- {
- if (m_connected)
- {
- return send(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0);
- }
- else
- {
- return sendto(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0, address, static_cast<socklen_t>(addressLength));
- }
- }
-
- int SimpleUDP::SendDataToLocalHost(const uint8_t* data, size_t dataLen, unsigned short port) const
- {
- if (m_connected)
- {
- return send(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0);
- }
- else if (m_addressFamily == AF_INET6)
- {
- sockaddr_in6 addrinfo = BuildAddrInfoIPV6(IPV6_LOOP_BACK_ADDRESS, port);
- return sendto(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0, reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in6));
- }
- else
- {
- sockaddr_in addrinfo = BuildAddrInfoIPV4(IPV4_LOOP_BACK_ADDRESS, port);
- return sendto(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0, reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in));
- }
- }
-
- int SimpleUDP::ReceiveData(uint8_t* buffer, size_t bufferLen) const
- {
- return recv(GetUnderlyingSocket(), reinterpret_cast<char*>(buffer), static_cast<int>(bufferLen), 0);
- }
-
-
- int SimpleUDP::ReceiveDataFrom(sockaddr* address, size_t* addressLength, uint8_t* buffer, size_t bufferLen) const
- {
- return recvfrom(GetUnderlyingSocket(), reinterpret_cast<char*>(buffer), static_cast<int>(bufferLen), 0, address, reinterpret_cast<socklen_t*>(addressLength));
- }
- }
-}
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp
deleted file mode 100644
index d8b5403123..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-
-#include <aws/core/platform/Environment.h>
-
-#include <stdio.h>
-#include <utility>
-
-namespace Aws
-{
-namespace Environment
-{
-
-/*
-using std::getenv generates a warning on windows so we use _dupenv_s instead. The character array returned by this function is our responsibility to clean up, so rather than returning raw strings
-that would need to be manually freed in all the client functions, just copy it into a Aws::String instead, freeing it here.
-*/
-Aws::String GetEnv(const char *variableName)
-{
- char* variableValue = nullptr;
- std::size_t valueSize = 0;
- auto queryResult = _dupenv_s(&variableValue, &valueSize, variableName);
-
- Aws::String result;
- if(queryResult == 0 && variableValue != nullptr && valueSize > 0)
- {
- result.assign(variableValue, valueSize - 1); // don't copy the c-string terminator byte
- free(variableValue);
- }
-
- return result;
-}
-
-} // namespace Environment
-} // namespace Aws
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp
deleted file mode 100644
index 2ea82de6f8..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp
+++ /dev/null
@@ -1,336 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-#include <aws/core/platform/FileSystem.h>
-
-#include <aws/core/platform/Environment.h>
-#include <aws/core/utils/logging/LogMacros.h>
-#include <aws/core/utils/StringUtils.h>
-#include <cassert>
-#include <iostream>
-#include <Userenv.h>
-
-#pragma warning( disable : 4996)
-
-using namespace Aws::Utils;
-namespace Aws
-{
-namespace FileSystem
-{
-
-static const char* FILE_SYSTEM_UTILS_LOG_TAG = "FileSystem";
-
-/**
- * See
- * https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
- * to understand how could we pass long path (over 260 chars) to WinAPI
- */
-static inline Aws::WString ToLongPath(const Aws::WString& path)
-{
- if (path.size() > MAX_PATH - 12/*8.3 file name*/)
- {
- return L"\\\\?\\" + path;
- }
- return path;
-}
-
-class User32Directory : public Directory
-{
-public:
- User32Directory(const Aws::String& path, const Aws::String& relativePath) : Directory(path, relativePath), m_find(INVALID_HANDLE_VALUE), m_lastError(0)
- {
- WIN32_FIND_DATAW ffd;
- AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Entering directory " << m_directoryEntry.path);
-
- m_find = FindFirstFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(m_directoryEntry.path.c_str())).c_str(), &ffd);
- if (m_find != INVALID_HANDLE_VALUE)
- {
- m_directoryEntry = ParseFileInfo(ffd, false);
- FindClose(m_find);
- auto seachPath = Join(m_directoryEntry.path, "*");
- m_find = FindFirstFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(seachPath.c_str())).c_str(), &m_ffd);
- }
- else
- {
- AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, "Could not load directory " << m_directoryEntry.path << " with error code " << GetLastError());
- }
- }
-
- ~User32Directory()
- {
- if (m_find != INVALID_HANDLE_VALUE)
- {
- FindClose(m_find);
- }
- }
-
- operator bool() const override { return m_directoryEntry.operator bool() && m_find != INVALID_HANDLE_VALUE; }
-
- DirectoryEntry Next() override
- {
- assert(m_find != INVALID_HANDLE_VALUE);
- DirectoryEntry entry;
- bool invalidEntry = true;
-
- while(invalidEntry && !m_lastError)
- {
- //due to the way the FindFirstFile api works,
- //the first entry will already be loaded by the time we get here.
- entry = ParseFileInfo(m_ffd, true);
-
- Aws::String fileName = Aws::Utils::StringUtils::FromWString(m_ffd.cFileName);
- if (fileName != ".." && fileName != ".")
- {
- AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Found entry " << entry.path);
- invalidEntry = false;
- }
- else
- {
- entry.fileType = FileType::None;
- AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Skipping . or .. entries.");
- }
-
- if(!FindNextFileW(m_find, &m_ffd))
- {
- m_lastError = GetLastError();
- AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, "Could not fetch next entry from " << m_directoryEntry.path << " with error code " << m_lastError);
- break;
- }
- }
-
- return entry;
- }
-
-private:
- DirectoryEntry ParseFileInfo(WIN32_FIND_DATAW& ffd, bool computePath)
- {
- DirectoryEntry entry;
- LARGE_INTEGER fileSize;
- fileSize.HighPart = ffd.nFileSizeHigh;
- fileSize.LowPart = ffd.nFileSizeLow;
- entry.fileSize = static_cast<int64_t>(fileSize.QuadPart);
-
- if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- entry.fileType = FileType::Directory;
- }
- else
- {
- entry.fileType = FileType::File;
- }
-
- if(computePath)
- {
- entry.path = Join(m_directoryEntry.path, Aws::Utils::StringUtils::FromWString(ffd.cFileName));
- entry.relativePath = m_directoryEntry.relativePath.empty() ? Aws::Utils::StringUtils::FromWString(ffd.cFileName) : Join(m_directoryEntry.relativePath, Aws::Utils::StringUtils::FromWString(ffd.cFileName));
- }
- else
- {
- entry.path = m_directoryEntry.path;
- entry.relativePath = m_directoryEntry.relativePath;
- }
-
- return entry;
- }
-
- HANDLE m_find;
- WIN32_FIND_DATAW m_ffd;
- DWORD m_lastError;
-};
-
-Aws::String GetHomeDirectory()
-{
- static const char* HOME_DIR_ENV_VAR = "USERPROFILE";
-
- AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Checking " << HOME_DIR_ENV_VAR << " for the home directory.");
- Aws::String homeDir = Aws::Environment::GetEnv(HOME_DIR_ENV_VAR);
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Environment value for variable " << HOME_DIR_ENV_VAR << " is " << homeDir);
- if(homeDir.empty())
- {
- AWS_LOGSTREAM_WARN(FILE_SYSTEM_UTILS_LOG_TAG, "Home dir not stored in environment, trying to fetch manually from the OS.");
- HANDLE hToken;
-
- if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &hToken))
- {
- DWORD len = MAX_PATH;
- WCHAR path[MAX_PATH];
- if (GetUserProfileDirectoryW(hToken, path, &len))
- {
- homeDir = Aws::Utils::StringUtils::FromWString(path);
- }
- CloseHandle(hToken);
- }
-
- AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Pulled " << homeDir << " as home directory from the OS.");
- }
-
- Aws::String retVal = (homeDir.size() > 0) ? Aws::Utils::StringUtils::Trim(homeDir.c_str()) : "";
-
- if (!retVal.empty())
- {
- if (retVal.at(retVal.length() - 1) != Aws::FileSystem::PATH_DELIM)
- {
- retVal += Aws::FileSystem::PATH_DELIM;
- }
- }
-
- return retVal;
-}
-
-Aws::String GetExecutableDirectory()
-{
- static const unsigned long long bufferSize = 256;
- WCHAR buffer[bufferSize];
-
- memset(buffer, 0, sizeof(buffer));
-
- if (GetModuleFileNameW(nullptr, buffer, static_cast<DWORD>(sizeof(buffer))))
- {
- Aws::String bufferStr(Aws::Utils::StringUtils::FromWString(buffer));
- auto fileNameStart = bufferStr.find_last_of(PATH_DELIM);
- if (fileNameStart != std::string::npos)
- {
- bufferStr = bufferStr.substr(0, fileNameStart);
- }
-
- return bufferStr;
- }
-
- return "";
-}
-
-bool CreateDirectoryIfNotExists(const char* path, bool createParentDirs)
-{
- Aws::String directoryName = path;
- AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Creating directory " << directoryName);
-
- // Create intermediate directories or create the target directory once.
- for (size_t i = createParentDirs ? 0 : directoryName.size() - 1; i < directoryName.size(); i++)
- {
- // Create the intermediate directory if we find a delimiter and the delimiter is not the first char, or if this is the target directory.
- if (i != 0 && (directoryName[i] == FileSystem::PATH_DELIM || i == directoryName.size() - 1))
- {
- // the last delimeter can be removed safely.
- if (directoryName[i] == FileSystem::PATH_DELIM)
- {
- directoryName[i] = '\0';
- }
- if (CreateDirectoryW(ToLongPath(StringUtils::ToWString(directoryName.c_str())).c_str(), nullptr))
- {
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Creation of directory " << directoryName.c_str() << " succeeded.");
- }
- else
- {
- DWORD errorCode = GetLastError();
- if (errorCode != ERROR_ALREADY_EXISTS && errorCode != NO_ERROR) // in vs2013 the errorCode is NO_ERROR
- {
- AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, " Creation of directory " << directoryName.c_str() << " returned code: " << errorCode);
- return false;
- }
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, " Creation of directory " << directoryName.c_str() << " returned code: " << errorCode);
- }
- // Restore the path. We are good even if we didn't change that char to '\0', because we are ready to return.
- directoryName[i] = FileSystem::PATH_DELIM;
- }
- }
- return true;
-}
-
-bool RemoveFileIfExists(const char* path)
-{
- AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Deleting file: " << path);
-
- if (DeleteFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(path)).c_str()))
- {
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Successfully deleted file: " << path);
- return true;
- }
- else
- {
- DWORD errorCode = GetLastError();
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Deletion of file: " << path << " Returned error code: " << errorCode);
- return errorCode == ERROR_FILE_NOT_FOUND;
- }
-}
-
-bool RelocateFileOrDirectory(const char* from, const char* to)
-{
- AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Moving file at " << from << " to " << to);
-
- if(MoveFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(from)).c_str(), Aws::Utils::StringUtils::ToWString(to).c_str()))
- {
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The moving operation of file at " << from << " to " << to << " Succeeded.");
- return true;
- }
- else
- {
- int errorCode = GetLastError();
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The moving operation of file at " << from << " to " << to << " Returned error code of " << errorCode);
- return false;
- }
-}
-
-bool RemoveDirectoryIfExists(const char* path)
-{
- AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Removing directory at " << path);
-
- if(RemoveDirectoryW(ToLongPath(Aws::Utils::StringUtils::ToWString(path)).c_str()))
- {
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The remove operation of file at " << path << " Succeeded.");
- return true;
- }
- else
- {
- int errorCode = GetLastError();
- if (errorCode == ERROR_DIR_NOT_EMPTY)
- {
- AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, "The remove operation of file at " << path << " failed. with error code because it was not empty.");
- }
-
- else if(errorCode == ERROR_DIRECTORY)
- {
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The deletion of directory at " << path << " failed because it doesn't exist.");
- return true;
-
- }
-
- AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The remove operation of file at " << path << " failed. with error code " << errorCode);
- return false;
- }
-}
-
-Aws::String CreateTempFilePath()
-{
-#ifdef _MSC_VER
-#pragma warning(disable: 4996) // _CRT_SECURE_NO_WARNINGS
-#endif
- char s_tempName[L_tmpnam_s+1];
-
- /*
- Prior to VS 2014, tmpnam/tmpnam_s generated root level files ("\filename") which were not appropriate for our usage, so for the windows version, we prepended a '.' to make it a
- tempfile in the current directory. Starting with VS2014, the behavior of tmpnam/tmpnam_s was changed to be a full, valid filepath based on the
- current user ("C:\Users\username\AppData\Local\Temp\...").
-
- See the tmpnam section in http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
- for more details.
- */
-
-#if _MSC_VER >= 1900
- tmpnam_s(s_tempName, L_tmpnam_s);
-#else
- s_tempName[0] = '.';
- tmpnam_s(s_tempName + 1, L_tmpnam_s);
-#endif // _MSC_VER
-
-
- return s_tempName;
-}
-
-Aws::UniquePtr<Directory> OpenDirectory(const Aws::String& path, const Aws::String& relativePath)
-{
- return Aws::MakeUnique<User32Directory>(FILE_SYSTEM_UTILS_LOG_TAG, path, relativePath);
-}
-
-} // namespace FileSystem
-} // namespace Aws
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp
deleted file mode 100644
index 0180f7fbf6..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-
-#include <aws/core/platform/OSVersionInfo.h>
-#include <aws/core/utils/StringUtils.h>
-#include <aws/core/utils/memory/stl/AWSStringStream.h>
-
-#include <iomanip>
-
-#pragma warning(disable: 4996)
-#include <windows.h>
-#include <stdio.h>
-namespace Aws
-{
-namespace OSVersionInfo
-{
-
-Aws::String GetSysCommandOutput(const char* command)
-{
- Aws::String outputStr;
- FILE* outputStream;
- const int maxBufferSize = 256;
- char outputBuffer[maxBufferSize];
-
- outputStream = _popen(command, "r");
-
- if (outputStream)
- {
- while (!feof(outputStream))
- {
- if (fgets(outputBuffer, maxBufferSize, outputStream) != nullptr)
- {
- outputStr.append(outputBuffer);
- }
- }
-
- _pclose(outputStream);
-
- return Aws::Utils::StringUtils::Trim(outputStr.c_str());
- }
-
- return {};
-}
-
-Aws::String ComputeOSVersionString()
-{
- // With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the operating system version.
- // The value returned by the GetVersionEx function now depends on how the application is manifested.
- // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
- //
- // This only works when the application is manifested for Windows 8.1 or 10, which we don't actually care about.
- // Also, this will cause build headaches for folks not building with VS2015, and is overall an unusable API for us.
- // The following is the least painful but most reliable hack I can come up with.
- //
- // From this article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724429.aspx
- // we will do the following:
- //
- // To obtain the full version number for the operating system, call the GetFileVersionInfo function on one of the system DLLs, such as Kernel32.dll,
- // then call VerQueryValue to obtain the \\StringFileInfo\\<lang><codepage>\\ProductVersion subblock of the file version information.
- //
- Aws::StringStream ss;
- ss << "Windows/";
-
- DWORD uselessParameter(0);
- static const char* FILE_TO_CHECK = "Kernel32.dll";
- DWORD fileVersionSize = GetFileVersionInfoSizeA(FILE_TO_CHECK, &uselessParameter);
- void* blob = Aws::Malloc("OSVersionInfo", static_cast<size_t>(fileVersionSize));
- bool versionFound(false);
-
- if (GetFileVersionInfoA(FILE_TO_CHECK, 0, fileVersionSize, blob))
- {
- struct LANGANDCODEPAGE {
- WORD wLanguage;
- WORD wCodePage;
- } *lpTranslate;
-
- UINT sizeOfCodePage(0);
-
- if (VerQueryValueA(blob, "\\VarFileInfo\\Translation", (LPVOID*)&lpTranslate, &sizeOfCodePage))
- {
- //we don't actually care which language pack we get, they should all have the same windows version attached.
- Aws::StringStream codePageSS;
- codePageSS << "\\StringFileInfo\\";
- codePageSS << std::setfill('0') << std::setw(4) << std::nouppercase << std::hex << lpTranslate[0].wLanguage;
- codePageSS << std::setfill('0') << std::setw(4) << std::nouppercase << std::hex << lpTranslate[0].wCodePage;
- codePageSS << "\\ProductVersion";
-
- void* subBlock(nullptr);
- UINT subBlockSize(0);
-
- if (VerQueryValueA(blob, codePageSS.str().c_str(), &subBlock, &subBlockSize))
- {
- ss << static_cast<const char*>(subBlock);
- versionFound = true;
- }
- }
- }
-
- Aws::Free(blob);
-
- if (!versionFound)
- {
- ss << "Unknown Version";
- }
-
-
-
- SYSTEM_INFO sysInfo;
- ZeroMemory(&sysInfo, sizeof(SYSTEM_INFO));
- GetSystemInfo(&sysInfo);
-
- switch (sysInfo.wProcessorArchitecture)
- {
- //PROCESSOR_ARCHITECTURE_AMD64
- case 0x09:
- ss << " AMD64";
- break;
- //PROCESSOR_ARCHITECTURE_IA64
- case 0x06:
- ss << " IA64";
- break;
- //PROCESSOR_ARCHITECTURE_INTEL
- case 0x00:
- ss << " x86";
- break;
- default:
- ss << " Unknown Processor Architecture";
- break;
- }
-
- return ss.str();
-}
-
-
-} // namespace OSVersionInfo
-} // namespace Aws
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp
deleted file mode 100644
index fbf9a4e679..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-
-#include <aws/core/platform/Security.h>
-
-#include <windows.h>
-
-namespace Aws
-{
-namespace Security
-{
-
-void SecureMemClear(unsigned char *data, size_t length)
-{
- SecureZeroMemory(data, length);
-}
-
-} // namespace Security
-} // namespace Aws
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp
deleted file mode 100644
index e186d21c81..0000000000
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-
-#include <aws/core/platform/Time.h>
-
-#include <time.h>
-
-namespace Aws
-{
-namespace Time
-{
-
-time_t TimeGM(struct tm* const t)
-{
- return _mkgmtime(t);
-}
-
-void LocalTime(tm* t, std::time_t time)
-{
- localtime_s(t, &time);
-}
-
-void GMTime(tm* t, std::time_t time)
-{
- gmtime_s(t, &time);
-}
-
-} // namespace Time
-} // namespace Aws
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
index e23b95c224..2002d78262 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
@@ -304,10 +304,14 @@ class ServerInterface : public internal::CallHook {
internal::ServerAsyncStreamingInterface* stream,
::grpc::CompletionQueue* call_cq,
::grpc::ServerCompletionQueue* notification_cq,
- void* tag, bool delete_on_finalize);
+ void* tag, bool delete_on_finalize,
+ bool delay_start = false);
bool FinalizeResult(void** tag, bool* status) override;
+ protected:
+ void Start();
+
private:
grpc_call_details call_details_;
};
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc
index b65583fcb2..a3f238220d 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc
@@ -136,6 +136,7 @@ static void on_writable(void* acp, grpc_error_handle error) {
int done;
grpc_endpoint** ep = ac->ep;
grpc_closure* closure = ac->closure;
+ std::string addr_str = ac->addr_str;
grpc_fd* fd;
(void)GRPC_ERROR_REF(error);
@@ -221,8 +222,7 @@ finish:
TString description =
y_absl::StrCat("Failed to connect to remote host: ", str);
error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, description);
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, ac->addr_str);
+ error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, addr_str);
}
if (done) {
// This is safe even outside the lock, because "done", the sentinel, is
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/work_serializer.cc b/contrib/libs/grpc/src/core/lib/iomgr/work_serializer.cc
index 3af315ccb1..dab378c64d 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/work_serializer.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/work_serializer.cc
@@ -121,10 +121,9 @@ void WorkSerializer::WorkSerializerImpl::Orphan() {
if (GRPC_TRACE_FLAG_ENABLED(grpc_work_serializer_trace)) {
gpr_log(GPR_INFO, "WorkSerializer::Orphan() %p", this);
}
- uint64_t prev_ref_pair =
+ const uint64_t prev_ref_pair =
refs_.fetch_sub(MakeRefPair(0, 1), std::memory_order_acq_rel);
- if (GetSize(prev_ref_pair) == 1) {
- GPR_DEBUG_ASSERT(GetOwners(prev_ref_pair) == 0);
+ if (GetOwners(prev_ref_pair) == 0 && GetSize(prev_ref_pair) == 1) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_work_serializer_trace)) {
gpr_log(GPR_INFO, " Destroying");
}
@@ -170,13 +169,19 @@ void WorkSerializer::WorkSerializerImpl::DrainQueueOwned() {
return;
}
if (GetSize(prev_ref_pair) == 2) {
- // Queue drained. Give up ownership but only if queue remains empty. Note
- // that we are using relaxed memory order semantics for the load on
- // failure since we don't care about that value.
+ // Queue drained. Give up ownership but only if queue remains empty.
uint64_t expected = MakeRefPair(1, 1);
if (refs_.compare_exchange_strong(expected, MakeRefPair(0, 1),
- std::memory_order_acq_rel,
- std::memory_order_relaxed)) {
+ std::memory_order_acq_rel)) {
+ // Queue is drained.
+ return;
+ }
+ if (GetSize(expected) == 0) {
+ // WorkSerializer got orphaned while this was running
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_work_serializer_trace)) {
+ gpr_log(GPR_INFO, " Queue Drained. Destroying");
+ }
+ delete this;
return;
}
}
diff --git a/contrib/libs/grpc/src/cpp/server/server_cc.cc b/contrib/libs/grpc/src/cpp/server/server_cc.cc
index edb1fe4d1d..02a52263c9 100644
--- a/contrib/libs/grpc/src/cpp/server/server_cc.cc
+++ b/contrib/libs/grpc/src/cpp/server/server_cc.cc
@@ -225,17 +225,24 @@ void ServerInterface::RegisteredAsyncRequest::IssueRequest(
ServerInterface::GenericAsyncRequest::GenericAsyncRequest(
ServerInterface* server, GenericServerContext* context,
internal::ServerAsyncStreamingInterface* stream, CompletionQueue* call_cq,
- ServerCompletionQueue* notification_cq, void* tag, bool delete_on_finalize)
+ ServerCompletionQueue* notification_cq, void* tag, bool delete_on_finalize,
+ bool delay_start)
: BaseAsyncRequest(server, context, stream, call_cq, notification_cq, tag,
delete_on_finalize) {
grpc_call_details_init(&call_details_);
- GPR_ASSERT(notification_cq);
- GPR_ASSERT(call_cq);
+ if (!delay_start) {
+ Start();
+ }
+}
+
+void ServerInterface::GenericAsyncRequest::Start() {
+ GPR_ASSERT(notification_cq_);
+ GPR_ASSERT(call_cq_);
// The following call_start_batch is internally-generated so no need for an
// explanatory log on failure.
- GPR_ASSERT(grpc_server_request_call(server->server(), &call_, &call_details_,
- context->client_metadata_.arr(),
- call_cq->cq(), notification_cq->cq(),
+ GPR_ASSERT(grpc_server_request_call(server_->server(), &call_, &call_details_,
+ context_->client_metadata_.arr(),
+ call_cq_->cq(), notification_cq_->cq(),
this) == GRPC_CALL_OK);
}
@@ -303,7 +310,9 @@ class Server::UnimplementedAsyncRequest final
UnimplementedAsyncRequest(ServerInterface* server,
grpc::ServerCompletionQueue* cq)
: GenericAsyncRequest(server, &server_context_, &generic_stream_, cq, cq,
- nullptr, false) {}
+ nullptr, false, true) {
+ Start();
+ }
bool FinalizeResult(void** tag, bool* status) override;
diff --git a/contrib/libs/libxml/CMakeLists.darwin.txt b/contrib/libs/libxml/CMakeLists.darwin.txt
index cebe9de336..1893b6f891 100644
--- a/contrib/libs/libxml/CMakeLists.darwin.txt
+++ b/contrib/libs/libxml/CMakeLists.darwin.txt
@@ -6,7 +6,6 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
find_package(ZLIB REQUIRED)
add_library(contrib-libs-libxml)
@@ -26,7 +25,6 @@ target_include_directories(contrib-libs-libxml PRIVATE
target_link_libraries(contrib-libs-libxml PUBLIC
contrib-libs-cxxsupp
yutil
- Iconv::Iconv
ZLIB::ZLIB
library-cpp-charset
)
diff --git a/contrib/libs/libxml/CMakeLists.linux-aarch64.txt b/contrib/libs/libxml/CMakeLists.linux-aarch64.txt
index 8d1f7ee7bf..09717ab04e 100644
--- a/contrib/libs/libxml/CMakeLists.linux-aarch64.txt
+++ b/contrib/libs/libxml/CMakeLists.linux-aarch64.txt
@@ -6,7 +6,6 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
find_package(ZLIB REQUIRED)
add_library(contrib-libs-libxml)
@@ -27,7 +26,6 @@ target_link_libraries(contrib-libs-libxml PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
- Iconv::Iconv
ZLIB::ZLIB
library-cpp-charset
)
diff --git a/contrib/libs/libxml/CMakeLists.linux.txt b/contrib/libs/libxml/CMakeLists.linux.txt
index 8d1f7ee7bf..09717ab04e 100644
--- a/contrib/libs/libxml/CMakeLists.linux.txt
+++ b/contrib/libs/libxml/CMakeLists.linux.txt
@@ -6,7 +6,6 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
find_package(ZLIB REQUIRED)
add_library(contrib-libs-libxml)
@@ -27,7 +26,6 @@ target_link_libraries(contrib-libs-libxml PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
- Iconv::Iconv
ZLIB::ZLIB
library-cpp-charset
)
diff --git a/contrib/restricted/boost/context/include/boost/context/stack_context.hpp b/contrib/restricted/boost/context/include/boost/context/stack_context.hpp
deleted file mode 100644
index 740d981dc7..0000000000
--- a/contrib/restricted/boost/context/include/boost/context/stack_context.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-
-// Copyright Oliver Kowalke 2014.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_CONTEXT_STACK_CONTEXT_H
-#define BOOST_CONTEXT_STACK_CONTEXT_H
-
-#include <cstddef>
-
-#include <boost/config.hpp>
-
-#include <boost/context/detail/config.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost {
-namespace context {
-
-#if ! defined(BOOST_CONTEXT_NO_CXX11)
-struct BOOST_CONTEXT_DECL stack_context {
-# if defined(BOOST_USE_SEGMENTED_STACKS)
- typedef void * segments_context[BOOST_CONTEXT_SEGMENTS];
-# endif
-
- std::size_t size{ 0 };
- void * sp{ nullptr };
-# if defined(BOOST_USE_SEGMENTED_STACKS)
- segments_context segments_ctx{};
-# endif
-# if defined(BOOST_USE_VALGRIND)
- unsigned valgrind_stack_id{ 0 };
-# endif
-};
-#else
-struct BOOST_CONTEXT_DECL stack_context {
-# if defined(BOOST_USE_SEGMENTED_STACKS)
- typedef void * segments_context[BOOST_CONTEXT_SEGMENTS];
-# endif
-
- std::size_t size;
- void * sp;
-# if defined(BOOST_USE_SEGMENTED_STACKS)
- segments_context segments_ctx;
-# endif
-# if defined(BOOST_USE_VALGRIND)
- unsigned valgrind_stack_id;
-# endif
-
- stack_context() :
- size( 0),
- sp( 0)
-# if defined(BOOST_USE_SEGMENTED_STACKS)
- , segments_ctx()
-# endif
-# if defined(BOOST_USE_VALGRIND)
- , valgrind_stack_id( 0)
-# endif
- {}
-};
-#endif
-
-}}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_CONTEXT_STACK_CONTEXT_H
diff --git a/contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm b/contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm
deleted file mode 100644
index c8a28a558e..0000000000
--- a/contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm
+++ /dev/null
@@ -1,205 +0,0 @@
-
-; Copyright Oliver Kowalke 2009.
-; Distributed under the Boost Software License, Version 1.0.
-; (See accompanying file LICENSE_1_0.txt or copy at
-; http://www.boost.org/LICENSE_1_0.txt)
-
-; ----------------------------------------------------------------------------------
-; | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
-; ----------------------------------------------------------------------------------
-; | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
-; ----------------------------------------------------------------------------------
-; | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
-; ----------------------------------------------------------------------------------
-; | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
-; ----------------------------------------------------------------------------------
-; | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
-; ----------------------------------------------------------------------------------
-; | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
-; ----------------------------------------------------------------------------------
-; | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc |
-; ----------------------------------------------------------------------------------
-; | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
-; ----------------------------------------------------------------------------------
-; | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc |
-; ----------------------------------------------------------------------------------
-; | limit | base | R12 | R13 |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
-; ----------------------------------------------------------------------------------
-; | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc |
-; ----------------------------------------------------------------------------------
-; | R14 | R15 | RDI | RSI |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
-; ----------------------------------------------------------------------------------
-; | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c |
-; ----------------------------------------------------------------------------------
-; | RBX | RBP | hidden | RIP |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
-; ----------------------------------------------------------------------------------
-; | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c |
-; ----------------------------------------------------------------------------------
-; | parameter area |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
-; ----------------------------------------------------------------------------------
-; | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c |
-; ----------------------------------------------------------------------------------
-; | FCTX | DATA | |
-; ----------------------------------------------------------------------------------
-
-.code
-
-jump_fcontext PROC BOOST_CONTEXT_EXPORT FRAME
- .endprolog
-
- ; prepare stack
- lea rsp, [rsp-0118h]
-
-IFNDEF BOOST_USE_TSX
- ; save XMM storage
- movaps [rsp], xmm6
- movaps [rsp+010h], xmm7
- movaps [rsp+020h], xmm8
- movaps [rsp+030h], xmm9
- movaps [rsp+040h], xmm10
- movaps [rsp+050h], xmm11
- movaps [rsp+060h], xmm12
- movaps [rsp+070h], xmm13
- movaps [rsp+080h], xmm14
- movaps [rsp+090h], xmm15
- ; save MMX control- and status-word
- stmxcsr [rsp+0a0h]
- ; save x87 control-word
- fnstcw [rsp+0a4h]
-ENDIF
-
- ; load NT_TIB
- mov r10, gs:[030h]
- ; save fiber local storage
- mov rax, [r10+020h]
- mov [rsp+0b0h], rax
- ; save current deallocation stack
- mov rax, [r10+01478h]
- mov [rsp+0b8h], rax
- ; save current stack limit
- mov rax, [r10+010h]
- mov [rsp+0c0h], rax
- ; save current stack base
- mov rax, [r10+08h]
- mov [rsp+0c8h], rax
-
- mov [rsp+0d0h], r12 ; save R12
- mov [rsp+0d8h], r13 ; save R13
- mov [rsp+0e0h], r14 ; save R14
- mov [rsp+0e8h], r15 ; save R15
- mov [rsp+0f0h], rdi ; save RDI
- mov [rsp+0f8h], rsi ; save RSI
- mov [rsp+0100h], rbx ; save RBX
- mov [rsp+0108h], rbp ; save RBP
-
- mov [rsp+0110h], rcx ; save hidden address of transport_t
-
- ; preserve RSP (pointing to context-data) in R9
- mov r9, rsp
-
- ; restore RSP (pointing to context-data) from RDX
- mov rsp, rdx
-
-IFNDEF BOOST_USE_TSX
- ; restore XMM storage
- movaps xmm6, [rsp]
- movaps xmm7, [rsp+010h]
- movaps xmm8, [rsp+020h]
- movaps xmm9, [rsp+030h]
- movaps xmm10, [rsp+040h]
- movaps xmm11, [rsp+050h]
- movaps xmm12, [rsp+060h]
- movaps xmm13, [rsp+070h]
- movaps xmm14, [rsp+080h]
- movaps xmm15, [rsp+090h]
- ; restore MMX control- and status-word
- ldmxcsr [rsp+0a0h]
- ; save x87 control-word
- fldcw [rsp+0a4h]
-ENDIF
-
- ; load NT_TIB
- mov r10, gs:[030h]
- ; restore fiber local storage
- mov rax, [rsp+0b0h]
- mov [r10+020h], rax
- ; restore current deallocation stack
- mov rax, [rsp+0b8h]
- mov [r10+01478h], rax
- ; restore current stack limit
- mov rax, [rsp+0c0h]
- mov [r10+010h], rax
- ; restore current stack base
- mov rax, [rsp+0c8h]
- mov [r10+08h], rax
-
- mov r12, [rsp+0d0h] ; restore R12
- mov r13, [rsp+0d8h] ; restore R13
- mov r14, [rsp+0e0h] ; restore R14
- mov r15, [rsp+0e8h] ; restore R15
- mov rdi, [rsp+0f0h] ; restore RDI
- mov rsi, [rsp+0f8h] ; restore RSI
- mov rbx, [rsp+0100h] ; restore RBX
- mov rbp, [rsp+0108h] ; restore RBP
-
- mov rax, [rsp+0110h] ; restore hidden address of transport_t
-
- ; prepare stack
- lea rsp, [rsp+0118h]
-
- ; load return-address
- pop r10
-
- ; transport_t returned in RAX
- ; return parent fcontext_t
- mov [rax], r9
- ; return data
- mov [rax+08h], r8
-
- ; transport_t as 1.arg of context-function
- mov rcx, rax
-
- ; indirect jump to context
- jmp r10
-jump_fcontext ENDP
-END
diff --git a/contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm b/contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm
deleted file mode 100644
index 8f6c959a83..0000000000
--- a/contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm
+++ /dev/null
@@ -1,163 +0,0 @@
-
-; Copyright Oliver Kowalke 2009.
-; Distributed under the Boost Software License, Version 1.0.
-; (See accompanying file LICENSE_1_0.txt or copy at
-; http://www.boost.org/LICENSE_1_0.txt)
-
-; ----------------------------------------------------------------------------------
-; | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
-; ----------------------------------------------------------------------------------
-; | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
-; ----------------------------------------------------------------------------------
-; | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
-; ----------------------------------------------------------------------------------
-; | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
-; ----------------------------------------------------------------------------------
-; | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
-; ----------------------------------------------------------------------------------
-; | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
-; ----------------------------------------------------------------------------------
-; | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc |
-; ----------------------------------------------------------------------------------
-; | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
-; ----------------------------------------------------------------------------------
-; | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc |
-; ----------------------------------------------------------------------------------
-; | limit | base | R12 | R13 |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
-; ----------------------------------------------------------------------------------
-; | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc |
-; ----------------------------------------------------------------------------------
-; | R14 | R15 | RDI | RSI |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
-; ----------------------------------------------------------------------------------
-; | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c |
-; ----------------------------------------------------------------------------------
-; | RBX | RBP | hidden | RIP |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
-; ----------------------------------------------------------------------------------
-; | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c |
-; ----------------------------------------------------------------------------------
-; | parameter area |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
-; ----------------------------------------------------------------------------------
-; | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c |
-; ----------------------------------------------------------------------------------
-; | FCTX | DATA | |
-; ----------------------------------------------------------------------------------
-
-; standard C library function
-EXTERN _exit:PROC
-.code
-
-; generate function table entry in .pdata and unwind information in
-make_fcontext PROC BOOST_CONTEXT_EXPORT FRAME
- ; .xdata for a function's structured exception handling unwind behavior
- .endprolog
-
- ; first arg of make_fcontext() == top of context-stack
- mov rax, rcx
-
- ; shift address in RAX to lower 16 byte boundary
- ; == pointer to fcontext_t and address of context stack
- and rax, -16
-
- ; reserve space for context-data on context-stack
- ; on context-function entry: (RSP -0x8) % 16 == 0
- sub rax, 0150h
-
- ; third arg of make_fcontext() == address of context-function
- ; stored in RBX
- mov [rax+0100h], r8
-
- ; first arg of make_fcontext() == top of context-stack
- ; save top address of context stack as 'base'
- mov [rax+0c8h], rcx
- ; second arg of make_fcontext() == size of context-stack
- ; negate stack size for LEA instruction (== substraction)
- neg rdx
- ; compute bottom address of context stack (limit)
- lea rcx, [rcx+rdx]
- ; save bottom address of context stack as 'limit'
- mov [rax+0c0h], rcx
- ; save address of context stack limit as 'dealloction stack'
- mov [rax+0b8h], rcx
- ; set fiber-storage to zero
- xor rcx, rcx
- mov [rax+0b0h], rcx
-
- ; save MMX control- and status-word
- stmxcsr [rax+0a0h]
- ; save x87 control-word
- fnstcw [rax+0a4h]
-
- ; compute address of transport_t
- lea rcx, [rax+0140h]
- ; store address of transport_t in hidden field
- mov [rax+0110h], rcx
-
- ; compute abs address of label trampoline
- lea rcx, trampoline
- ; save address of trampoline as return-address for context-function
- ; will be entered after calling jump_fcontext() first time
- mov [rax+0118h], rcx
-
- ; compute abs address of label finish
- lea rcx, finish
- ; save address of finish as return-address for context-function in RBP
- ; will be entered after context-function returns
- mov [rax+0108h], rcx
-
- ret ; return pointer to context-data
-
-trampoline:
- ; store return address on stack
- ; fix stack alignment
- push rbp
- ; jump to context-function
- jmp rbx
-
-finish:
- ; exit code is zero
- xor rcx, rcx
- ; exit application
- call _exit
- hlt
-make_fcontext ENDP
-END
diff --git a/contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm b/contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm
deleted file mode 100644
index b57dd15884..0000000000
--- a/contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm
+++ /dev/null
@@ -1,207 +0,0 @@
-
-; Copyright Oliver Kowalke 2009.
-; Distributed under the Boost Software License, Version 1.0.
-; (See accompanying file LICENSE_1_0.txt or copy at
-; http://www.boost.org/LICENSE_1_0.txt)
-
-; ----------------------------------------------------------------------------------
-; | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
-; ----------------------------------------------------------------------------------
-; | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
-; ----------------------------------------------------------------------------------
-; | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
-; ----------------------------------------------------------------------------------
-; | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
-; ----------------------------------------------------------------------------------
-; | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
-; ----------------------------------------------------------------------------------
-; | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c |
-; ----------------------------------------------------------------------------------
-; | SEE registers (XMM6-XMM15) |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
-; ----------------------------------------------------------------------------------
-; | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc |
-; ----------------------------------------------------------------------------------
-; | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
-; ----------------------------------------------------------------------------------
-; | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc |
-; ----------------------------------------------------------------------------------
-; | limit | base | R12 | R13 |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
-; ----------------------------------------------------------------------------------
-; | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc |
-; ----------------------------------------------------------------------------------
-; | R14 | R15 | RDI | RSI |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
-; ----------------------------------------------------------------------------------
-; | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c |
-; ----------------------------------------------------------------------------------
-; | RBX | RBP | hidden | RIP |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
-; ----------------------------------------------------------------------------------
-; | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c |
-; ----------------------------------------------------------------------------------
-; | parameter area |
-; ----------------------------------------------------------------------------------
-; ----------------------------------------------------------------------------------
-; | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
-; ----------------------------------------------------------------------------------
-; | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c |
-; ----------------------------------------------------------------------------------
-; | FCTX | DATA | |
-; ----------------------------------------------------------------------------------
-
-.code
-
-ontop_fcontext PROC BOOST_CONTEXT_EXPORT FRAME
- .endprolog
-
- ; prepare stack
- lea rsp, [rsp-0118h]
-
-IFNDEF BOOST_USE_TSX
- ; save XMM storage
- movaps [rsp], xmm6
- movaps [rsp+010h], xmm7
- movaps [rsp+020h], xmm8
- movaps [rsp+030h], xmm9
- movaps [rsp+040h], xmm10
- movaps [rsp+050h], xmm11
- movaps [rsp+060h], xmm12
- movaps [rsp+070h], xmm13
- movaps [rsp+080h], xmm14
- movaps [rsp+090h], xmm15
- ; save MMX control- and status-word
- stmxcsr [rsp+0a0h]
- ; save x87 control-word
- fnstcw [rsp+0a4h]
-ENDIF
-
- ; load NT_TIB
- mov r10, gs:[030h]
- ; save fiber local storage
- mov rax, [r10+020h]
- mov [rsp+0b0h], rax
- ; save current deallocation stack
- mov rax, [r10+01478h]
- mov [rsp+0b8h], rax
- ; save current stack limit
- mov rax, [r10+010h]
- mov [rsp+0c0h], rax
- ; save current stack base
- mov rax, [r10+08h]
- mov [rsp+0c8h], rax
-
- mov [rsp+0d0h], r12 ; save R12
- mov [rsp+0d8h], r13 ; save R13
- mov [rsp+0e0h], r14 ; save R14
- mov [rsp+0e8h], r15 ; save R15
- mov [rsp+0f0h], rdi ; save RDI
- mov [rsp+0f8h], rsi ; save RSI
- mov [rsp+0100h], rbx ; save RBX
- mov [rsp+0108h], rbp ; save RBP
-
- mov [rsp+0110h], rcx ; save hidden address of transport_t
-
- ; preserve RSP (pointing to context-data) in RCX
- mov rcx, rsp
-
- ; restore RSP (pointing to context-data) from RDX
- mov rsp, rdx
-
-IFNDEF BOOST_USE_TSX
- ; restore XMM storage
- movaps xmm6, [rsp]
- movaps xmm7, [rsp+010h]
- movaps xmm8, [rsp+020h]
- movaps xmm9, [rsp+030h]
- movaps xmm10, [rsp+040h]
- movaps xmm11, [rsp+050h]
- movaps xmm12, [rsp+060h]
- movaps xmm13, [rsp+070h]
- movaps xmm14, [rsp+080h]
- movaps xmm15, [rsp+090h]
- ; restore MMX control- and status-word
- ldmxcsr [rsp+0a0h]
- ; save x87 control-word
- fldcw [rsp+0a4h]
-ENDIF
-
- ; load NT_TIB
- mov r10, gs:[030h]
- ; restore fiber local storage
- mov rax, [rsp+0b0h]
- mov [r10+020h], rax
- ; restore current deallocation stack
- mov rax, [rsp+0b8h]
- mov [r10+01478h], rax
- ; restore current stack limit
- mov rax, [rsp+0c0h]
- mov [r10+010h], rax
- ; restore current stack base
- mov rax, [rsp+0c8h]
- mov [r10+08h], rax
-
- mov r12, [rsp+0d0h] ; restore R12
- mov r13, [rsp+0d8h] ; restore R13
- mov r14, [rsp+0e0h] ; restore R14
- mov r15, [rsp+0e8h] ; restore R15
- mov rdi, [rsp+0f0h] ; restore RDI
- mov rsi, [rsp+0f8h] ; restore RSI
- mov rbx, [rsp+0100h] ; restore RBX
- mov rbp, [rsp+0108h] ; restore RBP
-
- mov rax, [rsp+0110h] ; restore hidden address of transport_t
-
- ; prepare stack
- lea rsp, [rsp+0118h]
-
- ; keep return-address on stack
-
- ; transport_t returned in RAX
- ; return parent fcontext_t
- mov [rax], rcx
- ; return data
- mov [rax+08h], r8
-
- ; transport_t as 1.arg of context-function
- ; RCX contains address of returned (hidden) transfer_t
- mov rcx, rax
- ; RDX contains address of passed transfer_t
- mov rdx, rax
-
- ; indirect jump to context
- jmp r9
-ontop_fcontext ENDP
-END
diff --git a/contrib/restricted/boost/context/src/windows/stack_traits.cpp b/contrib/restricted/boost/context/src/windows/stack_traits.cpp
deleted file mode 100644
index 4edada0965..0000000000
--- a/contrib/restricted/boost/context/src/windows/stack_traits.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-
-// Copyright Oliver Kowalke 2014.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include "boost/context/stack_traits.hpp"
-
-extern "C" {
-#include <windows.h>
-}
-
-//#if defined (BOOST_WINDOWS) || _POSIX_C_SOURCE >= 200112L
-
-#include <algorithm>
-#include <cmath>
-#include <cstddef>
-#include <cstring>
-#include <stdexcept>
-
-#include <boost/assert.hpp>
-#include <boost/context/detail/config.hpp>
-
-#include <boost/context/stack_context.hpp>
-
-// x86_64
-// test x86_64 before i386 because icc might
-// define __i686__ for x86_64 too
-#if defined(__x86_64__) || defined(__x86_64) \
- || defined(__amd64__) || defined(__amd64) \
- || defined(_M_X64) || defined(_M_AMD64)
-
-// Windows seams not to provide a constant or function
-// telling the minimal stacksize
-# define MIN_STACKSIZE 8 * 1024
-#else
-# define MIN_STACKSIZE 4 * 1024
-#endif
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace {
-
-std::size_t pagesize() BOOST_NOEXCEPT_OR_NOTHROW {
- SYSTEM_INFO si;
- ::GetSystemInfo(&si);
- return static_cast< std::size_t >( si.dwPageSize );
-}
-
-}
-
-namespace boost {
-namespace context {
-
-// Windows seams not to provide a limit for the stacksize
-// libcoco uses 32k+4k bytes as minimum
-BOOST_CONTEXT_DECL
-bool
-stack_traits::is_unbounded() BOOST_NOEXCEPT_OR_NOTHROW {
- return true;
-}
-
-BOOST_CONTEXT_DECL
-std::size_t
-stack_traits::page_size() BOOST_NOEXCEPT_OR_NOTHROW {
- static std::size_t size = pagesize();
- return size;
-}
-
-BOOST_CONTEXT_DECL
-std::size_t
-stack_traits::default_size() BOOST_NOEXCEPT_OR_NOTHROW {
- return 128 * 1024;
-}
-
-// because Windows seams not to provide a limit for minimum stacksize
-BOOST_CONTEXT_DECL
-std::size_t
-stack_traits::minimum_size() BOOST_NOEXCEPT_OR_NOTHROW {
- return MIN_STACKSIZE;
-}
-
-// because Windows seams not to provide a limit for maximum stacksize
-// maximum_size() can never be called (pre-condition ! is_unbounded() )
-BOOST_CONTEXT_DECL
-std::size_t
-stack_traits::maximum_size() BOOST_NOEXCEPT_OR_NOTHROW {
- BOOST_ASSERT( ! is_unbounded() );
- return 1 * 1024 * 1024 * 1024; // 1GB
-}
-
-}}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
diff --git a/contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp b/contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp
deleted file mode 100644
index a31ebb56a9..0000000000
--- a/contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-
-// Copyright Oliver Kowalke 2009.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include "boost/coroutine/stack_traits.hpp"
-
-extern "C" {
-#include <windows.h>
-}
-
-//#if defined (BOOST_WINDOWS) || _POSIX_C_SOURCE >= 200112L
-
-#include <algorithm>
-#include <cmath>
-#include <cstddef>
-#include <cstring>
-#include <stdexcept>
-
-#include <boost/assert.hpp>
-#include <boost/coroutine/detail/config.hpp>
-
-#include <boost/coroutine/stack_context.hpp>
-
-// x86_64
-// test x86_64 before i386 because icc might
-// define __i686__ for x86_64 too
-#if defined(__x86_64__) || defined(__x86_64) \
- || defined(__amd64__) || defined(__amd64) \
- || defined(_M_X64) || defined(_M_AMD64)
-
-// Windows seams not to provide a constant or function
-// telling the minimal stacksize
-# define MIN_STACKSIZE 8 * 1024
-#else
-# define MIN_STACKSIZE 4 * 1024
-#endif
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace {
-
-std::size_t pagesize()
-{
- SYSTEM_INFO si;
- ::GetSystemInfo(&si);
- return static_cast< std::size_t >( si.dwPageSize );
-}
-
-}
-
-namespace boost {
-namespace coroutines {
-
-// Windows seams not to provide a limit for the stacksize
-// libcoco uses 32k+4k bytes as minimum
-bool
-stack_traits::is_unbounded() BOOST_NOEXCEPT
-{ return true; }
-
-std::size_t
-stack_traits::page_size() BOOST_NOEXCEPT
-{
- static std::size_t size = pagesize();
- return size;
-}
-
-std::size_t
-stack_traits::default_size() BOOST_NOEXCEPT
-{
- std::size_t size = 64 * 1024; // 64 kB
- if ( is_unbounded() )
- return (std::max)( size, minimum_size() );
-
- BOOST_ASSERT( maximum_size() >= minimum_size() );
- return maximum_size() == minimum_size()
- ? minimum_size()
- : ( std::min)( size, maximum_size() );
-}
-
-// because Windows seams not to provide a limit for minimum stacksize
-std::size_t
-stack_traits::minimum_size() BOOST_NOEXCEPT
-{ return MIN_STACKSIZE; }
-
-// because Windows seams not to provide a limit for maximum stacksize
-// maximum_size() can never be called (pre-condition ! is_unbounded() )
-std::size_t
-stack_traits::maximum_size() BOOST_NOEXCEPT
-{
- BOOST_ASSERT( ! is_unbounded() );
- return 1 * 1024 * 1024 * 1024; // 1GB
-}
-
-}}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
diff --git a/library/cpp/CMakeLists.darwin.txt b/library/cpp/CMakeLists.darwin.txt
index 74f3a1430a..50514bafce 100644
--- a/library/cpp/CMakeLists.darwin.txt
+++ b/library/cpp/CMakeLists.darwin.txt
@@ -82,6 +82,7 @@ add_subdirectory(time_provider)
add_subdirectory(timezone_conversion)
add_subdirectory(tld)
add_subdirectory(unicode)
+add_subdirectory(unified_agent_client)
add_subdirectory(uri)
add_subdirectory(xml)
add_subdirectory(yaml)
diff --git a/library/cpp/CMakeLists.linux-aarch64.txt b/library/cpp/CMakeLists.linux-aarch64.txt
index 7ccca0159a..2bc7249205 100644
--- a/library/cpp/CMakeLists.linux-aarch64.txt
+++ b/library/cpp/CMakeLists.linux-aarch64.txt
@@ -81,6 +81,7 @@ add_subdirectory(time_provider)
add_subdirectory(timezone_conversion)
add_subdirectory(tld)
add_subdirectory(unicode)
+add_subdirectory(unified_agent_client)
add_subdirectory(uri)
add_subdirectory(xml)
add_subdirectory(yaml)
diff --git a/library/cpp/CMakeLists.linux.txt b/library/cpp/CMakeLists.linux.txt
index 74f3a1430a..50514bafce 100644
--- a/library/cpp/CMakeLists.linux.txt
+++ b/library/cpp/CMakeLists.linux.txt
@@ -82,6 +82,7 @@ add_subdirectory(time_provider)
add_subdirectory(timezone_conversion)
add_subdirectory(tld)
add_subdirectory(unicode)
+add_subdirectory(unified_agent_client)
add_subdirectory(uri)
add_subdirectory(xml)
add_subdirectory(yaml)
diff --git a/library/cpp/actors/core/actorsystem.h b/library/cpp/actors/core/actorsystem.h
index 8051f5ee57..cd2cfda1bb 100644
--- a/library/cpp/actors/core/actorsystem.h
+++ b/library/cpp/actors/core/actorsystem.h
@@ -122,7 +122,21 @@ namespace NActors {
}
ui32 GetThreads(ui32 poolId) const {
- return Executors ? Executors[poolId]->GetThreads() : CpuManager.GetThreads(poolId);
+ auto result = GetThreadsOptional(poolId);
+ Y_VERIFY(result, "undefined pool id: %" PRIu32, (ui32)poolId);
+ return *result;
+ }
+
+ std::optional<ui32> GetThreadsOptional(const ui32 poolId) const {
+ if (Y_LIKELY(Executors)) {
+ if (Y_LIKELY(poolId < ExecutorsCount)) {
+ return Executors[poolId]->GetDefaultThreadCount();
+ } else {
+ return {};
+ }
+ } else {
+ return CpuManager.GetThreadsOptional(poolId);
+ }
}
};
diff --git a/library/cpp/actors/core/config.h b/library/cpp/actors/core/config.h
index 0bf4b871d7..650b1f39f5 100644
--- a/library/cpp/actors/core/config.h
+++ b/library/cpp/actors/core/config.h
@@ -128,10 +128,10 @@ namespace NActors {
Y_FAIL("undefined pool id: %" PRIu32, (ui32)poolId);
}
- ui32 GetThreads(ui32 poolId) const {
+ std::optional<ui32> GetThreadsOptional(ui32 poolId) const {
for (const auto& p : Basic) {
if (p.PoolId == poolId) {
- return p.Threads;
+ return p.DefaultThreadCount;
}
}
for (const auto& p : IO) {
@@ -144,7 +144,13 @@ namespace NActors {
return p.Concurrency ? p.Concurrency : UnitedWorkers.CpuCount;
}
}
- Y_FAIL("undefined pool id: %" PRIu32, (ui32)poolId);
+ return {};
+ }
+
+ ui32 GetThreads(ui32 poolId) const {
+ auto result = GetThreadsOptional(poolId);
+ Y_VERIFY(result, "undefined pool id: %" PRIu32, (ui32)poolId);
+ return *result;
}
};
diff --git a/library/cpp/actors/core/executor_pool.h b/library/cpp/actors/core/executor_pool.h
index f39415c7e2..c7c85e61fd 100644
--- a/library/cpp/actors/core/executor_pool.h
+++ b/library/cpp/actors/core/executor_pool.h
@@ -10,6 +10,11 @@ namespace NActors {
struct TWorkerContext;
class ISchedulerCookie;
+ struct TCpuConsumption {
+ double ConsumedUs = 0;
+ double BookedUs = 0;
+ };
+
class IExecutorPool : TNonCopyable {
public:
const ui32 PoolId;
@@ -131,14 +136,9 @@ namespace NActors {
return false;
}
- virtual double GetThreadConsumedUs(i16 threadIdx) {
- Y_UNUSED(threadIdx);
- return 0.0;
- }
-
- virtual double GetThreadBookedUs(i16 threadIdx) {
+ virtual TCpuConsumption GetThreadCpuConsumption(i16 threadIdx) {
Y_UNUSED(threadIdx);
- return 0.0;
+ return TCpuConsumption{0.0, 0.0};
}
};
diff --git a/library/cpp/actors/core/executor_pool_basic.cpp b/library/cpp/actors/core/executor_pool_basic.cpp
index 0c984f8fb0..de04105991 100644
--- a/library/cpp/actors/core/executor_pool_basic.cpp
+++ b/library/cpp/actors/core/executor_pool_basic.cpp
@@ -334,6 +334,8 @@ namespace NActors {
poolStats.MaxUtilizationTime = RelaxedLoad(&MaxUtilizationAccumulator) / (i64)(NHPTimer::GetCyclesPerSecond() / 1000);
poolStats.WrongWakenedThreadCount = RelaxedLoad(&WrongWakenedThreadCount);
poolStats.CurrentThreadCount = RelaxedLoad(&ThreadCount);
+ poolStats.DefaultThreadCount = DefaultThreadCount;
+ poolStats.MaxThreadCount = MaxThreadCount;
if (Harmonizer) {
TPoolHarmonizedStats stats = Harmonizer->GetPoolStats(PoolId);
poolStats.IsNeedy = stats.IsNeedy;
@@ -342,6 +344,7 @@ namespace NActors {
poolStats.IncreasingThreadsByNeedyState = stats.IncreasingThreadsByNeedyState;
poolStats.DecreasingThreadsByStarvedState = stats.DecreasingThreadsByStarvedState;
poolStats.DecreasingThreadsByHoggishState = stats.DecreasingThreadsByHoggishState;
+ poolStats.PotentialMaxThreadCount = stats.PotentialMaxThreadCount;
}
statsCopy.resize(PoolThreads + 1);
@@ -490,24 +493,14 @@ namespace NActors {
return false;
}
- double TBasicExecutorPool::GetThreadConsumedUs(i16 threadIdx) {
+ TCpuConsumption TBasicExecutorPool::GetThreadCpuConsumption(i16 threadIdx) {
if ((ui32)threadIdx >= PoolThreads) {
- return 0;
+ return {0.0, 0.0};
}
TThreadCtx& threadCtx = Threads[threadIdx];
TExecutorThreadStats stats;
threadCtx.Thread->GetCurrentStats(stats);
- return Ts2Us(stats.ElapsedTicks);
- }
-
- double TBasicExecutorPool::GetThreadBookedUs(i16 threadIdx) {
- if ((ui32)threadIdx >= PoolThreads) {
- return 0;
- }
- TThreadCtx& threadCtx = Threads[threadIdx];
- TExecutorThreadStats stats;
- threadCtx.Thread->GetCurrentStats(stats);
- return stats.CpuNs / 1000.0;
+ return {Ts2Us(stats.SafeElapsedTicks), static_cast<double>(stats.CpuUs)};
}
i16 TBasicExecutorPool::GetBlockingThreadCount() const {
diff --git a/library/cpp/actors/core/executor_pool_basic.h b/library/cpp/actors/core/executor_pool_basic.h
index cd94a998f1..813f91dc9a 100644
--- a/library/cpp/actors/core/executor_pool_basic.h
+++ b/library/cpp/actors/core/executor_pool_basic.h
@@ -153,8 +153,7 @@ namespace NActors {
i16 GetMinThreadCount() const override;
i16 GetMaxThreadCount() const override;
bool IsThreadBeingStopped(i16 threadIdx) const override;
- double GetThreadConsumedUs(i16 threadIdx) override;
- double GetThreadBookedUs(i16 threadIdx) override;
+ TCpuConsumption GetThreadCpuConsumption(i16 threadIdx) override;
i16 GetBlockingThreadCount() const override;
i16 GetPriority() const override;
diff --git a/library/cpp/actors/core/executor_pool_basic_ut.cpp b/library/cpp/actors/core/executor_pool_basic_ut.cpp
index 6361bc6662..f96f65931a 100644
--- a/library/cpp/actors/core/executor_pool_basic_ut.cpp
+++ b/library/cpp/actors/core/executor_pool_basic_ut.cpp
@@ -339,7 +339,7 @@ Y_UNIT_TEST_SUITE(BasicExecutorPool) {
UNIT_ASSERT_VALUES_EQUAL(stats[0].PreemptedEvents, 0);
UNIT_ASSERT_VALUES_EQUAL(stats[0].NonDeliveredEvents, 0);
UNIT_ASSERT_VALUES_EQUAL(stats[0].EmptyMailboxActivation, 0);
- //UNIT_ASSERT_VALUES_EQUAL(stats[0].CpuNs, 0); // depends on total duration of test, so undefined
+ //UNIT_ASSERT_VALUES_EQUAL(stats[0].CpuUs, 0); // depends on total duration of test, so undefined
UNIT_ASSERT(stats[0].ElapsedTicks > 0);
UNIT_ASSERT(stats[0].ParkedTicks > 0);
UNIT_ASSERT_VALUES_EQUAL(stats[0].BlockedTicks, 0);
diff --git a/library/cpp/actors/core/executor_pool_united_ut.cpp b/library/cpp/actors/core/executor_pool_united_ut.cpp
index 133e9c5f2a..a7c7399d73 100644
--- a/library/cpp/actors/core/executor_pool_united_ut.cpp
+++ b/library/cpp/actors/core/executor_pool_united_ut.cpp
@@ -171,7 +171,7 @@ Y_UNIT_TEST_SUITE(UnitedExecutorPool) {
//UNIT_ASSERT_VALUES_EQUAL(stats[0].PreemptedEvents, 0); // depends on execution time and system load, so may be non-zero
UNIT_ASSERT_VALUES_EQUAL(stats[0].NonDeliveredEvents, 0);
UNIT_ASSERT_VALUES_EQUAL(stats[0].EmptyMailboxActivation, 0);
- //UNIT_ASSERT_VALUES_EQUAL(stats[0].CpuNs, 0); // depends on total duration of test, so undefined
+ //UNIT_ASSERT_VALUES_EQUAL(stats[0].CpuUs, 0); // depends on total duration of test, so undefined
UNIT_ASSERT(stats[0].ElapsedTicks > 0);
//UNIT_ASSERT(stats[0].ParkedTicks == 0); // per-pool parked time does not make sense for united pools
UNIT_ASSERT_VALUES_EQUAL(stats[0].BlockedTicks, 0);
diff --git a/library/cpp/actors/core/harmonizer.cpp b/library/cpp/actors/core/harmonizer.cpp
index f318d8909c..e2fd0c5f24 100644
--- a/library/cpp/actors/core/harmonizer.cpp
+++ b/library/cpp/actors/core/harmonizer.cpp
@@ -121,6 +121,7 @@ struct TPoolInfo {
TAtomic IncreasingThreadsByNeedyState = 0;
TAtomic DecreasingThreadsByStarvedState = 0;
TAtomic DecreasingThreadsByHoggishState = 0;
+ TAtomic PotentialMaxThreadCount = 0;
bool IsBeingStopped(i16 threadIdx);
double GetBooked(i16 threadIdx);
@@ -169,9 +170,10 @@ double TPoolInfo::GetlastSecondPoolConsumed(i16 threadIdx) {
void TPoolInfo::PullStats(ui64 ts) {
for (i16 threadIdx = 0; threadIdx < MaxThreadCount; ++threadIdx) {
TThreadInfo &threadInfo = ThreadInfo[threadIdx];
- threadInfo.Consumed.Register(ts, Pool->GetThreadConsumedUs(threadIdx));
+ TCpuConsumption cpuConsumption = Pool->GetThreadCpuConsumption(threadIdx);
+ threadInfo.Consumed.Register(ts, cpuConsumption.ConsumedUs);
LWPROBE(SavedValues, Pool->PoolId, Pool->GetName(), "consumed", UNROLL_HISTORY(threadInfo.Consumed.History));
- threadInfo.Booked.Register(ts, Pool->GetThreadBookedUs(threadIdx));
+ threadInfo.Booked.Register(ts, cpuConsumption.BookedUs);
LWPROBE(SavedValues, Pool->PoolId, Pool->GetName(), "booked", UNROLL_HISTORY(threadInfo.Booked.History));
}
}
@@ -236,7 +238,7 @@ void THarmonizer::PullStats(ui64 ts) {
}
Y_FORCE_INLINE bool IsStarved(double consumed, double booked) {
- return Max(consumed, booked) > 0.1 && consumed < booked * 0.7;
+ return consumed < booked * 0.7;
}
Y_FORCE_INLINE bool IsHoggish(double booked, ui16 currentThreadCount) {
@@ -293,35 +295,43 @@ void THarmonizer::HarmonizeImpl(ui64 ts) {
LWPROBE(HarmonizeCheckPool, poolIdx, pool.Pool->GetName(), poolBooked, poolConsumed, lastSecondPoolBooked, lastSecondPoolConsumed, pool.GetThreadCount(), pool.MaxThreadCount, isStarved, isNeedy, isHoggish);
}
double budget = total - Max(booked, lastSecondBooked);
+ i16 budgetInt = static_cast<i16>(Max(budget, 0.0));
if (budget < -0.1) {
isStarvedPresent = true;
}
+ for (size_t poolIdx = 0; poolIdx < Pools.size(); ++poolIdx) {
+ TPoolInfo& pool = Pools[poolIdx];
+ AtomicSet(pool.PotentialMaxThreadCount, Min(pool.MaxThreadCount, budgetInt));
+ }
double overbooked = consumed - booked;
if (isStarvedPresent) {
- // last_starved_at_consumed_value = сумма по всем пулам consumed;
- // TODO(cthulhu): использовать как лимит планвно устремлять этот лимит к total,
- // использовать вместо total
- if (beingStopped && beingStopped >= overbooked) {
- // do nothing
- } else {
- TStackVec<size_t> reorder;
- for (size_t i = 0; i < Pools.size(); ++i) {
- reorder.push_back(i);
- }
- for (ui16 poolIdx : PriorityOrder) {
- TPoolInfo &pool = Pools[poolIdx];
- i64 threadCount = pool.GetThreadCount();
- if (threadCount > pool.DefaultThreadCount) {
- pool.SetThreadCount(threadCount - 1);
- AtomicIncrement(pool.DecreasingThreadsByStarvedState);
- overbooked--;
- LWPROBE(HarmonizeOperation, poolIdx, pool.Pool->GetName(), "decrease", threadCount - 1, pool.DefaultThreadCount, pool.MaxThreadCount);
- if (overbooked < 1) {
- break;
- }
- }
- }
- }
+ // last_starved_at_consumed_value = сумма по всем пулам consumed;
+ // TODO(cthulhu): использовать как лимит планвно устремлять этот лимит к total,
+ // использовать вместо total
+ if (beingStopped && beingStopped >= overbooked) {
+ // do nothing
+ } else {
+ TStackVec<size_t> reorder;
+ for (size_t i = 0; i < Pools.size(); ++i) {
+ reorder.push_back(i);
+ }
+ for (ui16 poolIdx : PriorityOrder) {
+ TPoolInfo &pool = Pools[poolIdx];
+ i64 threadCount = pool.GetThreadCount();
+ while (threadCount > pool.DefaultThreadCount) {
+ pool.SetThreadCount(threadCount - 1);
+ AtomicIncrement(pool.DecreasingThreadsByStarvedState);
+ overbooked--;
+ LWPROBE(HarmonizeOperation, poolIdx, pool.Pool->GetName(), "decrease", threadCount - 1, pool.DefaultThreadCount, pool.MaxThreadCount);
+ if (overbooked < 1) {
+ break;
+ }
+ }
+ if (overbooked < 1) {
+ break;
+ }
+ }
+ }
} else {
for (size_t needyPoolIdx : needyPools) {
TPoolInfo &pool = Pools[needyPoolIdx];
@@ -422,6 +432,7 @@ TPoolHarmonizedStats THarmonizer::GetPoolStats(i16 poolId) const {
.IncreasingThreadsByNeedyState = static_cast<ui64>(RelaxedLoad(&pool.IncreasingThreadsByNeedyState)),
.DecreasingThreadsByStarvedState = static_cast<ui64>(RelaxedLoad(&pool.DecreasingThreadsByStarvedState)),
.DecreasingThreadsByHoggishState = static_cast<ui64>(RelaxedLoad(&pool.DecreasingThreadsByHoggishState)),
+ .PotentialMaxThreadCount = static_cast<i16>(RelaxedLoad(&pool.PotentialMaxThreadCount)),
.IsNeedy = static_cast<bool>(flags & 1),
.IsStarved = static_cast<bool>(flags & 2),
.IsHoggish = static_cast<bool>(flags & 4),
diff --git a/library/cpp/actors/core/harmonizer.h b/library/cpp/actors/core/harmonizer.h
index 61f13e43ac..bc6b938fe8 100644
--- a/library/cpp/actors/core/harmonizer.h
+++ b/library/cpp/actors/core/harmonizer.h
@@ -10,6 +10,7 @@ namespace NActors {
ui64 IncreasingThreadsByNeedyState = 0;
ui64 DecreasingThreadsByStarvedState = 0;
ui64 DecreasingThreadsByHoggishState = 0;
+ i16 PotentialMaxThreadCount = 0;
bool IsNeedy = false;
bool IsStarved = false;
bool IsHoggish = false;
diff --git a/library/cpp/actors/core/mon_stats.h b/library/cpp/actors/core/mon_stats.h
index 38629e2aa1..4c664a964a 100644
--- a/library/cpp/actors/core/mon_stats.h
+++ b/library/cpp/actors/core/mon_stats.h
@@ -65,6 +65,9 @@ namespace NActors {
ui64 DecreasingThreadsByHoggishState = 0;
i16 WrongWakenedThreadCount = 0;
i16 CurrentThreadCount = 0;
+ i16 PotentialMaxThreadCount = 0;
+ i16 DefaultThreadCount = 0;
+ i16 MaxThreadCount = 0;
bool IsNeedy = false;
bool IsStarved = false;
bool IsHoggish = false;
@@ -76,7 +79,8 @@ namespace NActors {
ui64 PreemptedEvents = 0; // Number of events experienced hard preemption
ui64 NonDeliveredEvents = 0;
ui64 EmptyMailboxActivation = 0;
- ui64 CpuNs = 0; // nanoseconds thread was executing on CPU (accounts for preemtion)
+ ui64 CpuUs = 0; // microseconds thread was executing on CPU (accounts for preemtion)
+ ui64 SafeElapsedTicks = 0;
ui64 WorstActivationTimeUs = 0;
NHPTimer::STime ElapsedTicks = 0;
NHPTimer::STime ParkedTicks = 0;
@@ -120,7 +124,8 @@ namespace NActors {
PreemptedEvents += RelaxedLoad(&other.PreemptedEvents);
NonDeliveredEvents += RelaxedLoad(&other.NonDeliveredEvents);
EmptyMailboxActivation += RelaxedLoad(&other.EmptyMailboxActivation);
- CpuNs += RelaxedLoad(&other.CpuNs);
+ CpuUs += RelaxedLoad(&other.CpuUs);
+ SafeElapsedTicks += RelaxedLoad(&other.SafeElapsedTicks);
RelaxedStore(
&WorstActivationTimeUs,
std::max(RelaxedLoad(&WorstActivationTimeUs), RelaxedLoad(&other.WorstActivationTimeUs)));
diff --git a/library/cpp/actors/core/worker_context.h b/library/cpp/actors/core/worker_context.h
index 2179771fb6..c3a2947df1 100644
--- a/library/cpp/actors/core/worker_context.h
+++ b/library/cpp/actors/core/worker_context.h
@@ -137,7 +137,8 @@ namespace NActors {
}
void UpdateThreadTime() {
- RelaxedStore(&WorkerStats.CpuNs, ThreadCPUTime() * 1000);
+ RelaxedStore(&WorkerStats.SafeElapsedTicks, (ui64)RelaxedLoad(&WorkerStats.ElapsedTicks));
+ RelaxedStore(&WorkerStats.CpuUs, ThreadCPUTime());
}
#else
void GetCurrentStats(TExecutorThreadStats&) const {}
diff --git a/library/cpp/actors/helpers/pool_stats_collector.h b/library/cpp/actors/helpers/pool_stats_collector.h
index b1217b1d63..d80951827d 100644
--- a/library/cpp/actors/helpers/pool_stats_collector.h
+++ b/library/cpp/actors/helpers/pool_stats_collector.h
@@ -126,6 +126,9 @@ private:
NMonitoring::TDynamicCounters::TCounterPtr MailboxPushedOutByEventCount;
NMonitoring::TDynamicCounters::TCounterPtr WrongWakenedThreadCount;
NMonitoring::TDynamicCounters::TCounterPtr CurrentThreadCount;
+ NMonitoring::TDynamicCounters::TCounterPtr PotentialMaxThreadCount;
+ NMonitoring::TDynamicCounters::TCounterPtr DefaultThreadCount;
+ NMonitoring::TDynamicCounters::TCounterPtr MaxThreadCount;
NMonitoring::TDynamicCounters::TCounterPtr IsNeedy;
NMonitoring::TDynamicCounters::TCounterPtr IsStarved;
NMonitoring::TDynamicCounters::TCounterPtr IsHoggish;
@@ -178,6 +181,9 @@ private:
MailboxPushedOutByEventCount = PoolGroup->GetCounter("MailboxPushedOutByEventCount", true);
WrongWakenedThreadCount = PoolGroup->GetCounter("WrongWakenedThreadCount", true);
CurrentThreadCount = PoolGroup->GetCounter("CurrentThreadCount", false);
+ PotentialMaxThreadCount = PoolGroup->GetCounter("PotentialMaxThreadCount", false);
+ DefaultThreadCount = PoolGroup->GetCounter("DefaultThreadCount", false);
+ MaxThreadCount = PoolGroup->GetCounter("MaxThreadCount", false);
IsNeedy = PoolGroup->GetCounter("IsNeedy", false);
IsStarved = PoolGroup->GetCounter("IsStarved", false);
IsHoggish = PoolGroup->GetCounter("IsHoggish", false);
@@ -211,7 +217,7 @@ private:
*NonDeliveredEvents = stats.NonDeliveredEvents;
*DestroyedActors = stats.PoolDestroyedActors;
*EmptyMailboxActivation = stats.EmptyMailboxActivation;
- *CpuMicrosec = stats.CpuNs / 1000;
+ *CpuMicrosec = stats.CpuUs;
*ElapsedMicrosec = ::NHPTimer::GetSeconds(stats.ElapsedTicks)*1000000;
*ParkedMicrosec = ::NHPTimer::GetSeconds(stats.ParkedTicks)*1000000;
*ActorRegistrations = stats.PoolActorRegistrations;
@@ -222,6 +228,9 @@ private:
*MailboxPushedOutByEventCount = stats.MailboxPushedOutByEventCount;
*WrongWakenedThreadCount = poolStats.WrongWakenedThreadCount;
*CurrentThreadCount = poolStats.CurrentThreadCount;
+ *PotentialMaxThreadCount = poolStats.PotentialMaxThreadCount;
+ *DefaultThreadCount = poolStats.DefaultThreadCount;
+ *MaxThreadCount = poolStats.MaxThreadCount;
*IsNeedy = poolStats.IsNeedy;
*IsStarved = poolStats.IsStarved;
*IsHoggish = poolStats.IsHoggish;
diff --git a/library/cpp/actors/interconnect/events_local.h b/library/cpp/actors/interconnect/events_local.h
index 43f376038b..b1b8ae0c75 100644
--- a/library/cpp/actors/interconnect/events_local.h
+++ b/library/cpp/actors/interconnect/events_local.h
@@ -52,9 +52,6 @@ namespace NActors {
EvProcessPingRequest,
EvGetSecureSocket,
EvSecureSocket,
- HandshakeBrokerTake,
- HandshakeBrokerFree,
- HandshakeBrokerPermit,
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// nonlocal messages; their indices must be preserved in order to work properly while doing rolling update
@@ -101,18 +98,6 @@ namespace NActors {
}
};
- struct TEvHandshakeBrokerTake: public TEventLocal<TEvHandshakeBrokerTake, ui32(ENetwork::HandshakeBrokerTake)> {
- DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeBrokerTake, "Network: TEvHandshakeBrokerTake")
- };
-
- struct TEvHandshakeBrokerFree: public TEventLocal<TEvHandshakeBrokerFree, ui32(ENetwork::HandshakeBrokerFree)> {
- DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeBrokerFree, "Network: TEvHandshakeBrokerFree")
- };
-
- struct TEvHandshakeBrokerPermit: public TEventLocal<TEvHandshakeBrokerPermit, ui32(ENetwork::HandshakeBrokerPermit)> {
- DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeBrokerPermit, "Network: TEvHandshakeBrokerPermit")
- };
-
struct TEvHandshakeAsk: public TEventLocal<TEvHandshakeAsk, ui32(ENetwork::HandshakeAsk)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeAsk, "Network: TEvHandshakeAsk")
TEvHandshakeAsk(const TActorId& self,
diff --git a/library/cpp/actors/interconnect/handshake_broker.h b/library/cpp/actors/interconnect/handshake_broker.h
deleted file mode 100644
index 70a7cb91dc..0000000000
--- a/library/cpp/actors/interconnect/handshake_broker.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#pragma once
-
-#include <library/cpp/actors/core/actor.h>
-
-#include <deque>
-
-namespace NActors {
- static constexpr ui32 DEFAULT_INFLIGHT = 100;
-
- class THandshakeBroker : public TActor<THandshakeBroker> {
- private:
- std::deque<TActorId> Waiting;
- ui32 Capacity;
-
- void Handle(TEvHandshakeBrokerTake::TPtr &ev) {
- if (Capacity > 0) {
- Capacity -= 1;
- Send(ev->Sender, new TEvHandshakeBrokerPermit());
- } else {
- Waiting.push_back(ev->Sender);
- }
- }
-
- void Handle(TEvHandshakeBrokerFree::TPtr& ev) {
- Y_UNUSED(ev);
- if (Capacity == 0 && !Waiting.empty()) {
- Send(Waiting.front(), new TEvHandshakeBrokerPermit());
- Waiting.pop_front();
- } else {
- Capacity += 1;
- }
- }
-
- void PassAway() override {
- while (!Waiting.empty()) {
- Send(Waiting.front(), new TEvHandshakeBrokerPermit());
- Waiting.pop_front();
- }
- TActor::PassAway();
- }
-
- public:
- THandshakeBroker(ui32 inflightLimit = DEFAULT_INFLIGHT)
- : TActor(&TThis::StateFunc)
- , Capacity(inflightLimit)
- {
- }
-
- static constexpr char ActorName[] = "HANDSHAKE_BROKER_ACTOR";
-
- STFUNC(StateFunc) {
- Y_UNUSED(ctx);
- switch(ev->GetTypeRewrite()) {
- hFunc(TEvHandshakeBrokerTake, Handle);
- hFunc(TEvHandshakeBrokerFree, Handle);
- cFunc(TEvents::TSystem::Poison, PassAway);
- }
- }
-
- void Bootstrap() {
- Become(&TThis::StateFunc);
- };
- };
-
- inline IActor* CreateHandshakeBroker() {
- return new THandshakeBroker();
- }
-
- inline TActorId MakeHandshakeBrokerOutId() {
- char x[12] = {'I', 'C', 'H', 's', 'h', 'k', 'B', 'r', 'k', 'O', 'u', 't'};
- return TActorId(0, TStringBuf(std::begin(x), std::end(x)));
- }
-
- inline TActorId MakeHandshakeBrokerInId() {
- char x[12] = {'I', 'C', 'H', 's', 'h', 'k', 'B', 'r', 'k', 'r', 'I', 'n'};
- return TActorId(0, TStringBuf(std::begin(x), std::end(x)));
- }
-};
diff --git a/library/cpp/actors/interconnect/interconnect_handshake.cpp b/library/cpp/actors/interconnect/interconnect_handshake.cpp
index a9c6b1dd11..dc651f3762 100644
--- a/library/cpp/actors/interconnect/interconnect_handshake.cpp
+++ b/library/cpp/actors/interconnect/interconnect_handshake.cpp
@@ -1,5 +1,4 @@
#include "interconnect_handshake.h"
-#include "handshake_broker.h"
#include "interconnect_tcp_proxy.h"
#include <library/cpp/actors/core/actor_coroutine.h>
@@ -97,13 +96,8 @@ namespace NActors {
THashMap<ui32, TInstant> LastLogNotice;
const TDuration MuteDuration = TDuration::Seconds(15);
TInstant Deadline;
- TActorId HandshakeBroker;
public:
- static constexpr IActor::EActivityType ActorActivityType() {
- return IActor::INTERCONNECT_HANDSHAKE;
- }
-
THandshakeActor(TInterconnectProxyCommon::TPtr common, const TActorId& self, const TActorId& peer,
ui32 nodeId, ui64 nextPacket, TString peerHostName, TSessionParams params)
: TActorCoroImpl(StackSize, true, true) // allow unhandled poison pills and dtors
@@ -119,7 +113,6 @@ namespace NActors {
Y_VERIFY(SelfVirtualId);
Y_VERIFY(SelfVirtualId.NodeId());
Y_VERIFY(PeerNodeId);
- HandshakeBroker = MakeHandshakeBrokerOutId();
}
THandshakeActor(TInterconnectProxyCommon::TPtr common, TSocketPtr socket)
@@ -135,7 +128,6 @@ namespace NActors {
} else {
PeerAddr.clear();
}
- HandshakeBroker = MakeHandshakeBrokerInId();
}
void UpdatePrefix() {
@@ -145,64 +137,45 @@ namespace NActors {
void Run() override {
UpdatePrefix();
- bool isBrokerActive = false;
-
- if (Send(HandshakeBroker, new TEvHandshakeBrokerTake())) {
- isBrokerActive = true;
- WaitForSpecificEvent<TEvHandshakeBrokerPermit>("HandshakeBrokerPermit");
+ // set up overall handshake process timer
+ TDuration timeout = Common->Settings.Handshake;
+ if (timeout == TDuration::Zero()) {
+ timeout = DEFAULT_HANDSHAKE_TIMEOUT;
}
+ timeout += ResolveTimeout * 2;
+ Deadline = Now() + timeout;
+ Schedule(Deadline, new TEvents::TEvWakeup);
try {
- // set up overall handshake process timer
- TDuration timeout = Common->Settings.Handshake;
- if (timeout == TDuration::Zero()) {
- timeout = DEFAULT_HANDSHAKE_TIMEOUT;
- }
- timeout += ResolveTimeout * 2;
- Deadline = Now() + timeout;
- Schedule(Deadline, new TEvents::TEvWakeup);
-
- try {
- if (Socket) {
- PerformIncomingHandshake();
- } else {
- PerformOutgoingHandshake();
- }
-
- // establish encrypted channel, or, in case when encryption is disabled, check if it matches settings
- if (ProgramInfo) {
- if (Params.Encryption) {
- EstablishSecureConnection();
- } else if (Common->Settings.EncryptionMode == EEncryptionMode::REQUIRED && !Params.AuthOnly) {
- Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "Peer doesn't support encryption, which is required");
- }
- }
- } catch (const TExHandshakeFailed&) {
- ProgramInfo.Clear();
+ if (Socket) {
+ PerformIncomingHandshake();
+ } else {
+ PerformOutgoingHandshake();
}
+ // establish encrypted channel, or, in case when encryption is disabled, check if it matches settings
if (ProgramInfo) {
- LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH04", NLog::PRI_INFO, "handshake succeeded");
- Y_VERIFY(NextPacketFromPeer);
- if (PollerToken) {
- Y_VERIFY(PollerToken->RefCount() == 1);
- PollerToken.Reset(); // ensure we are going to destroy poller token here as we will re-register the socket within other actor
+ if (Params.Encryption) {
+ EstablishSecureConnection();
+ } else if (Common->Settings.EncryptionMode == EEncryptionMode::REQUIRED && !Params.AuthOnly) {
+ Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "Peer doesn't support encryption, which is required");
}
- SendToProxy(MakeHolder<TEvHandshakeDone>(std::move(Socket), PeerVirtualId, SelfVirtualId,
- *NextPacketFromPeer, ProgramInfo->Release(), std::move(Params)));
- }
- } catch (const TDtorException&) {
- throw; // we can't use actor system when handling this exception
- } catch (...) {
- if (isBrokerActive) {
- Send(HandshakeBroker, new TEvHandshakeBrokerFree());
}
- throw;
+ } catch (const TExHandshakeFailed&) {
+ ProgramInfo.Clear();
}
- if (isBrokerActive) {
- Send(HandshakeBroker, new TEvHandshakeBrokerFree());
+ if (ProgramInfo) {
+ LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH04", NLog::PRI_INFO, "handshake succeeded");
+ Y_VERIFY(NextPacketFromPeer);
+ if (PollerToken) {
+ Y_VERIFY(PollerToken->RefCount() == 1);
+ PollerToken.Reset(); // ensure we are going to destroy poller token here as we will re-register the socket within other actor
+ }
+ SendToProxy(MakeHolder<TEvHandshakeDone>(std::move(Socket), PeerVirtualId, SelfVirtualId,
+ *NextPacketFromPeer, ProgramInfo->Release(), std::move(Params)));
}
+
Socket.Reset();
}
@@ -1022,11 +995,12 @@ namespace NActors {
const TActorId& peer, ui32 nodeId, ui64 nextPacket, TString peerHostName,
TSessionParams params) {
return new TActorCoro(MakeHolder<THandshakeActor>(std::move(common), self, peer, nodeId, nextPacket,
- std::move(peerHostName), std::move(params)));
+ std::move(peerHostName), std::move(params)), IActor::INTERCONNECT_HANDSHAKE);
}
IActor* CreateIncomingHandshakeActor(TInterconnectProxyCommon::TPtr common, TSocketPtr socket) {
- return new TActorCoro(MakeHolder<THandshakeActor>(std::move(common), std::move(socket)));
+ return new TActorCoro(MakeHolder<THandshakeActor>(std::move(common), std::move(socket)),
+ IActor::INTERCONNECT_HANDSHAKE);
}
}
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp b/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
index a8c505d94d..fdf035499f 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
@@ -39,7 +39,7 @@ namespace NActors {
SetPrefix(Sprintf("InputSession %s [node %" PRIu32 "]", SelfId().ToString().data(), NodeId));
Become(&TThis::WorkingState, DeadPeerTimeout, new TEvCheckDeadPeer);
LOG_DEBUG_IC_SESSION("ICIS01", "InputSession created");
- LastReceiveTimestamp = TActivationContext::Now();
+ LastReceiveTimestamp = TActivationContext::Monotonic();
ReceiveData();
}
@@ -437,7 +437,7 @@ namespace NActors {
}
}
- LastReceiveTimestamp = TActivationContext::Now();
+ LastReceiveTimestamp = TActivationContext::Monotonic();
return true;
}
@@ -473,7 +473,7 @@ namespace NActors {
}
void TInputSessionTCP::HandleCheckDeadPeer() {
- const TInstant now = TActivationContext::Now();
+ const TMonotonic now = TActivationContext::Monotonic();
if (now >= LastReceiveTimestamp + DeadPeerTimeout) {
ReceiveData();
if (Socket && now >= LastReceiveTimestamp + DeadPeerTimeout) {
@@ -481,7 +481,7 @@ namespace NActors {
DestroySession(TDisconnectReason::DeadPeer());
}
}
- Schedule(LastReceiveTimestamp + DeadPeerTimeout - now, new TEvCheckDeadPeer);
+ Schedule(LastReceiveTimestamp + DeadPeerTimeout, new TEvCheckDeadPeer);
}
void TInputSessionTCP::HandlePingResponse(TDuration passed) {
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp b/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp
index 7e2d8ccb94..b4cc263a4c 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp
@@ -40,7 +40,6 @@ namespace NActors {
SetPrefix(Sprintf("Proxy %s [node %" PRIu32 "]", SelfId().ToString().data(), PeerNodeId));
SwitchToInitialState();
- PassAwayTimestamp = TActivationContext::Now() + TDuration::Seconds(15);
LOG_INFO_IC("ICP01", "ready to work");
}
@@ -563,7 +562,7 @@ namespace NActors {
ValidateEvent(ev, "EnqueueSessionEvent");
const ui32 size = ev->GetSize();
PendingSessionEventsSize += size;
- PendingSessionEvents.emplace_back(TActivationContext::Now() + Common->Settings.MessagePendingTimeout, size, ev);
+ PendingSessionEvents.emplace_back(TActivationContext::Monotonic() + Common->Settings.MessagePendingTimeout, size, ev);
ScheduleCleanupEventQueue();
CleanupEventQueue();
}
@@ -810,7 +809,7 @@ namespace NActors {
if (!CleanupEventQueueScheduled && PendingSessionEvents) {
// apply batching at 50 ms granularity
- Schedule(Max(TDuration::MilliSeconds(50), PendingSessionEvents.front().Deadline - TActivationContext::Now()), new TEvCleanupEventQueue);
+ Schedule(Max(TDuration::MilliSeconds(50), PendingSessionEvents.front().Deadline - TActivationContext::Monotonic()), new TEvCleanupEventQueue);
CleanupEventQueueScheduled = true;
}
}
@@ -827,7 +826,7 @@ namespace NActors {
void TInterconnectProxyTCP::CleanupEventQueue() {
ICPROXY_PROFILED;
- const TInstant now = TActivationContext::Now();
+ const TMonotonic now = TActivationContext::Monotonic();
while (PendingSessionEvents) {
TPendingSessionEvent& ev = PendingSessionEvents.front();
if (now >= ev.Deadline || PendingSessionEventsSize > Common->Settings.MessagePendingSize) {
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_proxy.h b/library/cpp/actors/interconnect/interconnect_tcp_proxy.h
index 023e5bd1ee..b750e278e1 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_proxy.h
+++ b/library/cpp/actors/interconnect/interconnect_tcp_proxy.h
@@ -175,11 +175,18 @@ namespace NActors {
Become(std::forward<TArgs>(args)...);
Y_VERIFY(!Terminated || CurrentStateFunc() == &TThis::HoldByError); // ensure we never escape this state
if (CurrentStateFunc() != &TThis::PendingActivation) {
- PassAwayTimestamp = TInstant::Max();
+ PassAwayTimestamp = TMonotonic::Max();
+ } else if (DynamicPtr) {
+ PassAwayTimestamp = TActivationContext::Monotonic() + TDuration::Seconds(15);
+ if (!PassAwayScheduled) {
+ TActivationContext::Schedule(PassAwayTimestamp, new IEventHandle(EvPassAwayIfNeeded, 0, SelfId(),
+ {}, nullptr, 0));
+ PassAwayScheduled = true;
+ }
}
}
- TInstant PassAwayTimestamp;
+ TMonotonic PassAwayTimestamp;
bool PassAwayScheduled = false;
void SwitchToInitialState() {
@@ -189,17 +196,18 @@ namespace NActors {
" PendingIncomingHandshakeEvents# %zu State# %s", LogPrefix.data(), PendingSessionEvents.size(),
PendingIncomingHandshakeEvents.size(), State);
SwitchToState(__LINE__, "PendingActivation", &TThis::PendingActivation);
- if (DynamicPtr && !PassAwayScheduled && PassAwayTimestamp != TInstant::Max()) {
- TActivationContext::Schedule(PassAwayTimestamp, new IEventHandle(EvPassAwayIfNeeded, 0, SelfId(),
- {}, nullptr, 0));
- PassAwayScheduled = true;
- }
}
void HandlePassAwayIfNeeded() {
Y_VERIFY(PassAwayScheduled);
- if (PassAwayTimestamp != TInstant::Max()) {
+ const TMonotonic now = TActivationContext::Monotonic();
+ if (now >= PassAwayTimestamp) {
PassAway();
+ } else if (PassAwayTimestamp != TMonotonic::Max()) {
+ TActivationContext::Schedule(PassAwayTimestamp, new IEventHandle(EvPassAwayIfNeeded, 0, SelfId(),
+ {}, nullptr, 0));
+ } else {
+ PassAwayScheduled = false;
}
}
@@ -387,11 +395,11 @@ namespace NActors {
// hold all events before connection is established
struct TPendingSessionEvent {
- TInstant Deadline;
+ TMonotonic Deadline;
ui32 Size;
THolder<IEventHandle> Event;
- TPendingSessionEvent(TInstant deadline, ui32 size, TAutoPtr<IEventHandle> event)
+ TPendingSessionEvent(TMonotonic deadline, ui32 size, TAutoPtr<IEventHandle> event)
: Deadline(deadline)
, Size(size)
, Event(event)
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_session.cpp b/library/cpp/actors/interconnect/interconnect_tcp_session.cpp
index feb55a16ad..18df8e42ff 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_session.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_session.cpp
@@ -232,7 +232,7 @@ namespace NActors {
CloseOnIdleWatchdog.Arm(SelfId());
// reset activity timestamps
- LastInputActivityTimestamp = LastPayloadActivityTimestamp = TActivationContext::Now();
+ LastInputActivityTimestamp = LastPayloadActivityTimestamp = TActivationContext::Monotonic();
LOG_INFO_IC_SESSION("ICS10", "traffic start");
@@ -315,7 +315,7 @@ namespace NActors {
bool needConfirm = false;
// update activity timer for dead peer checker
- LastInputActivityTimestamp = TActivationContext::Now();
+ LastInputActivityTimestamp = TActivationContext::Monotonic();
if (msg.NumDataBytes) {
UnconfirmedBytes += msg.NumDataBytes;
@@ -326,7 +326,7 @@ namespace NActors {
}
// reset payload watchdog that controls close-on-idle behaviour
- LastPayloadActivityTimestamp = TActivationContext::Now();
+ LastPayloadActivityTimestamp = TActivationContext::Monotonic();
CloseOnIdleWatchdog.Reset();
}
@@ -654,7 +654,7 @@ namespace NActors {
void TInterconnectSessionTCP::SetForcePacketTimestamp(TDuration period) {
if (period != TDuration::Max()) {
- const TInstant when = TActivationContext::Now() + period;
+ const TMonotonic when = TActivationContext::Monotonic() + period;
if (when < ForcePacketTimestamp) {
ForcePacketTimestamp = when;
ScheduleFlush();
@@ -664,7 +664,7 @@ namespace NActors {
void TInterconnectSessionTCP::ScheduleFlush() {
if (FlushSchedule.empty() || ForcePacketTimestamp < FlushSchedule.top()) {
- Schedule(ForcePacketTimestamp - TActivationContext::Now(), new TEvFlush);
+ Schedule(ForcePacketTimestamp, new TEvFlush);
FlushSchedule.push(ForcePacketTimestamp);
MaxFlushSchedule = Max(MaxFlushSchedule, FlushSchedule.size());
++FlushEventsScheduled;
@@ -672,7 +672,7 @@ namespace NActors {
}
void TInterconnectSessionTCP::HandleFlush() {
- const TInstant now = TActivationContext::Now();
+ const TMonotonic now = TActivationContext::Monotonic();
while (FlushSchedule && now >= FlushSchedule.top()) {
FlushSchedule.pop();
}
@@ -682,14 +682,14 @@ namespace NActors {
++ConfirmPacketsForcedByTimeout;
++FlushEventsProcessed;
MakePacket(false); // just generate confirmation packet if we have preconditions for this
- } else if (ForcePacketTimestamp != TInstant::Max()) {
+ } else if (ForcePacketTimestamp != TMonotonic::Max()) {
ScheduleFlush();
}
}
}
void TInterconnectSessionTCP::ResetFlushLogic() {
- ForcePacketTimestamp = TInstant::Max();
+ ForcePacketTimestamp = TMonotonic::Max();
UnconfirmedBytes = 0;
const TDuration ping = Proxy->Common->Settings.PingPeriod;
if (ping != TDuration::Zero() && !NumEventsInReadyChannels) {
@@ -761,7 +761,7 @@ namespace NActors {
}
// update payload activity timer
- LastPayloadActivityTimestamp = TActivationContext::Now();
+ LastPayloadActivityTimestamp = TActivationContext::Monotonic();
} else if (pingMask) {
serial = *pingMask;
@@ -923,7 +923,7 @@ namespace NActors {
flagState = EFlag::GREEN;
do {
- auto lastInputDelay = TActivationContext::Now() - LastInputActivityTimestamp;
+ auto lastInputDelay = TActivationContext::Monotonic() - LastInputActivityTimestamp;
if (lastInputDelay * 4 >= GetDeadPeerTimeout() * 3) {
flagState = EFlag::ORANGE;
break;
@@ -1006,7 +1006,7 @@ namespace NActors {
}
void TInterconnectSessionTCP::IssuePingRequest() {
- const TInstant now = TActivationContext::Now();
+ const TMonotonic now = TActivationContext::Monotonic();
if (now >= LastPingTimestamp + PingPeriodicity) {
LOG_DEBUG_IC_SESSION("ICS22", "Issuing ping request");
if (Socket) {
@@ -1175,6 +1175,8 @@ namespace NActors {
ui32 unsentQueueSize = Socket ? Socket->GetUnsentQueueSize() : 0;
+ const TMonotonic now = TActivationContext::Monotonic();
+
MON_VAR(OutputStuckFlag)
MON_VAR(SendQueue.size())
MON_VAR(SendQueueCache.size())
@@ -1184,8 +1186,8 @@ namespace NActors {
MON_VAR(InflightDataAmount)
MON_VAR(unsentQueueSize)
MON_VAR(SendBufferSize)
- MON_VAR(LastInputActivityTimestamp)
- MON_VAR(LastPayloadActivityTimestamp)
+ MON_VAR(now - LastInputActivityTimestamp)
+ MON_VAR(now - LastPayloadActivityTimestamp)
MON_VAR(LastHandshakeDone)
MON_VAR(OutputCounter)
MON_VAR(LastSentSerial)
@@ -1204,7 +1206,7 @@ namespace NActors {
clockSkew = Sprintf("+%s", TDuration::MicroSeconds(x).ToString().data());
}
- MON_VAR(LastPingTimestamp)
+ MON_VAR(now - LastPingTimestamp)
MON_VAR(GetPingRTT())
MON_VAR(clockSkew)
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_session.h b/library/cpp/actors/interconnect/interconnect_tcp_session.h
index 51c5bfa453..598a5c9220 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_session.h
+++ b/library/cpp/actors/interconnect/interconnect_tcp_session.h
@@ -266,7 +266,7 @@ namespace NActors {
}
const TDuration DeadPeerTimeout;
- TInstant LastReceiveTimestamp;
+ TMonotonic LastReceiveTimestamp;
void HandleCheckDeadPeer();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -413,15 +413,15 @@ namespace NActors {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// pinger
- TInstant LastPingTimestamp;
+ TMonotonic LastPingTimestamp;
static constexpr TDuration PingPeriodicity = TDuration::Seconds(1);
void IssuePingRequest();
void Handle(TEvProcessPingRequest::TPtr ev);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- TInstant LastInputActivityTimestamp;
- TInstant LastPayloadActivityTimestamp;
+ TMonotonic LastInputActivityTimestamp;
+ TMonotonic LastPayloadActivityTimestamp;
TWatchdogTimer<TEvCheckCloseOnIdle> CloseOnIdleWatchdog;
TWatchdogTimer<TEvCheckLostConnection> LostConnectionWatchdog;
@@ -481,8 +481,8 @@ namespace NActors {
// time at which we want to send confirmation packet even if there was no outgoing data
ui64 UnconfirmedBytes = 0;
- TInstant ForcePacketTimestamp = TInstant::Max();
- TPriorityQueue<TInstant, TVector<TInstant>, std::greater<TInstant>> FlushSchedule;
+ TMonotonic ForcePacketTimestamp = TMonotonic::Max();
+ TPriorityQueue<TMonotonic, TVector<TMonotonic>, std::greater<TMonotonic>> FlushSchedule;
size_t MaxFlushSchedule = 0;
ui64 FlushEventsScheduled = 0;
ui64 FlushEventsProcessed = 0;
diff --git a/library/cpp/actors/interconnect/watchdog_timer.h b/library/cpp/actors/interconnect/watchdog_timer.h
index c190105a59..fe62006e3b 100644
--- a/library/cpp/actors/interconnect/watchdog_timer.h
+++ b/library/cpp/actors/interconnect/watchdog_timer.h
@@ -8,7 +8,7 @@ namespace NActors {
const TDuration Timeout;
const TCallback Callback;
- TInstant LastResetTimestamp;
+ TMonotonic LastResetTimestamp;
TEvent* ExpectedEvent = nullptr;
ui32 Iteration = 0;
@@ -29,7 +29,7 @@ namespace NActors {
}
void Reset() {
- LastResetTimestamp = TActivationContext::Now();
+ LastResetTimestamp = TActivationContext::Monotonic();
}
void Disarm() {
@@ -38,11 +38,11 @@ namespace NActors {
void operator()(typename TEvent::TPtr& ev) {
if (ev->Get() == ExpectedEvent) {
- const TInstant now = TActivationContext::Now();
- const TInstant barrier = LastResetTimestamp + Timeout;
+ const TMonotonic now = TActivationContext::Monotonic();
+ const TMonotonic barrier = LastResetTimestamp + Timeout;
if (now < barrier) {
// the time hasn't come yet
- Schedule(barrier - now, TActorIdentity(ev->Recipient));
+ Schedule(barrier, TActorIdentity(ev->Recipient));
} else if (Iteration < NumIterationsBeforeFiring) {
// time has come, but we will still give actor a chance to process some messages and rearm timer
++Iteration;
@@ -57,7 +57,8 @@ namespace NActors {
}
private:
- void Schedule(TDuration timeout, const TActorIdentity& actor) {
+ template<typename T>
+ void Schedule(T&& timeout, const TActorIdentity& actor) {
auto ev = MakeHolder<TEvent>();
ExpectedEvent = ev.Get();
Iteration = 0;
diff --git a/library/cpp/actors/util/rc_buf.h b/library/cpp/actors/util/rc_buf.h
index 1a492064ee..a2bce33fba 100644
--- a/library/cpp/actors/util/rc_buf.h
+++ b/library/cpp/actors/util/rc_buf.h
@@ -113,10 +113,11 @@ public:
private:
static int Compare(const TContiguousSpan& x, const TContiguousSpan& y) {
- if (int res = std::memcmp(x.data(), y.data(), std::min(x.size(), y.size())); res) {
- return res;
+ int res = 0;
+ if (const size_t common = std::min(x.size(), y.size())) {
+ res = std::memcmp(x.data(), y.data(), common);
}
- return x.size() - y.size();
+ return res ? res : x.size() - y.size();
}
};
diff --git a/library/cpp/charset/CMakeLists.darwin.txt b/library/cpp/charset/CMakeLists.darwin.txt
index cb5c16891d..ed68dc36f8 100644
--- a/library/cpp/charset/CMakeLists.darwin.txt
+++ b/library/cpp/charset/CMakeLists.darwin.txt
@@ -6,13 +6,11 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
add_library(library-cpp-charset)
target_link_libraries(library-cpp-charset PUBLIC
contrib-libs-cxxsupp
yutil
- Iconv::Iconv
)
target_sources(library-cpp-charset PRIVATE
${CMAKE_SOURCE_DIR}/library/cpp/charset/generated/cp_data.cpp
diff --git a/library/cpp/charset/CMakeLists.linux-aarch64.txt b/library/cpp/charset/CMakeLists.linux-aarch64.txt
index 03b01e7c69..1d9903b843 100644
--- a/library/cpp/charset/CMakeLists.linux-aarch64.txt
+++ b/library/cpp/charset/CMakeLists.linux-aarch64.txt
@@ -6,14 +6,12 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
add_library(library-cpp-charset)
target_link_libraries(library-cpp-charset PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
- Iconv::Iconv
)
target_sources(library-cpp-charset PRIVATE
${CMAKE_SOURCE_DIR}/library/cpp/charset/generated/cp_data.cpp
diff --git a/library/cpp/charset/CMakeLists.linux.txt b/library/cpp/charset/CMakeLists.linux.txt
index 03b01e7c69..1d9903b843 100644
--- a/library/cpp/charset/CMakeLists.linux.txt
+++ b/library/cpp/charset/CMakeLists.linux.txt
@@ -6,14 +6,12 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
add_library(library-cpp-charset)
target_link_libraries(library-cpp-charset PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
- Iconv::Iconv
)
target_sources(library-cpp-charset PRIVATE
${CMAKE_SOURCE_DIR}/library/cpp/charset/generated/cp_data.cpp
diff --git a/library/cpp/charset/iconv.cpp b/library/cpp/charset/iconv.cpp
index dc604c8492..0b6dbace9e 100644
--- a/library/cpp/charset/iconv.cpp
+++ b/library/cpp/charset/iconv.cpp
@@ -5,20 +5,22 @@
using namespace NICONVPrivate;
TDescriptor::TDescriptor(const char* from, const char* to)
- : Descriptor_(libiconv_open(to, from))
+ : Descriptor_(iconv_open(to, from))
, From_(from)
, To_(to)
{
+#if defined(USE_ICONV_EXTENSIONS)
if (!Invalid()) {
int temp = 1;
libiconvctl(Descriptor_, ICONV_SET_DISCARD_ILSEQ, &temp);
}
+#endif
}
TDescriptor::~TDescriptor() {
if (!Invalid()) {
- libiconv_close(Descriptor_);
+ iconv_close(Descriptor_);
}
}
@@ -31,7 +33,7 @@ size_t NICONVPrivate::RecodeImpl(const TDescriptor& descriptor, const char* in,
char* outPtr = out;
size_t inSizeMod = inSize;
size_t outSizeMod = outSize;
- size_t res = libiconv(descriptor.Get(), &inPtr, &inSizeMod, &outPtr, &outSizeMod);
+ size_t res = iconv(descriptor.Get(), &inPtr, &inSizeMod, &outPtr, &outSizeMod);
read = inSize - inSizeMod;
written = outSize - outSizeMod;
diff --git a/library/cpp/grpc/server/grpc_request.h b/library/cpp/grpc/server/grpc_request.h
index c4b7e9c040..4e869ef5f6 100644
--- a/library/cpp/grpc/server/grpc_request.h
+++ b/library/cpp/grpc/server/grpc_request.h
@@ -113,6 +113,10 @@ public:
return FinishPromise_.GetFuture();
}
+ bool IsClientLost() const override {
+ return ClientLost_.load();
+ }
+
TString GetPeer() const override {
return TString(this->Context.peer());
}
@@ -496,6 +500,7 @@ private:
void OnFinish(EQueueEventStatus evStatus) {
if (this->Context.IsCancelled()) {
+ ClientLost_.store(true);
FinishPromise_.SetValue(EFinishStatus::CANCEL);
} else {
FinishPromise_.SetValue(evStatus == EQueueEventStatus::OK ? EFinishStatus::OK : EFinishStatus::ERROR);
@@ -556,6 +561,7 @@ private:
NThreading::TPromise<EFinishStatus> FinishPromise_;
bool SkipUpdateCountersOnError = false;
IStreamAdaptor::TPtr StreamAdaptor_;
+ std::atomic<bool> ClientLost_ = false;
};
template<typename TIn, typename TOut, typename TService, typename TInProtoPrinter=google::protobuf::TextFormat::Printer, typename TOutProtoPrinter=google::protobuf::TextFormat::Printer>
diff --git a/library/cpp/grpc/server/grpc_request_base.h b/library/cpp/grpc/server/grpc_request_base.h
index 42b78ed7df..60b38805ed 100644
--- a/library/cpp/grpc/server/grpc_request_base.h
+++ b/library/cpp/grpc/server/grpc_request_base.h
@@ -116,6 +116,9 @@ public:
//! Returns true if server is using ssl
virtual bool SslServer() const = 0;
+
+ //! Returns true if client was not interested in result (but we still must send response to make grpc happy)
+ virtual bool IsClientLost() const = 0;
};
} // namespace NGrpc
diff --git a/library/cpp/grpc/server/grpc_server.cpp b/library/cpp/grpc/server/grpc_server.cpp
index 97472206e2..0c05c7404e 100644
--- a/library/cpp/grpc/server/grpc_server.cpp
+++ b/library/cpp/grpc/server/grpc_server.cpp
@@ -130,11 +130,16 @@ void TGRpcServer::Start() {
builder.SetOption(std::make_unique<TKeepAliveOption>());
}
- if (Options_.UseCompletionQueuePerThread) {
- for (size_t i = 0; i < Options_.WorkerThreads; ++i) {
- CQS_.push_back(builder.AddCompletionQueue());
- }
- } else {
+ size_t completionQueueCount = 1;
+ if (Options_.WorkersPerCompletionQueue) {
+ size_t threadsPerQueue = Max(std::size_t{1}, Options_.WorkersPerCompletionQueue);
+ completionQueueCount = (Options_.WorkerThreads + threadsPerQueue - 1) / threadsPerQueue; // ceiling
+ } else if (Options_.UseCompletionQueuePerThread) {
+ completionQueueCount = Options_.WorkerThreads;
+ }
+
+ CQS_.reserve(completionQueueCount);
+ for (size_t i = 0; i < completionQueueCount; ++i) {
CQS_.push_back(builder.AddCompletionQueue());
}
@@ -159,23 +164,15 @@ void TGRpcServer::Start() {
size_t index = 0;
for (IGRpcServicePtr service : Services_) {
// TODO: provide something else for services instead of ServerCompletionQueue
- service->InitService(CQS_[index++ % CQS_.size()].get(), Options_.Logger);
+ service->InitService(CQS_, Options_.Logger, index++);
}
- if (Options_.UseCompletionQueuePerThread) {
- for (size_t i = 0; i < Options_.WorkerThreads; ++i) {
- auto* cq = &CQS_[i];
- Ts.push_back(SystemThreadFactory()->Run([cq] {
- PullEvents(cq->get());
- }));
- }
- } else {
- for (size_t i = 0; i < Options_.WorkerThreads; ++i) {
- auto* cq = &CQS_[0];
- Ts.push_back(SystemThreadFactory()->Run([cq] {
- PullEvents(cq->get());
- }));
- }
+ Ts.reserve(Options_.WorkerThreads);
+ for (size_t i = 0; i < Options_.WorkerThreads; ++i) {
+ auto* cq = &CQS_[i % CQS_.size()];
+ Ts.push_back(SystemThreadFactory()->Run([cq] {
+ PullEvents(cq->get());
+ }));
}
if (Options_.ExternalListener) {
diff --git a/library/cpp/grpc/server/grpc_server.h b/library/cpp/grpc/server/grpc_server.h
index c9b48a6676..6da5076046 100644
--- a/library/cpp/grpc/server/grpc_server.h
+++ b/library/cpp/grpc/server/grpc_server.h
@@ -54,7 +54,14 @@ struct TServerOptions {
//! Number of worker threads.
DECLARE_FIELD(WorkerThreads, size_t, 2);
- //! Create one completion queue per thread
+ //! Number of workers per completion queue, i.e. when
+ // WorkerThreads=8 and PriorityWorkersPerCompletionQueue=2
+ // there will be 4 completion queues. When set to 0 then
+ // only UseCompletionQueuePerThread affects number of CQ.
+ DECLARE_FIELD(WorkersPerCompletionQueue, size_t, 0);
+
+ //! Obsolete. Create one completion queue per thread.
+ // Setting true equals to the WorkersPerCompletionQueue=1
DECLARE_FIELD(UseCompletionQueuePerThread, bool, false);
//! Memory quota size for grpc server in bytes. Zero means unlimited.
@@ -122,6 +129,15 @@ class ICancelableContext {
public:
virtual void Shutdown() = 0;
virtual ~ICancelableContext() = default;
+
+private:
+ template<class T>
+ friend class TGrpcServiceBase;
+
+ // Shard assigned by RegisterRequestCtx. This field is not thread-safe
+ // because RegisterRequestCtx may only be called once for a single service,
+ // so it's only assigned once.
+ size_t ShardIndex = size_t(-1);
};
template <class TLimit>
@@ -166,7 +182,17 @@ class IGRpcService: public TThrRefBase {
public:
virtual grpc::Service* GetService() = 0;
virtual void StopService() noexcept = 0;
+
virtual void InitService(grpc::ServerCompletionQueue* cq, TLoggerPtr logger) = 0;
+
+ virtual void InitService(
+ const std::vector<std::unique_ptr<grpc::ServerCompletionQueue>>& cqs,
+ TLoggerPtr logger,
+ size_t index)
+ {
+ InitService(cqs[index % cqs.size()].get(), logger);
+ }
+
virtual void SetGlobalLimiterHandle(TGlobalLimiter* limiter) = 0;
virtual bool IsUnsafeToShutdown() const = 0;
virtual size_t RequestsInProgress() const = 0;
@@ -236,13 +262,15 @@ public:
using TCurrentGRpcService = T;
void StopService() noexcept override {
- with_lock(Lock_) {
- AtomicSet(ShuttingDown_, 1);
-
- // Send TryCansel to event (can be send after finishing).
- // Actual dtors will be called from grpc thread, so deadlock impossible
- for (auto* request : Requests_) {
- request->Shutdown();
+ AtomicSet(ShuttingDown_, 1);
+
+ for (auto& shard : Shards_) {
+ with_lock(shard.Lock_) {
+ // Send TryCansel to event (can be send after finishing).
+ // Actual dtors will be called from grpc thread, so deadlock impossible
+ for (auto* request : shard.Requests_) {
+ request->Shutdown();
+ }
}
}
}
@@ -263,8 +291,10 @@ public:
size_t RequestsInProgress() const override {
size_t c = 0;
- with_lock(Lock_) {
- c = Requests_.size();
+ for (auto& shard : Shards_) {
+ with_lock(shard.Lock_) {
+ c += shard.Requests_.size();
+ }
}
return c;
}
@@ -290,23 +320,29 @@ public:
}
bool RegisterRequestCtx(ICancelableContext* req) {
- with_lock(Lock_) {
- auto r = Requests_.emplace(req);
- Y_VERIFY(r.second, "Ctx already registered");
+ if (Y_LIKELY(req->ShardIndex == size_t(-1))) {
+ req->ShardIndex = NextShard_.fetch_add(1, std::memory_order_relaxed) % Shards_.size();
+ }
+ auto& shard = Shards_[req->ShardIndex];
+ with_lock(shard.Lock_) {
if (IsShuttingDown()) {
- // Server is already shutting down
- Requests_.erase(r.first);
return false;
}
+
+ auto r = shard.Requests_.emplace(req);
+ Y_VERIFY(r.second, "Ctx already registered");
}
return true;
}
void DeregisterRequestCtx(ICancelableContext* req) {
- with_lock(Lock_) {
- Y_VERIFY(Requests_.erase(req), "Ctx is not registered");
+ Y_VERIFY(req->ShardIndex != size_t(-1), "Ctx does not have an assigned shard index");
+
+ auto& shard = Shards_[req->ShardIndex];
+ with_lock(shard.Lock_) {
+ Y_VERIFY(shard.Requests_.erase(req), "Ctx is not registered");
}
}
@@ -325,8 +361,14 @@ private:
bool SslServer_ = false;
bool NeedAuth_ = false;
- THashSet<ICancelableContext*> Requests_;
- TAdaptiveLock Lock_;
+ struct TShard {
+ TAdaptiveLock Lock_;
+ THashSet<ICancelableContext*> Requests_;
+ };
+
+ // Note: benchmarks showed 4 shards is enough to scale to ~30 threads
+ TVector<TShard> Shards_{ size_t(4) };
+ std::atomic<size_t> NextShard_{ 0 };
};
class TGRpcServer {
diff --git a/library/cpp/unified_agent_client/CMakeLists.darwin.txt b/library/cpp/unified_agent_client/CMakeLists.darwin.txt
new file mode 100644
index 0000000000..bad1e374fd
--- /dev/null
+++ b/library/cpp/unified_agent_client/CMakeLists.darwin.txt
@@ -0,0 +1,63 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+add_subdirectory(proto)
+
+add_library(library-cpp-unified_agent_client)
+target_include_directories(library-cpp-unified_agent_client PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/include
+)
+target_link_libraries(library-cpp-unified_agent_client PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ cpp-logger-global
+ cpp-threading-future
+ cpp-monlib-dynamic_counters
+ cpp-unified_agent_client-proto
+ tools-enum_parser-enum_serialization_runtime
+)
+target_sources(library-cpp-unified_agent_client PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/backend.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/backend_creator.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/client_impl.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/counters.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/helpers.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_io.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_status_code.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/clock.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/duration_counter.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/logger.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/throttling.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/proto_weighing.cpp
+)
+generate_enum_serilization(library-cpp-unified_agent_client
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_io.h
+ INCLUDE_HEADERS
+ library/cpp/unified_agent_client/grpc_io.h
+)
+
+add_global_library_for(library-cpp-unified_agent_client.global library-cpp-unified_agent_client)
+target_include_directories(library-cpp-unified_agent_client.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/include
+)
+target_link_libraries(library-cpp-unified_agent_client.global PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ cpp-logger-global
+ cpp-threading-future
+ cpp-monlib-dynamic_counters
+ cpp-unified_agent_client-proto
+ tools-enum_parser-enum_serialization_runtime
+)
+target_sources(library-cpp-unified_agent_client.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/registrar.cpp
+)
diff --git a/library/cpp/unified_agent_client/CMakeLists.linux-aarch64.txt b/library/cpp/unified_agent_client/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..ea3391bf18
--- /dev/null
+++ b/library/cpp/unified_agent_client/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,65 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+add_subdirectory(proto)
+
+add_library(library-cpp-unified_agent_client)
+target_include_directories(library-cpp-unified_agent_client PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/include
+)
+target_link_libraries(library-cpp-unified_agent_client PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ cpp-logger-global
+ cpp-threading-future
+ cpp-monlib-dynamic_counters
+ cpp-unified_agent_client-proto
+ tools-enum_parser-enum_serialization_runtime
+)
+target_sources(library-cpp-unified_agent_client PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/backend.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/backend_creator.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/client_impl.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/counters.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/helpers.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_io.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_status_code.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/clock.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/duration_counter.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/logger.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/throttling.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/proto_weighing.cpp
+)
+generate_enum_serilization(library-cpp-unified_agent_client
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_io.h
+ INCLUDE_HEADERS
+ library/cpp/unified_agent_client/grpc_io.h
+)
+
+add_global_library_for(library-cpp-unified_agent_client.global library-cpp-unified_agent_client)
+target_include_directories(library-cpp-unified_agent_client.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/include
+)
+target_link_libraries(library-cpp-unified_agent_client.global PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ cpp-logger-global
+ cpp-threading-future
+ cpp-monlib-dynamic_counters
+ cpp-unified_agent_client-proto
+ tools-enum_parser-enum_serialization_runtime
+)
+target_sources(library-cpp-unified_agent_client.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/registrar.cpp
+)
diff --git a/library/cpp/unified_agent_client/CMakeLists.linux.txt b/library/cpp/unified_agent_client/CMakeLists.linux.txt
new file mode 100644
index 0000000000..ea3391bf18
--- /dev/null
+++ b/library/cpp/unified_agent_client/CMakeLists.linux.txt
@@ -0,0 +1,65 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+add_subdirectory(proto)
+
+add_library(library-cpp-unified_agent_client)
+target_include_directories(library-cpp-unified_agent_client PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/include
+)
+target_link_libraries(library-cpp-unified_agent_client PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ cpp-logger-global
+ cpp-threading-future
+ cpp-monlib-dynamic_counters
+ cpp-unified_agent_client-proto
+ tools-enum_parser-enum_serialization_runtime
+)
+target_sources(library-cpp-unified_agent_client PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/backend.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/backend_creator.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/client_impl.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/counters.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/helpers.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_io.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_status_code.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/clock.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/duration_counter.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/logger.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/throttling.cpp
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/proto_weighing.cpp
+)
+generate_enum_serilization(library-cpp-unified_agent_client
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/grpc_io.h
+ INCLUDE_HEADERS
+ library/cpp/unified_agent_client/grpc_io.h
+)
+
+add_global_library_for(library-cpp-unified_agent_client.global library-cpp-unified_agent_client)
+target_include_directories(library-cpp-unified_agent_client.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/include
+)
+target_link_libraries(library-cpp-unified_agent_client.global PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ cpp-logger-global
+ cpp-threading-future
+ cpp-monlib-dynamic_counters
+ cpp-unified_agent_client-proto
+ tools-enum_parser-enum_serialization_runtime
+)
+target_sources(library-cpp-unified_agent_client.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/registrar.cpp
+)
diff --git a/library/cpp/unified_agent_client/CMakeLists.txt b/library/cpp/unified_agent_client/CMakeLists.txt
new file mode 100644
index 0000000000..3e0811fb22
--- /dev/null
+++ b/library/cpp/unified_agent_client/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (APPLE)
+ include(CMakeLists.darwin.txt)
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux.txt)
+endif()
diff --git a/library/cpp/unified_agent_client/async_joiner.h b/library/cpp/unified_agent_client/async_joiner.h
new file mode 100644
index 0000000000..ce392ef7bc
--- /dev/null
+++ b/library/cpp/unified_agent_client/async_joiner.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include <library/cpp/threading/future/future.h>
+
+namespace NUnifiedAgent {
+ class TAsyncJoiner {
+ public:
+ inline TAsyncJoiner()
+ : Promise(NThreading::NewPromise())
+ , Refs(1)
+ {
+ }
+
+ inline i64 Ref(i64 count = 1) noexcept {
+ const auto result = Refs.fetch_add(count);
+ Y_VERIFY(result >= 1, "already joined");
+ return result;
+ }
+
+ inline i64 UnRef() noexcept {
+ const auto prev = Refs.fetch_sub(1);
+ Y_VERIFY(prev >= 1);
+ if (prev == 1) {
+ auto p = Promise;
+ p.SetValue();
+ }
+ return prev;
+ }
+
+ inline NThreading::TFuture<void> Join() noexcept {
+ auto result = Promise;
+ UnRef();
+ return result;
+ }
+
+ private:
+ NThreading::TPromise<void> Promise;
+ std::atomic<i64> Refs;
+ };
+
+ using TAsyncJoinerToken = TIntrusivePtr<TAsyncJoiner>;
+}
diff --git a/library/cpp/unified_agent_client/backend.cpp b/library/cpp/unified_agent_client/backend.cpp
new file mode 100644
index 0000000000..b3c4b4ebcf
--- /dev/null
+++ b/library/cpp/unified_agent_client/backend.cpp
@@ -0,0 +1,112 @@
+#include "backend.h"
+
+#include <library/cpp/unified_agent_client/enum.h>
+
+#include <library/cpp/logger/record.h>
+
+#include <util/datetime/base.h>
+#include <util/generic/guid.h>
+#include <util/generic/serialized_enum.h>
+
+namespace NUnifiedAgent {
+ namespace {
+ class TDefaultRecordConverter : public IRecordConverter {
+ public:
+ TDefaultRecordConverter(bool stripTrailingNewLine)
+ : StripTrailingNewLine(stripTrailingNewLine)
+ , PriorityKey("_priority")
+ {
+ }
+
+ TClientMessage Convert(const TLogRecord& rec) const override {
+ const auto stripTrailingNewLine = StripTrailingNewLine &&
+ rec.Len > 0 && rec.Data[rec.Len - 1] == '\n';
+
+ THashMap<TString, TString> metaFlags{{PriorityKey, NameOf(rec.Priority)}};
+ metaFlags.insert(rec.MetaFlags.begin(), rec.MetaFlags.end());
+
+ return {
+ TString(rec.Data, stripTrailingNewLine ? rec.Len - 1 : rec.Len),
+ std::move(metaFlags)
+ };
+ }
+
+ private:
+ const bool StripTrailingNewLine;
+ const TString PriorityKey;
+ };
+
+ class TClientSessionAdapter: public TLogBackend {
+ public:
+ explicit TClientSessionAdapter(const TClientSessionPtr& session, THolder<IRecordConverter> recordConverter)
+ : Session(session)
+ , RecordConverter(std::move(recordConverter))
+ {
+ }
+
+ void WriteData(const TLogRecord& rec) override {
+ Session->Send(RecordConverter->Convert(rec));
+ }
+
+ void ReopenLog() override {
+ }
+
+ private:
+ TClientSessionPtr Session;
+ THolder<IRecordConverter> RecordConverter;
+ };
+
+ class TSessionHolder {
+ protected:
+ TSessionHolder(const TClientParameters& parameters, const TSessionParameters& sessionParameters)
+ : Client(MakeClient(parameters))
+ , Session(Client->CreateSession(sessionParameters))
+ {
+ }
+
+ protected:
+ TClientPtr Client;
+ TClientSessionPtr Session;
+ };
+
+ class TAgentLogBackend: private TSessionHolder, public TClientSessionAdapter {
+ public:
+ TAgentLogBackend(const TClientParameters& parameters,
+ const TSessionParameters& sessionParameters,
+ THolder<IRecordConverter> recordConverter)
+ : TSessionHolder(parameters, sessionParameters)
+ , TClientSessionAdapter(TSessionHolder::Session, std::move(recordConverter))
+ {
+ }
+
+ ~TAgentLogBackend() override {
+ TSessionHolder::Session->Close();
+ }
+ };
+ }
+
+ THolder<IRecordConverter> MakeDefaultRecordConverter(bool stripTrailingNewLine) {
+ return MakeHolder<TDefaultRecordConverter>(stripTrailingNewLine);
+ }
+
+ THolder<TLogBackend> AsLogBackend(const TClientSessionPtr& session, bool stripTrailingNewLine) {
+ return MakeHolder<TClientSessionAdapter>(session, MakeDefaultRecordConverter(stripTrailingNewLine));
+ }
+
+ THolder<TLogBackend> MakeLogBackend(const TClientParameters& parameters,
+ const TSessionParameters& sessionParameters,
+ THolder<IRecordConverter> recordConverter)
+ {
+ if (!recordConverter) {
+ recordConverter = MakeDefaultRecordConverter();
+ }
+ return MakeHolder<TAgentLogBackend>(parameters, sessionParameters, std::move(recordConverter));
+ }
+
+ THolder<::TLog> MakeLog(const TClientParameters& parameters,
+ const TSessionParameters& sessionParameters,
+ THolder<IRecordConverter> recordConverter)
+ {
+ return MakeHolder<::TLog>(MakeLogBackend(parameters, sessionParameters, std::move(recordConverter)));
+ }
+}
diff --git a/library/cpp/unified_agent_client/backend.h b/library/cpp/unified_agent_client/backend.h
new file mode 100644
index 0000000000..41e8d146b3
--- /dev/null
+++ b/library/cpp/unified_agent_client/backend.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/client.h>
+
+#include <library/cpp/logger/backend.h>
+#include <library/cpp/logger/log.h>
+
+namespace NUnifiedAgent {
+ class IRecordConverter {
+ public:
+ virtual ~IRecordConverter() = default;
+
+ virtual TClientMessage Convert(const TLogRecord&) const = 0;
+ };
+
+ THolder<IRecordConverter> MakeDefaultRecordConverter(bool stripTrailingNewLine = true);
+
+ THolder<TLogBackend> AsLogBackend(const TClientSessionPtr& session, bool stripTrailingNewLine = true);
+
+ THolder<TLogBackend> MakeLogBackend(const TClientParameters& parameters,
+ const TSessionParameters& sessionParameters = {},
+ THolder<IRecordConverter> recordConverter = {});
+
+ THolder<::TLog> MakeLog(const TClientParameters& parameters,
+ const TSessionParameters& sessionParameters = {},
+ THolder<IRecordConverter> recordConverter = {});
+}
diff --git a/library/cpp/unified_agent_client/backend_creator.cpp b/library/cpp/unified_agent_client/backend_creator.cpp
new file mode 100644
index 0000000000..825e3ebd2b
--- /dev/null
+++ b/library/cpp/unified_agent_client/backend_creator.cpp
@@ -0,0 +1,63 @@
+#include "backend_creator.h"
+#include <library/cpp/logger/global/global.h>
+
+namespace NUnifiedAgent {
+
+
+ TLogBackendCreator::TLogBackendCreator()
+ : TLogBackendCreatorBase("unified_agent")
+ {}
+
+ bool TLogBackendCreator::Init(const IInitContext& ctx) {
+ if(TString socket = ctx.GetOrElse("Uri", TString())) {
+ ClientParams = MakeHolder<TClientParameters>(socket);
+ } else {
+ Cdbg << "Uri not set for unified_agent log backend" << Endl;
+ return false;
+ }
+ TString secretKey;
+ ctx.GetValue("SharedSecretKey", secretKey);
+ if (secretKey) {
+ ClientParams->SharedSecretKey = secretKey;
+ }
+ ctx.GetValue("MaxInflightBytes", ClientParams->MaxInflightBytes);
+ ctx.GetValue("GrpcSendDelay", ClientParams->GrpcSendDelay);
+ size_t rateLimit;
+ if (ctx.GetValue("LogRateLimit", rateLimit)) {
+ ClientParams->LogRateLimitBytes = rateLimit;
+ }
+ ctx.GetValue("GrpcReconnectDelay", ClientParams->GrpcReconnectDelay);
+ ctx.GetValue("GrpcMaxMessageSize", ClientParams->GrpcMaxMessageSize);
+ const auto ownLogger = ctx.GetChildren("OwnLogger");
+ if (!ownLogger.empty() && ownLogger.front()->GetOrElse("LoggerType", TString()) != "global") {
+ OwnLogger = ILogBackendCreator::Create(*ownLogger.front());
+ TLog log;
+ log.ResetBackend(OwnLogger->CreateLogBackend());
+ ClientParams->SetLog(log);
+ }
+ return true;
+ }
+
+
+ void TLogBackendCreator::DoToJson(NJson::TJsonValue& value) const {
+ value["Uri"] = ClientParams->Uri;
+ if (ClientParams->SharedSecretKey) {
+ value["SharedSecretKey"] = *ClientParams->SharedSecretKey;
+ }
+ value["MaxInflightBytes"] = ClientParams->MaxInflightBytes;
+ value["GrpcSendDelay"] = ClientParams->GrpcSendDelay.ToString();
+ if (ClientParams->LogRateLimitBytes) {
+ value["LogRateLimit"] = *ClientParams->LogRateLimitBytes;
+ }
+ value["GrpcReconnectDelay"] = ClientParams->GrpcReconnectDelay.ToString();
+ value["GrpcMaxMessageSize"] = ClientParams->GrpcMaxMessageSize;
+ if (OwnLogger) {
+ OwnLogger->ToJson(value["OwnLogger"].AppendValue(NJson::JSON_MAP));
+ }
+ }
+
+ THolder<TLogBackend> TLogBackendCreator::DoCreateLogBackend() const {
+ return MakeLogBackend(*ClientParams);
+ }
+
+}
diff --git a/library/cpp/unified_agent_client/backend_creator.h b/library/cpp/unified_agent_client/backend_creator.h
new file mode 100644
index 0000000000..04928f616c
--- /dev/null
+++ b/library/cpp/unified_agent_client/backend_creator.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "backend.h"
+#include <library/cpp/logger/backend_creator.h>
+
+namespace NUnifiedAgent {
+
+ class TLogBackendCreator: public TLogBackendCreatorBase {
+ public:
+ TLogBackendCreator();
+ bool Init(const IInitContext& ctx) override;
+ static TFactory::TRegistrator<TLogBackendCreator> Registrar;
+
+ protected:
+ void DoToJson(NJson::TJsonValue& value) const override;
+
+ private:
+ THolder<TLogBackend> DoCreateLogBackend() const override;
+
+ private:
+ THolder<TClientParameters> ClientParams;
+ THolder<ILogBackendCreator> OwnLogger;
+ };
+
+}
diff --git a/library/cpp/unified_agent_client/client.h b/library/cpp/unified_agent_client/client.h
new file mode 100644
index 0000000000..62e1210803
--- /dev/null
+++ b/library/cpp/unified_agent_client/client.h
@@ -0,0 +1,256 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/counters.h>
+
+#include <library/cpp/logger/log.h>
+#include <library/cpp/threading/future/future.h>
+
+#include <util/datetime/base.h>
+#include <util/generic/hash.h>
+#include <util/generic/maybe.h>
+#include <util/generic/string.h>
+
+namespace NUnifiedAgent {
+ struct TClientParameters {
+ // uri format https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // for example: unix:///unified_agent for unix domain sockets or localhost:12345 for tcp
+ explicit TClientParameters(const TString& uri);
+
+ // Simple way to protect against writing to unintended/invalid Unified Agent endpoint.
+ // Must correspond to 'shared_secret_key' grpc input parameter
+ // (https://a.yandex-team.ru/arc/trunk/arcadia/logbroker/unified_agent/examples/all.yml?rev=6333542#L219),
+ // session would end with error otherwise.
+ //
+ // Default: not set
+ TClientParameters& SetSharedSecretKey(const TString& sharedSecretKey) {
+ SharedSecretKey = sharedSecretKey;
+ return *this;
+ }
+
+ // Max bytes count that have been received by client session but not acknowledged yet.
+ // When exceeded, new messages will be discarded, an error message
+ // will be written to the TLog instance and drop counter will be incremented.
+ //
+ // Default: 10 mb
+ TClientParameters& SetMaxInflightBytes(size_t maxInflightBytes) {
+ MaxInflightBytes = maxInflightBytes;
+ return *this;
+ }
+
+ // TLog instance for client library's own logs.
+ //
+ // Default: TLoggerOperator<TGlobalLog>::Log()
+ TClientParameters& SetLog(TLog& log) {
+ Log = log;
+ return *this;
+ }
+
+ // Throttle client library log by rate limit in bytes, excess will be discarded.
+ //
+ // Default: not set
+ TClientParameters& SetLogRateLimit(size_t bytesPerSec) {
+ LogRateLimitBytes = bytesPerSec;
+ return *this;
+ }
+
+ // Try to establish new grpc session if the current one become broken.
+ // Session may break either due to agent unavailability, or the agent itself may
+ // reject new session creation if it does not satisfy certain
+ // conditions - shared_secret_key does not match, the session creation rate has been
+ // exceeded, invalid session metadata has been used and so on.
+ // Attempts to establish a grpc session will continue indefinitely.
+ //
+ // Default: 50 millis
+ TClientParameters& SetGrpcReconnectDelay(TDuration delay) {
+ GrpcReconnectDelay = delay;
+ return *this;
+ }
+
+ // Grpc usually writes data to the socket faster than it comes from the client.
+ // This means that it's possible that each TClientMessage would be sent in it's own grpc message.
+ // This is expensive in terms of cpu, since grpc makes at least one syscall
+ // for each message on the sender and receiver sides.
+ // To avoid a large number of syscalls, the client holds incoming messages
+ // in internal buffer in hope of being able to assemble bigger grpc batch.
+ // This parameter sets the timeout for this delay - from IClientSession::Send
+ // call to the actual sending of the corresponding grpc message.
+ //
+ // Default: 10 millis.
+ TClientParameters& SetGrpcSendDelay(TDuration delay) {
+ GrpcSendDelay = delay;
+ return *this;
+ }
+
+ // Client library sends messages to grpc in batches, this parameter
+ // establishes upper limit on the size of single batch in bytes.
+ // If you increase this value, don't forget to adjust max_receive_message_size (https://a.yandex-team.ru/arc/trunk/arcadia/logbroker/unified_agent/examples/all.yml?rev=6661788#L185)
+ // in grpc input config, it must be grater than GrpcMaxMessageSize.
+ //
+ // Default: 1 mb
+ TClientParameters& SetGrpcMaxMessageSize(size_t size) {
+ GrpcMaxMessageSize = size;
+ return *this;
+ }
+
+ // Enable forks handling in client library.
+ // Multiple threads and concurrent forks are all supported is this regime.
+ //
+ // Default: false
+ TClientParameters& SetEnableForkSupport(bool value) {
+ EnableForkSupport = value;
+ return *this;
+ }
+
+ // Client library counters.
+ // App can set this to some leaf of it's TDynamicCounters tree.
+ // Actual provided counters are listed in TClientCounters.
+ //
+ // Default: not set
+ TClientParameters& SetCounters(const NMonitoring::TDynamicCounterPtr& counters) {
+ return SetCounters(MakeIntrusive<TClientCounters>(counters));
+ }
+
+ TClientParameters& SetCounters(const TIntrusivePtr<TClientCounters>& counters) {
+ Counters = counters;
+ return *this;
+ }
+
+ public:
+ static const size_t DefaultMaxInflightBytes;
+ static const size_t DefaultGrpcMaxMessageSize;
+ static const TDuration DefaultGrpcSendDelay;
+
+ public:
+ TString Uri;
+ TMaybe<TString> SharedSecretKey;
+ size_t MaxInflightBytes;
+ TLog Log;
+ TMaybe<size_t> LogRateLimitBytes;
+ TDuration GrpcReconnectDelay;
+ TDuration GrpcSendDelay;
+ bool EnableForkSupport;
+ size_t GrpcMaxMessageSize;
+ TIntrusivePtr<TClientCounters> Counters;
+ };
+
+ struct TSessionParameters {
+ TSessionParameters();
+
+ // Session unique identifier.
+ // It's guaranteed that for messages with the same sessionId relative
+ // ordering of the messages will be preserved at all processing stages
+ // in library, in Unified Agent and in other systems that respect ordering (e.g., Logbroker)
+ //
+ // Default: generated automatically by Unified Agent.
+ TSessionParameters& SetSessionId(const TString& sessionId) {
+ SessionId = sessionId;
+ return *this;
+ }
+
+ // Session metadata as key-value set.
+ // Can be used by agent filters and outputs for validation/routing/enrichment/etc.
+ //
+ // Default: not set
+ TSessionParameters& SetMeta(const THashMap<TString, TString>& meta) {
+ Meta = meta;
+ return *this;
+ }
+
+ // Session counters.
+ // Actual provided counters are listed in TClientSessionCounters.
+ //
+ // Default: A single common for all sessions subgroup of client TDynamicCounters instance
+ // with label ('session': 'default').
+ TSessionParameters& SetCounters(const NMonitoring::TDynamicCounterPtr& counters) {
+ return SetCounters(MakeIntrusive<TClientSessionCounters>(counters));
+ }
+
+ TSessionParameters& SetCounters(const TIntrusivePtr<TClientSessionCounters>& counters) {
+ Counters = counters;
+ return *this;
+ }
+
+ // Max bytes count that have been received by client session but not acknowledged yet.
+ // When exceeded, new messages will be discarded, an error message
+ // will be written to the TLog instance and drop counter will be incremented.
+ //
+ // Default: value from client settings
+ TSessionParameters& SetMaxInflightBytes(size_t maxInflightBytes) {
+ MaxInflightBytes = maxInflightBytes;
+ return *this;
+ }
+
+ public:
+ TMaybe<TString> SessionId;
+ TMaybe<THashMap<TString, TString>> Meta;
+ TIntrusivePtr<TClientSessionCounters> Counters;
+ TMaybe<size_t> MaxInflightBytes;
+ };
+
+ // Message data to be sent to unified agent.
+ struct TClientMessage {
+ // Opaque message payload.
+ TString Payload;
+
+ // Message metadata as key-value set.
+ // Can be used by agent filters and outputs for validation/routing/enrichment/etc.
+ //
+ // Default: not set
+ TMaybe<THashMap<TString, TString>> Meta{};
+
+ // Message timestamp.
+ //
+ // Default: time the client library has received this instance of TClientMessage.
+ TMaybe<TInstant> Timestamp{};
+ };
+
+ // Message size as it is accounted in byte-related metrics (ReceivedBytes, InflightBytes, etc).
+ size_t SizeOf(const TClientMessage& message);
+
+ class IClientSession: public TAtomicRefCount<IClientSession> {
+ public:
+ virtual ~IClientSession() = default;
+
+ // Places the message into send queue. Actual grpc call may occur later asynchronously,
+ // based on settings GrpcSendDelay and GrpcMaxMessageSize.
+ // A message can be discarded if the limits defined by the GrpcMaxMessageSize and MaxInflightBytes
+ // settings are exceeded, or if the Close method has already been called.
+ // In this case an error message will be written to the TLog instance
+ // and drop counter will be incremented.
+ virtual void Send(TClientMessage&& message) = 0;
+
+ void Send(const TClientMessage& message) {
+ Send(TClientMessage(message));
+ }
+
+ // Waits until either all current inflight messages are
+ // acknowledged or the specified deadline is reached.
+ // Upon the deadline grpc connection would be forcefully dropped (via grpc::ClientContext::TryCancel).
+ virtual NThreading::TFuture<void> CloseAsync(TInstant deadline) = 0;
+
+ void Close(TInstant deadline) {
+ CloseAsync(deadline).Wait();
+ }
+
+ void Close(TDuration timeout = TDuration::Seconds(3)) {
+ Close(Now() + timeout);
+ }
+ };
+ using TClientSessionPtr = TIntrusivePtr<IClientSession>;
+
+ class IClient: public TAtomicRefCount<IClient> {
+ public:
+ virtual ~IClient() = default;
+
+ virtual TClientSessionPtr CreateSession(const TSessionParameters& parameters = {}) = 0;
+
+ virtual void StartTracing(ELogPriority) {
+ }
+
+ virtual void FinishTracing() {
+ }
+ };
+ using TClientPtr = TIntrusivePtr<IClient>;
+
+ TClientPtr MakeClient(const TClientParameters& parameters);
+}
diff --git a/library/cpp/unified_agent_client/client_impl.cpp b/library/cpp/unified_agent_client/client_impl.cpp
new file mode 100644
index 0000000000..4db98120fd
--- /dev/null
+++ b/library/cpp/unified_agent_client/client_impl.cpp
@@ -0,0 +1,1274 @@
+#include "client_impl.h"
+#include "helpers.h"
+
+#include <contrib/libs/grpc/include/grpc/grpc.h>
+#include <contrib/libs/grpc/src/core/lib/gpr/string.h>
+#include <contrib/libs/grpc/src/core/lib/gprpp/fork.h>
+#include <contrib/libs/grpc/src/core/lib/iomgr/executor.h>
+
+#include <util/charset/utf8.h>
+#include <util/generic/size_literals.h>
+#include <util/system/env.h>
+
+using namespace NThreading;
+using namespace NMonitoring;
+
+namespace NUnifiedAgent::NPrivate {
+ std::shared_ptr<grpc::Channel> CreateChannel(const grpc::string& target) {
+ grpc::ChannelArguments args;
+ args.SetCompressionAlgorithm(GRPC_COMPRESS_NONE);
+ args.SetMaxReceiveMessageSize(Max<int>());
+ args.SetInt(GRPC_ARG_KEEPALIVE_TIME_MS, 60000);
+ args.SetInt(GRPC_ARG_KEEPALIVE_TIMEOUT_MS, 5000);
+ args.SetInt(GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS, 100);
+ args.SetInt(GRPC_ARG_MAX_RECONNECT_BACKOFF_MS, 200);
+ args.SetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA, 0);
+ args.SetInt(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS, 1);
+ args.SetInt(GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS, 5000);
+ args.SetInt(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS, 5000);
+ args.SetInt(GRPC_ARG_TCP_READ_CHUNK_SIZE, 1024*1024);
+ return grpc::CreateCustomChannel(target, grpc::InsecureChannelCredentials(), args);
+ }
+
+ void AddMeta(NUnifiedAgentProto::Request_Initialize& init, const TString& name, const TString& value) {
+ auto* metaItem = init.MutableMeta()->Add();
+ metaItem->SetName(name);
+ metaItem->SetValue(value);
+ }
+
+ std::atomic<ui64> TClient::Id{0};
+
+ TClient::TClient(const TClientParameters& parameters, std::shared_ptr<TForkProtector> forkProtector)
+ : Parameters(parameters)
+ , ForkProtector(forkProtector)
+ , Counters(parameters.Counters ? parameters.Counters : MakeIntrusive<TClientCounters>())
+ , Log(parameters.Log)
+ , MainLogger(Log, MakeFMaybe(Parameters.LogRateLimitBytes))
+ , Logger(MainLogger.Child(Sprintf("ua_%lu", Id.fetch_add(1))))
+ , Channel(nullptr)
+ , Stub(nullptr)
+ , ActiveCompletionQueue(nullptr)
+ , SessionLogLabel(0)
+ , ActiveSessions()
+ , Started(false)
+ , Destroyed(false)
+ , Lock()
+ {
+ MainLogger.SetDroppedBytesCounter(&Counters->ClientLogDroppedBytes);
+
+ if (ForkProtector != nullptr) {
+ ForkProtector->Register(*this);
+ }
+
+ EnsureStarted();
+
+ YLOG_INFO(Sprintf("created, uri [%s]", Parameters.Uri.c_str()));
+ }
+
+ TClient::~TClient() {
+ with_lock(Lock) {
+ Y_VERIFY(ActiveSessions.empty(), "active sessions found");
+
+ EnsureStoppedNoLock();
+
+ Destroyed = true;
+ }
+
+ if (ForkProtector != nullptr) {
+ ForkProtector->Unregister(*this);
+ }
+
+ YLOG_INFO(Sprintf("destroyed, uri [%s]", Parameters.Uri.c_str()));
+ }
+
+ TClientSessionPtr TClient::CreateSession(const TSessionParameters& parameters) {
+ return MakeIntrusive<TClientSession>(this, parameters);
+ }
+
+ void TClient::StartTracing(ELogPriority logPriority) {
+ MainLogger.StartTracing(logPriority);
+ StartGrpcTracing();
+ YLOG_INFO("tracing started");
+ }
+
+ void TClient::FinishTracing() {
+ FinishGrpcTracing();
+ MainLogger.FinishTracing();
+ YLOG_INFO("tracing finished");
+ }
+
+ void TClient::RegisterSession(TClientSession* session) {
+ with_lock(Lock) {
+ ActiveSessions.push_back(session);
+ }
+ }
+
+ void TClient::UnregisterSession(TClientSession* session) {
+ with_lock(Lock) {
+ const auto it = Find(ActiveSessions, session);
+ Y_VERIFY(it != ActiveSessions.end());
+ ActiveSessions.erase(it);
+ }
+ }
+
+ void TClient::PreFork() {
+ YLOG_INFO("pre fork started");
+
+ Lock.Acquire();
+
+ auto futures = TVector<TFuture<void>>(Reserve(ActiveSessions.size()));
+ for (auto* s: ActiveSessions) {
+ futures.push_back(s->PreFork());
+ }
+ YLOG_INFO("waiting for sessions");
+ WaitAll(futures).Wait();
+
+ EnsureStoppedNoLock();
+
+ YLOG_INFO("shutdown grpc executor");
+ grpc_core::Executor::SetThreadingAll(false);
+
+ YLOG_INFO("pre fork finished");
+ }
+
+ void TClient::PostForkParent() {
+ YLOG_INFO("post fork parent started");
+
+ if (!Destroyed) {
+ EnsureStartedNoLock();
+ }
+ Lock.Release();
+
+ for (auto* s: ActiveSessions) {
+ s->PostForkParent();
+ }
+
+ YLOG_INFO("post fork parent finished");
+ }
+
+ void TClient::PostForkChild() {
+ YLOG_INFO("post fork child started");
+
+ Lock.Release();
+
+ for (auto* s: ActiveSessions) {
+ s->PostForkChild();
+ }
+
+ YLOG_INFO("post fork child finished");
+ }
+
+ void TClient::EnsureStarted() {
+ with_lock(Lock) {
+ EnsureStartedNoLock();
+ }
+ }
+
+ void TClient::EnsureStartedNoLock() {
+ // Lock must be held
+
+ if (Started) {
+ return;
+ }
+
+ Channel = CreateChannel(Parameters.Uri);
+ Stub = NUnifiedAgentProto::UnifiedAgentService::NewStub(Channel);
+ ActiveCompletionQueue = MakeHolder<TGrpcCompletionQueueHost>();
+ ActiveCompletionQueue->Start();
+
+ Started = true;
+ }
+
+ void TClient::EnsureStoppedNoLock() {
+ // Lock must be held
+
+ if (!Started) {
+ return;
+ }
+
+ YLOG_INFO("stopping");
+ ActiveCompletionQueue->Stop();
+ ActiveCompletionQueue = nullptr;
+ Stub = nullptr;
+ Channel = nullptr;
+ YLOG_INFO("stopped");
+
+ Started = false;
+ }
+
+ TScopeLogger TClient::CreateSessionLogger() {
+ return Logger.Child(ToString(SessionLogLabel.fetch_add(1)));
+ }
+
+ TForkProtector::TForkProtector()
+ : Clients()
+ , GrpcInitializer()
+ , Enabled(grpc_core::Fork::Enabled())
+ , Lock()
+ {
+ }
+
+ void TForkProtector::Register(TClient& client) {
+ if (!Enabled) {
+ return;
+ }
+
+ Y_VERIFY(grpc_is_initialized());
+ Y_VERIFY(grpc_core::Fork::Enabled());
+
+ with_lock(Lock) {
+ Clients.push_back(&client);
+ }
+ }
+
+ void TForkProtector::Unregister(TClient& client) {
+ if (!Enabled) {
+ return;
+ }
+
+ with_lock(Lock) {
+ const auto it = Find(Clients, &client);
+ Y_VERIFY(it != Clients.end());
+ Clients.erase(it);
+ }
+ }
+
+ std::shared_ptr<TForkProtector> TForkProtector::Get(bool createIfNotExists) {
+ with_lock(InstanceLock) {
+ auto result = Instance.lock();
+ if (!result && createIfNotExists) {
+ SetEnv("GRPC_ENABLE_FORK_SUPPORT", "true");
+ result = std::make_shared<TForkProtector>();
+ if (!result->Enabled) {
+ TLog log("cerr");
+ TLogger logger(log, Nothing());
+ auto scopeLogger = logger.Child("ua client");
+ YLOG(TLOG_WARNING,
+ "Grpc is already initialized, can't enable fork support. "
+ "If forks are possible, please set environment variable GRPC_ENABLE_FORK_SUPPORT to 'true'. "
+ "If not, you can suppress this warning by setting EnableForkSupport "
+ "to false when creating the ua client.",
+ scopeLogger);
+ } else if (!SubscribedToForks) {
+ SubscribedToForks = true;
+ #ifdef _unix_
+ pthread_atfork(
+ &TForkProtector::PreFork,
+ &TForkProtector::PostForkParent,
+ &TForkProtector::PostForkChild);
+ #endif
+ }
+
+ Instance = result;
+ }
+ return result;
+ }
+ }
+
+ void TForkProtector::PreFork() {
+ auto self = Get(false);
+ if (!self) {
+ return;
+ }
+ self->Lock.Acquire();
+ for (auto* c : self->Clients) {
+ c->PreFork();
+ }
+ }
+
+ void TForkProtector::PostForkParent() {
+ auto self = Get(false);
+ if (!self) {
+ return;
+ }
+ for (auto* c : self->Clients) {
+ c->PostForkParent();
+ }
+ self->Lock.Release();
+ }
+
+ void TForkProtector::PostForkChild() {
+ auto self = Get(false);
+ if (!self) {
+ return;
+ }
+ for (auto* c : self->Clients) {
+ c->PostForkChild();
+ }
+ self->Lock.Release();
+ }
+
+ std::weak_ptr<TForkProtector> TForkProtector::Instance{};
+ TMutex TForkProtector::InstanceLock{};
+ bool TForkProtector::SubscribedToForks{false};
+
+ TClientSession::TClientSession(const TIntrusivePtr<TClient>& client, const TSessionParameters& parameters)
+ : AsyncJoiner()
+ , Client(client)
+ , OriginalSessionId(MakeFMaybe(parameters.SessionId))
+ , SessionId(OriginalSessionId)
+ , Meta(MakeFMaybe(parameters.Meta))
+ , Logger(Client->CreateSessionLogger())
+ , CloseStarted(false)
+ , ForcedCloseStarted(false)
+ , Closed(false)
+ , ForkInProgressLocal(false)
+ , Started(false)
+ , ClosePromise()
+ , ActiveGrpcCall(nullptr)
+ , WriteQueue()
+ , TrimmedCount(0)
+ , NextIndex(0)
+ , AckSeqNo(Nothing())
+ , PollerLastEventTimestamp()
+ , Counters(parameters.Counters ? parameters.Counters : Client->GetCounters()->GetDefaultSessionCounters())
+ , MakeGrpcCallTimer(nullptr)
+ , ForceCloseTimer(nullptr)
+ , PollTimer(nullptr)
+ , GrpcInflightMessages(0)
+ , GrpcInflightBytes(0)
+ , InflightBytes(0)
+ , CloseRequested(false)
+ , EventsBatchSize(0)
+ , PollingStatus(EPollingStatus::Inactive)
+ , EventNotification(nullptr)
+ , EventNotificationTriggered(false)
+ , EventsBatch()
+ , SecondaryEventsBatch()
+ , ForkInProgress(false)
+ , Lock()
+ , MaxInflightBytes(
+ parameters.MaxInflightBytes.GetOrElse(Client->GetParameters().MaxInflightBytes))
+ , AgentMaxReceiveMessage(Nothing()) {
+ if (Meta.Defined() && !IsUtf8(*Meta)) {
+ throw std::runtime_error("session meta contains non UTF-8 characters");
+ }
+ Y_ENSURE(!(Client->GetParameters().EnableForkSupport && SessionId.Defined()),
+ "explicit session id is not supported with forks");
+ Client->RegisterSession(this);
+
+ with_lock(Lock) {
+ DoStart();
+ }
+ }
+
+ TFuture<void> TClientSession::PreFork() {
+ YLOG_INFO("pre fork started");
+
+ Lock.Acquire();
+
+ YLOG_INFO("triggering event notification");
+ if (!EventNotificationTriggered) {
+ EventNotificationTriggered = true;
+ EventNotification->Trigger();
+ }
+
+ YLOG_INFO("setting 'fork in progress' flag");
+ ForkInProgress.store(true);
+
+ if (!Started) {
+ ClosePromise.TrySetValue();
+ }
+ YLOG_INFO("pre fork finished");
+ return ClosePromise.GetFuture();
+ }
+
+ void TClientSession::PostForkParent() {
+ YLOG_INFO("post fork parent started");
+ ForkInProgress.store(false);
+ ForkInProgressLocal = false;
+ Started = false;
+
+ if (!CloseRequested) {
+ DoStart();
+
+ YLOG_INFO("triggering event notification");
+ EventNotificationTriggered = true;
+ EventNotification->Trigger();
+ }
+
+ Lock.Release();
+
+ YLOG_INFO("post fork parent finished");
+ }
+
+ void TClientSession::PostForkChild() {
+ YLOG_INFO("post fork child started");
+ ForkInProgress.store(false);
+ ForkInProgressLocal = false;
+ Started = false;
+
+ SessionId.Clear();
+ TrimmedCount = 0;
+ NextIndex = 0;
+ AckSeqNo.Clear();
+ PurgeWriteQueue();
+ EventsBatch.clear();
+ SecondaryEventsBatch.clear();
+ EventsBatchSize = 0;
+
+ Lock.Release();
+
+ YLOG_INFO("post fork child finished");
+ }
+
+ void TClientSession::SetAgentMaxReceiveMessage(size_t newValue) {
+ AgentMaxReceiveMessage = newValue;
+ }
+
+ void TClientSession::DoStart() {
+ // Lock must be held
+
+ Y_VERIFY(!Started);
+ YLOG_INFO("starting");
+
+ Client->EnsureStarted();
+
+ MakeGrpcCallTimer = MakeHolder<TGrpcTimer>(Client->GetCompletionQueue(),
+ MakeIOCallback([this](EIOStatus status) {
+ if (status == EIOStatus::Error) {
+ return;
+ }
+ MakeGrpcCall();
+ }, &AsyncJoiner));
+ ForceCloseTimer = MakeHolder<TGrpcTimer>(Client->GetCompletionQueue(),
+ MakeIOCallback([this](EIOStatus status) {
+ if (status == EIOStatus::Error) {
+ return;
+ }
+ YLOG_INFO("ForceCloseTimer");
+ BeginClose(TInstant::Zero());
+ }, &AsyncJoiner));
+ PollTimer = MakeHolder<TGrpcTimer>(Client->GetCompletionQueue(),
+ MakeIOCallback([this](EIOStatus status) {
+ if (status == EIOStatus::Error) {
+ return;
+ }
+ Poll();
+ }, &AsyncJoiner));
+ EventNotification = MakeHolder<TGrpcNotification>(Client->GetCompletionQueue(),
+ MakeIOCallback([this](EIOStatus status) {
+ Y_VERIFY(status == EIOStatus::Ok);
+ Poll();
+ }, &AsyncJoiner));
+
+ CloseStarted = false;
+ ForcedCloseStarted = false;
+ Closed = false;
+ ClosePromise = NewPromise();
+ EventNotificationTriggered = false;
+ PollerLastEventTimestamp = Now();
+ PollingStatus = EPollingStatus::Inactive;
+
+ ++Client->GetCounters()->ActiveSessionsCount;
+ MakeGrpcCallTimer->Set(Now());
+ YLOG_INFO(Sprintf("started, sessionId [%s]", OriginalSessionId.GetOrElse("").c_str()));
+
+ Started = true;
+ }
+
+ void TClientSession::MakeGrpcCall() {
+ if (Closed) {
+ YLOG_INFO("MakeGrpcCall, session already closed");
+ return;
+ }
+ Y_VERIFY(!ForcedCloseStarted);
+ Y_VERIFY(!ActiveGrpcCall);
+ ActiveGrpcCall = MakeIntrusive<TGrpcCall>(*this);
+ ActiveGrpcCall->Start();
+ ++Counters->GrpcCalls;
+ if (CloseStarted) {
+ ActiveGrpcCall->BeginClose(false);
+ }
+ }
+
+ TClientSession::~TClientSession() {
+ Close(TInstant::Zero());
+ AsyncJoiner.Join().Wait();
+ Client->UnregisterSession(this);
+ YLOG_INFO("destroyed");
+ }
+
+ void TClientSession::Send(TClientMessage&& message) {
+ const auto messageSize = SizeOf(message);
+ ++Counters->ReceivedMessages;
+ Counters->ReceivedBytes += messageSize;
+ if (messageSize > Client->GetParameters().GrpcMaxMessageSize) {
+ YLOG_ERR(Sprintf("message size [%lu] is greater than max grpc message size [%lu], message dropped",
+ messageSize, Client->GetParameters().GrpcMaxMessageSize));
+ ++Counters->DroppedMessages;
+ Counters->DroppedBytes += messageSize;
+ ++Counters->ErrorsCount;
+ return;
+ }
+ if (message.Meta.Defined() && !IsUtf8(*message.Meta)) {
+ YLOG_ERR("message meta contains non UTF-8 characters, message dropped");
+ ++Counters->DroppedMessages;
+ Counters->DroppedBytes += messageSize;
+ ++Counters->ErrorsCount;
+ return;
+ }
+ if (!message.Timestamp.Defined()) {
+ message.Timestamp = TInstant::Now();
+ }
+ ++Counters->InflightMessages;
+ Counters->InflightBytes += messageSize;
+ {
+ auto g = Guard(Lock);
+
+ if (!Started) {
+ DoStart();
+ }
+
+ if (CloseRequested) {
+ g.Release();
+ YLOG_ERR(Sprintf("session is closing, message dropped, [%lu] bytes", messageSize));
+ --Counters->InflightMessages;
+ Counters->InflightBytes -= messageSize;
+ ++Counters->DroppedMessages;
+ Counters->DroppedBytes += messageSize;
+ ++Counters->ErrorsCount;
+ return;
+ }
+ if (InflightBytes.load() + messageSize > MaxInflightBytes) {
+ g.Release();
+ YLOG_ERR(Sprintf("max inflight of [%lu] bytes reached, [%lu] bytes dropped",
+ MaxInflightBytes, messageSize));
+ --Counters->InflightMessages;
+ Counters->InflightBytes -= messageSize;
+ ++Counters->DroppedMessages;
+ Counters->DroppedBytes += messageSize;
+ ++Counters->ErrorsCount;
+ return;
+ }
+ InflightBytes.fetch_add(messageSize);
+ EventsBatch.push_back(TMessageReceivedEvent{std::move(message), messageSize});
+ EventsBatchSize += messageSize;
+ if ((PollingStatus == EPollingStatus::Inactive ||
+ EventsBatchSize >= Client->GetParameters().GrpcMaxMessageSize) &&
+ !EventNotificationTriggered)
+ {
+ EventNotificationTriggered = true;
+ EventNotification->Trigger();
+ }
+ }
+ }
+
+ TFuture<void> TClientSession::CloseAsync(TInstant deadline) {
+ YLOG_INFO(Sprintf("close, deadline [%s]", ToString(deadline).c_str()));
+ if (!ClosePromise.GetFuture().HasValue()) {
+ with_lock(Lock) {
+ if (!Started) {
+ return MakeFuture();
+ }
+
+ CloseRequested = true;
+
+ EventsBatch.push_back(TCloseRequestedEvent{deadline});
+ if (!EventNotificationTriggered) {
+ EventNotificationTriggered = true;
+ EventNotification->Trigger();
+ }
+ }
+ }
+ return ClosePromise.GetFuture();
+ }
+
+ void TClientSession::BeginClose(TInstant deadline) {
+ if (Closed) {
+ return;
+ }
+ if (!CloseStarted) {
+ CloseStarted = true;
+ YLOG_INFO("close started");
+ }
+ const auto force = deadline == TInstant::Zero();
+ if (force && !ForcedCloseStarted) {
+ ForcedCloseStarted = true;
+ YLOG_INFO("forced close started");
+ }
+ if (!ActiveGrpcCall && (ForcedCloseStarted || WriteQueue.empty())) {
+ DoClose();
+ } else {
+ if (!force) {
+ ForceCloseTimer->Set(deadline);
+ }
+ if (ActiveGrpcCall) {
+ ActiveGrpcCall->BeginClose(ForcedCloseStarted);
+ }
+ }
+ }
+
+ void TClientSession::Poll() {
+ if (ForkInProgressLocal) {
+ return;
+ }
+
+ const auto now = Now();
+ const auto sendDelay = Client->GetParameters().GrpcSendDelay;
+ const auto oldPollingStatus = PollingStatus;
+
+ {
+ if (!Lock.TryAcquire()) {
+ TSpinWait sw;
+
+ while (Lock.IsLocked() || !Lock.TryAcquire()) {
+ if (ForkInProgress.load()) {
+ YLOG_INFO("poller 'fork in progress' signal received, stopping session");
+ ForkInProgressLocal = true;
+ if (!ActiveGrpcCall || !ActiveGrpcCall->Initialized()) {
+ BeginClose(TInstant::Max());
+ } else if (ActiveGrpcCall->ReuseSessions()) {
+ ActiveGrpcCall->Poison();
+ BeginClose(TInstant::Max());
+ } else {
+ BeginClose(TInstant::Zero());
+ }
+ return;
+ }
+ sw.Sleep();
+ }
+ }
+
+ if (!EventsBatch.empty()) {
+ DoSwap(EventsBatch, SecondaryEventsBatch);
+ EventsBatchSize = 0;
+ PollerLastEventTimestamp = now;
+ }
+ const auto needNextPollStep = sendDelay != TDuration::Zero() &&
+ !CloseRequested &&
+ (now - PollerLastEventTimestamp) < 10 * sendDelay;
+ PollingStatus = needNextPollStep ? EPollingStatus::Active : EPollingStatus::Inactive;
+ EventNotificationTriggered = false;
+
+ Lock.Release();
+ }
+
+ if (PollingStatus == EPollingStatus::Active) {
+ PollTimer->Set(now + sendDelay);
+ }
+ if (PollingStatus != oldPollingStatus) {
+ YLOG_DEBUG(Sprintf("poller %s", PollingStatus == EPollingStatus::Active ? "started" : "stopped"));
+ }
+ if (auto& batch = SecondaryEventsBatch; !batch.empty()) {
+ auto closeIt = FindIf(batch, [](const auto& e) {
+ return std::holds_alternative<TCloseRequestedEvent>(e);
+ });
+
+ if (auto it = begin(batch); it != closeIt) {
+ Y_VERIFY(!CloseStarted);
+ do {
+ auto& e = std::get<TMessageReceivedEvent>(*it++);
+ WriteQueue.push_back({std::move(e.Message), e.Size, false});
+ } while (it != closeIt);
+ if (ActiveGrpcCall) {
+ ActiveGrpcCall->NotifyMessageAdded();
+ }
+ }
+
+ for (auto endIt = end(batch); closeIt != endIt; ++closeIt) {
+ const auto& e = std::get<TCloseRequestedEvent>(*closeIt);
+ BeginClose(e.Deadline);
+ }
+
+ batch.clear();
+ }
+ };
+
+ void TClientSession::PrepareInitializeRequest(NUnifiedAgentProto::Request& target) {
+ auto& initializeMessage = *target.MutableInitialize();
+ if (SessionId.Defined()) {
+ initializeMessage.SetSessionId(*SessionId);
+ }
+ if (Client->GetParameters().SharedSecretKey.Defined()) {
+ initializeMessage.SetSharedSecretKey(*Client->GetParameters().SharedSecretKey);
+ }
+ if (Meta.Defined()) {
+ for (const auto& p: *Meta) {
+ AddMeta(initializeMessage, p.first, p.second);
+ }
+ }
+ if (!Meta.Defined() || Meta->find("_reusable") == Meta->end()) {
+ AddMeta(initializeMessage, "_reusable", "true");
+ }
+ }
+
+ TClientSession::TRequestBuilder::TRequestBuilder(NUnifiedAgentProto::Request& target, size_t RequestPayloadLimitBytes,
+ TFMaybe<size_t> serializedRequestLimitBytes)
+ : Target(target)
+ , PwTarget(MakeFMaybe<NPW::TRequest>())
+ , MetaItems()
+ , RequestPayloadSize(0)
+ , RequestPayloadLimitBytes(RequestPayloadLimitBytes)
+ , SerializedRequestSize(0)
+ , SerializedRequestLimitBytes(serializedRequestLimitBytes)
+ , CountersInvalid(false)
+ {
+ }
+
+ void TClientSession::TRequestBuilder::ResetCounters() {
+ RequestPayloadSize = 0;
+ SerializedRequestSize = 0;
+ PwTarget.Clear();
+ PwTarget.ConstructInPlace();
+ CountersInvalid = false;
+ }
+
+ TClientSession::TRequestBuilder::TAddResult TClientSession::TRequestBuilder::TryAddMessage(
+ const TPendingMessage& message, size_t seqNo) {
+ Y_VERIFY(!CountersInvalid);
+ {
+ // add item to pwRequest to increase calculated size
+ PwTarget->DataBatch.SeqNo.Add(seqNo);
+ PwTarget->DataBatch.Timestamp.Add(message.Message.Timestamp->MicroSeconds());
+ PwTarget->DataBatch.Payload.Add().SetValue(message.Message.Payload);
+ if (message.Message.Meta.Defined()) {
+ for (const auto &m: *message.Message.Meta) {
+ TMetaItemBuilder *metaItemBuilder = nullptr;
+ {
+ auto it = MetaItems.find(m.first);
+ if (it == MetaItems.end()) {
+ PwTarget->DataBatch.Meta.Add().Key.SetValue(m.first);
+ } else {
+ metaItemBuilder = &it->second;
+ }
+ }
+ size_t metaItemIdx = (metaItemBuilder != nullptr) ? metaItemBuilder->ItemIndex :
+ PwTarget->DataBatch.Meta.GetSize() - 1;
+ auto &pwMetaItem = PwTarget->DataBatch.Meta.Get(metaItemIdx);
+ pwMetaItem.Value.Add().SetValue(m.second);
+ const auto index = Target.GetDataBatch().SeqNoSize();
+ if ((metaItemBuilder != nullptr && metaItemBuilder->ValueIndex != index) ||
+ (metaItemBuilder == nullptr && index != 0)) {
+ const auto valueIdx = (metaItemBuilder) ? metaItemBuilder->ValueIndex : 0;
+ pwMetaItem.SkipStart.Add(valueIdx);
+ pwMetaItem.SkipLength.Add(index - valueIdx);
+ }
+ }
+ }
+ }
+ const auto newSerializedRequestSize = PwTarget->ByteSizeLong();
+ const auto newPayloadSize = RequestPayloadSize + message.Size;
+ if ((SerializedRequestLimitBytes.Defined() && newSerializedRequestSize > *SerializedRequestLimitBytes) ||
+ newPayloadSize > RequestPayloadLimitBytes) {
+ CountersInvalid = true;
+ return {true, newPayloadSize, newSerializedRequestSize};
+ }
+
+ {
+ // add item to the real request
+ auto& batch = *Target.MutableDataBatch();
+ batch.AddSeqNo(seqNo);
+ batch.AddTimestamp(message.Message.Timestamp->MicroSeconds());
+ batch.AddPayload(message.Message.Payload);
+ if (message.Message.Meta.Defined()) {
+ for (const auto &m: *message.Message.Meta) {
+ TMetaItemBuilder *metaItemBuilder;
+ {
+ auto it = MetaItems.find(m.first);
+ if (it == MetaItems.end()) {
+ batch.AddMeta()->SetKey(m.first);
+ auto insertResult = MetaItems.insert({m.first, {batch.MetaSize() - 1}});
+ Y_VERIFY(insertResult.second);
+ metaItemBuilder = &insertResult.first->second;
+ } else {
+ metaItemBuilder = &it->second;
+ }
+ }
+ auto *metaItem = batch.MutableMeta(metaItemBuilder->ItemIndex);
+ metaItem->AddValue(m.second);
+ const auto index = batch.SeqNoSize() - 1;
+ if (metaItemBuilder->ValueIndex != index) {
+ metaItem->AddSkipStart(metaItemBuilder->ValueIndex);
+ metaItem->AddSkipLength(index - metaItemBuilder->ValueIndex);
+ }
+ metaItemBuilder->ValueIndex = index + 1;
+ }
+ }
+ SerializedRequestSize = newSerializedRequestSize;
+ RequestPayloadSize = newPayloadSize;
+ }
+
+ return {false, newPayloadSize, newSerializedRequestSize};
+ }
+
+ void TClientSession::PrepareWriteBatchRequest(NUnifiedAgentProto::Request& target) {
+ Y_VERIFY(AckSeqNo.Defined());
+ TRequestBuilder requestBuilder(target, Client->GetParameters().GrpcMaxMessageSize, AgentMaxReceiveMessage);
+ const auto startIndex = NextIndex - TrimmedCount;
+ for (size_t i = startIndex; i < WriteQueue.size(); ++i) {
+ auto& queueItem = WriteQueue[i];
+ if (queueItem.Skipped) {
+ NextIndex++;
+ continue;
+ }
+
+ const auto addResult = requestBuilder.TryAddMessage(queueItem, *AckSeqNo + i + 1);
+ const auto serializedLimitToLog = AgentMaxReceiveMessage.Defined() ? *AgentMaxReceiveMessage : 0;
+ if (addResult.LimitExceeded && target.GetDataBatch().SeqNoSize() == 0) {
+ YLOG_ERR(Sprintf("single serialized message is too large [%lu] > [%lu], dropping it",
+ addResult.NewSerializedRequestSize, serializedLimitToLog));
+ queueItem.Skipped = true;
+ ++Counters->DroppedMessages;
+ Counters->DroppedBytes += queueItem.Size;
+ ++Counters->ErrorsCount;
+ NextIndex++;
+ requestBuilder.ResetCounters();
+ continue;
+ }
+ if (addResult.LimitExceeded) {
+ YLOG_DEBUG(Sprintf(
+ "batch limit exceeded: [%lu] > [%lu] (limit for serialized batch)"
+ "OR [%lu] > [%lu] (limit for raw batch)",
+ addResult.NewSerializedRequestSize, serializedLimitToLog,
+ addResult.NewRequestPayloadSize, Client->GetParameters().GrpcMaxMessageSize));
+ break;
+ }
+
+ NextIndex++;
+ }
+ const auto messagesCount = target.GetDataBatch().SeqNoSize();
+ if (messagesCount == 0) {
+ return;
+ }
+ Y_VERIFY(requestBuilder.GetSerializedRequestSize() == target.ByteSizeLong(),
+ "failed to calculate size for message [%s]", target.ShortDebugString().c_str());
+ GrpcInflightMessages += messagesCount;
+ GrpcInflightBytes += requestBuilder.GetRequestPayloadSize();
+ YLOG_DEBUG(Sprintf("new write batch, [%lu] messages, [%lu] bytes, first seq_no [%lu], serialized size [%lu]",
+ messagesCount, requestBuilder.GetRequestPayloadSize(),
+ *target.GetDataBatch().GetSeqNo().begin(), requestBuilder.GetSerializedRequestSize()));
+ ++Counters->GrpcWriteBatchRequests;
+ Counters->GrpcInflightMessages += messagesCount;
+ Counters->GrpcInflightBytes += requestBuilder.GetRequestPayloadSize();
+ }
+
+ void TClientSession::Acknowledge(ui64 seqNo) {
+ size_t messagesCount = 0;
+ size_t bytesCount = 0;
+ size_t skippedMessagesCount = 0;
+ size_t skippedBytesCount = 0;
+
+ if (AckSeqNo.Defined()) {
+ while (!WriteQueue.empty() && ((*AckSeqNo < seqNo) || WriteQueue.front().Skipped)) {
+ if (WriteQueue.front().Skipped) {
+ skippedMessagesCount++;
+ skippedBytesCount += WriteQueue.front().Size;
+ } else {
+ ++messagesCount;
+ bytesCount += WriteQueue.front().Size;
+ }
+ ++(*AckSeqNo);
+ WriteQueue.pop_front();
+ ++TrimmedCount;
+ }
+ }
+ if (!AckSeqNo.Defined() || seqNo > *AckSeqNo) {
+ AckSeqNo = seqNo;
+ }
+
+ Counters->AcknowledgedMessages += messagesCount;
+ Counters->AcknowledgedBytes += bytesCount;
+ Counters->InflightMessages -= (messagesCount + skippedMessagesCount);
+ Counters->InflightBytes -= (bytesCount + skippedBytesCount);
+ InflightBytes.fetch_sub(bytesCount);
+ Counters->GrpcInflightMessages -= messagesCount;
+ Counters->GrpcInflightBytes -= bytesCount;
+ GrpcInflightMessages -= messagesCount;
+ GrpcInflightBytes -= bytesCount;
+
+ YLOG_DEBUG(Sprintf("ack [%lu], [%lu] messages, [%lu] bytes", seqNo, messagesCount, bytesCount));
+ }
+
+ void TClientSession::OnGrpcCallInitialized(const TString& sessionId, ui64 lastSeqNo) {
+ SessionId = sessionId;
+ Acknowledge(lastSeqNo);
+ NextIndex = TrimmedCount;
+ ++Counters->GrpcCallsInitialized;
+ Counters->GrpcInflightMessages -= GrpcInflightMessages;
+ Counters->GrpcInflightBytes -= GrpcInflightBytes;
+ GrpcInflightMessages = 0;
+ GrpcInflightBytes = 0;
+ YLOG_INFO(Sprintf("grpc call initialized, session_id [%s], last_seq_no [%lu]",
+ sessionId.c_str(), lastSeqNo));
+ }
+
+ void TClientSession::OnGrpcCallFinished() {
+ Y_VERIFY(!Closed);
+ Y_VERIFY(ActiveGrpcCall);
+ ActiveGrpcCall = nullptr;
+ if (CloseStarted && (ForcedCloseStarted || WriteQueue.empty())) {
+ DoClose();
+ } else {
+ const auto reconnectTime = TInstant::Now() + Client->GetParameters().GrpcReconnectDelay;
+ MakeGrpcCallTimer->Set(reconnectTime);
+ YLOG_INFO(Sprintf("grpc call delayed until [%s]", reconnectTime.ToString().c_str()));
+ }
+ }
+
+ auto TClientSession::PurgeWriteQueue() -> TPurgeWriteQueueStats {
+ size_t bytesCount = 0;
+ for (const auto& m: WriteQueue) {
+ bytesCount += m.Size;
+ }
+ auto result = TPurgeWriteQueueStats{WriteQueue.size(), bytesCount};
+
+ Counters->DroppedMessages += WriteQueue.size();
+ Counters->DroppedBytes += bytesCount;
+ Counters->InflightMessages -= WriteQueue.size();
+ Counters->InflightBytes -= bytesCount;
+ Counters->GrpcInflightMessages -= GrpcInflightMessages;
+ Counters->GrpcInflightBytes -= GrpcInflightBytes;
+
+ InflightBytes.fetch_sub(bytesCount);
+ GrpcInflightMessages = 0;
+ GrpcInflightBytes = 0;
+ WriteQueue.clear();
+
+ return result;
+ }
+
+ void TClientSession::DoClose() {
+ Y_VERIFY(CloseStarted);
+ Y_VERIFY(!Closed);
+ Y_VERIFY(!ClosePromise.HasValue());
+ MakeGrpcCallTimer->Cancel();
+ ForceCloseTimer->Cancel();
+ PollTimer->Cancel();
+ if (!ForkInProgressLocal && WriteQueue.size() > 0) {
+ const auto stats = PurgeWriteQueue();
+ ++Counters->ErrorsCount;
+ YLOG_ERR(Sprintf("DoClose, dropped [%lu] messages, [%lu] bytes",
+ stats.PurgedMessages, stats.PurgedBytes));
+ }
+ --Client->GetCounters()->ActiveSessionsCount;
+ Closed = true;
+ ClosePromise.SetValue();
+ YLOG_INFO("session closed");
+ }
+
+ TGrpcCall::TGrpcCall(TClientSession& session)
+ : Session(session)
+ , AsyncJoinerToken(&Session.GetAsyncJoiner())
+ , AcceptTag(MakeIOCallback(this, &TGrpcCall::EndAccept))
+ , ReadTag(MakeIOCallback(this, &TGrpcCall::EndRead))
+ , WriteTag(MakeIOCallback(this, &TGrpcCall::EndWrite))
+ , WritesDoneTag(MakeIOCallback(this, &TGrpcCall::EndWritesDone))
+ , FinishTag(MakeIOCallback(this, &TGrpcCall::EndFinish))
+ , Logger(session.GetLogger().Child("grpc"))
+ , AcceptPending(false)
+ , Initialized_(false)
+ , ReadPending(false)
+ , ReadsDone(false)
+ , WritePending(false)
+ , WritesBlocked(false)
+ , WritesDonePending(false)
+ , WritesDone(false)
+ , ErrorOccured(false)
+ , FinishRequested(false)
+ , FinishStarted(false)
+ , FinishDone(false)
+ , Cancelled(false)
+ , Poisoned(false)
+ , PoisonPillSent(false)
+ , ReuseSessions_(false)
+ , FinishStatus()
+ , ClientContext()
+ , ReaderWriter(nullptr)
+ , Request()
+ , Response()
+ {
+ }
+
+ void TGrpcCall::Start() {
+ AcceptPending = true;
+ auto& client = Session.GetClient();
+ ReaderWriter = client.GetStub().AsyncSession(&ClientContext,
+ &client.GetCompletionQueue(),
+ AcceptTag->Ref());
+ YLOG_INFO("AsyncSession started");
+ }
+
+ TGrpcCall::~TGrpcCall() {
+ YLOG_INFO("destroyed");
+ }
+
+ void TGrpcCall::EnsureFinishStarted() {
+ if (!FinishStarted) {
+ FinishStarted = true;
+ ReaderWriter->Finish(&FinishStatus, FinishTag->Ref());
+ YLOG_INFO("Finish started");
+ }
+ }
+
+ bool TGrpcCall::CheckHasError(EIOStatus status, const char* method) {
+ if (status == EIOStatus::Error) {
+ SetError(Sprintf("%s %s", method, ToString(status).c_str()));
+ return true;
+ }
+ if (ErrorOccured) {
+ ScheduleFinishOnError();
+ return true;
+ }
+ return false;
+ }
+
+ void TGrpcCall::SetError(const TString& error) {
+ if (!Cancelled) {
+ YLOG_ERR(error);
+ ++Session.GetCounters().ErrorsCount;
+ }
+ ErrorOccured = true;
+ ScheduleFinishOnError();
+ }
+
+ void TGrpcCall::ScheduleFinishOnError() {
+ if (!AcceptPending && !WritePending && !WritesDonePending) {
+ EnsureFinishStarted();
+ }
+ }
+
+ void TGrpcCall::BeginClose(bool force) {
+ if (force) {
+ if (!Cancelled) {
+ Cancelled = true;
+ ClientContext.TryCancel();
+ SetError("forced close");
+ }
+ return;
+ }
+ YLOG_INFO(Sprintf("Close Initialized [%d], AcceptPending [%d], "
+ "WritePending [%d], FinishRequested [%d], "
+ "ErrorOccured [%d]",
+ static_cast<int>(Initialized_),
+ static_cast<int>(AcceptPending),
+ static_cast<int>(WritePending),
+ static_cast<int>(FinishRequested),
+ static_cast<int>(ErrorOccured)));
+ if (ErrorOccured || FinishRequested) {
+ return;
+ }
+ FinishRequested = true;
+ if (!Initialized_ || WritePending) {
+ return;
+ }
+ WritesBlocked = true;
+ BeginWritesDone();
+ }
+
+ void TGrpcCall::Poison() {
+ Poisoned = true;
+ NotifyMessageAdded();
+ }
+
+ void TGrpcCall::NotifyMessageAdded() {
+ if (WritePending || !Initialized_ || ErrorOccured || FinishRequested) {
+ return;
+ }
+ ScheduleWrite();
+ }
+
+ void TGrpcCall::ScheduleWrite() {
+ Request.Clear();
+ if (!Poisoned) {
+ Session.PrepareWriteBatchRequest(Request);
+ } else if (!PoisonPillSent) {
+ PoisonPillSent = true;
+ auto& batch = *Request.mutable_data_batch();
+ batch.AddSeqNo(std::numeric_limits<::google::protobuf::uint64>::max());
+ batch.AddTimestamp(Now().MicroSeconds());
+ batch.AddPayload("");
+ YLOG_INFO("poison pill sent");
+ }
+ if (Request.GetDataBatch().GetSeqNo().empty()) {
+ if (FinishRequested) {
+ WritesBlocked = true;
+ BeginWritesDone();
+ }
+ return;
+ }
+
+ BeginWrite();
+ }
+
+ void TGrpcCall::EndAccept(EIOStatus status) {
+ Y_VERIFY(AcceptPending);
+ AcceptPending = false;
+ if (CheckHasError(status, "EndAccept")) {
+ return;
+ }
+ BeginRead();
+ Request.Clear();
+ Session.PrepareInitializeRequest(Request);
+ BeginWrite();
+ }
+
+ void TGrpcCall::EndRead(EIOStatus status) {
+ ReadPending = false;
+ if (FinishDone) {
+ Session.OnGrpcCallFinished();
+ return;
+ }
+ if (!ErrorOccured && status == EIOStatus::Error && WritesBlocked) {
+ Y_VERIFY(!WritePending);
+ YLOG_INFO("EndRead ReadsDone");
+ ReadsDone = true;
+ if (WritesDone) {
+ EnsureFinishStarted();
+ return;
+ }
+ return;
+ }
+ if (CheckHasError(status, "EndRead")) {
+ return;
+ }
+ if (!Initialized_) {
+ const auto metadata = ClientContext.GetServerInitialMetadata();
+ {
+ const auto it = metadata.find("ua-reuse-sessions");
+ if (it != metadata.end() && it->second == "true") {
+ ReuseSessions_ = true;
+ }
+ }
+ {
+ const auto it = metadata.find("ua-max-receive-message-size");
+ if (it != metadata.end()) {
+ Session.SetAgentMaxReceiveMessage(FromString<size_t>(TString{it->second.begin(), it->second.end()}));
+ }
+ }
+
+ if (Response.response_case() != NUnifiedAgentProto::Response::kInitialized) {
+ SetError(Sprintf("EndRead while initializing, unexpected response_case [%d]",
+ static_cast<int>(Response.response_case())));
+ return;
+ }
+ Session.OnGrpcCallInitialized(Response.GetInitialized().GetSessionId(),
+ Response.GetInitialized().GetLastSeqNo());
+ Initialized_ = true;
+ if (!WritePending) {
+ ScheduleWrite();
+ }
+ } else {
+ if (Response.response_case() != NUnifiedAgentProto::Response::kAck) {
+ SetError(Sprintf("EndRead unexpected response_case [%d]",
+ static_cast<int>(Response.response_case())));
+ return;
+ }
+ Session.Acknowledge(Response.GetAck().GetSeqNo());
+ }
+ BeginRead();
+ }
+
+ void TGrpcCall::EndWrite(EIOStatus status) {
+ WritePending = false;
+ if (CheckHasError(status, "EndWrite")) {
+ return;
+ }
+ if (!Initialized_) {
+ return;
+ }
+ ScheduleWrite();
+ }
+
+ void TGrpcCall::EndFinish(EIOStatus status) {
+ FinishDone = true;
+ const auto finishStatus = status == EIOStatus::Error
+ ? grpc::Status(grpc::UNKNOWN, "finish error")
+ : FinishStatus;
+ YLOG(finishStatus.ok() || Cancelled || Poisoned ? TLOG_INFO : TLOG_ERR,
+ Sprintf("EndFinish, code [%s], message [%s]",
+ ToString(finishStatus.error_code()).c_str(),
+ finishStatus.error_message().c_str()),
+ Logger);
+ if (!finishStatus.ok() && !Cancelled) {
+ ++Session.GetCounters().ErrorsCount;
+ }
+ if (!ReadPending) {
+ Session.OnGrpcCallFinished();
+ }
+ }
+
+ void TGrpcCall::EndWritesDone(EIOStatus status) {
+ YLOG_INFO(Sprintf("EndWritesDone [%s]", ToString(status).c_str()));
+ Y_VERIFY(!WritePending && !WritesDone && WritesDonePending);
+ WritesDonePending = false;
+ WritesDone = true;
+ if (CheckHasError(status, "EndWriteDone")) {
+ return;
+ }
+ if (ReadsDone) {
+ EnsureFinishStarted();
+ }
+ }
+
+ void TGrpcCall::BeginWritesDone() {
+ WritesDonePending = true;
+ ReaderWriter->WritesDone(WritesDoneTag->Ref());
+ YLOG_INFO("WritesDone started");
+ }
+
+ void TGrpcCall::BeginRead() {
+ ReadPending = true;
+ Response.Clear();
+ ReaderWriter->Read(&Response, ReadTag->Ref());
+ YLOG_DEBUG("Read started");
+ }
+
+ void TGrpcCall::BeginWrite() {
+ WritePending = true;
+ ReaderWriter->Write(Request, WriteTag->Ref());
+ YLOG_DEBUG("Write started");
+ }
+}
+
+namespace NUnifiedAgent {
+ size_t SizeOf(const TClientMessage& message) {
+ auto result = message.Payload.Size() + sizeof(TInstant);
+ if (message.Meta.Defined()) {
+ for (const auto& m: *message.Meta) {
+ result += m.first.Size() + m.second.Size();
+ }
+ }
+ return result;
+ }
+
+ TClientParameters::TClientParameters(const TString& uri)
+ : Uri(uri)
+ , SharedSecretKey(Nothing())
+ , MaxInflightBytes(DefaultMaxInflightBytes)
+ , Log(TLoggerOperator<TGlobalLog>::Log())
+ , LogRateLimitBytes(Nothing())
+ , GrpcReconnectDelay(TDuration::MilliSeconds(50))
+ , GrpcSendDelay(DefaultGrpcSendDelay)
+ , EnableForkSupport(false)
+ , GrpcMaxMessageSize(DefaultGrpcMaxMessageSize)
+ , Counters(nullptr)
+ {
+ }
+
+ TSessionParameters::TSessionParameters()
+ : SessionId(Nothing())
+ , Meta(Nothing())
+ , Counters(nullptr)
+ , MaxInflightBytes()
+ {
+ }
+
+ const size_t TClientParameters::DefaultMaxInflightBytes = 10_MB;
+ const size_t TClientParameters::DefaultGrpcMaxMessageSize = 1_MB;
+ const TDuration TClientParameters::DefaultGrpcSendDelay = TDuration::MilliSeconds(10);
+
+ TClientPtr MakeClient(const TClientParameters& parameters) {
+ if (!grpc_is_initialized()) {
+ EnsureGrpcConfigured();
+ }
+
+ std::shared_ptr<NPrivate::TForkProtector> forkProtector{};
+#ifdef _unix_
+ if (parameters.EnableForkSupport) {
+ forkProtector = NPrivate::TForkProtector::Get(true);
+ }
+#endif
+ return MakeIntrusive<NPrivate::TClient>(parameters, forkProtector);
+ }
+}
diff --git a/library/cpp/unified_agent_client/client_impl.h b/library/cpp/unified_agent_client/client_impl.h
new file mode 100644
index 0000000000..6adadf92e3
--- /dev/null
+++ b/library/cpp/unified_agent_client/client_impl.h
@@ -0,0 +1,364 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/client.h>
+#include <library/cpp/unified_agent_client/client_proto_weighing.h>
+#include <library/cpp/unified_agent_client/counters.h>
+#include <library/cpp/unified_agent_client/logger.h>
+#include <library/cpp/unified_agent_client/variant.h>
+#include <library/cpp/unified_agent_client/proto/unified_agent.grpc.pb.h>
+#include <library/cpp/unified_agent_client/grpc_io.h>
+
+#include <library/cpp/logger/global/global.h>
+
+#include <util/generic/deque.h>
+#include <util/system/mutex.h>
+
+namespace NUnifiedAgent::NPrivate {
+ class TClientSession;
+ class TGrpcCall;
+ class TForkProtector;
+
+ class TClient: public IClient {
+ public:
+ explicit TClient(const TClientParameters& parameters, std::shared_ptr<TForkProtector> forkProtector);
+
+ ~TClient() override;
+
+ TClientSessionPtr CreateSession(const TSessionParameters& parameters) override;
+
+ void StartTracing(ELogPriority logPriority) override;
+
+ void FinishTracing() override;
+
+ inline const TIntrusivePtr<TClientCounters>& GetCounters() const noexcept {
+ return Counters;
+ }
+
+ inline NUnifiedAgentProto::UnifiedAgentService::Stub& GetStub() noexcept {
+ return *Stub;
+ }
+
+ TScopeLogger CreateSessionLogger();
+
+ inline const TClientParameters& GetParameters() const noexcept {
+ return Parameters;
+ }
+
+ inline grpc::CompletionQueue& GetCompletionQueue() noexcept {
+ return ActiveCompletionQueue->GetCompletionQueue();
+ }
+
+ void RegisterSession(TClientSession* session);
+
+ void UnregisterSession(TClientSession* session);
+
+ void PreFork();
+
+ void PostForkParent();
+
+ void PostForkChild();
+
+ void EnsureStarted();
+
+ private:
+ void EnsureStartedNoLock();
+
+ void EnsureStoppedNoLock();
+
+ private:
+ const TClientParameters Parameters;
+ std::shared_ptr<TForkProtector> ForkProtector;
+ TIntrusivePtr<TClientCounters> Counters;
+ TLog Log;
+ TLogger MainLogger;
+ TScopeLogger Logger;
+ std::shared_ptr<grpc::Channel> Channel;
+ std::unique_ptr<NUnifiedAgentProto::UnifiedAgentService::Stub> Stub;
+ THolder<TGrpcCompletionQueueHost> ActiveCompletionQueue;
+ std::atomic<size_t> SessionLogLabel;
+ TVector<TClientSession*> ActiveSessions;
+ bool Started;
+ bool Destroyed;
+ TAdaptiveLock Lock;
+ static std::atomic<ui64> Id;
+ };
+
+ class TForkProtector {
+ public:
+ TForkProtector();
+
+ void Register(TClient& client);
+
+ void Unregister(TClient& client);
+
+ static std::shared_ptr<TForkProtector> Get(bool createIfNotExists);
+
+ private:
+ static void PreFork();
+
+ static void PostForkParent();
+
+ static void PostForkChild();
+
+ private:
+ TVector<TClient*> Clients;
+ grpc::GrpcLibraryCodegen GrpcInitializer;
+ bool Enabled;
+ TAdaptiveLock Lock;
+
+ static std::weak_ptr<TForkProtector> Instance;
+ static TMutex InstanceLock;
+ static bool SubscribedToForks;
+ };
+
+ class TClientSession: public IClientSession {
+ public:
+ TClientSession(const TIntrusivePtr<TClient>& client, const TSessionParameters& parameters);
+
+ ~TClientSession();
+
+ void Send(TClientMessage&& message) override;
+
+ NThreading::TFuture<void> CloseAsync(TInstant deadline) override;
+
+ inline TClient& GetClient() noexcept {
+ return *Client;
+ }
+
+ inline TScopeLogger& GetLogger() noexcept {
+ return Logger;
+ }
+
+ inline TClientSessionCounters& GetCounters() noexcept {
+ return *Counters;
+ }
+
+ inline TAsyncJoiner& GetAsyncJoiner() noexcept {
+ return AsyncJoiner;
+ }
+
+ void PrepareInitializeRequest(NUnifiedAgentProto::Request& target);
+
+ void PrepareWriteBatchRequest(NUnifiedAgentProto::Request& target);
+
+ void Acknowledge(ui64 seqNo);
+
+ void OnGrpcCallInitialized(const TString& sessionId, ui64 lastSeqNo);
+
+ void OnGrpcCallFinished();
+
+ NThreading::TFuture<void> PreFork();
+
+ void PostForkParent();
+
+ void PostForkChild();
+
+ void SetAgentMaxReceiveMessage(size_t);
+
+ private:
+ enum class EPollingStatus {
+ Active,
+ Inactive
+ };
+
+ struct TCloseRequestedEvent {
+ TInstant Deadline;
+ };
+
+ struct TMessageReceivedEvent {
+ TClientMessage Message;
+ size_t Size;
+ };
+
+ struct TPurgeWriteQueueStats {
+ size_t PurgedMessages{};
+ size_t PurgedBytes{};
+ };
+
+ using TEvent = std::variant<TCloseRequestedEvent, TMessageReceivedEvent>;
+
+ public:
+ struct TPendingMessage {
+ TClientMessage Message;
+ size_t Size;
+ bool Skipped;
+ };
+
+ class TRequestBuilder {
+ public:
+ struct TAddResult;
+
+ public:
+ TRequestBuilder(NUnifiedAgentProto::Request &target, size_t RequestPayloadLimitBytes,
+ TFMaybe<size_t> serializedRequestLimitBytes);
+
+ TAddResult TryAddMessage(const TPendingMessage& message, size_t seqNo);
+
+ void ResetCounters();
+
+ inline size_t GetSerializedRequestSize() const {
+ return SerializedRequestSize;
+ }
+
+ inline size_t GetRequestPayloadSize() const {
+ return RequestPayloadSize;
+ }
+
+ public:
+ struct TAddResult {
+ bool LimitExceeded;
+ size_t NewRequestPayloadSize; // == actual value, if !LimitExceeded
+ size_t NewSerializedRequestSize; // == actual value, if !LimitExceeded
+ };
+
+ private:
+ struct TMetaItemBuilder {
+ size_t ItemIndex;
+ size_t ValueIndex{0};
+ };
+
+ private:
+ NUnifiedAgentProto::Request& Target;
+ TFMaybe<NPW::TRequest> PwTarget;
+ THashMap<TString, TMetaItemBuilder> MetaItems;
+ size_t RequestPayloadSize;
+ size_t RequestPayloadLimitBytes;
+ size_t SerializedRequestSize;
+ TFMaybe<size_t> SerializedRequestLimitBytes;
+ bool CountersInvalid;
+ };
+
+ private:
+ void MakeGrpcCall();
+
+ void DoClose();
+
+ void BeginClose(TInstant deadline);
+
+ void Poll();
+
+ TPurgeWriteQueueStats PurgeWriteQueue();
+
+ void DoStart();
+
+ private:
+ TAsyncJoiner AsyncJoiner;
+ TIntrusivePtr<TClient> Client;
+ TFMaybe<TString> OriginalSessionId;
+ TFMaybe<TString> SessionId;
+ TFMaybe<THashMap<TString, TString>> Meta;
+ TScopeLogger Logger;
+ bool CloseStarted;
+ bool ForcedCloseStarted;
+ bool Closed;
+ bool ForkInProgressLocal;
+ bool Started;
+ NThreading::TPromise<void> ClosePromise;
+ TIntrusivePtr<TGrpcCall> ActiveGrpcCall;
+ TDeque<TPendingMessage> WriteQueue;
+ size_t TrimmedCount;
+ size_t NextIndex;
+ TFMaybe<ui64> AckSeqNo;
+ TInstant PollerLastEventTimestamp;
+ TIntrusivePtr<TClientSessionCounters> Counters;
+ THolder<TGrpcTimer> MakeGrpcCallTimer;
+ THolder<TGrpcTimer> ForceCloseTimer;
+ THolder<TGrpcTimer> PollTimer;
+ ui64 GrpcInflightMessages;
+ ui64 GrpcInflightBytes;
+
+ std::atomic<size_t> InflightBytes;
+ bool CloseRequested;
+ size_t EventsBatchSize;
+ EPollingStatus PollingStatus;
+ THolder<TGrpcNotification> EventNotification;
+ bool EventNotificationTriggered;
+ TVector<TEvent> EventsBatch;
+ TVector<TEvent> SecondaryEventsBatch;
+ std::atomic<bool> ForkInProgress;
+ TAdaptiveLock Lock;
+ size_t MaxInflightBytes;
+ TFMaybe<size_t> AgentMaxReceiveMessage;
+ };
+
+ class TGrpcCall final: public TAtomicRefCount<TGrpcCall> {
+ public:
+ explicit TGrpcCall(TClientSession& session);
+
+ void Start();
+
+ ~TGrpcCall();
+
+ void BeginClose(bool force);
+
+ void Poison();
+
+ void NotifyMessageAdded();
+
+ inline bool Initialized() const {
+ return Initialized_;
+ }
+
+ inline bool ReuseSessions() const {
+ return ReuseSessions_;
+ }
+
+ private:
+ void EndAccept(EIOStatus status);
+
+ void EndRead(EIOStatus status);
+
+ void EndWrite(EIOStatus status);
+
+ void EndFinish(EIOStatus status);
+
+ void EndWritesDone(EIOStatus);
+
+ void ScheduleWrite();
+
+ void BeginWritesDone();
+
+ bool CheckHasError(EIOStatus status, const char* method);
+
+ void SetError(const TString& error);
+
+ void EnsureFinishStarted();
+
+ void BeginRead();
+
+ void BeginWrite();
+
+ void ScheduleFinishOnError();
+
+ private:
+ TClientSession& Session;
+ TAsyncJoinerToken AsyncJoinerToken;
+ THolder<IIOCallback> AcceptTag;
+ THolder<IIOCallback> ReadTag;
+ THolder<IIOCallback> WriteTag;
+ THolder<IIOCallback> WritesDoneTag;
+ THolder<IIOCallback> FinishTag;
+ TScopeLogger Logger;
+ bool AcceptPending;
+ bool Initialized_;
+ bool ReadPending;
+ bool ReadsDone;
+ bool WritePending;
+ bool WritesBlocked;
+ bool WritesDonePending;
+ bool WritesDone;
+ bool ErrorOccured;
+ bool FinishRequested;
+ bool FinishStarted;
+ bool FinishDone;
+ bool Cancelled;
+ bool Poisoned;
+ bool PoisonPillSent;
+ bool ReuseSessions_;
+ grpc::Status FinishStatus;
+ grpc::ClientContext ClientContext;
+ std::unique_ptr<grpc::ClientAsyncReaderWriter<NUnifiedAgentProto::Request, NUnifiedAgentProto::Response>> ReaderWriter;
+ NUnifiedAgentProto::Request Request;
+ NUnifiedAgentProto::Response Response;
+ };
+}
diff --git a/library/cpp/unified_agent_client/client_proto_weighing.h b/library/cpp/unified_agent_client/client_proto_weighing.h
new file mode 100644
index 0000000000..728792e49f
--- /dev/null
+++ b/library/cpp/unified_agent_client/client_proto_weighing.h
@@ -0,0 +1,75 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/f_maybe.h>
+#include <library/cpp/unified_agent_client/proto_weighing.h>
+
+namespace NUnifiedAgent::NPW {
+ struct TMessageMetaItem: public TMessage {
+ TMessageMetaItem()
+ : TMessage()
+ , Key(this)
+ , Value(this)
+ , SkipStart(this)
+ , SkipLength(this)
+ {
+ }
+
+ explicit TMessageMetaItem(TMessage* parent)
+ : TMessage(parent)
+ , Key(this)
+ , Value(this)
+ , SkipStart(this)
+ , SkipLength(this)
+ {
+ }
+
+ explicit TMessageMetaItem(const NUnifiedAgent::TFMaybe<TFieldLink>& link)
+ : TMessage(link)
+ , Key(this)
+ , Value(this)
+ , SkipStart(this)
+ , SkipLength(this)
+ {
+ }
+
+ TStringField Key;
+ TRepeatedPtrField<TStringField> Value;
+ TRepeatedField<ui32> SkipStart;
+ TRepeatedField<ui32> SkipLength;
+ };
+
+ struct TDataBatch: public TMessage {
+ TDataBatch()
+ : TMessage()
+ , SeqNo(this)
+ , Timestamp(this)
+ , Payload(this, 2)
+ , Meta(this, 2)
+ {
+ }
+
+ TDataBatch(TMessage* parent)
+ : TMessage(parent)
+ , SeqNo(this)
+ , Timestamp(this)
+ , Payload(this, 2)
+ , Meta(this, 2)
+ {
+ }
+
+ TRepeatedField<ui64> SeqNo; // 1
+ TRepeatedField<ui64> Timestamp; // 2
+ TRepeatedPtrField<TStringField> Payload; // 100
+ TRepeatedPtrField<TMessageMetaItem> Meta; // 101
+ };
+
+ struct TRequest: public TMessage {
+ TRequest()
+ : TMessage()
+ , DataBatch(this)
+ {
+ }
+
+ TDataBatch DataBatch;
+ };
+}
diff --git a/library/cpp/unified_agent_client/clock.cpp b/library/cpp/unified_agent_client/clock.cpp
new file mode 100644
index 0000000000..192c998a02
--- /dev/null
+++ b/library/cpp/unified_agent_client/clock.cpp
@@ -0,0 +1,48 @@
+#include "clock.h"
+
+namespace NUnifiedAgent {
+ void TClock::Configure() {
+ Y_VERIFY(!Configured_);
+
+ Configured_ = true;
+ }
+
+ void TClock::SetBase(TInstant value) {
+ Y_VERIFY(Configured_);
+
+ Base_.store(value.GetValue());
+ }
+
+ void TClock::ResetBase() {
+ Base_.store(0);
+ }
+
+ void TClock::ResetBaseWithShift() {
+ Y_VERIFY(Configured_);
+
+ Shift_.store(static_cast<i64>(Base_.exchange(0)) - static_cast<i64>(::Now().GetValue()));
+ }
+
+ void TClock::SetShift(TDuration value) {
+ Y_VERIFY(Configured_);
+
+ Shift_.fetch_add(value.GetValue());
+ }
+
+ void TClock::ResetShift() {
+ Shift_.store(0);
+ }
+
+ TInstant TClock::Get() {
+ auto base = Base_.load();
+ if (base == 0) {
+ base = ::Now().GetValue();
+ }
+ base += Shift_.load();
+ return TInstant::FromValue(base);
+ }
+
+ bool TClock::Configured_{false};
+ std::atomic<ui64> TClock::Base_{0};
+ std::atomic<i64> TClock::Shift_{0};
+}
diff --git a/library/cpp/unified_agent_client/clock.h b/library/cpp/unified_agent_client/clock.h
new file mode 100644
index 0000000000..77ff44583e
--- /dev/null
+++ b/library/cpp/unified_agent_client/clock.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <util/datetime/base.h>
+
+#include <atomic>
+
+namespace NUnifiedAgent {
+ class TClock {
+ public:
+ static void Configure();
+
+ static inline bool Configured() {
+ return Configured_;
+ }
+
+ static inline TInstant Now() {
+ return Configured_ ? Get() : TInstant::Now();
+ }
+
+ static void SetBase(TInstant value);
+
+ static void ResetBase();
+
+ static void ResetBaseWithShift();
+
+ static void SetShift(TDuration value);
+
+ static void ResetShift();
+
+ static TInstant Get();
+
+ private:
+ static bool Configured_;
+ static std::atomic<ui64> Base_;
+ static std::atomic<i64> Shift_;
+ };
+}
diff --git a/library/cpp/unified_agent_client/counters.cpp b/library/cpp/unified_agent_client/counters.cpp
new file mode 100644
index 0000000000..776a86ec4e
--- /dev/null
+++ b/library/cpp/unified_agent_client/counters.cpp
@@ -0,0 +1,36 @@
+#include "counters.h"
+
+using namespace NMonitoring;
+
+namespace NUnifiedAgent {
+ TClientCounters::TClientCounters(const NMonitoring::TDynamicCounterPtr& counters)
+ : TDynamicCountersWrapper(counters)
+ , ActiveSessionsCount(GetCounter("ActiveSessionsCount", false))
+ , ClientLogDroppedBytes(GetCounter("ClientLogDroppedBytes", true))
+ {
+ }
+
+ TIntrusivePtr<TClientSessionCounters> TClientCounters::GetDefaultSessionCounters() {
+ auto group = Unwrap()->GetSubgroup("session", "default");
+ return MakeIntrusive<TClientSessionCounters>(group);
+ }
+
+ TClientSessionCounters::TClientSessionCounters(const NMonitoring::TDynamicCounterPtr& counters)
+ : TDynamicCountersWrapper(counters)
+ , ReceivedMessages(GetCounter("ReceivedMessages", true))
+ , ReceivedBytes(GetCounter("ReceivedBytes", true))
+ , AcknowledgedMessages(GetCounter("AcknowledgedMessages", true))
+ , AcknowledgedBytes(GetCounter("AcknowledgedBytes", true))
+ , InflightMessages(GetCounter("InflightMessages", false))
+ , InflightBytes(GetCounter("InflightBytes", false))
+ , GrpcWriteBatchRequests(GetCounter("GrpcWriteBatchRequests", true))
+ , GrpcInflightMessages(GetCounter("GrpcInflightMessages", false))
+ , GrpcInflightBytes(GetCounter("GrpcInflightBytes", false))
+ , GrpcCalls(GetCounter("GrpcCalls", true))
+ , GrpcCallsInitialized(GetCounter("GrpcCallsInitialized", true))
+ , DroppedMessages(GetCounter("DroppedMessages", true))
+ , DroppedBytes(GetCounter("DroppedBytes", true))
+ , ErrorsCount(GetCounter("ErrorsCount", true))
+ {
+ }
+}
diff --git a/library/cpp/unified_agent_client/counters.h b/library/cpp/unified_agent_client/counters.h
new file mode 100644
index 0000000000..3c2192c3c5
--- /dev/null
+++ b/library/cpp/unified_agent_client/counters.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/dynamic_counters_wrapper.h>
+
+namespace NUnifiedAgent {
+ struct TClientSessionCounters;
+
+ struct TClientCounters: public TDynamicCountersWrapper {
+ explicit TClientCounters(const NMonitoring::TDynamicCounterPtr& counters =
+ MakeIntrusive<NMonitoring::TDynamicCounters>());
+
+ NMonitoring::TDeprecatedCounter& ActiveSessionsCount;
+ NMonitoring::TDeprecatedCounter& ClientLogDroppedBytes;
+
+ public:
+ TIntrusivePtr<TClientSessionCounters> GetDefaultSessionCounters();
+ };
+
+ struct TClientSessionCounters: public TDynamicCountersWrapper {
+ explicit TClientSessionCounters(const NMonitoring::TDynamicCounterPtr& counters =
+ MakeIntrusive<NMonitoring::TDynamicCounters>());
+
+ NMonitoring::TDeprecatedCounter& ReceivedMessages;
+ NMonitoring::TDeprecatedCounter& ReceivedBytes;
+ NMonitoring::TDeprecatedCounter& AcknowledgedMessages;
+ NMonitoring::TDeprecatedCounter& AcknowledgedBytes;
+ NMonitoring::TDeprecatedCounter& InflightMessages;
+ NMonitoring::TDeprecatedCounter& InflightBytes;
+ NMonitoring::TDeprecatedCounter& GrpcWriteBatchRequests;
+ NMonitoring::TDeprecatedCounter& GrpcInflightMessages;
+ NMonitoring::TDeprecatedCounter& GrpcInflightBytes;
+ NMonitoring::TDeprecatedCounter& GrpcCalls;
+ NMonitoring::TDeprecatedCounter& GrpcCallsInitialized;
+ NMonitoring::TDeprecatedCounter& DroppedMessages;
+ NMonitoring::TDeprecatedCounter& DroppedBytes;
+ NMonitoring::TDeprecatedCounter& ErrorsCount;
+ };
+}
diff --git a/library/cpp/unified_agent_client/duration_counter.cpp b/library/cpp/unified_agent_client/duration_counter.cpp
new file mode 100644
index 0000000000..118778a226
--- /dev/null
+++ b/library/cpp/unified_agent_client/duration_counter.cpp
@@ -0,0 +1,41 @@
+#include "duration_counter.h"
+
+namespace NUnifiedAgent {
+ using namespace NMonitoring;
+
+ TDurationUsCounter::TDurationUsCounter(const TString& name, TDynamicCounters& owner)
+ : Counter(*owner.GetCounter(name, true))
+ , ActiveTimers()
+ , Lock()
+ {
+ }
+
+ NHPTimer::STime* TDurationUsCounter::Begin() {
+ with_lock (Lock) {
+ ActiveTimers.push_back(0);
+ auto& result = ActiveTimers.back();
+ NHPTimer::GetTime(&result);
+ return &result;
+ }
+ }
+
+ void TDurationUsCounter::End(NHPTimer::STime* startTime) {
+ with_lock (Lock) {
+ Counter += static_cast<ui64>(NHPTimer::GetTimePassed(startTime) * 1000000);
+ *startTime = 0;
+ while (!ActiveTimers.empty() && ActiveTimers.front() == 0) {
+ ActiveTimers.pop_front();
+ }
+ }
+ }
+
+ void TDurationUsCounter::Update() {
+ with_lock (Lock) {
+ for (auto& startTime : ActiveTimers) {
+ if (startTime != 0) {
+ Counter += static_cast<ui64>(NHPTimer::GetTimePassed(&startTime) * 1000000);
+ }
+ }
+ }
+ }
+}
diff --git a/library/cpp/unified_agent_client/duration_counter.h b/library/cpp/unified_agent_client/duration_counter.h
new file mode 100644
index 0000000000..dbdfc22ed4
--- /dev/null
+++ b/library/cpp/unified_agent_client/duration_counter.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include <library/cpp/monlib/dynamic_counters/counters.h>
+
+#include <util/generic/deque.h>
+#include <util/system/hp_timer.h>
+#include <util/system/mutex.h>
+
+namespace NUnifiedAgent {
+ class TDurationUsCounter {
+ public:
+ class TScope {
+ public:
+ TScope(TDurationUsCounter& counter)
+ : Counter(counter)
+ , StartTime(Counter.Begin())
+ {
+ }
+
+ ~TScope() {
+ Counter.End(StartTime);
+ }
+
+ private:
+ TDurationUsCounter& Counter;
+ NHPTimer::STime* StartTime;
+ };
+
+ public:
+ TDurationUsCounter(const TString& name, NMonitoring::TDynamicCounters& owner);
+
+ NHPTimer::STime* Begin();
+
+ void End(NHPTimer::STime* startTime);
+
+ void Update();
+
+ private:
+ NMonitoring::TDeprecatedCounter& Counter;
+ TDeque<NHPTimer::STime> ActiveTimers;
+ TAdaptiveLock Lock;
+ };
+}
diff --git a/library/cpp/unified_agent_client/dynamic_counters_wrapper.h b/library/cpp/unified_agent_client/dynamic_counters_wrapper.h
new file mode 100644
index 0000000000..cac4c6813d
--- /dev/null
+++ b/library/cpp/unified_agent_client/dynamic_counters_wrapper.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <library/cpp/monlib/dynamic_counters/counters.h>
+
+namespace NUnifiedAgent {
+ class TDynamicCountersWrapper: public TAtomicRefCount<TDynamicCountersWrapper> {
+ public:
+ explicit TDynamicCountersWrapper(const TIntrusivePtr<NMonitoring::TDynamicCounters>& counters)
+ : Counters(counters)
+ {
+ }
+
+ virtual ~TDynamicCountersWrapper() = default;
+
+ const TIntrusivePtr<NMonitoring::TDynamicCounters>& Unwrap() const {
+ return Counters;
+ }
+
+ protected:
+ NMonitoring::TDeprecatedCounter& GetCounter(const TString& value, bool derivative) {
+ return *Counters->GetCounter(value, derivative);
+ }
+
+ private:
+ TIntrusivePtr<NMonitoring::TDynamicCounters> Counters;
+ };
+
+ class TUpdatableCounters: public TDynamicCountersWrapper {
+ public:
+ using TDynamicCountersWrapper::TDynamicCountersWrapper;
+
+ virtual void Update() = 0;
+ };
+}
diff --git a/library/cpp/unified_agent_client/enum.h b/library/cpp/unified_agent_client/enum.h
new file mode 100644
index 0000000000..b21e21acb0
--- /dev/null
+++ b/library/cpp/unified_agent_client/enum.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <util/generic/serialized_enum.h>
+#include <util/generic/vector.h>
+
+namespace NUnifiedAgent {
+ namespace NPrivate {
+ using TEnumNames = TVector<const TString*>;
+
+ template <typename TEnum>
+ TEnumNames BuildEnumNames() {
+ const auto names = GetEnumNames<TEnum>();
+ auto result = TEnumNames(names.size());
+ size_t index = 0;
+ for (const auto& p: names) {
+ Y_VERIFY(static_cast<size_t>(p.first) == index);
+ result[index++] = &p.second;
+ }
+ return result;
+ }
+
+ template <typename TEnum>
+ inline const auto EnumNames = BuildEnumNames<TEnum>();
+ }
+
+ template <typename TEnum, typename = std::enable_if_t<std::is_enum_v<TEnum>>>
+ inline const TString& NameOf(TEnum val) noexcept {
+ return *NPrivate::EnumNames<TEnum>[static_cast<size_t>(val)];
+ }
+}
diff --git a/library/cpp/unified_agent_client/examples/ua_grpc_client/main.cpp b/library/cpp/unified_agent_client/examples/ua_grpc_client/main.cpp
new file mode 100644
index 0000000000..a9eb423d13
--- /dev/null
+++ b/library/cpp/unified_agent_client/examples/ua_grpc_client/main.cpp
@@ -0,0 +1,122 @@
+#include <library/cpp/unified_agent_client/client.h>
+
+#include <library/cpp/getopt/opt.h>
+
+#include <util/string/split.h>
+
+using namespace NUnifiedAgent;
+
+class TOptions {
+public:
+ TString Uri;
+ TString SharedSecretKey;
+ TString SessionId;
+ TString SessionMeta;
+
+ TOptions(int argc, const char* argv[]) {
+ NLastGetopt::TOpts opts;
+ TString logPriorityStr;
+
+ opts
+ .AddLongOption("uri")
+ .RequiredArgument()
+ .Required()
+ .StoreResult(&Uri);
+ opts
+ .AddLongOption("shared-secret-key")
+ .RequiredArgument()
+ .Optional()
+ .StoreResult(&SharedSecretKey);
+ opts
+ .AddLongOption("session-id")
+ .RequiredArgument()
+ .Optional()
+ .StoreResult(&SessionId);
+ opts
+ .AddLongOption("session-meta", "key-value pairs separated by comma, e.g. 'k1=v1,k2=v2'")
+ .RequiredArgument()
+ .Optional()
+ .StoreResult(&SessionMeta);
+
+ opts.AddHelpOption();
+ opts.AddVersionOption();
+ NLastGetopt::TOptsParseResult res(&opts, argc, argv);
+ }
+};
+
+bool TryParseMeta(const TString& s, THashMap<TString, TString>& meta) {
+ for (auto& t: StringSplitter(s).Split(',')) {
+ TString key;
+ TString value;
+ if (!StringSplitter(t.Token()).Split('=').TryCollectInto(&key, &value)) {
+ Cout << "invalid meta, can't extract key-value pair from [" << t.Token() << "]" << Endl;
+ return false;
+ }
+ meta[key] = value;
+ }
+ return true;
+}
+
+bool TryParseLine(const TString& line, TVector<TString>& lineItems) {
+ lineItems = StringSplitter(line).Split('|').ToList<TString>();
+ Y_VERIFY(lineItems.size() >= 1);
+ if (lineItems.size() > 2) {
+ Cout << "invalid line format, expected 'k1=v1,k2=v2|payload' or just 'payload'" << Endl;
+ return false;
+ }
+ return true;
+}
+
+int main(int argc, const char* argv[]) {
+ TOptions options(argc, argv);
+
+ TClientSessionPtr sessionPtr;
+ {
+ TLog emptyLog;
+ auto clientParameters = TClientParameters(options.Uri).SetLog(emptyLog);
+ if (!options.SharedSecretKey.Empty()) {
+ clientParameters.SetSharedSecretKey(options.SharedSecretKey);
+ }
+ auto clientPtr = MakeClient(clientParameters);
+ auto sessionParameters = TSessionParameters();
+ if (!options.SessionId.Empty()) {
+ sessionParameters.SetSessionId(options.SessionId);
+ }
+ if (!options.SessionMeta.empty()) {
+ THashMap<TString, TString> sessionMeta;
+ if (!TryParseMeta(options.SessionMeta, sessionMeta)) {
+ return -1;
+ }
+ sessionParameters.SetMeta(sessionMeta);
+ }
+ sessionPtr = clientPtr->CreateSession(sessionParameters);
+ }
+
+ TString line;
+ while (true) {
+ Cin.ReadLine(line);
+ if (line.Empty()) {
+ break;
+ }
+
+ TVector<TString> lineItems;
+ if (!TryParseLine(line, lineItems)) {
+ continue;
+ }
+
+ TClientMessage clientMessage;
+ clientMessage.Payload = lineItems.back();
+ if (lineItems.size() == 2) {
+ THashMap<TString, TString> messageMeta;
+ if (!TryParseMeta(lineItems[0], messageMeta)) {
+ continue;
+ }
+ clientMessage.Meta = std::move(messageMeta);
+ }
+ sessionPtr->Send(std::move(clientMessage));
+ }
+
+ sessionPtr->Close();
+
+ return 0;
+}
diff --git a/library/cpp/unified_agent_client/f_maybe.h b/library/cpp/unified_agent_client/f_maybe.h
new file mode 100644
index 0000000000..7abd4c0aac
--- /dev/null
+++ b/library/cpp/unified_agent_client/f_maybe.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <util/generic/maybe.h>
+
+namespace NUnifiedAgent {
+ template <typename T>
+ using TFMaybe = TMaybe<T, ::NMaybe::TPolicyUndefinedFail>;
+
+ template <class T>
+ inline constexpr TFMaybe<std::decay_t<T>> MakeFMaybe(T&& value) {
+ return TMaybe<std::decay_t<T>, ::NMaybe::TPolicyUndefinedFail>(std::forward<T>(value));
+ }
+
+ template <class T, class... TArgs>
+ inline constexpr TFMaybe<T> MakeFMaybe(TArgs&&... args) {
+ return TFMaybe<T>(typename TFMaybe<T>::TInPlace{}, std::forward<TArgs>(args)...);
+ }
+
+ template <class T>
+ inline constexpr TFMaybe<std::decay_t<T>> MakeFMaybe(const TMaybe<T>& source) {
+ return source.Defined() ? MakeFMaybe(*source) : Nothing();
+ }
+}
diff --git a/library/cpp/unified_agent_client/grpc_io.cpp b/library/cpp/unified_agent_client/grpc_io.cpp
new file mode 100644
index 0000000000..6d237d75ec
--- /dev/null
+++ b/library/cpp/unified_agent_client/grpc_io.cpp
@@ -0,0 +1,161 @@
+#include "grpc_io.h"
+
+#include <contrib/libs/grpc/src/core/lib/iomgr/executor.h>
+#include <contrib/libs/grpc/src/core/lib/surface/completion_queue.h>
+#include <contrib/libs/grpc/include/grpc/impl/codegen/log.h>
+
+#include <util/generic/yexception.h>
+#include <util/string/cast.h>
+#include <util/system/env.h>
+#include <util/system/mutex.h>
+#include <util/system/thread.h>
+
+namespace NUnifiedAgent {
+ namespace {
+ std::once_flag GrpcConfigured{};
+ }
+
+ TGrpcNotification::TGrpcNotification(grpc::CompletionQueue& completionQueue, THolder<IIOCallback>&& ioCallback)
+ : CompletionQueue(completionQueue)
+ , IOCallback(std::move(ioCallback))
+ , Completion(MakeHolder<grpc_cq_completion>())
+ , InQueue(false)
+ {
+ }
+
+ TGrpcNotification::~TGrpcNotification() = default;
+
+ void TGrpcNotification::Trigger() {
+ {
+ bool inQueue = false;
+ if (!InQueue.compare_exchange_strong(inQueue, true)) {
+ return;
+ }
+ }
+ grpc_core::ApplicationCallbackExecCtx callbackExecCtx;
+ grpc_core::ExecCtx execCtx;
+ IOCallback->Ref();
+ Y_VERIFY(grpc_cq_begin_op(CompletionQueue.cq(), this));
+ grpc_cq_end_op(CompletionQueue.cq(), this, nullptr,
+ [](void* self, grpc_cq_completion*) {
+ Y_VERIFY(static_cast<TGrpcNotification*>(self)->InQueue.exchange(false));
+ },
+ this, Completion.Get());
+ }
+
+ bool TGrpcNotification::FinalizeResult(void** tag, bool*) {
+ *tag = IOCallback.Get();
+ return true;
+ }
+
+ TGrpcTimer::TGrpcTimer(grpc::CompletionQueue& completionQueue, THolder<IIOCallback>&& ioCallback)
+ : CompletionQueue(completionQueue)
+ , IOCallback(std::move(ioCallback))
+ , Alarm()
+ , AlarmIsSet(false)
+ , NextTriggerTime(Nothing())
+ {
+ }
+
+ void TGrpcTimer::Set(TInstant triggerTime) {
+ if (AlarmIsSet) {
+ NextTriggerTime = triggerTime;
+ Alarm.Cancel();
+ } else {
+ AlarmIsSet = true;
+ Alarm.Set(&CompletionQueue, InstantToTimespec(triggerTime), Ref());
+ }
+ }
+
+ void TGrpcTimer::Cancel() {
+ NextTriggerTime.Clear();
+ if (AlarmIsSet) {
+ Alarm.Cancel();
+ }
+ }
+
+ IIOCallback* TGrpcTimer::Ref() {
+ IOCallback->Ref();
+ return this;
+ }
+
+ void TGrpcTimer::OnIOCompleted(EIOStatus status) {
+ Y_VERIFY(AlarmIsSet);
+ if (NextTriggerTime) {
+ Alarm.Set(&CompletionQueue, InstantToTimespec(*NextTriggerTime), this);
+ NextTriggerTime.Clear();
+ } else {
+ AlarmIsSet = false;
+ IOCallback->OnIOCompleted(status);
+ }
+ }
+
+ TGrpcCompletionQueuePoller::TGrpcCompletionQueuePoller(grpc::CompletionQueue& queue)
+ : Queue(queue)
+ , Thread()
+ {
+ }
+
+ void TGrpcCompletionQueuePoller::Start() {
+ Thread = std::thread([this]() {
+ TThread::SetCurrentThreadName("ua_grpc_cq");
+ void* tag;
+ bool ok;
+ while (Queue.Next(&tag, &ok)) {
+ try {
+ static_cast<IIOCallback*>(tag)->OnIOCompleted(ok ? EIOStatus::Ok : EIOStatus::Error);
+ } catch (...) {
+ Y_FAIL("unexpected exception [%s]", CurrentExceptionMessage().c_str());
+ }
+ }
+ });
+ }
+
+ void TGrpcCompletionQueuePoller::Join() {
+ Thread.join();
+ }
+
+ TGrpcCompletionQueueHost::TGrpcCompletionQueueHost()
+ : CompletionQueue()
+ , Poller(CompletionQueue)
+ {
+ }
+
+ void TGrpcCompletionQueueHost::Start() {
+ Poller.Start();
+ }
+
+ void TGrpcCompletionQueueHost::Stop() {
+ CompletionQueue.Shutdown();
+ Poller.Join();
+ }
+
+ gpr_timespec InstantToTimespec(TInstant instant) {
+ gpr_timespec result;
+ result.clock_type = GPR_CLOCK_REALTIME;
+ result.tv_sec = static_cast<int64_t>(instant.Seconds());
+ result.tv_nsec = instant.NanoSecondsOfSecond();
+ return result;
+ }
+
+ void EnsureGrpcConfigured() {
+ std::call_once(GrpcConfigured, []() {
+ const auto limitStr = GetEnv("UA_GRPC_EXECUTOR_THREADS_LIMIT");
+ ui64 limit;
+ if (limitStr.Empty() || !TryFromString(limitStr, limit)) {
+ limit = 2;
+ }
+ grpc_core::Executor::SetThreadsLimit(limit);
+ });
+ }
+
+ void StartGrpcTracing() {
+ grpc_tracer_set_enabled("all", true);
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG);
+ }
+
+ void FinishGrpcTracing() {
+ grpc_tracer_set_enabled("all", false);
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_ERROR);
+ }
+}
diff --git a/library/cpp/unified_agent_client/grpc_io.h b/library/cpp/unified_agent_client/grpc_io.h
new file mode 100644
index 0000000000..5f368a5943
--- /dev/null
+++ b/library/cpp/unified_agent_client/grpc_io.h
@@ -0,0 +1,141 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/async_joiner.h>
+#include <library/cpp/unified_agent_client/f_maybe.h>
+
+#include <contrib/libs/grpc/include/grpcpp/alarm.h>
+#include <contrib/libs/grpc/include/grpc++/grpc++.h>
+
+#include <thread>
+
+struct grpc_cq_completion;
+
+namespace NUnifiedAgent {
+ enum class EIOStatus {
+ Ok,
+ Error
+ };
+
+ class IIOCallback {
+ public:
+ virtual ~IIOCallback() = default;
+
+ virtual IIOCallback* Ref() = 0;
+
+ virtual void OnIOCompleted(EIOStatus status) = 0;
+ };
+
+ template<typename TCallback, typename TCounter>
+ class TIOCallback: public IIOCallback {
+ public:
+ explicit TIOCallback(TCallback&& callback, TCounter* counter)
+ : Callback(std::move(callback))
+ , Counter(counter)
+ {
+ }
+
+ IIOCallback* Ref() override {
+ Counter->Ref();
+ return this;
+ }
+
+ void OnIOCompleted(EIOStatus status) override {
+ Callback(status);
+ Counter->UnRef();
+ }
+
+ private:
+ TCallback Callback;
+ TCounter* Counter;
+ };
+
+ template<typename TCallback, typename TCounter>
+ THolder<IIOCallback> MakeIOCallback(TCallback&& callback, TCounter* counter) {
+ return MakeHolder<TIOCallback<TCallback, TCounter>>(std::move(callback), counter);
+ }
+
+ template<typename TTarget, typename TCounter = TTarget>
+ THolder<IIOCallback> MakeIOCallback(TTarget* target, void (TTarget::*method)(EIOStatus),
+ TCounter* counter = nullptr)
+ {
+ return MakeIOCallback([target, method](EIOStatus status) { ((*target).*method)(status); },
+ counter ? counter : target);
+ }
+
+ class TGrpcNotification: private ::grpc::internal::CompletionQueueTag {
+ public:
+ TGrpcNotification(grpc::CompletionQueue& completionQueue, THolder<IIOCallback>&& ioCallback);
+
+ ~TGrpcNotification();
+
+ void Trigger();
+
+ private:
+ bool FinalizeResult(void** tag, bool* status) override;
+
+ private:
+ grpc::CompletionQueue& CompletionQueue;
+ THolder<IIOCallback> IOCallback;
+ THolder<grpc_cq_completion> Completion;
+ std::atomic<bool> InQueue;
+ };
+
+ class TGrpcTimer: private IIOCallback {
+ public:
+ TGrpcTimer(grpc::CompletionQueue& completionQueue, THolder<IIOCallback>&& ioCallback);
+
+ void Set(TInstant triggerTime);
+
+ void Cancel();
+
+ private:
+ IIOCallback* Ref() override;
+
+ void OnIOCompleted(EIOStatus status) override;
+
+ private:
+ grpc::CompletionQueue& CompletionQueue;
+ THolder<IIOCallback> IOCallback;
+ grpc::Alarm Alarm;
+ bool AlarmIsSet;
+ TFMaybe<TInstant> NextTriggerTime;
+ };
+
+ class TGrpcCompletionQueuePoller {
+ public:
+ explicit TGrpcCompletionQueuePoller(grpc::CompletionQueue& queue);
+
+ void Start();
+
+ void Join();
+
+ private:
+ grpc::CompletionQueue& Queue;
+ std::thread Thread;
+ };
+
+ class TGrpcCompletionQueueHost {
+ public:
+ TGrpcCompletionQueueHost();
+
+ void Start();
+
+ void Stop();
+
+ inline grpc::CompletionQueue& GetCompletionQueue() noexcept {
+ return CompletionQueue;
+ }
+
+ private:
+ grpc::CompletionQueue CompletionQueue;
+ TGrpcCompletionQueuePoller Poller;
+ };
+
+ gpr_timespec InstantToTimespec(TInstant instant);
+
+ void EnsureGrpcConfigured();
+
+ void StartGrpcTracing();
+
+ void FinishGrpcTracing();
+}
diff --git a/library/cpp/unified_agent_client/grpc_status_code.cpp b/library/cpp/unified_agent_client/grpc_status_code.cpp
new file mode 100644
index 0000000000..662bbbe7a5
--- /dev/null
+++ b/library/cpp/unified_agent_client/grpc_status_code.cpp
@@ -0,0 +1,56 @@
+#include <contrib/libs/grpc/include/grpcpp/impl/codegen/status_code_enum.h>
+
+#include <util/stream/output.h>
+
+namespace {
+ const char* GrpcStatusCodeToString(grpc::StatusCode statusCode) {
+ switch (statusCode) {
+ case grpc::OK:
+ return "OK";
+ case grpc::CANCELLED:
+ return "CANCELLED";
+ case grpc::UNKNOWN:
+ return "UNKNOWN";
+ case grpc::INVALID_ARGUMENT:
+ return "INVALID_ARGUMENT";
+ case grpc::DEADLINE_EXCEEDED:
+ return "DEADLINE_EXCEEDED";
+ case grpc::NOT_FOUND:
+ return "NOT_FOUND";
+ case grpc::ALREADY_EXISTS:
+ return "ALREADY_EXISTS";
+ case grpc::PERMISSION_DENIED:
+ return "PERMISSION_DENIED";
+ case grpc::UNAUTHENTICATED:
+ return "UNAUTHENTICATED";
+ case grpc::RESOURCE_EXHAUSTED:
+ return "RESOURCE_EXHAUSTED";
+ case grpc::FAILED_PRECONDITION:
+ return "FAILED_PRECONDITION";
+ case grpc::ABORTED:
+ return "ABORTED";
+ case grpc::OUT_OF_RANGE:
+ return "OUT_OF_RANGE";
+ case grpc::UNIMPLEMENTED:
+ return "UNIMPLEMENTED";
+ case grpc::INTERNAL:
+ return "INTERNAL";
+ case grpc::UNAVAILABLE:
+ return "UNAVAILABLE";
+ case grpc::DATA_LOSS:
+ return "DATA_LOSS";
+ default:
+ return nullptr;
+ }
+ }
+}
+
+template <>
+void Out<grpc::StatusCode>(IOutputStream& o, grpc::StatusCode statusCode) {
+ const auto* s = GrpcStatusCodeToString(statusCode);
+ if (s == nullptr) {
+ o << "grpc::StatusCode [" << static_cast<int>(statusCode) << "]";
+ } else {
+ o << s;
+ }
+}
diff --git a/library/cpp/unified_agent_client/helpers.cpp b/library/cpp/unified_agent_client/helpers.cpp
new file mode 100644
index 0000000000..335cc4e323
--- /dev/null
+++ b/library/cpp/unified_agent_client/helpers.cpp
@@ -0,0 +1,12 @@
+#include "helpers.h"
+
+namespace NUnifiedAgent::NPrivate {
+ bool IsUtf8(const THashMap<TString, TString>& meta) {
+ for (const auto& p: meta) {
+ if (!IsUtf(p.first) || !IsUtf(p.second)) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
diff --git a/library/cpp/unified_agent_client/helpers.h b/library/cpp/unified_agent_client/helpers.h
new file mode 100644
index 0000000000..33defa2b49
--- /dev/null
+++ b/library/cpp/unified_agent_client/helpers.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include "client.h"
+
+#include <util/charset/utf8.h>
+
+namespace NUnifiedAgent::NPrivate {
+ bool IsUtf8(const THashMap<TString, TString>& meta);
+}
diff --git a/library/cpp/unified_agent_client/logger.cpp b/library/cpp/unified_agent_client/logger.cpp
new file mode 100644
index 0000000000..e9c713f0d0
--- /dev/null
+++ b/library/cpp/unified_agent_client/logger.cpp
@@ -0,0 +1,130 @@
+#include "logger.h"
+
+#include <library/cpp/unified_agent_client/clock.h>
+
+#include <library/cpp/logger/log.h>
+
+#include <util/datetime/base.h>
+#include <util/stream/str.h>
+#include <util/system/getpid.h>
+#include <util/system/thread.h>
+
+namespace NUnifiedAgent {
+ namespace {
+ TString FormatLogLine(ELogPriority logLevel, const TStringBuf message, const TString& scope) {
+ TString result;
+ {
+ TStringOutput output(result);
+ output << FormatIsoLocal(TClock::Now())
+ << " " << GetPID()
+ << " " << TThread::CurrentThreadId()
+ << " " << logLevel;
+ if (!scope.Empty()) {
+ output << " " << scope;
+ }
+ output << " " << message << "\n";
+ }
+ return result;
+ }
+ }
+
+ TLogger::TThrottlerWithLock::TThrottlerWithLock(size_t rateLimitBytes)
+ : Throttler(rateLimitBytes, rateLimitBytes / 2)
+ , Lock()
+ {
+ }
+
+ bool TLogger::TThrottlerWithLock::TryConsume(double tokens) {
+ with_lock(Lock) {
+ return Throttler.TryConsume(tokens);
+ }
+ }
+
+ TLogger::TLogger(TLog& log, TFMaybe<size_t> rateLimitBytes)
+ : DefaultLogContext{log, log.IsNullLog() ? ELogPriority::TLOG_EMERG : log.FiltrationLevel()}
+ , TracingLogContexts()
+ , CurrentLogContext_()
+ , Errors(nullptr)
+ , DroppedBytes(nullptr)
+ , Throttler(rateLimitBytes.Defined() ? MakeHolder<TThrottlerWithLock>(*rateLimitBytes) : nullptr)
+ , Lock()
+ {
+ SetCurrentLogContext(DefaultLogContext);
+ }
+
+ void TLogger::SetCurrentLogContext(TLogContext& logContext) {
+ CurrentLogContext_.store(logContext.Log.IsNullLog() ? nullptr : &logContext, std::memory_order_release);
+ }
+
+ void TLogger::Log(TLog& log, ELogPriority logPriority, const TStringBuf message, const TString& scope) const {
+ try {
+ const auto logLine = FormatLogLine(logPriority, message, scope);
+ if (Throttler && &log == &DefaultLogContext.Log && !Throttler->TryConsume(logLine.size())) {
+ if (DroppedBytes) {
+ DroppedBytes->Add(logLine.size());
+ }
+ return;
+ }
+ log.Write(logPriority, logLine);
+ } catch (...) {
+ }
+ }
+
+ void TLogger::StartTracing(ELogPriority logPriority) noexcept {
+ with_lock(Lock) {
+ auto& logContext = GetOrCreateTracingLogContext(logPriority);
+ SetTracing(logContext, "started");
+ }
+ }
+
+ void TLogger::FinishTracing() noexcept {
+ with_lock(Lock) {
+ SetTracing(DefaultLogContext, "finished");
+ }
+ }
+
+ void TLogger::SetTracing(TLogContext& logContext, const char* action) {
+ // Lock must be held
+
+ SetCurrentLogContext(logContext);
+
+ Log(logContext.Log,
+ TLOG_INFO,
+ Sprintf("tracing %s, log priority is set to [%s]",
+ action, ToString(logContext.Priority).c_str()),
+ "");
+ }
+
+ auto TLogger::GetOrCreateTracingLogContext(ELogPriority logPriority) -> TLogContext& {
+ // Lock must be held
+
+ for (const auto& c: TracingLogContexts) {
+ if (c->Priority == logPriority) {
+ return *c;
+ }
+ }
+
+ auto newLogContext = MakeHolder<TLogContext>();
+ newLogContext->Log = TLog("cerr", logPriority);
+ newLogContext->Priority = logPriority;
+ auto* result = newLogContext.Get();
+ TracingLogContexts.push_back(std::move(newLogContext));
+ return *result;
+ }
+
+ TScopeLogger::TScopeLogger()
+ : Logger(nullptr)
+ , Scope()
+ , Errors(nullptr)
+ {
+ }
+
+ TScopeLogger::TScopeLogger(TLogger* logger,
+ const TString& scope,
+ NMonitoring::TDeprecatedCounter* errors)
+ : Logger(logger)
+ , Scope(scope)
+ , Errors(errors)
+ {
+ }
+}
diff --git a/library/cpp/unified_agent_client/logger.h b/library/cpp/unified_agent_client/logger.h
new file mode 100644
index 0000000000..d83cba92de
--- /dev/null
+++ b/library/cpp/unified_agent_client/logger.h
@@ -0,0 +1,157 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/f_maybe.h>
+#include <library/cpp/unified_agent_client/throttling.h>
+
+#include <library/cpp/logger/log.h>
+#include <library/cpp/monlib/dynamic_counters/counters.h>
+
+#include <util/generic/string.h>
+#include <util/string/join.h>
+#include <util/string/printf.h>
+#include <util/system/file.h>
+
+#include <atomic>
+
+#define YLOG(logPriority, message, logger) \
+ do { \
+ const auto __logPriority = logPriority; \
+ if (auto* log = logger.Accept(__logPriority, false); log != nullptr) { \
+ logger.Log(*log, __logPriority, message); \
+ } \
+ } while (false)
+
+#define YLOG_EMERG(msg) YLOG(TLOG_EMERG, msg, Logger)
+#define YLOG_ALERT(msg) YLOG(TLOG_ALERT, msg, Logger)
+#define YLOG_CRIT(msg) YLOG(TLOG_CRIT, msg, Logger)
+#define YLOG_ERR(msg) YLOG(TLOG_ERR, msg, Logger)
+#define YLOG_WARNING(msg) YLOG(TLOG_WARNING, msg, Logger)
+#define YLOG_NOTICE(msg) YLOG(TLOG_NOTICE, msg, Logger)
+#define YLOG_INFO(msg) YLOG(TLOG_INFO, msg, Logger)
+#define YLOG_DEBUG(msg) YLOG(TLOG_DEBUG, msg, Logger)
+#define YLOG_RESOURCES(msg) YLOG(TLOG_RESOURCES , msg, Logger)
+
+#define YLOG_FATAL(msg) \
+ YLOG(TLOG_CRIT, msg, Logger); \
+ _Exit(1);
+
+namespace NUnifiedAgent {
+ class TScopeLogger;
+
+ class TLogger {
+ public:
+ TLogger(TLog& log, TFMaybe<size_t> rateLimitBytes);
+
+ void StartTracing(ELogPriority logPriority) noexcept;
+
+ void FinishTracing() noexcept;
+
+ inline TScopeLogger Child(const TString& v, NMonitoring::TDeprecatedCounter* errors = nullptr);
+
+ inline void SetErrorsCounter(NMonitoring::TDeprecatedCounter* counter) noexcept {
+ Errors = counter;
+ }
+
+ inline void SetDroppedBytesCounter(NMonitoring::TDeprecatedCounter* counter) noexcept {
+ DroppedBytes = counter;
+ }
+
+ inline bool HasRateLimit() const noexcept {
+ return Throttler != nullptr;
+ }
+
+ friend class TScopeLogger;
+
+ private:
+ void Log(TLog& log, ELogPriority logPriority, const TStringBuf message, const TString& scope) const;
+
+ inline TLog* Accept(ELogPriority logPriority, NMonitoring::TDeprecatedCounter* errors) const noexcept {
+ if ((logPriority <= TLOG_ERR) && (errors != nullptr)) {
+ ++(*errors);
+ }
+ auto* result = CurrentLogContext_.load(std::memory_order_acquire);
+ return result != nullptr && static_cast<int>(logPriority) <= static_cast<int>(result->Priority)
+ ? &result->Log
+ : nullptr;
+ }
+
+ private:
+ struct TLogContext {
+ TLog Log;
+ ELogPriority Priority;
+ };
+
+ class TThrottlerWithLock {
+ public:
+ explicit TThrottlerWithLock(size_t rateLimitBytes);
+
+ bool TryConsume(double tokens);
+
+ private:
+ TThrottler Throttler;
+ TAdaptiveLock Lock;
+ };
+
+ private:
+ void SetCurrentLogContext(TLogContext& logContext);
+
+ TLogContext& GetOrCreateTracingLogContext(ELogPriority logPriority);
+
+ void SetTracing(TLogContext& logContext, const char* action);
+
+ private:
+ TLogContext DefaultLogContext;
+ TVector<THolder<TLogContext>> TracingLogContexts;
+ std::atomic<TLogContext*> CurrentLogContext_;
+ NMonitoring::TDeprecatedCounter* Errors;
+ NMonitoring::TDeprecatedCounter* DroppedBytes;
+ const THolder<TThrottlerWithLock> Throttler;
+ TAdaptiveLock Lock;
+ };
+
+ class TScopeLogger {
+ public:
+ TScopeLogger();
+
+ inline void Log(TLog& log, ELogPriority logPriority, const TStringBuf message) const {
+ if (Logger) {
+ Logger->Log(log, logPriority, message, Scope);
+ }
+ }
+
+ inline TLog* Accept(ELogPriority logPriority, bool silent) const noexcept {
+ return Logger ? Logger->Accept(logPriority, silent ? nullptr : Errors) : nullptr;
+ }
+
+ inline TScopeLogger Child(const TString& v, NMonitoring::TDeprecatedCounter* errors = nullptr) {
+ return Logger
+ ? Logger->Child(Join('/', Scope, v), errors == nullptr ? Errors : errors)
+ : TScopeLogger();
+ }
+
+ inline TLogger* Unwrap() noexcept {
+ return Logger;
+ }
+
+ friend class TLogger;
+
+ private:
+ TScopeLogger(TLogger* logger,
+ const TString& scope,
+ NMonitoring::TDeprecatedCounter* errors);
+
+ private:
+ TLogger* Logger;
+ TString Scope;
+ NMonitoring::TDeprecatedCounter* Errors;
+ };
+
+ inline TScopeLogger TLogger::Child(const TString& v, NMonitoring::TDeprecatedCounter* errors) {
+ return TScopeLogger(this, v, errors == nullptr ? Errors : errors);
+ }
+
+ inline ELogPriority ToLogPriority(int level) noexcept {
+ const auto result = ClampVal(level, 0, static_cast<int>(TLOG_RESOURCES));
+ return static_cast<ELogPriority>(result);
+ }
+}
diff --git a/library/cpp/unified_agent_client/proto/CMakeLists.darwin.txt b/library/cpp/unified_agent_client/proto/CMakeLists.darwin.txt
new file mode 100644
index 0000000000..7cd90f489d
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto/CMakeLists.darwin.txt
@@ -0,0 +1,45 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(cpp-unified_agent_client-proto)
+set_property(TARGET cpp-unified_agent_client-proto PROPERTY
+ PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h
+)
+target_link_libraries(cpp-unified_agent_client-proto PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ tools-enum_parser-enum_serialization_runtime
+ contrib-libs-protobuf
+)
+target_proto_messages(cpp-unified_agent_client-proto PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/proto/unified_agent.proto
+)
+generate_enum_serilization(cpp-unified_agent_client-proto
+ ${CMAKE_BINARY_DIR}/library/cpp/unified_agent_client/proto/unified_agent.pb.h
+ INCLUDE_HEADERS
+ library/cpp/unified_agent_client/proto/unified_agent.pb.h
+)
+target_proto_addincls(cpp-unified_agent_client-proto
+ ./
+ ${CMAKE_SOURCE_DIR}/
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src
+)
+target_proto_outs(cpp-unified_agent_client-proto
+ --cpp_out=${CMAKE_BINARY_DIR}/
+ --cpp_styleguide_out=${CMAKE_BINARY_DIR}/
+)
+target_proto_plugin(cpp-unified_agent_client-proto
+ grpc_cpp
+ grpc_cpp
+)
diff --git a/library/cpp/unified_agent_client/proto/CMakeLists.linux-aarch64.txt b/library/cpp/unified_agent_client/proto/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..db3af9681d
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,46 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(cpp-unified_agent_client-proto)
+set_property(TARGET cpp-unified_agent_client-proto PROPERTY
+ PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h
+)
+target_link_libraries(cpp-unified_agent_client-proto PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ tools-enum_parser-enum_serialization_runtime
+ contrib-libs-protobuf
+)
+target_proto_messages(cpp-unified_agent_client-proto PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/proto/unified_agent.proto
+)
+generate_enum_serilization(cpp-unified_agent_client-proto
+ ${CMAKE_BINARY_DIR}/library/cpp/unified_agent_client/proto/unified_agent.pb.h
+ INCLUDE_HEADERS
+ library/cpp/unified_agent_client/proto/unified_agent.pb.h
+)
+target_proto_addincls(cpp-unified_agent_client-proto
+ ./
+ ${CMAKE_SOURCE_DIR}/
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src
+)
+target_proto_outs(cpp-unified_agent_client-proto
+ --cpp_out=${CMAKE_BINARY_DIR}/
+ --cpp_styleguide_out=${CMAKE_BINARY_DIR}/
+)
+target_proto_plugin(cpp-unified_agent_client-proto
+ grpc_cpp
+ grpc_cpp
+)
diff --git a/library/cpp/unified_agent_client/proto/CMakeLists.linux.txt b/library/cpp/unified_agent_client/proto/CMakeLists.linux.txt
new file mode 100644
index 0000000000..db3af9681d
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto/CMakeLists.linux.txt
@@ -0,0 +1,46 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(cpp-unified_agent_client-proto)
+set_property(TARGET cpp-unified_agent_client-proto PROPERTY
+ PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h
+)
+target_link_libraries(cpp-unified_agent_client-proto PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ contrib-libs-grpc
+ tools-enum_parser-enum_serialization_runtime
+ contrib-libs-protobuf
+)
+target_proto_messages(cpp-unified_agent_client-proto PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/unified_agent_client/proto/unified_agent.proto
+)
+generate_enum_serilization(cpp-unified_agent_client-proto
+ ${CMAKE_BINARY_DIR}/library/cpp/unified_agent_client/proto/unified_agent.pb.h
+ INCLUDE_HEADERS
+ library/cpp/unified_agent_client/proto/unified_agent.pb.h
+)
+target_proto_addincls(cpp-unified_agent_client-proto
+ ./
+ ${CMAKE_SOURCE_DIR}/
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src
+)
+target_proto_outs(cpp-unified_agent_client-proto
+ --cpp_out=${CMAKE_BINARY_DIR}/
+ --cpp_styleguide_out=${CMAKE_BINARY_DIR}/
+)
+target_proto_plugin(cpp-unified_agent_client-proto
+ grpc_cpp
+ grpc_cpp
+)
diff --git a/library/cpp/unified_agent_client/proto/CMakeLists.txt b/library/cpp/unified_agent_client/proto/CMakeLists.txt
new file mode 100644
index 0000000000..3e0811fb22
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (APPLE)
+ include(CMakeLists.darwin.txt)
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux.txt)
+endif()
diff --git a/library/cpp/unified_agent_client/proto/unified_agent.proto b/library/cpp/unified_agent_client/proto/unified_agent.proto
new file mode 100644
index 0000000000..68efe35747
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto/unified_agent.proto
@@ -0,0 +1,101 @@
+syntax = "proto3";
+import "google/protobuf/descriptor.proto";
+
+package NUnifiedAgentProto;
+
+option java_package = "com.yandex.unified_agent";
+option go_package = "a.yandex-team.ru/library/cpp/unified_agent_client/proto;unifiedagent";
+
+extend google.protobuf.FileOptions {
+ bool GenerateYaStyle = 66777;
+}
+
+message Request {
+ message SessionMetaItem {
+ string name = 1;
+ string value = 2;
+ }
+
+ message Initialize {
+ // Session_id provided by server, use it in case of reconnects.
+ string session_id = 1;
+
+ // Session metadata
+ repeated SessionMetaItem meta = 2;
+
+ string shared_secret_key = 3;
+ }
+
+ message MessageMetaItem {
+ // Arbitrary key-value pairs. Can be used by agent filters to modify/filter messages
+ // or to route them to target outputs.
+
+ // Meta items of all messages should be grouped by meta key, it's expected in the 'key' field.
+ // Meta values should be passed in the 'value' sequence, it corresponds to the payload
+ // sequence from DataBatch. If some messages don't have a meta with this key, the range of such messages
+ // can be passed via skip_start/skip_length sequences.
+ // For example, [{m:v1}, {}, {}, {m: v2}, {}, {m: v3}, {}, {}] can be represented as follows:
+ // key: 'm'
+ // value: ['v1', 'v2', 'v3']
+ // skip_start: [1, 4]
+ // skip_length: [2, 1]
+
+ string key = 1;
+ repeated string value = 2;
+ repeated uint32 skip_start = 3;
+ repeated uint32 skip_length = 4;
+ }
+
+ message DataBatch {
+ repeated uint64 seq_no = 1;
+ repeated uint64 timestamp = 2; //microseconds
+ repeated bytes payload = 100;
+ repeated MessageMetaItem meta = 101;
+ }
+
+ oneof request {
+ Initialize initialize = 1;
+ DataBatch data_batch = 2;
+ }
+}
+
+message Response {
+ message Initialized {
+ // Session identifier for log and deduplication purposes.
+ string session_id = 1;
+
+ // Application can skip all formed messages by seq_no upto last_seq_no - they are consumed by server.
+ uint64 last_seq_no = 2;
+ }
+
+ message Ack {
+ uint64 seq_no = 1;
+ }
+
+ oneof response {
+ Initialized initialized = 1;
+ Ack ack = 2;
+ }
+}
+
+service UnifiedAgentService {
+ rpc Session(stream Request) returns (stream Response);
+}
+
+
+// dataflow:
+// Request.initialize -> UnifiedAgent;
+// specify session_id when this is a retry. Сlient can already have sesison_id from previous init response,
+// or it can use some pregenerated sessionId for each session.
+// Response.initializeded -> client;
+// Request.entry -> UnifiedAgent;
+// ....
+// Response.ack -> client;
+// when this record is consumed by UnifiedAgent with choosen garanties UnifiedAgent will send ack to client;
+// client can forget about this log record now
+//
+// grpc finish session -> client;
+// something went wrong; client must reconnect and retry all not acknowleged records
+//
+// Exactly once retries - when reconnect, client must provide previous session_id and same seq_no`s
+// for records - only in this case UnifiedAgent can dedup.
diff --git a/library/cpp/unified_agent_client/proto_weighing.cpp b/library/cpp/unified_agent_client/proto_weighing.cpp
new file mode 100644
index 0000000000..7a532213ea
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto_weighing.cpp
@@ -0,0 +1,99 @@
+#include "proto_weighing.h"
+
+#include <google/protobuf/io/coded_stream.h>
+
+namespace NUnifiedAgent::NPW {
+ template <typename T>
+ inline size_t SizeOf(T value);
+
+ using CodedOutputStream = google::protobuf::io::CodedOutputStream;
+
+ template <>
+ inline size_t SizeOf(ui64 value) {
+ return CodedOutputStream::VarintSize64(value);
+ }
+
+ template <>
+ inline size_t SizeOf(ui32 value) {
+ return CodedOutputStream::VarintSize32(value);
+ }
+
+ template <>
+ inline size_t SizeOf(i64 value) {
+ return CodedOutputStream::VarintSize64(static_cast<google::protobuf::uint64>(value));
+ }
+
+ TFieldLink::TFieldLink(TLengthDelimited* container, bool repeated, size_t keySize)
+ : Container(container)
+ , OuterSize(0)
+ , Repeated(repeated)
+ , KeySize(keySize)
+ {
+ }
+
+ void TFieldLink::SetValueSize(bool empty, size_t size) {
+ const auto newOuterSize = empty && !Repeated ? 0 : KeySize + static_cast<int>(size);
+ Container->IncSize(newOuterSize - OuterSize);
+ OuterSize = newOuterSize;
+ }
+
+ TLengthDelimited::TLengthDelimited(const TFMaybe<TFieldLink>& link)
+ : Link(link)
+ , ByteSize(0)
+ {
+ }
+
+ void TLengthDelimited::IncSize(int sizeDelta) {
+ ByteSize += sizeDelta;
+ if (Link) {
+ const auto byteSize = static_cast<ui32>(ByteSize);
+ Link->SetValueSize(false, byteSize + SizeOf(byteSize));
+ }
+ }
+
+ template <typename T>
+ void TRepeatedField<T>::Add(T value) {
+ IncSize(static_cast<int>(SizeOf(value)));
+ }
+
+ template <typename T>
+ TNumberField<T>::TNumberField(const TFieldLink& link)
+ : Link(link)
+ {
+ }
+
+ template <typename T>
+ void TNumberField<T>::SetValue(T value) {
+ Link.SetValueSize(value == 0, SizeOf(value));
+ }
+
+ template <typename T>
+ TFixedNumberField<T>::TFixedNumberField(const TFieldLink& link)
+ : Link(link)
+ {
+ }
+
+ template <typename T>
+ void TFixedNumberField<T>::SetValue() {
+ Link.SetValueSize(false, sizeof(T));
+ }
+
+ TStringField::TStringField(const TFieldLink& link)
+ : Link(link)
+ {
+ }
+
+ void TStringField::SetValue(const TString& value) {
+ Link.SetValueSize(value.Empty(), value.Size() + SizeOf(static_cast<ui32>(value.Size())));
+ }
+
+ template class TNumberField<ui64>;
+ template class TNumberField<ui32>;
+ template class TNumberField<i64>;
+ template class TFixedNumberField<ui64>;
+ template class TFixedNumberField<ui32>;
+ template class TFixedNumberField<i64>;
+ template class TRepeatedField<ui64>;
+ template class TRepeatedField<ui32>;
+ template class TRepeatedField<i64>;
+}
diff --git a/library/cpp/unified_agent_client/proto_weighing.h b/library/cpp/unified_agent_client/proto_weighing.h
new file mode 100644
index 0000000000..47cf577e14
--- /dev/null
+++ b/library/cpp/unified_agent_client/proto_weighing.h
@@ -0,0 +1,138 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/f_maybe.h>
+
+#include <util/generic/deque.h>
+#include <util/generic/string.h>
+
+namespace NUnifiedAgent::NPW {
+ class TLengthDelimited;
+
+ class TFieldLink {
+ public:
+ TFieldLink(TLengthDelimited* container, bool repeated = false, size_t keySize = 1);
+
+ void SetValueSize(bool empty, size_t size);
+
+ private:
+ TLengthDelimited* Container;
+ int OuterSize;
+ bool Repeated;
+ size_t KeySize;
+ };
+
+ class TLengthDelimited {
+ public:
+ explicit TLengthDelimited(const TFMaybe<TFieldLink>& link = Nothing());
+
+ void IncSize(int sizeDelta);
+
+ size_t ByteSizeLong() const {
+ return static_cast<size_t>(ByteSize);
+ }
+
+ private:
+ TFMaybe<TFieldLink> Link;
+ int ByteSize;
+ };
+
+ using TMessage = TLengthDelimited;
+
+ template <typename T>
+ class TRepeatedField: public TLengthDelimited {
+ public:
+ static_assert(std::is_same_v<T, ui32> ||
+ std::is_same_v<T, ui64> ||
+ std::is_same_v<T, i64>,
+ "type is not supported");
+
+ using TLengthDelimited::TLengthDelimited;
+
+ void Add(T value);
+ };
+
+ template <typename T>
+ class TRepeatedPtrField {
+ public:
+ explicit TRepeatedPtrField(TMessage* message, size_t keySize = 1)
+ : Message(message)
+ , Children()
+ , KeySize(keySize)
+ {
+ }
+
+ size_t GetSize() const {
+ return Children.size();
+ }
+
+ T& Get(size_t index) {
+ return Children[index];
+ }
+
+ T& Add() {
+ if constexpr (std::is_constructible<T, TFieldLink>::value) {
+ Children.emplace_back(TFieldLink(Message, true, KeySize));
+ } else {
+ Children.emplace_back(Message);
+ }
+ return Children.back();
+ }
+
+ private:
+ TMessage* Message;
+ TDeque<T> Children;
+ size_t KeySize;
+ };
+
+ template <typename T>
+ class TNumberField {
+ public:
+ static_assert(std::is_same_v<T, ui32> ||
+ std::is_same_v<T, ui64> ||
+ std::is_same_v<T, i64>,
+ "type is not supported");
+
+ explicit TNumberField(const TFieldLink& link);
+
+ void SetValue(T value);
+
+ private:
+ TFieldLink Link;
+ };
+
+ template <typename T>
+ class TFixedNumberField {
+ public:
+ static_assert(std::is_same_v<T, ui32> ||
+ std::is_same_v<T, ui64> ||
+ std::is_same_v<T, i64>,
+ "type is not supported");
+
+ explicit TFixedNumberField(const TFieldLink& link);
+
+ void SetValue();
+
+ private:
+ TFieldLink Link;
+ };
+
+ class TStringField {
+ public:
+ explicit TStringField(const TFieldLink& link);
+
+ void SetValue(const TString& value);
+
+ private:
+ TFieldLink Link;
+ };
+
+ extern template class TNumberField<ui64>;
+ extern template class TNumberField<ui32>;
+ extern template class TNumberField<i64>;
+ extern template class TFixedNumberField<ui64>;
+ extern template class TFixedNumberField<ui32>;
+ extern template class TFixedNumberField<i64>;
+ extern template class TRepeatedField<ui64>;
+ extern template class TRepeatedField<ui32>;
+ extern template class TRepeatedField<i64>;
+}
diff --git a/library/cpp/unified_agent_client/registrar.cpp b/library/cpp/unified_agent_client/registrar.cpp
new file mode 100644
index 0000000000..41f6eb34ca
--- /dev/null
+++ b/library/cpp/unified_agent_client/registrar.cpp
@@ -0,0 +1,8 @@
+#include "backend_creator.h"
+
+namespace NUnifiedAgent {
+
+ ILogBackendCreator::TFactory::TRegistrator<NUnifiedAgent::TLogBackendCreator> TLogBackendCreator::Registrar("unified_agent");
+
+}
+
diff --git a/library/cpp/unified_agent_client/throttling.cpp b/library/cpp/unified_agent_client/throttling.cpp
new file mode 100644
index 0000000000..271f7b0e7e
--- /dev/null
+++ b/library/cpp/unified_agent_client/throttling.cpp
@@ -0,0 +1,67 @@
+#include "throttling.h"
+
+#include <util/datetime/cputimer.h>
+
+namespace NUnifiedAgent {
+ TThrottler::TThrottler(double rate, TDuration updatePeriod)
+ : CyclesPerMillisecond(GetCyclesPerMillisecond())
+ , UpdatePeriod(updatePeriod.MilliSeconds() * CyclesPerMillisecond)
+ , PeriodTokens(updatePeriod.SecondsFloat() * rate)
+ , AvailableTokens(0)
+ , ExpirationTime(0)
+ {
+ }
+
+ TThrottler::TThrottler(double rate, double burst)
+ : TThrottler(rate, TDuration::Seconds(burst / rate))
+ {
+ }
+
+ void TThrottler::Consume(double& tokens, TFMaybe<TDuration>& nextCheckDelay) {
+ const auto updateTime = UpdateTokens();
+
+ if (tokens <= AvailableTokens) {
+ AvailableTokens -= tokens;
+ tokens = 0.0;
+ nextCheckDelay = Nothing();
+ } else {
+ tokens -= AvailableTokens;
+ AvailableTokens = 0.0;
+ nextCheckDelay = TDuration::MicroSeconds((ExpirationTime - updateTime) * 1000 / CyclesPerMillisecond + 1);
+ }
+ }
+
+ bool TThrottler::TryConsume(double tokens) {
+ UpdateTokens();
+
+ if (tokens > AvailableTokens) {
+ return false;
+ }
+ AvailableTokens -= tokens;
+ return true;
+ }
+
+ void TThrottler::ConsumeAndWait(double tokens) {
+ TFMaybe<TDuration> nextCheckDelay;
+ while (true) {
+ Consume(tokens, nextCheckDelay);
+ if (!nextCheckDelay.Defined()) {
+ return;
+ }
+ Sleep(*nextCheckDelay);
+ }
+ }
+
+ ui64 TThrottler::UpdateTokens() {
+ const auto updateTime = GetCycleCount();
+ if (updateTime >= ExpirationTime) {
+ if (ExpirationTime == 0) {
+ ExpirationTime = updateTime + UpdatePeriod;
+ } else {
+ ExpirationTime += ((updateTime - ExpirationTime) / UpdatePeriod + 1) * UpdatePeriod;
+ }
+ AvailableTokens = PeriodTokens;
+ }
+ return updateTime;
+ }
+}
diff --git a/library/cpp/unified_agent_client/throttling.h b/library/cpp/unified_agent_client/throttling.h
new file mode 100644
index 0000000000..1e5db1e8fa
--- /dev/null
+++ b/library/cpp/unified_agent_client/throttling.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <library/cpp/unified_agent_client/f_maybe.h>
+
+#include <util/datetime/base.h>
+
+namespace NUnifiedAgent {
+ class TThrottler {
+ public:
+ explicit TThrottler(double rate, TDuration updatePeriod = TDuration::MilliSeconds(100));
+
+ TThrottler(double rate, double burst);
+
+ void Consume(double& tokens, TFMaybe<TDuration>& nextCheckDelay);
+
+ bool TryConsume(double tokens);
+
+ void ConsumeAndWait(double tokens);
+
+ private:
+ ui64 UpdateTokens();
+
+ private:
+ ui64 CyclesPerMillisecond;
+ ui64 UpdatePeriod;
+ double PeriodTokens;
+ double AvailableTokens;
+ ui64 ExpirationTime;
+ };
+}
diff --git a/library/cpp/unified_agent_client/variant.h b/library/cpp/unified_agent_client/variant.h
new file mode 100644
index 0000000000..e261aa9af3
--- /dev/null
+++ b/library/cpp/unified_agent_client/variant.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <variant>
+
+namespace NUnifiedAgent {
+ template<class... Ts> struct TOverloaded : Ts... { using Ts::operator()...; };
+ template<class... Ts> TOverloaded(Ts...) -> TOverloaded<Ts...>;
+
+ template <class T, class... U>
+ auto Visit(T&& variant, U&&... visitorOverloads) {
+ return std::visit(TOverloaded{std::forward<U>(visitorOverloads)...}, std::forward<T>(variant));
+ }
+
+ template <typename TTarget, typename... TSourceTypes>
+ auto CastTo(std::variant<TSourceTypes...>&& variant) {
+ return Visit(variant, [](auto& p) -> TTarget { return std::move(p); });
+ }
+}
diff --git a/ydb/apps/dstool/lib/commands.py b/ydb/apps/dstool/lib/commands.py
index 8854d86e4e..00a3534708 100644
--- a/ydb/apps/dstool/lib/commands.py
+++ b/ydb/apps/dstool/lib/commands.py
@@ -10,12 +10,15 @@ import ydb.apps.dstool.lib.dstool_cmd_vdisk_wipe as vdisk_wipe
import ydb.apps.dstool.lib.dstool_cmd_group_add as group_add
import ydb.apps.dstool.lib.dstool_cmd_group_check as group_check
+import ydb.apps.dstool.lib.dstool_cmd_group_decommit as group_decommit
import ydb.apps.dstool.lib.dstool_cmd_group_list as group_list
import ydb.apps.dstool.lib.dstool_cmd_group_show_blob_info as group_show_blob_info
import ydb.apps.dstool.lib.dstool_cmd_group_show_usage_by_tablets as group_show_usage_by_tablets
import ydb.apps.dstool.lib.dstool_cmd_group_state as group_state
import ydb.apps.dstool.lib.dstool_cmd_group_take_snapshot as group_take_snapshot
+import ydb.apps.dstool.lib.dstool_cmd_group_virtual_create as group_virtual_create
+import ydb.apps.dstool.lib.dstool_cmd_pool_create_virtual as pool_create_virtual
import ydb.apps.dstool.lib.dstool_cmd_pool_list as pool_list
import ydb.apps.dstool.lib.dstool_cmd_box_list as box_list
@@ -37,8 +40,8 @@ modules = [
cluster_balance, cluster_get, cluster_set, cluster_list, cluster_workload_run,
node_list,
box_list,
- pool_list,
- group_check, group_show_blob_info, group_show_usage_by_tablets, group_state, group_take_snapshot, group_add, group_list,
+ pool_list, pool_create_virtual,
+ group_check, group_decommit, group_show_blob_info, group_show_usage_by_tablets, group_state, group_take_snapshot, group_add, group_list, group_virtual_create,
pdisk_add_by_serial, pdisk_remove_by_serial, pdisk_set, pdisk_list,
vdisk_remove_donor, vdisk_evict, vdisk_list, vdisk_wipe,
]
@@ -46,8 +49,8 @@ modules = [
default_structure = [
('pdisk', ['add-by-serial', 'remove-by-serial', 'set', 'list']),
('vdisk', ['evict', 'remove-donor', 'wipe', 'list']),
- ('group', ['add', 'check', ('show', ['blob-info', 'usage-by-tablets']), 'state', 'take-snapshot', 'list']),
- ('pool', ['list']),
+ ('group', ['add', 'check', 'decommit', ('show', ['blob-info', 'usage-by-tablets']), 'state', 'take-snapshot', 'list', ('virtual', ['create'])]),
+ ('pool', ['list', ('create', ['virtual'])]),
('box', ['list']),
('node', ['list']),
('cluster', ['balance', 'get', 'set', ('workload', ['run']), 'list']),
diff --git a/ydb/apps/dstool/lib/common.py b/ydb/apps/dstool/lib/common.py
index 1260db5a85..19a6b42ced 100644
--- a/ydb/apps/dstool/lib/common.py
+++ b/ydb/apps/dstool/lib/common.py
@@ -297,8 +297,8 @@ def fetch(path, params={}, explicit_host=None, fmt='json', host=None, cache=True
assert False, 'ERROR: invalid stream fmt specified: %s' % fmt
-@query_random_host_with_retry()
-def invoke_grpc(func, *params, host=None):
+@query_random_host_with_retry(explicit_host_param='explicit_host')
+def invoke_grpc(func, *params, explicit_host=None, host=None):
options = [
('grpc.max_receive_message_length', 256 << 20), # 256 MiB
]
@@ -398,10 +398,10 @@ def invoke_wipe_request(request):
return invoke_bsc_request(request)
-@inmemcache('base_config_and_storage_pools')
-def fetch_base_config_and_storage_pools():
+@inmemcache('base_config_and_storage_pools', cache_enable_param='cache')
+def fetch_base_config_and_storage_pools(virtualGroupsOnly=False, cache=True):
request = kikimr_bsconfig.TConfigRequest(Rollback=True)
- request.Command.add().QueryBaseConfig.CopyFrom(kikimr_bsconfig.TQueryBaseConfig())
+ request.Command.add().QueryBaseConfig.CopyFrom(kikimr_bsconfig.TQueryBaseConfig(VirtualGroupsOnly=virtualGroupsOnly))
request.Command.add().ReadStoragePool.BoxId = (1 << 64) - 1
response = invoke_bsc_request(request)
assert not response.Success
@@ -411,8 +411,8 @@ def fetch_base_config_and_storage_pools():
return dict(BaseConfig=response.Status[0].BaseConfig, StoragePools=response.Status[1].StoragePool)
-def fetch_base_config():
- return fetch_base_config_and_storage_pools()['BaseConfig']
+def fetch_base_config(virtualGroupsOnly=False, cache=True):
+ return fetch_base_config_and_storage_pools(virtualGroupsOnly, cache)['BaseConfig']
def fetch_storage_pools():
@@ -766,20 +766,18 @@ def fetch_json_info(entity, nodes=None, enums=1):
def merge(x, y):
return max([x, y], key=lambda x: x.get('GroupGeneration', 0))
-
elif entity == 'tabletinfo':
section, keycols = 'TabletStateInfo', ['TabletId']
+
+ def merge(x, y):
+ return max([x, y], key=lambda x: x.get('Generation', 0))
elif entity == 'bsgroupinfo':
section, keycols = 'BSGroupStateInfo', ['GroupID']
def merge(x, y):
- if x.get('GroupGeneration', 0) > y.get('GroupGeneration', 0):
- return x
- if y.get('GroupGeneration', 0) > x.get('GroupGeneration', 0):
- return y
- if x.get('VDiskIds', []):
- return x
- return y
+ return x if x.get('GroupGeneration', 0) > y.get('GroupGeneration', 0) else \
+ y if y.get('GroupGeneration', 0) > x.get('GroupGeneration', 0) else \
+ x if x.get('VDiskIds', []) else y
else:
assert False
res = {}
diff --git a/ydb/apps/dstool/lib/dstool_cmd_cluster_workload_run.py b/ydb/apps/dstool/lib/dstool_cmd_cluster_workload_run.py
index db5e255cb9..3256aafcc3 100644
--- a/ydb/apps/dstool/lib/dstool_cmd_cluster_workload_run.py
+++ b/ydb/apps/dstool/lib/dstool_cmd_cluster_workload_run.py
@@ -143,6 +143,7 @@ def do(args):
cmd.FailRealmIdx = vslot.FailRealmIdx
cmd.FailDomainIdx = vslot.FailDomainIdx
cmd.VDiskIdx = vslot.VDiskIdx
+ cmd.SuppressDonorMode = random.choice([True, False])
response = common.invoke_bsc_request(request)
if not response.Success:
if 'Error# failed to allocate group: no group options' in response.ErrorDescription:
@@ -180,7 +181,7 @@ def do(args):
for vslot in base_config.VSlot:
if common.is_dynamic_group(vslot.GroupId):
vslot_id = common.get_vslot_id(vslot.VSlotId)
- if can_act_on_vslot(*vslot_id) and recent_restarts:
+ if can_act_on_vslot(*vslot_id) and (recent_restarts or args.disable_restarts):
vdisk_id = '[%08x:%d:%d:%d]' % (vslot.GroupId, vslot.FailRealmIdx, vslot.FailDomainIdx, vslot.VDiskIdx)
if not args.disable_evicts:
possible_actions.append(('evict vslot id: %s, vdisk id: %s' % (vslot_id, vdisk_id), (do_evict, vslot_id)))
diff --git a/ydb/apps/dstool/lib/dstool_cmd_group_decommit.py b/ydb/apps/dstool/lib/dstool_cmd_group_decommit.py
new file mode 100644
index 0000000000..c3f09787a9
--- /dev/null
+++ b/ydb/apps/dstool/lib/dstool_cmd_group_decommit.py
@@ -0,0 +1,42 @@
+import ydb.apps.dstool.lib.common as common
+import ydb.core.protos.blob_depot_config_pb2 as blob_depot_config
+import sys
+
+description = 'Decommit physical group'
+
+
+def add_options(p):
+ common.add_group_ids_option(p, required=True)
+ p.add_argument('--hive-id', type=int, required=True, help='tablet id of containing hive')
+ p.add_argument('--log-channel-sp', type=str, metavar='POOL_NAME', help='channel 0 specifier')
+ p.add_argument('--snapshot-channel-sp', type=str, metavar='POOL_NAME', help='channel 1 specifier (defaults to channel 0)')
+ p.add_argument('--data-channel-sp', type=str, metavar='POOL_NAME[*COUNT]', nargs='*', help='data channel specifier')
+
+
+def do(args):
+ request = common.create_bsc_request(args)
+ cmd = request.Command.add().DecommitGroups
+ cmd.GroupIds.extend(args.group_ids)
+ cmd.HiveId = args.hive_id
+
+ if args.log_channel_sp or args.snapshot_channel_sp or args.data_channel_sp:
+ if args.log_channel_sp is None:
+ print('--log-channel-sp must be specified', file=sys.stderr)
+ sys.exit(1)
+ elif args.data_channel_sp is None:
+ print('--data-channel-sp must be specified', file=sys.stderr)
+ sys.exit(1)
+
+ cmd.ChannelProfiles.add(StoragePoolName=args.log_channel_sp, ChannelKind=blob_depot_config.TChannelKind.System)
+ chan1 = args.snapshot_channel_sp if args.snapshot_channel_sp is not None else args.log_channel_sp
+ cmd.ChannelProfiles.add(StoragePoolName=chan1, ChannelKind=blob_depot_config.TChannelKind.System)
+ for data_sp in args.data_channel_sp:
+ pool_name, sep, count = data_sp.rpartition('*')
+ if sep == '*':
+ count = int(count)
+ else:
+ pool_name, count = count, 1
+ cmd.ChannelProfiles.add(StoragePoolName=pool_name, ChannelKind=blob_depot_config.TChannelKind.Data, Count=count)
+
+ response = common.invoke_bsc_request(request)
+ common.print_request_result(args, request, response)
diff --git a/ydb/apps/dstool/lib/dstool_cmd_group_list.py b/ydb/apps/dstool/lib/dstool_cmd_group_list.py
index 76dc00cf65..2d988e9924 100644
--- a/ydb/apps/dstool/lib/dstool_cmd_group_list.py
+++ b/ydb/apps/dstool/lib/dstool_cmd_group_list.py
@@ -10,11 +10,12 @@ description = 'List groups'
def add_options(p):
p.add_argument('--show-vdisk-status', action='store_true', help='Show columns with VDisk status')
p.add_argument('--show-vdisk-usage', action='store_true', help='Show columns with VDisk usage')
+ p.add_argument('--virtual-groups-only', action='store_true', help='Show only virtual groups')
table.TableOutput([], col_units=[]).add_options(p)
def do(args):
- base_config_and_storage_pools = common.fetch_base_config_and_storage_pools()
+ base_config_and_storage_pools = common.fetch_base_config_and_storage_pools(virtualGroupsOnly=args.virtual_groups_only)
base_config = base_config_and_storage_pools['BaseConfig']
group_map = common.build_group_map(base_config)
@@ -43,6 +44,11 @@ def do(args):
'UsedSize',
'AvailableSize',
'TotalSize',
+ 'VirtualGroupState',
+ 'VirtualGroupName',
+ 'BlobDepotId',
+ 'ErrorReason',
+ 'DecommitStatus',
]
visible_columns = [
'GroupId',
@@ -66,9 +72,35 @@ def do(args):
if args.show_vdisk_usage or args.all_columns:
visible_columns.extend(['Usage', 'UsedSize', 'AvailableSize', 'TotalSize'])
+ if args.virtual_groups_only:
+ visible_columns.extend(['VirtualGroupState', 'VirtualGroupName', 'BlobDepotId', 'ErrorReason', 'DecommitStatus'])
+
table_output = table.TableOutput(all_columns, col_units=col_units, default_visible_columns=visible_columns)
group_stat_map = defaultdict(lambda: defaultdict(int))
+
+ for group_id, group in group_map.items():
+ group_stat = group_stat_map[group_id]
+ group_stat['BoxId:PoolId'] = '[%d:%d]' % (group.BoxId, group.StoragePoolId)
+ group_stat['PoolName'] = sp_name[(group.BoxId, group.StoragePoolId)]
+ group_stat['GroupId'] = group.GroupId
+ group_stat['Generation'] = group.GroupGeneration
+ group_stat['ErasureSpecies'] = group.ErasureSpecies
+ group_stat['ExpectedStatus'] = kikimr_bsconfig.TGroupStatus.E.Name(group.ExpectedStatus)
+ group_stat['OperatingStatus'] = kikimr_bsconfig.TGroupStatus.E.Name(group.OperatingStatus)
+ group_stat['SeenOperational'] = group.SeenOperational
+
+ if group.VirtualGroupInfo:
+ group_stat['VirtualGroupState'] = kikimr_bsconfig.EVirtualGroupState.Name(group.VirtualGroupInfo.State)
+ group_stat['VirtualGroupName'] = group.VirtualGroupInfo.Name
+ group_stat['BlobDepotId'] = group.VirtualGroupInfo.BlobDepotId
+ group_stat['ErrorReason'] = group.VirtualGroupInfo.ErrorReason
+ group_stat['DecommitStatus'] = kikimr_bsconfig.TGroupDecommitStatus.E.Name(group.VirtualGroupInfo.DecommitStatus)
+
+ group_stat['UsedSize'] = 0
+ group_stat['TotalSize'] = 0
+ group_stat['AvailableSize'] = 0
+
for vslot_id, vslot in vslot_map.items():
group_id = vslot.GroupId
if not common.is_dynamic_group(group_id):
@@ -82,14 +114,6 @@ def do(args):
group = group_map[group_id]
group_stat = group_stat_map[group_id]
- group_stat['BoxId:PoolId'] = '[%d:%d]' % (group.BoxId, group.StoragePoolId)
- group_stat['PoolName'] = sp_name[(group.BoxId, group.StoragePoolId)]
- group_stat['GroupId'] = group.GroupId
- group_stat['Generation'] = group.GroupGeneration
- group_stat['ErasureSpecies'] = group.ErasureSpecies
- group_stat['ExpectedStatus'] = kikimr_bsconfig.TGroupStatus.E.Name(group.ExpectedStatus)
- group_stat['OperatingStatus'] = kikimr_bsconfig.TGroupStatus.E.Name(group.OperatingStatus)
- group_stat['SeenOperational'] = group.SeenOperational
group_stat['UsedSize'] += vslot.VDiskMetrics.AllocatedSize
group_stat['TotalSize'] += vslot.VDiskMetrics.AllocatedSize
group_stat['AvailableSize'] += vslot.VDiskMetrics.AvailableSize
diff --git a/ydb/apps/dstool/lib/dstool_cmd_group_virtual_create.py b/ydb/apps/dstool/lib/dstool_cmd_group_virtual_create.py
new file mode 100644
index 0000000000..b805997208
--- /dev/null
+++ b/ydb/apps/dstool/lib/dstool_cmd_group_virtual_create.py
@@ -0,0 +1,77 @@
+import ydb.apps.dstool.lib.common as common
+import ydb.core.protos.blob_depot_config_pb2 as blob_depot_config
+import sys
+import time
+
+description = 'Create virtual group backed by BlobDepot'
+
+
+def add_options(p):
+ p.add_argument('--name', type=str, required=True, nargs='+', help='cluster-unique name(s) of newly created virtual groups')
+ p.add_argument('--hive-id', type=int, required=True, help='tablet id of containing hive')
+ g = p.add_mutually_exclusive_group(required=True)
+ g.add_argument('--storage-pool-name', type=str, metavar='POOL_NAME', help='name of the containing storage pool')
+ g.add_argument('--storage-pool-id', type=str, metavar='BOX:POOL', help='id of the cotaining storage pool')
+ p.add_argument('--log-channel-sp', type=str, metavar='POOL_NAME', required=True, help='channel 0 specifier')
+ p.add_argument('--snapshot-channel-sp', type=str, metavar='POOL_NAME', help='channel 1 specifier (defaults to channel 0)')
+ p.add_argument('--data-channel-sp', type=str, metavar='POOL_NAME[*COUNT]', nargs='+', required=True, help='data channel specifier')
+ p.add_argument('--wait', action='store_true', help='wait for operation to complete by polling')
+
+
+def do(args):
+ request = common.create_bsc_request(args)
+ for name in args.name:
+ cmd = request.Command.add().AllocateVirtualGroup
+
+ cmd.Name = name
+ cmd.HiveId = args.hive_id
+
+ if args.storage_pool_name is not None:
+ cmd.StoragePoolName = args.storage_pool_name
+ else:
+ id_ = cmd.StoragePoolId
+ try:
+ id_.BoxId, id_.StoragePoolId = map(int, args.storage_pool_id.split(':'))
+ except Exception:
+ print(f'Invalid --storage-pool-id={args.storage_pool_id} format, <number>:<number> expected', file=sys.stderr)
+ sys.exit(1)
+
+ cmd.ChannelProfiles.add(StoragePoolName=args.log_channel_sp, ChannelKind=blob_depot_config.TChannelKind.System)
+ chan1 = args.snapshot_channel_sp if args.snapshot_channel_sp is not None else args.log_channel_sp
+ cmd.ChannelProfiles.add(StoragePoolName=chan1, ChannelKind=blob_depot_config.TChannelKind.System)
+ for data_sp in args.data_channel_sp:
+ pool_name, sep, count = data_sp.rpartition('*')
+ if sep == '*':
+ count = int(count)
+ else:
+ pool_name, count = count, 1
+ cmd.ChannelProfiles.add(StoragePoolName=pool_name, ChannelKind=blob_depot_config.TChannelKind.Data, Count=count)
+
+ response = common.invoke_bsc_request(request)
+ common.print_request_result(args, request, response)
+
+ if args.wait and not args.dry_run:
+ while True:
+ base_config = common.fetch_base_config(virtualGroupsOnly=True, cache=False)
+ names_remaining = set(args.name)
+ errors = []
+
+ for group in base_config.Group:
+ if group.VirtualGroupInfo.Name in names_remaining:
+ if group.VirtualGroupInfo.State == common.kikimr_bsconfig.EVirtualGroupState.WORKING:
+ names_remaining.remove(group.VirtualGroupInfo.Name)
+ elif group.VirtualGroupInfo.State == common.kikimr_bsconfig.EVirtualGroupState.CREATE_FAILED:
+ names_remaining.remove(group.VirtualGroupInfo.Name)
+ errors.append(f'{group.VirtualGroupInfo.Name}: {group.ErrorReason}')
+
+ if names_remaining:
+ time.sleep(1)
+ continue
+
+ if errors:
+ print('Some of groups were not created:', file=sys.stderr)
+ for line in errors:
+ print(line, file=sys.stderr)
+ sys.exit(1)
+ else:
+ break
diff --git a/ydb/apps/dstool/lib/dstool_cmd_pdisk_list.py b/ydb/apps/dstool/lib/dstool_cmd_pdisk_list.py
index 3ac2daea25..d979c30ffd 100644
--- a/ydb/apps/dstool/lib/dstool_cmd_pdisk_list.py
+++ b/ydb/apps/dstool/lib/dstool_cmd_pdisk_list.py
@@ -1,6 +1,7 @@
import ydb.core.protos.blobstorage_config_pb2 as kikimr_bsconfig
import ydb.apps.dstool.lib.common as common
import ydb.apps.dstool.lib.table as table
+from google.protobuf import text_format
description = 'List pdisks'
@@ -18,6 +19,7 @@ def do(args):
'NodeId:PDiskId',
'NodeId',
'PDiskId',
+ 'ExpectedSerial',
'FQDN',
'Path',
'Type',
@@ -28,6 +30,7 @@ def do(args):
'Guid',
'NumStaticSlots',
'ExpectedSlotCount',
+ 'PDiskConfig',
'Usage',
'UsedSize',
'AvailableSize',
@@ -38,6 +41,7 @@ def do(args):
]
visible_columns = [
'NodeId:PDiskId',
+ 'ExpectedSerial',
'FQDN',
'Path',
'Type',
@@ -69,6 +73,7 @@ def do(args):
rows = []
for pdisk in base_config.PDisk:
row = {}
+ row['ExpectedSerial'] = pdisk.ExpectedSerial
row['NodeId:PDiskId'] = '[%u:%u]' % (pdisk.NodeId, pdisk.PDiskId)
row['NodeId'] = pdisk.NodeId
row['PDiskId'] = pdisk.PDiskId
@@ -82,6 +87,7 @@ def do(args):
row['Guid'] = pdisk.Guid
row['NumStaticSlots'] = pdisk.NumStaticSlots
row['ExpectedSlotCount'] = pdisk.ExpectedSlotCount
+ row['PDiskConfig'] = text_format.MessageToString(pdisk.PDiskConfig, as_one_line=True)
row['AvailableSize'] = pdisk.PDiskMetrics.AvailableSize
row['TotalSize'] = pdisk.PDiskMetrics.TotalSize
row['UsedSize'] = pdisk.PDiskMetrics.TotalSize - pdisk.PDiskMetrics.AvailableSize
diff --git a/ydb/apps/dstool/lib/dstool_cmd_pool_create_virtual.py b/ydb/apps/dstool/lib/dstool_cmd_pool_create_virtual.py
new file mode 100644
index 0000000000..564e604e41
--- /dev/null
+++ b/ydb/apps/dstool/lib/dstool_cmd_pool_create_virtual.py
@@ -0,0 +1,23 @@
+import ydb.apps.dstool.lib.common as common
+
+description = 'Create pool suitable for virtual groups'
+
+
+def add_options(p):
+ p.add_argument('--box-id', type=int, required=True, help='Containing box id')
+ p.add_argument('--name', type=str, metavar='POOL_NAME', required=True, help='Virtual group pool name')
+ p.add_argument('--kind', type=str, help='Optional pool kind')
+
+
+def do(args):
+ request = common.create_bsc_request(args)
+ cmd = request.Command.add().DefineStoragePool
+ cmd.BoxId = args.box_id
+ cmd.ErasureSpecies = 'none'
+ cmd.VDiskKind = 'Default'
+ cmd.Name = args.name
+ if args.kind is not None:
+ cmd.Kind = args.kind
+
+ response = common.invoke_bsc_request(request)
+ common.print_request_result(args, request, response)
diff --git a/ydb/apps/ydbd/CMakeLists.darwin.txt b/ydb/apps/ydbd/CMakeLists.darwin.txt
index affc61d208..699ae63cc2 100644
--- a/ydb/apps/ydbd/CMakeLists.darwin.txt
+++ b/ydb/apps/ydbd/CMakeLists.darwin.txt
@@ -59,7 +59,6 @@ target_link_options(ydbd PRIVATE
CoreFoundation
)
target_sources(ydbd PRIVATE
- ${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/log_backend.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/export.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/sqs.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/main.cpp
diff --git a/ydb/apps/ydbd/CMakeLists.linux-aarch64.txt b/ydb/apps/ydbd/CMakeLists.linux-aarch64.txt
index dcb3bdd325..2cde534482 100644
--- a/ydb/apps/ydbd/CMakeLists.linux-aarch64.txt
+++ b/ydb/apps/ydbd/CMakeLists.linux-aarch64.txt
@@ -61,7 +61,6 @@ target_link_options(ydbd PRIVATE
-ldl
)
target_sources(ydbd PRIVATE
- ${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/log_backend.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/export.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/sqs.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/main.cpp
diff --git a/ydb/apps/ydbd/CMakeLists.linux.txt b/ydb/apps/ydbd/CMakeLists.linux.txt
index 1bad3358de..2c23d05176 100644
--- a/ydb/apps/ydbd/CMakeLists.linux.txt
+++ b/ydb/apps/ydbd/CMakeLists.linux.txt
@@ -63,7 +63,6 @@ target_link_options(ydbd PRIVATE
-ldl
)
target_sources(ydbd PRIVATE
- ${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/log_backend.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/export.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/sqs.cpp
${CMAKE_SOURCE_DIR}/ydb/apps/ydbd/main.cpp
diff --git a/ydb/apps/ydbd/log_backend.cpp b/ydb/apps/ydbd/log_backend.cpp
deleted file mode 100644
index dc50353efa..0000000000
--- a/ydb/apps/ydbd/log_backend.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "log_backend.h"
-#include <ydb/core/base/counters.h>
-
-namespace NKikimr {
-
-TAutoPtr<TLogBackend> TAuditLogBackendFactory::CreateLogBackend(
- const TKikimrRunConfig& runConfig,
- NMonitoring::TDynamicCounterPtr)
-{
- TAutoPtr<TLogBackend> logBackend;
- if (!runConfig.AppConfig.HasAuditConfig())
- return logBackend;
-
- const auto& auditConfig = runConfig.AppConfig.GetAuditConfig();
- if (auditConfig.HasAuditFilePath()) {
- const auto& filePath = auditConfig.GetAuditFilePath();
- try {
- logBackend = new TFileLogBackend(filePath);
- } catch (const TFileError& ex) {
- Cerr << "TAuditLogBackendFactory: failed to open file '" << filePath << "': " << ex.what() << Endl;
- exit(1);
- }
- }
-
- if (logBackend) {
- return logBackend;
- }
- return NActors::CreateStderrBackend();
-}
-
-} // NKikimr
diff --git a/ydb/apps/ydbd/log_backend.h b/ydb/apps/ydbd/log_backend.h
deleted file mode 100644
index 6daab1cc13..0000000000
--- a/ydb/apps/ydbd/log_backend.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-#include <ydb/core/driver_lib/run/log_backend.h>
-
-namespace NKikimr {
-
-class TAuditLogBackendFactory : public TLogBackendFactory {
-public:
- virtual TAutoPtr<TLogBackend> CreateLogBackend(
- const TKikimrRunConfig& runConfig,
- NMonitoring::TDynamicCounterPtr counters) override;
-};
-
-} // NKikimr
diff --git a/ydb/apps/ydbd/main.cpp b/ydb/apps/ydbd/main.cpp
index 558efcaee1..3f24369b36 100644
--- a/ydb/apps/ydbd/main.cpp
+++ b/ydb/apps/ydbd/main.cpp
@@ -1,6 +1,5 @@
#include "sqs.h"
#include "export.h"
-#include "log_backend.h"
#include <ydb/core/driver_lib/run/main.h>
#include <ydb/core/security/ticket_parser.h>
#include <ydb/core/ymq/actor/auth_factory.h>
@@ -16,7 +15,6 @@ int main(int argc, char **argv) {
SetupTerminateHandler();
auto factories = std::make_shared<NKikimr::TModuleFactories>();
- factories->AuditLogBackendFactory = std::make_shared<NKikimr::TAuditLogBackendFactory>();
factories->DataShardExportFactory = std::make_shared<TDataShardExportFactory>();
factories->CreateTicketParser = NKikimr::CreateTicketParser;
factories->FolderServiceFactory = NKikimr::NFolderService::CreateMockFolderServiceActor;
diff --git a/ydb/core/CMakeLists.txt b/ydb/core/CMakeLists.txt
index a7134c65db..4ecd61df53 100644
--- a/ydb/core/CMakeLists.txt
+++ b/ydb/core/CMakeLists.txt
@@ -31,6 +31,7 @@ add_subdirectory(kesus)
add_subdirectory(keyvalue)
add_subdirectory(kqp)
add_subdirectory(load_test)
+add_subdirectory(log_backend)
add_subdirectory(metering)
add_subdirectory(mind)
add_subdirectory(mon)
diff --git a/ydb/core/audit/CMakeLists.darwin.txt b/ydb/core/audit/CMakeLists.darwin.txt
index 976aa09e16..c32c20d66d 100644
--- a/ydb/core/audit/CMakeLists.darwin.txt
+++ b/ydb/core/audit/CMakeLists.darwin.txt
@@ -18,8 +18,7 @@ target_link_libraries(ydb-core-audit PUBLIC
library-cpp-resource
)
target_sources(ydb-core-audit PRIVATE
- ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_json_impl.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_txt_impl.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log.cpp
)
diff --git a/ydb/core/audit/CMakeLists.linux-aarch64.txt b/ydb/core/audit/CMakeLists.linux-aarch64.txt
index 90a2d8483e..1cf2b7f3fc 100644
--- a/ydb/core/audit/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/audit/CMakeLists.linux-aarch64.txt
@@ -19,8 +19,7 @@ target_link_libraries(ydb-core-audit PUBLIC
library-cpp-resource
)
target_sources(ydb-core-audit PRIVATE
- ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_json_impl.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_txt_impl.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log.cpp
)
diff --git a/ydb/core/audit/CMakeLists.linux.txt b/ydb/core/audit/CMakeLists.linux.txt
index 90a2d8483e..1cf2b7f3fc 100644
--- a/ydb/core/audit/CMakeLists.linux.txt
+++ b/ydb/core/audit/CMakeLists.linux.txt
@@ -19,8 +19,7 @@ target_link_libraries(ydb-core-audit PUBLIC
library-cpp-resource
)
target_sources(ydb-core-audit PRIVATE
- ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_json_impl.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_txt_impl.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/audit/audit_log.cpp
)
diff --git a/ydb/core/audit/audit_log.cpp b/ydb/core/audit/audit_log.cpp
index d576f9fedf..df9e5f65e1 100644
--- a/ydb/core/audit/audit_log.cpp
+++ b/ydb/core/audit/audit_log.cpp
@@ -9,17 +9,10 @@ namespace NKikimr::NAudit {
std::atomic<bool> AUDIT_LOG_ENABLED = false;
-THolder<NActors::IActor> CreateAuditWriter(THolder<TLogBackend> auditFile, NKikimrConfig::TAuditConfig_EFormat format)
+THolder<NActors::IActor> CreateAuditWriter(TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> logBackends)
{
AUDIT_LOG_ENABLED.store(true);
- switch (format) {
- case NKikimrConfig::TAuditConfig::JSON:
- return MakeHolder<TAuditJsonLogActor>(std::move(auditFile));
- case NKikimrConfig::TAuditConfig::TXT:
- return MakeHolder<TAuditTxtLogActor>(std::move(auditFile));
- default:
- return MakeHolder<TAuditJsonLogActor>(std::move(auditFile));
- }
+ return MakeHolder<TAuditLogActor>(std::move(logBackends));
}
void SendAuditLog(const NActors::TActorSystem* sys, TVector<std::pair<TStringBuf, TString>>& parts)
diff --git a/ydb/core/audit/audit_log.h b/ydb/core/audit/audit_log.h
index d04fc1f060..48b3e0346b 100644
--- a/ydb/core/audit/audit_log.h
+++ b/ydb/core/audit/audit_log.h
@@ -72,15 +72,15 @@ struct TEvAuditLog
};
};
-class TAuditJsonLogActor final
- : public TActor<TAuditJsonLogActor>
+class TAuditLogActor final
+ : public TActor<TAuditLogActor>
{
private:
- const THolder<TLogBackend> AuditFile;
+ const TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> LogBackends;
public:
- TAuditJsonLogActor(THolder<TLogBackend> auditFile)
+ TAuditLogActor(TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> logBackends)
: TActor(&TThis::StateWork)
- , AuditFile(std::move(auditFile))
+ , LogBackends(std::move(logBackends))
{
}
@@ -99,35 +99,15 @@ private:
const TEvAuditLog::TEvWriteAuditLog::TPtr& ev,
const TActorContext& ctx);
- void HandleUnexpectedEvent(STFUNC_SIG);
-};
-
-class TAuditTxtLogActor final
- : public TActor<TAuditTxtLogActor>
-{
-private:
- const THolder<TLogBackend> AuditFile;
-public:
- TAuditTxtLogActor(THolder<TLogBackend> auditFile)
- : TActor(&TThis::StateWork)
- , AuditFile(std::move(auditFile))
- {
- }
-
- static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
- return NKikimrServices::TActivity::AUDIT_WRITER_ACTOR;
- }
+ static void WriteLog(
+ const TString& log,
+ const TVector<THolder<TLogBackend>>& logBackends);
-private:
- STFUNC(StateWork);
+ static TString GetJsonLog(
+ const TEvAuditLog::TEvWriteAuditLog::TPtr& ev);
- void HandlePoisonPill(
- const TEvents::TEvPoisonPill::TPtr& ev,
- const TActorContext& ctx);
-
- void HandleWriteAuditLog(
- const TEvAuditLog::TEvWriteAuditLog::TPtr& ev,
- const TActorContext& ctx);
+ static TString GetTxtLog(
+ const TEvAuditLog::TEvWriteAuditLog::TPtr& ev);
void HandleUnexpectedEvent(STFUNC_SIG);
};
@@ -140,7 +120,6 @@ inline NActors::TActorId MakeAuditServiceID() {
return NActors::TActorId(0, TStringBuf("YDB_AUDIT"));
}
-THolder<NActors::IActor> CreateAuditWriter(
- THolder<TLogBackend> auditFile, NKikimrConfig::TAuditConfig_EFormat format);
+THolder<NActors::IActor> CreateAuditWriter(TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> logBackends);
} // namespace NKikimr::NAudit
diff --git a/ydb/core/audit/audit_log_impl.cpp b/ydb/core/audit/audit_log_impl.cpp
new file mode 100644
index 0000000000..a8eae22d9e
--- /dev/null
+++ b/ydb/core/audit/audit_log_impl.cpp
@@ -0,0 +1,99 @@
+#include "audit_log.h"
+#include "audit_log_impl.h"
+
+#include <library/cpp/json/json_value.h>
+#include <library/cpp/json/json_writer.h>
+
+namespace NKikimr::NAudit {
+
+using namespace NActors;
+
+void TAuditLogActor::HandlePoisonPill(
+ const TEvents::TEvPoisonPill::TPtr& ev,
+ const TActorContext& ctx)
+{
+ Y_UNUSED(ev);
+ AUDIT_LOG_ENABLED.store(false);
+ Die(ctx);
+}
+
+STFUNC(TAuditLogActor::StateWork)
+{
+ switch (ev->GetTypeRewrite()) {
+ HFunc(TEvents::TEvPoisonPill, HandlePoisonPill);
+ HFunc(TEvAuditLog::TEvWriteAuditLog, HandleWriteAuditLog);
+ default:
+ HandleUnexpectedEvent(ev, ctx);
+ break;
+ }
+}
+
+void TAuditLogActor::WriteLog(const TString& log, const TVector<THolder<TLogBackend>>& logBackends) {
+ for (auto& logBackend : logBackends) {
+ try {
+ logBackend->WriteData(
+ TLogRecord(
+ ELogPriority::TLOG_INFO,
+ log.data(),
+ log.length()));
+ } catch (const yexception& e) {
+ LOG_W("WriteLog:"
+ << " unable to write audit log (error: " << e.what() << ")");
+ }
+ }
+}
+
+TString TAuditLogActor::GetJsonLog(const TEvAuditLog::TEvWriteAuditLog::TPtr& ev) {
+ const auto* msg = ev->Get();
+ TStringStream ss;
+ ss << msg->Time << ": ";
+ NJson::TJsonMap m;
+ for (auto& [k, v] : msg->Parts) {
+ m[k] = v;
+ }
+ NJson::WriteJson(&ss, &m, false, false);
+ ss << Endl;
+ return ss.Str();
+}
+
+TString TAuditLogActor::GetTxtLog(const TEvAuditLog::TEvWriteAuditLog::TPtr& ev) {
+ const auto* msg = ev->Get();
+ TStringStream ss;
+ ss << msg->Time << ": ";
+ for (auto it = msg->Parts.begin(); it != msg->Parts.end(); it++) {
+ if (it != msg->Parts.begin())
+ ss << ", ";
+ ss << it->first << "=" << it->second;
+ }
+ ss << Endl;
+ return ss.Str();
+}
+
+void TAuditLogActor::HandleWriteAuditLog(const TEvAuditLog::TEvWriteAuditLog::TPtr& ev, const TActorContext& ctx) {
+ Y_UNUSED(ctx);
+
+ for (auto& logBackends : LogBackends) {
+ switch (logBackends.first) {
+ case NKikimrConfig::TAuditConfig::JSON:
+ WriteLog(GetJsonLog(ev), logBackends.second);
+ break;
+ case NKikimrConfig::TAuditConfig::TXT:
+ WriteLog(GetTxtLog(ev), logBackends.second);
+ break;
+ default:
+ WriteLog(GetJsonLog(ev), logBackends.second);
+ break;
+ }
+ }
+}
+
+void TAuditLogActor::HandleUnexpectedEvent(STFUNC_SIG)
+{
+ Y_UNUSED(ctx);
+
+ LOG_W("TAuditLogActor:"
+ << " unhandled event type: " << ev->GetTypeRewrite()
+ << " event: " << (ev->HasEvent() ? ev->GetBase()->ToString().data() : "serialized?"));
+}
+
+} // namespace NKikimr::NAudit
diff --git a/ydb/core/audit/audit_log_json_impl.cpp b/ydb/core/audit/audit_log_json_impl.cpp
deleted file mode 100644
index 4f84d2bd8f..0000000000
--- a/ydb/core/audit/audit_log_json_impl.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-#include "audit_log.h"
-#include "audit_log_impl.h"
-
-#include <library/cpp/json/json_value.h>
-#include <library/cpp/json/json_writer.h>
-
-namespace NKikimr::NAudit {
-
-using namespace NActors;
-
-void TAuditJsonLogActor::HandlePoisonPill(
- const TEvents::TEvPoisonPill::TPtr& ev,
- const TActorContext& ctx)
-{
- Y_UNUSED(ev);
- AUDIT_LOG_ENABLED.store(false);
- Die(ctx);
-}
-
-STFUNC(TAuditJsonLogActor::StateWork)
-{
- switch (ev->GetTypeRewrite()) {
- HFunc(TEvents::TEvPoisonPill, HandlePoisonPill);
- HFunc(TEvAuditLog::TEvWriteAuditLog, HandleWriteAuditLog);
- default:
- HandleUnexpectedEvent(ev, ctx);
- break;
- }
-}
-
-void TAuditJsonLogActor::HandleWriteAuditLog(const TEvAuditLog::TEvWriteAuditLog::TPtr& ev, const TActorContext& ctx) {
- Y_UNUSED(ctx);
- const auto* msg = ev->Get();
- try {
- TStringStream ss;
- ss << msg->Time << ": ";
- NJson::TJsonMap m;
- for (auto& [k, v] : msg->Parts) {
- m[k] = v;
- }
- NJson::WriteJson(&ss, &m, false, false);
- ss << Endl;
- auto json = ss.Str();
-
- AuditFile->WriteData(
- TLogRecord(
- ELogPriority::TLOG_INFO,
- json.data(),
- json.length()));
- } catch (const TFileError& e) {
- LOG_W("TAuditJsonLogActor:"
- << " unable to write audit log (error: " << e.what() << ")");
- }
-}
-
-void TAuditJsonLogActor::HandleUnexpectedEvent(STFUNC_SIG)
-{
- Y_UNUSED(ctx);
-
- LOG_W("TAuditJsonLogActor:"
- << " unhandled event type: " << ev->GetTypeRewrite()
- << " event: " << (ev->HasEvent() ? ev->GetBase()->ToString().data() : "serialized?"));
-}
-
-} // namespace NKikimr::NAudit
diff --git a/ydb/core/audit/audit_log_txt_impl.cpp b/ydb/core/audit/audit_log_txt_impl.cpp
deleted file mode 100644
index 5f25119cc7..0000000000
--- a/ydb/core/audit/audit_log_txt_impl.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "audit_log.h"
-#include "audit_log_impl.h"
-
-namespace NKikimr::NAudit {
-
-using namespace NActors;
-
-void TAuditTxtLogActor::HandlePoisonPill(
- const TEvents::TEvPoisonPill::TPtr& ev,
- const TActorContext& ctx)
-{
- Y_UNUSED(ev);
- AUDIT_LOG_ENABLED.store(false);
- Die(ctx);
-}
-
-STFUNC(TAuditTxtLogActor::StateWork)
-{
- switch (ev->GetTypeRewrite()) {
- HFunc(TEvents::TEvPoisonPill, HandlePoisonPill);
- HFunc(TEvAuditLog::TEvWriteAuditLog, HandleWriteAuditLog);
- default:
- HandleUnexpectedEvent(ev, ctx);
- break;
- }
-}
-
-void TAuditTxtLogActor::HandleWriteAuditLog(const TEvAuditLog::TEvWriteAuditLog::TPtr& ev, const TActorContext& ctx) {
- Y_UNUSED(ctx);
- const auto* msg = ev->Get();
- try {
- TStringStream ss;
- ss << msg->Time << ": ";
- for (auto it = msg->Parts.begin(); it != msg->Parts.end(); it++) {
- if (it != msg->Parts.begin())
- ss << ", ";
- ss << it->first << "=" << it->second;
- }
- ss << Endl;
- auto text = ss.Str();
-
- AuditFile->WriteData(
- TLogRecord(
- ELogPriority::TLOG_INFO,
- text.data(),
- text.length()));
- } catch (const TFileError& e) {
- LOG_W("TAuditTxtLogActor:"
- << " unable to write audit log (error: " << e.what() << ")");
- }
-}
-
-void TAuditTxtLogActor::HandleUnexpectedEvent(STFUNC_SIG)
-{
- Y_UNUSED(ctx);
-
- LOG_W("TAuditTxtLogActor:"
- << " unhandled event type: " << ev->GetTypeRewrite()
- << " event: " << (ev->HasEvent() ? ev->GetBase()->ToString().data() : "serialized?"));
-}
-
-} // namespace NKikimr::NAudit
diff --git a/ydb/core/base/appdata.h b/ydb/core/base/appdata.h
index f7b64137e9..0eb5954ed4 100644
--- a/ydb/core/base/appdata.h
+++ b/ydb/core/base/appdata.h
@@ -141,12 +141,14 @@ struct TAppData {
NKikimrConfig::TCompactionConfig CompactionConfig;
NKikimrConfig::TDomainsConfig DomainsConfig;
NKikimrConfig::TBootstrap BootstrapConfig;
+ std::optional<NKikimrSharedCache::TSharedCacheConfig> SharedCacheConfig;
bool EnforceUserTokenRequirement = false;
bool AllowHugeKeyValueDeletes = true; // delete when all clients limit deletes per request
bool EnableKqpSpilling = false;
bool AllowShadowDataInSchemeShardForTests = false;
bool EnableMvccSnapshotWithLegacyDomainRoot = false;
bool UsePartitionStatsCollectorForTests = false;
+ bool DisableCdcAutoSwitchingToReadyStateForTests = false;
TVector<TString> AdministrationAllowedSIDs; // users/groups which allowed to perform administrative tasks
TVector<TString> DefaultUserSIDs;
TString AllAuthenticatedUsers = "all-users@well-known";
diff --git a/ydb/core/base/blobstorage.h b/ydb/core/base/blobstorage.h
index 0d1adfdf56..c3449ba984 100644
--- a/ydb/core/base/blobstorage.h
+++ b/ydb/core/base/blobstorage.h
@@ -875,6 +875,8 @@ struct TEvBlobStorage {
static_assert(EvEnd < EventSpaceEnd(TKikimrEvents::ES_BLOBSTORAGE),
"expect EvEnd < EventSpaceEnd(TKikimrEvents::ES_BLOBSTORAGE)");
+ struct TExecutionRelay {};
+
struct TEvPutResult;
struct TEvGetResult;
struct TEvBlockResult;
@@ -914,6 +916,7 @@ struct TEvBlobStorage {
mutable NLWTrace::TOrbit Orbit;
ui32 RestartCounter = 0;
std::vector<std::pair<ui64, ui32>> ExtraBlockChecks; // (TabletId, Generation) pairs
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvPut(const TLogoBlobID &id, TRcBuf &&buffer, TInstant deadline,
NKikimrBlobStorage::EPutHandleClass handleClass = NKikimrBlobStorage::TabletLog,
@@ -986,6 +989,7 @@ struct TEvBlobStorage {
TString ErrorReason;
bool WrittenBeyondBarrier = false; // was this blob written beyond the barrier?
mutable NLWTrace::TOrbit Orbit;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvPutResult(NKikimrProto::EReplyStatus status, const TLogoBlobID &id, const TStorageStatusFlags statusFlags,
ui32 groupId, float approximateFreeSpaceShare)
@@ -1064,6 +1068,7 @@ struct TEvBlobStorage {
ui32 RestartCounter = 0;
bool PhantomCheck = false;
bool Decommission = false; // is it generated by decommission actor and should be handled by the underlying proxy?
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
struct TTabletData {
TTabletData() = default;
@@ -1211,6 +1216,7 @@ struct TEvBlobStorage {
TString DebugInfo;
TString ErrorReason;
mutable NLWTrace::TOrbit Orbit;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
// to measure blobstorage->client hop
TInstant Sent;
@@ -1272,6 +1278,7 @@ struct TEvBlobStorage {
const ui64 IssuerGuid = RandomNumber<ui64>() | 1;
bool IsMonitored = true;
ui32 RestartCounter = 0;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvBlock(ui64 tabletId, ui32 generation, TInstant deadline)
: TabletId(tabletId)
@@ -1312,6 +1319,7 @@ struct TEvBlobStorage {
struct TEvBlockResult : public TEventLocal<TEvBlockResult, EvBlockResult> {
NKikimrProto::EReplyStatus Status;
TString ErrorReason;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvBlockResult(NKikimrProto::EReplyStatus status)
: Status(status)
@@ -1382,6 +1390,7 @@ struct TEvBlobStorage {
const TInstant Deadline;
mutable NLWTrace::TOrbit Orbit;
ui32 RestartCounter = 0;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvPatch(ui32 originalGroupId, const TLogoBlobID &originalId, const TLogoBlobID &patchedId,
ui32 maskForCookieBruteForcing, TArrayHolder<TDiff> &&diffs, ui64 diffCount, TInstant deadline)
@@ -1508,6 +1517,7 @@ struct TEvBlobStorage {
const float ApproximateFreeSpaceShare; // 0.f has special meaning 'data could not be obtained'
TString ErrorReason;
mutable NLWTrace::TOrbit Orbit;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvPatchResult(NKikimrProto::EReplyStatus status, const TLogoBlobID &id, TStorageStatusFlags statusFlags,
ui32 groupId, float approximateFreeSpaceShare)
@@ -1637,6 +1647,7 @@ struct TEvBlobStorage {
const ui32 ForceBlockedGeneration;
const bool FromLeader;
ui32 RestartCounter = 0;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvDiscover(ui64 tabletId, ui32 minGeneration, bool readBody, bool discoverBlockedGeneration,
TInstant deadline, ui32 forceBlockedGeneration, bool fromLeader)
@@ -1683,6 +1694,7 @@ struct TEvBlobStorage {
TString Buffer;
ui32 BlockedGeneration;
TString ErrorReason;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvDiscoverResult(NKikimrProto::EReplyStatus status, ui32 minGeneration, ui32 blockedGeneration)
: Status(status)
@@ -1740,6 +1752,7 @@ struct TEvBlobStorage {
ui32 ForceBlockedGeneration;
ui32 RestartCounter = 0;
bool Decommission = false;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvRange(ui64 tabletId, const TLogoBlobID &from, const TLogoBlobID &to, const bool mustRestoreFirst,
TInstant deadline, bool isIndexOnly = false, ui32 forceBlockedGeneration = 0)
@@ -1788,9 +1801,11 @@ struct TEvBlobStorage {
TResponse()
{}
- TResponse(const TLogoBlobID &id, const TString &x)
+ TResponse(const TLogoBlobID &id, const TString &x, bool keep = false, bool doNotKeep = false)
: Id(id)
, Buffer(x)
+ , Keep(keep)
+ , DoNotKeep(doNotKeep)
{}
};
@@ -1801,6 +1816,7 @@ struct TEvBlobStorage {
TVector<TResponse> Responses;
const ui32 GroupId;
TString ErrorReason;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvRangeResult(NKikimrProto::EReplyStatus status, const TLogoBlobID &from, const TLogoBlobID &to, ui32 groupId)
: Status(status)
@@ -1861,6 +1877,7 @@ struct TEvBlobStorage {
bool Decommission = false;
ui32 RestartCounter = 0;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvCollectGarbage(ui64 tabletId, ui32 recordGeneration, ui32 perGenerationCounter, ui32 channel,
bool collect, ui32 collectGeneration,
@@ -1970,6 +1987,7 @@ struct TEvBlobStorage {
ui32 PerGenerationCounter;
ui32 Channel;
TString ErrorReason;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvCollectGarbageResult(NKikimrProto::EReplyStatus status, ui64 tabletId,
ui32 recordGeneration, ui32 perGenerationCounter, ui32 channel)
@@ -2003,6 +2021,7 @@ struct TEvBlobStorage {
struct TEvStatus : public TEventLocal<TEvStatus, EvStatus> {
const TInstant Deadline;
ui32 RestartCounter = 0;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvStatus(TInstant deadline)
: Deadline(deadline)
@@ -2033,6 +2052,7 @@ struct TEvBlobStorage {
TStorageStatusFlags StatusFlags;
float ApproximateFreeSpaceShare = 0.0f; // zero means absence of correct data
TString ErrorReason;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvStatusResult(NKikimrProto::EReplyStatus status, TStorageStatusFlags statusFlags)
: Status(status)
@@ -2062,6 +2082,7 @@ struct TEvBlobStorage {
std::optional<std::tuple<ui64, ui8>> SkipBarriersUpTo;
std::optional<TLogoBlobID> SkipBlobsUpTo;
ui32 RestartCounter = 0;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvAssimilate(std::optional<ui64> skipBlocksUpTo, std::optional<std::tuple<ui64, ui8>> skipBarriersUpTo,
std::optional<TLogoBlobID> skipBlobsUpTo)
@@ -2179,6 +2200,7 @@ struct TEvBlobStorage {
std::deque<TBlock> Blocks;
std::deque<TBarrier> Barriers;
std::deque<TBlob> Blobs;
+ std::shared_ptr<TExecutionRelay> ExecutionRelay;
TEvAssimilateResult(NKikimrProto::EReplyStatus status, TString errorReason = {})
: Status(status)
diff --git a/ydb/core/base/feature_flags.h b/ydb/core/base/feature_flags.h
index 8a07d1c348..c830a0a340 100644
--- a/ydb/core/base/feature_flags.h
+++ b/ydb/core/base/feature_flags.h
@@ -24,10 +24,6 @@ public:
}
}
- inline void SetEnableMvccSnapshotReadsForTest(bool value) {
- SetEnableMvccSnapshotReads(value);
- }
-
inline void SetEnableBackgroundCompactionForTest(bool value) {
SetEnableBackgroundCompaction(value);
}
@@ -39,12 +35,6 @@ public:
inline void SetEnableBorrowedSplitCompactionForTest(bool value) {
SetEnableBorrowedSplitCompaction(value);
}
-
- inline void SetEnableMvccForTest(bool value) {
- SetEnableMvcc(value
- ? NKikimrConfig::TFeatureFlags::VALUE_TRUE
- : NKikimrConfig::TFeatureFlags::VALUE_FALSE);
- }
};
} // NKikimr
diff --git a/ydb/core/base/tablet.h b/ydb/core/base/tablet.h
index 945d636088..e93a3c4454 100644
--- a/ydb/core/base/tablet.h
+++ b/ydb/core/base/tablet.h
@@ -656,6 +656,9 @@ struct TEvTablet {
TResourceProfilesPtr ResourceProfiles;
TSharedQuotaPtr TxCacheQuota;
+ NMetrics::TTabletThroughputRawValue GroupReadBytes;
+ NMetrics::TTabletIopsRawValue GroupReadOps;
+
TEvFBoot(ui64 tabletID, ui32 followerID, ui32 generation, TActorId launcher, const TEvFollowerUpdate &upd,
TIntrusivePtr<TTabletStorageInfo> info, TResourceProfilesPtr profiles = nullptr,
TSharedQuotaPtr txCacheQuota = nullptr)
@@ -671,7 +674,9 @@ struct TEvTablet {
TEvFBoot(ui64 tabletID, ui32 followerID, ui32 generation, TActorId launcher, TDependencyGraph *dependencyGraph,
TIntrusivePtr<TTabletStorageInfo> info, TResourceProfilesPtr profiles = nullptr,
- TSharedQuotaPtr txCacheQuota = nullptr)
+ TSharedQuotaPtr txCacheQuota = nullptr,
+ NMetrics::TTabletThroughputRawValue&& read = NMetrics::TTabletThroughputRawValue(),
+ NMetrics::TTabletIopsRawValue&& readOps = NMetrics::TTabletIopsRawValue())
: TabletID(tabletID)
, FollowerID(followerID)
, Generation(generation)
@@ -680,6 +685,8 @@ struct TEvTablet {
, TabletStorageInfo(info)
, ResourceProfiles(profiles)
, TxCacheQuota(txCacheQuota)
+ , GroupReadBytes(std::move(read))
+ , GroupReadOps(std::move(readOps))
{}
};
diff --git a/ydb/core/base/tablet_pipecache.h b/ydb/core/base/tablet_pipecache.h
index b9e246a69a..ce56815fcf 100644
--- a/ydb/core/base/tablet_pipecache.h
+++ b/ydb/core/base/tablet_pipecache.h
@@ -14,6 +14,7 @@ struct TEvPipeCache {
EvForward = EventSpaceBegin(TKikimrEvents::ES_PIPECACHE),
EvUnlink,
EvGetTabletNode,
+ EvForcePipeReconnect,
EvDeliveryProblem = EvForward + 1 * 512,
EvGetTabletNodeResult,
@@ -66,6 +67,18 @@ struct TEvPipeCache {
};
/**
+ * Invalidate tablet node cache
+ */
+ struct TEvForcePipeReconnect : public TEventLocal<TEvForcePipeReconnect, EvForcePipeReconnect> {
+ const ui64 TabletId;
+
+ explicit TEvForcePipeReconnect(ui64 tabletId)
+ : TabletId(tabletId)
+ {
+ }
+ };
+
+ /**
* Returns node id of the given tablet id, or zero if there's a connection error
*/
struct TEvGetTabletNodeResult : public TEventLocal<TEvGetTabletNodeResult, EvGetTabletNodeResult> {
diff --git a/ydb/core/base/ticket_parser.h b/ydb/core/base/ticket_parser.h
index 3e5c14d92e..f715dec164 100644
--- a/ydb/core/base/ticket_parser.h
+++ b/ydb/core/base/ticket_parser.h
@@ -178,14 +178,15 @@ namespace NKikimr {
struct TEvAuthorizeTicketResult : TEventLocal<TEvAuthorizeTicketResult, EvAuthorizeTicketResult> {
TString Ticket;
TError Error;
- TIntrusivePtr<NACLib::TUserToken> Token;
- TString SerializedToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> Token;
+ const TString SerializedToken;
- TEvAuthorizeTicketResult(const TString& ticket, const TIntrusivePtr<NACLib::TUserToken>& token, const TString& serializedToken)
+ TEvAuthorizeTicketResult(const TString& ticket, const TIntrusiveConstPtr<NACLib::TUserToken>& token)
: Ticket(ticket)
, Token(token)
- , SerializedToken(serializedToken)
- {}
+ , SerializedToken(token ? token->GetSerializedToken() : "")
+ {
+ }
TEvAuthorizeTicketResult(const TString& ticket, const TError& error)
: Ticket(ticket)
diff --git a/ydb/core/blob_depot/CMakeLists.darwin.txt b/ydb/core/blob_depot/CMakeLists.darwin.txt
index b05e2e73a9..0ba0474252 100644
--- a/ydb/core/blob_depot/CMakeLists.darwin.txt
+++ b/ydb/core/blob_depot/CMakeLists.darwin.txt
@@ -7,6 +7,7 @@
add_subdirectory(agent)
+add_subdirectory(ut)
add_library(ydb-core-blob_depot)
target_link_libraries(ydb-core-blob_depot PUBLIC
@@ -21,7 +22,9 @@ target_sources(ydb-core-blob_depot PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/assimilator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/blocks.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/coro_tx.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_decommit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_gc.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_load.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_mon.cpp
diff --git a/ydb/core/blob_depot/CMakeLists.linux-aarch64.txt b/ydb/core/blob_depot/CMakeLists.linux-aarch64.txt
index 22d0a89693..5db3b844e4 100644
--- a/ydb/core/blob_depot/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/blob_depot/CMakeLists.linux-aarch64.txt
@@ -7,6 +7,7 @@
add_subdirectory(agent)
+add_subdirectory(ut)
add_library(ydb-core-blob_depot)
target_link_libraries(ydb-core-blob_depot PUBLIC
@@ -22,7 +23,9 @@ target_sources(ydb-core-blob_depot PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/assimilator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/blocks.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/coro_tx.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_decommit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_gc.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_load.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_mon.cpp
diff --git a/ydb/core/blob_depot/CMakeLists.linux.txt b/ydb/core/blob_depot/CMakeLists.linux.txt
index 22d0a89693..5db3b844e4 100644
--- a/ydb/core/blob_depot/CMakeLists.linux.txt
+++ b/ydb/core/blob_depot/CMakeLists.linux.txt
@@ -7,6 +7,7 @@
add_subdirectory(agent)
+add_subdirectory(ut)
add_library(ydb-core-blob_depot)
target_link_libraries(ydb-core-blob_depot PUBLIC
@@ -22,7 +23,9 @@ target_sources(ydb-core-blob_depot PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/assimilator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/blocks.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/coro_tx.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_decommit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_gc.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_load.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/data_mon.cpp
diff --git a/ydb/core/blob_depot/agent.cpp b/ydb/core/blob_depot/agent.cpp
index edc014ed8f..5e59be28a0 100644
--- a/ydb/core/blob_depot/agent.cpp
+++ b/ydb/core/blob_depot/agent.cpp
@@ -134,35 +134,35 @@ namespace NKikimr::NBlobDepot {
const ui32 generation = Executor()->Generation();
auto [response, record] = TEvBlobDepot::MakeResponseFor(*ev, ev->Get()->Record.GetChannelKind(), generation);
- auto *givenIdRange = record->MutableGivenIdRange();
-
std::vector<ui8> channels(ev->Get()->Record.GetCount());
- PickChannels(record->GetChannelKind(), channels);
-
- THashMap<ui8, NKikimrBlobDepot::TGivenIdRange::TChannelRange*> issuedRanges;
- for (ui8 channelIndex : channels) {
- TChannelInfo& channel = Channels[channelIndex];
- const ui64 value = channel.NextBlobSeqId++;
-
- // fill in range item
- auto& range = issuedRanges[channelIndex];
- if (!range || range->GetEnd() != value) {
- range = givenIdRange->AddChannelRanges();
- range->SetChannel(channelIndex);
- range->SetBegin(value);
+ if (PickChannels(record->GetChannelKind(), channels)) {
+ auto *givenIdRange = record->MutableGivenIdRange();
+
+ THashMap<ui8, NKikimrBlobDepot::TGivenIdRange::TChannelRange*> issuedRanges;
+ for (ui8 channelIndex : channels) {
+ TChannelInfo& channel = Channels[channelIndex];
+ const ui64 value = channel.NextBlobSeqId++;
+
+ // fill in range item
+ auto& range = issuedRanges[channelIndex];
+ if (!range || range->GetEnd() != value) {
+ range = givenIdRange->AddChannelRanges();
+ range->SetChannel(channelIndex);
+ range->SetBegin(value);
+ }
+ range->SetEnd(value + 1);
}
- range->SetEnd(value + 1);
- }
- // register issued ranges in agent and global records
- TAgent& agent = GetAgent(ev->Recipient);
- for (const auto& range : givenIdRange->GetChannelRanges()) {
- agent.GivenIdRanges[range.GetChannel()].IssueNewRange(range.GetBegin(), range.GetEnd());
- Channels[range.GetChannel()].GivenIdRanges.IssueNewRange(range.GetBegin(), range.GetEnd());
+ // register issued ranges in agent and global records
+ TAgent& agent = GetAgent(ev->Recipient);
+ for (const auto& range : givenIdRange->GetChannelRanges()) {
+ agent.GivenIdRanges[range.GetChannel()].IssueNewRange(range.GetBegin(), range.GetEnd());
+ Channels[range.GetChannel()].GivenIdRanges.IssueNewRange(range.GetBegin(), range.GetEnd());
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT05, "IssueNewRange", (Id, GetLogId()),
- (AgentId, agent.Connection->NodeId), (Channel, range.GetChannel()),
- (Begin, range.GetBegin()), (End, range.GetEnd()));
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT05, "IssueNewRange", (Id, GetLogId()),
+ (AgentId, agent.Connection->NodeId), (Channel, range.GetChannel()),
+ (Begin, range.GetBegin()), (End, range.GetEnd()));
+ }
}
TActivationContext::Send(response.release());
diff --git a/ydb/core/blob_depot/agent/CMakeLists.darwin.txt b/ydb/core/blob_depot/agent/CMakeLists.darwin.txt
index 8ebb4a51ef..397e518432 100644
--- a/ydb/core/blob_depot/agent/CMakeLists.darwin.txt
+++ b/ydb/core/blob_depot/agent/CMakeLists.darwin.txt
@@ -22,10 +22,12 @@ target_sources(core-blob_depot-agent PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/channel_kind.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/comm.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/garbage.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/metrics.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/proxy.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/query.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/read.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/request.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/resolved_value.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/status.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/storage_put.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/storage_get.cpp
diff --git a/ydb/core/blob_depot/agent/CMakeLists.linux-aarch64.txt b/ydb/core/blob_depot/agent/CMakeLists.linux-aarch64.txt
index 85321cdcda..6a3adb5858 100644
--- a/ydb/core/blob_depot/agent/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/blob_depot/agent/CMakeLists.linux-aarch64.txt
@@ -23,10 +23,12 @@ target_sources(core-blob_depot-agent PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/channel_kind.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/comm.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/garbage.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/metrics.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/proxy.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/query.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/read.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/request.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/resolved_value.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/status.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/storage_put.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/storage_get.cpp
diff --git a/ydb/core/blob_depot/agent/CMakeLists.linux.txt b/ydb/core/blob_depot/agent/CMakeLists.linux.txt
index 85321cdcda..6a3adb5858 100644
--- a/ydb/core/blob_depot/agent/CMakeLists.linux.txt
+++ b/ydb/core/blob_depot/agent/CMakeLists.linux.txt
@@ -23,10 +23,12 @@ target_sources(core-blob_depot-agent PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/channel_kind.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/comm.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/garbage.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/metrics.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/proxy.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/query.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/read.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/request.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/resolved_value.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/status.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/storage_put.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/agent/storage_get.cpp
diff --git a/ydb/core/blob_depot/agent/agent.cpp b/ydb/core/blob_depot/agent/agent.cpp
index e9d8c022b6..ebf4fc6472 100644
--- a/ydb/core/blob_depot/agent/agent.cpp
+++ b/ydb/core/blob_depot/agent/agent.cpp
@@ -18,6 +18,9 @@ namespace NKikimr::NBlobDepot {
if (info) {
Y_VERIFY(info->BlobDepotId);
TabletId = *info->BlobDepotId;
+ LogId = TStringBuilder() << '{' << TabletId << '@' << virtualGroupId << '}';
+ } else {
+ LogId = TStringBuilder() << '{' << '?' << '@' << virtualGroupId << "}";
}
}
@@ -34,6 +37,7 @@ namespace NKikimr::NBlobDepot {
HandleQueryWatchdog();
HandlePendingEventQueueWatchdog();
+ HandlePushMetrics();
}
IActor *CreateBlobDepotAgent(ui32 virtualGroupId, TIntrusivePtr<TBlobStorageGroupInfo> info, TActorId proxyId) {
diff --git a/ydb/core/blob_depot/agent/agent_impl.h b/ydb/core/blob_depot/agent/agent_impl.h
index fcfdd67e9d..ebb975bf88 100644
--- a/ydb/core/blob_depot/agent/agent_impl.h
+++ b/ydb/core/blob_depot/agent/agent_impl.h
@@ -1,6 +1,7 @@
#pragma once
#include "defs.h"
+#include "resolved_value.h"
namespace NKikimr::NBlobDepot {
@@ -33,8 +34,43 @@ namespace NKikimr::NBlobDepot {
struct TTabletDisconnected {};
struct TKeyResolved {
- const TResolvedValueChain* ValueChain;
- std::optional<TString> ErrorReason;
+ struct TSuccess {
+ const TResolvedValue *Value;
+ };
+ struct TError {
+ TString ErrorReason;
+ };
+ std::variant<TSuccess, TError> Outcome;
+
+ TKeyResolved(const TResolvedValue *value)
+ : Outcome(TSuccess{value})
+ {}
+
+ static constexpr struct TResolutionError {} ResolutionError{};
+
+ TKeyResolved(TResolutionError, TString errorReason)
+ : Outcome(TError{std::move(errorReason)})
+ {}
+
+ bool Error() const { return std::holds_alternative<TError>(Outcome); }
+ bool Success() const { return std::holds_alternative<TSuccess>(Outcome); }
+ const TResolvedValue *GetResolvedValue() const { return std::get<TSuccess>(Outcome).Value; }
+
+ void Output(IOutputStream& s) const {
+ if (auto *success = std::get_if<TSuccess>(&Outcome)) {
+ s << (success->Value ? success->Value->ToString() : "<no data>");
+ } else if (auto *error = std::get_if<TError>(&Outcome)) {
+ s << "Error# '" << EscapeC(error->ErrorReason) << '\'';
+ } else {
+ Y_FAIL();
+ }
+ }
+
+ TString ToString() const {
+ TStringStream s;
+ Output(s);
+ return s.Str();
+ }
};
class TRequestSender;
@@ -73,6 +109,9 @@ namespace NKikimr::NBlobDepot {
protected:
TBlobDepotAgent& Agent;
+ friend class TBlobDepotAgent;
+ std::set<std::weak_ptr<TEvBlobStorage::TExecutionRelay>, std::owner_less<std::weak_ptr<TEvBlobStorage::TExecutionRelay>>> SubrequestRelays;
+
public:
using TResponse = std::variant<
// internal events
@@ -99,7 +138,8 @@ namespace NKikimr::NBlobDepot {
TRequestSender(TBlobDepotAgent& agent);
virtual ~TRequestSender();
void ClearRequestsInFlight();
- void OnRequestComplete(TRequestInFlight& requestInFlight, TResponse response);
+ void OnRequestComplete(TRequestInFlight& requestInFlight, TResponse response,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay);
protected:
virtual void ProcessResponse(ui64 id, TRequestContext::TPtr context, TResponse response) = 0;
@@ -114,7 +154,7 @@ namespace NKikimr::NBlobDepot {
, public TRequestSender
{
const ui32 VirtualGroupId;
- const TActorId ProxyId;
+ TActorId ProxyId;
const ui64 AgentInstanceId;
ui64 TabletId = Max<ui64>();
TActorId PipeId;
@@ -127,10 +167,14 @@ namespace NKikimr::NBlobDepot {
EvQueryWatchdog = EventSpaceBegin(TEvents::ES_PRIVATE),
EvProcessPendingEvent,
EvPendingEventQueueWatchdog,
+ EvPushMetrics,
};
};
public:
+ TString LogId;
+
+ public:
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
return NKikimrServices::TActivity::BLOB_DEPOT_AGENT_ACTOR;
}
@@ -169,6 +213,8 @@ namespace NKikimr::NBlobDepot {
cFunc(TEvPrivate::EvPendingEventQueueWatchdog, HandlePendingEventQueueWatchdog);
cFunc(TEvPrivate::EvQueryWatchdog, HandleQueryWatchdog);
+
+ cFunc(TEvPrivate::EvPushMetrics, HandlePushMetrics);
)
DeletePendingQueries.Clear();
@@ -176,6 +222,7 @@ namespace NKikimr::NBlobDepot {
#undef FORWARD_STORAGE_PROXY
void PassAway() override {
+ ClearPendingEventQueue("BlobDepot agent destroyed");
NTabletPipe::CloseAndForgetClient(SelfId(), PipeId);
TActor::PassAway();
}
@@ -185,17 +232,20 @@ namespace NKikimr::NBlobDepot {
Y_VERIFY(info->BlobDepotId);
if (TabletId != *info->BlobDepotId) {
TabletId = *info->BlobDepotId;
+ LogId = TStringBuilder() << '{' << TabletId << '@' << VirtualGroupId << '}';
if (TabletId && TabletId != Max<ui64>()) {
ConnectToBlobDepot();
}
}
if (!info->GetTotalVDisksNum()) {
+ // proxy finishes serving user requests
TActivationContext::Send(new IEventHandle(TEvents::TSystem::Poison, 0, ProxyId, {}, nullptr, 0));
- return;
+ ProxyId = {};
}
}
-
- TActivationContext::Send(ev->Forward(ProxyId));
+ if (ProxyId) {
+ TActivationContext::Send(ev->Forward(ProxyId));
+ }
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -209,7 +259,8 @@ namespace NKikimr::NBlobDepot {
TRequestsInFlight OtherRequestInFlight;
void RegisterRequest(ui64 id, TRequestSender *sender, TRequestContext::TPtr context,
- TRequestInFlight::TCancelCallback cancelCallback, bool toBlobDepotTablet);
+ TRequestInFlight::TCancelCallback cancelCallback, bool toBlobDepotTablet,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay = nullptr);
template<typename TEvent>
void HandleTabletResponse(TAutoPtr<TEventHandle<TEvent>> ev);
@@ -217,7 +268,8 @@ namespace NKikimr::NBlobDepot {
template<typename TEvent>
void HandleOtherResponse(TAutoPtr<TEventHandle<TEvent>> ev);
- void OnRequestComplete(ui64 id, TRequestSender::TResponse response, TRequestsInFlight& map);
+ void OnRequestComplete(ui64 id, TRequestSender::TResponse response, TRequestsInFlight& map,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay = nullptr);
void DropTabletRequest(ui64 id);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -272,6 +324,7 @@ namespace NKikimr::NBlobDepot {
std::multimap<TMonotonic, TQuery*>::iterator QueryWatchdogMapIter;
NLog::EPriority WatchdogPriority = NLog::PRI_WARN;
bool Destroyed = false;
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> ExecutionRelay;
static constexpr TDuration WatchdogDuration = TDuration::Seconds(10);
@@ -290,9 +343,26 @@ namespace NKikimr::NBlobDepot {
virtual void OnUpdateBlock() {}
virtual void OnRead(ui64 /*tag*/, NKikimrProto::EReplyStatus /*status*/, TString /*dataOrErrorReason*/) {}
- virtual void OnIdAllocated() {}
+ virtual void OnIdAllocated(bool /*success*/) {}
virtual void OnDestroy(bool /*success*/) {}
+ protected: // reading logic
+ struct TReadContext;
+ struct TReadArg {
+ TResolvedValue Value;
+ NKikimrBlobStorage::EGetHandleClass GetHandleClass;
+ bool MustRestoreFirst = false;
+ ui64 Offset = 0;
+ ui64 Size = 0;
+ ui64 Tag = 0;
+ std::optional<TEvBlobStorage::TEvGet::TReaderTabletData> ReaderTabletData;
+ TString Key; // the key we are reading -- this is used for retries when we are getting NODATA
+ };
+
+ bool IssueRead(TReadArg&& arg, TString& error);
+ void HandleGetResult(const TRequestContext::TPtr& context, TEvBlobStorage::TEvGetResult& msg);
+ void HandleResolveResult(const TRequestContext::TPtr& context, TEvBlobDepot::TEvResolveResult& msg);
+
public:
struct TDeleter {
static void Destroy(TQuery *query) { delete query; }
@@ -308,7 +378,9 @@ namespace NKikimr::NBlobDepot {
TBlobStorageQuery(TBlobDepotAgent& agent, std::unique_ptr<IEventHandle> event)
: TQuery(agent, std::move(event))
, Request(*Event->Get<TEvent>())
- {}
+ {
+ ExecutionRelay = std::move(Request.ExecutionRelay);
+ }
protected:
TEvent& Request;
@@ -369,7 +441,7 @@ namespace NKikimr::NBlobDepot {
void RebuildHeap();
void EnqueueQueryWaitingForId(TQuery *query);
- void ProcessQueriesWaitingForId();
+ void ProcessQueriesWaitingForId(bool success);
};
THashMap<NKikimrBlobDepot::TChannelKind::E, TChannelKind> ChannelKinds;
@@ -390,25 +462,6 @@ namespace NKikimr::NBlobDepot {
TBlocksManager& BlocksManager;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Reading
-
- struct TReadContext;
- struct TReadArg {
- const NProtoBuf::RepeatedPtrField<NKikimrBlobDepot::TResolvedValueChain>& Values;
- NKikimrBlobStorage::EGetHandleClass GetHandleClass;
- bool MustRestoreFirst = false;
- TQuery *Query = nullptr;
- ui64 Offset = 0;
- ui64 Size = 0;
- ui64 Tag = 0;
- std::optional<TEvBlobStorage::TEvGet::TReaderTabletData> ReaderTabletData;
- };
-
- bool IssueRead(const TReadArg& arg, TString& error);
-
- void HandleGetResult(const TRequestContext::TPtr& context, TEvBlobStorage::TEvGetResult& msg);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Blob mapping cache
class TBlobMappingCache;
@@ -420,6 +473,27 @@ namespace NKikimr::NBlobDepot {
TStorageStatusFlags GetStorageStatusFlags() const;
float GetApproximateFreeSpaceShare() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Logging
+
+ TString PrettyKey(const TString& key) const {
+ if (VirtualGroupId) {
+ return TLogoBlobID::FromBinary(key).ToString();
+ } else {
+ return EscapeC(key);
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Metrics
+
+ ui64 BytesRead = 0;
+ ui64 BytesWritten = 0;
+ ui64 LastBytesRead = 0;
+ ui64 LastBytesWritten = 0;
+
+ void HandlePushMetrics();
};
#define BDEV_QUERY(MARKER, TEXT, ...) BDEV(MARKER, TEXT, (VG, Agent.VirtualGroupId), (BDT, Agent.TabletId), \
diff --git a/ydb/core/blob_depot/agent/blob_mapping_cache.cpp b/ydb/core/blob_depot/agent/blob_mapping_cache.cpp
index 1b6c7c2fee..77800af63a 100644
--- a/ydb/core/blob_depot/agent/blob_mapping_cache.cpp
+++ b/ydb/core/blob_depot/agent/blob_mapping_cache.cpp
@@ -4,71 +4,117 @@ namespace NKikimr::NBlobDepot {
struct TResolveContext : TRequestContext {
TString Key;
+ bool MustRestoreFirst;
- TResolveContext(TString key)
+ TResolveContext(TString key, bool mustRestoreFirst)
: Key(std::move(key))
+ , MustRestoreFirst(mustRestoreFirst)
{}
};
void TBlobDepotAgent::TBlobMappingCache::HandleResolveResult(ui64 tag, const NKikimrBlobDepot::TEvResolveResult& msg,
TRequestContext::TPtr context) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA28, "HandleResolveResult", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA28, "HandleResolveResult", (AgentId, Agent.LogId),
(Cookie, tag), (Msg, msg));
- auto process = [&](TString key, const NKikimrBlobDepot::TEvResolveResult::TResolvedKey *item) {
- const TStringBuf keyBuf = key;
- TCachedKeyItem& entry = Cache.try_emplace(std::move(key), keyBuf).first->second;
- if (item) {
- Y_VERIFY(entry.Key == item->GetKey());
- entry.Values = item->GetValueChain();
+ auto process = [&](const auto& item, bool nodata) {
+ // check if there is an error or no data attached
+ if (item.HasErrorReason() || item.GetValueChain().empty() || nodata) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA43, "HandleResolveResult error", (AgentId, Agent.LogId), (Item, item),
+ (NoData, nodata), (Key, Agent.PrettyKey(item.GetKey())));
+
+ const TString errorReason = item.HasErrorReason() ? item.GetErrorReason() : "no data attached to the key";
+ const auto it = Cache.find(item.GetKey());
+ if (it != Cache.end()) {
+ for (const auto& [id, mustRestoreFirst] : it->second.PendingQueries) {
+ Agent.OnRequestComplete(id, nodata ? TKeyResolved(nullptr) :
+ TKeyResolved(TKeyResolved::ResolutionError, errorReason),
+ Agent.OtherRequestInFlight);
+ }
+ Cache.erase(it);
+ }
} else {
- entry.Values.Clear();
- }
- Queue.PushBack(&entry);
- entry.ResolveInFlight = false;
- for (const ui64 id : std::exchange(entry.PendingQueries, {})) {
- Agent.OnRequestComplete(id, TKeyResolved{
- entry.Values.empty() ? nullptr : &entry.Values,
- item && item->HasErrorReason() ? std::make_optional(item->GetErrorReason()) : std::nullopt
- }, Agent.OtherRequestInFlight);
+ TString key = item.GetKey();
+ TStringBuf keyBuf = key;
+ const auto [it, inserted] = Cache.try_emplace(std::move(key), keyBuf);
+ auto& [key_, entry] = *it;
+
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA44, "HandleResolveResult success", (AgentId, Agent.LogId), (Item, item),
+ (NoData, nodata), (Key, Agent.PrettyKey(key_)), (CurrentValue, entry.Value));
+
+ // update value if it supersedes current one
+ if (TResolvedValue value(item); value.Supersedes(entry.Value)) {
+ entry.Value = std::move(value);
+ }
+
+ // notify matching queries about this
+ for (auto it = entry.PendingQueries.begin(); it != entry.PendingQueries.end(); ) {
+ const auto& [id, mustRestoreFirst] = *it;
+ if (mustRestoreFirst <= entry.Value.ReliablyWritten) {
+ Agent.OnRequestComplete(id, TKeyResolved(&entry.Value), Agent.OtherRequestInFlight);
+ entry.PendingQueries.erase(it++);
+ } else {
+ ++it;
+ }
+ }
+
+ if (context) {
+ auto& resolveContext = context->Obtain<TResolveContext>();
+ if (resolveContext.MustRestoreFirst) {
+ --entry.MustRestoreFirstResolvePending;
+ } else {
+ --entry.OrdinaryResolvePending;
+ }
+ }
+
+ Queue.PushBack(&entry);
+ while (Cache.size() > 1'000'000) {
+ auto& front = *Queue.Front();
+ Cache.erase(front.Key);
+ }
}
};
- for (const auto& item : msg.GetResolvedKeys()) {
- process(item.GetKey(), &item);
- if (context && context->Obtain<TResolveContext>().Key == item.GetKey()) {
- context.reset();
+ if (!context) {
+ // aside requests -- just add received data to cache
+ for (const auto& item : msg.GetResolvedKeys()) {
+ process(item, false);
+ }
+ } else {
+ auto& resolveContext = context->Obtain<TResolveContext>();
+ if (msg.ResolvedKeysSize() == 1) {
+ const auto& item = msg.GetResolvedKeys(0);
+ Y_VERIFY(item.GetKey() == resolveContext.Key);
+ process(item, false);
+ } else if (msg.ResolvedKeysSize() == 0) {
+ NKikimrBlobDepot::TEvResolveResult::TResolvedKey item;
+ item.SetKey(resolveContext.Key);
+ process(item, true);
+ } else {
+ Y_FAIL("unexpected resolve response");
}
- }
- if (context) {
- process(context->Obtain<TResolveContext>().Key, nullptr);
}
}
- const TResolvedValueChain *TBlobDepotAgent::TBlobMappingCache::ResolveKey(TString key, TQuery *query,
- TRequestContext::TPtr context) {
+ const TResolvedValue *TBlobDepotAgent::TBlobMappingCache::ResolveKey(TString key, TQuery *query,
+ TRequestContext::TPtr context, bool mustRestoreFirst) {
+ // obtain entry in the cache
const TStringBuf keyBuf = key;
- auto& entry = Cache.try_emplace(std::move(key), keyBuf).first->second;
- if (!entry.Values.empty()) {
- return &entry.Values;
- }
- if (!entry.ResolveInFlight) {
- entry.ResolveInFlight = true;
+ const auto [it, inserted] = Cache.try_emplace(std::move(key), keyBuf);
+ auto& entry = it->second;
- NKikimrBlobDepot::TEvResolve msg;
- auto *item = msg.AddItems();
- item->SetExactKey(TString(keyBuf));
-
- if (Agent.VirtualGroupId) {
- const auto& id = TLogoBlobID::FromBinary(keyBuf);
- item->SetTabletId(id.TabletID());
- }
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA45, "ResolveKey", (AgentId, Agent.LogId), (Key, Agent.PrettyKey(it->first)),
+ (MustRestoreFirst, mustRestoreFirst), (Value, entry.Value), (OrdinaryResolvePending, entry.OrdinaryResolvePending),
+ (MustRestoreFirstResolvePending, entry.MustRestoreFirstResolvePending));
- Agent.Issue(std::move(msg), this, std::make_unique<TResolveContext>(TString(keyBuf)));
+ // return cached value if we have all conditions met for this query
+ if (!entry.Value.IsEmpty() && mustRestoreFirst <= entry.Value.ReliablyWritten) {
+ return &entry.Value;
}
+ // register query-local request for the key
const ui64 id = Agent.NextOtherRequestId++;
- const bool inserted1 = entry.PendingQueries.emplace(id).second;
+ const bool inserted1 = entry.PendingQueries.emplace(id, mustRestoreFirst).second;
Y_VERIFY(inserted1);
auto cancelCallback = [&entry, id] {
const size_t numErased = entry.PendingQueries.erase(id);
@@ -76,6 +122,19 @@ namespace NKikimr::NBlobDepot {
};
Agent.RegisterRequest(id, query, std::move(context), std::move(cancelCallback), false);
+ // see if we have to issue the query
+ if (!entry.MustRestoreFirstResolvePending && (mustRestoreFirst || !entry.OrdinaryResolvePending)) {
+ NKikimrBlobDepot::TEvResolve msg;
+ auto *item = msg.AddItems();
+ item->SetExactKey(TString(keyBuf));
+ if (mustRestoreFirst != item->GetMustRestoreFirst()) {
+ item->SetMustRestoreFirst(mustRestoreFirst);
+ }
+
+ Agent.Issue(std::move(msg), this, std::make_unique<TResolveContext>(TString(keyBuf), mustRestoreFirst));
+ ++(mustRestoreFirst ? entry.MustRestoreFirstResolvePending : entry.OrdinaryResolvePending);
+ }
+
return nullptr;
}
@@ -84,13 +143,19 @@ namespace NKikimr::NBlobDepot {
HandleResolveResult(tag, (*p)->Record, std::move(context));
} else if (std::holds_alternative<TTabletDisconnected>(response)) {
STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA38, "TBlobMappingCache::TTabletDisconnected",
- (VirtualGroupId, Agent.VirtualGroupId), (Cookie, tag));
- if (auto resolveContext = std::dynamic_pointer_cast<TResolveContext>(context)) {
- if (const auto it = Cache.find(resolveContext->Key); it != Cache.end() && it->second.ResolveInFlight) {
- for (const ui64 id : std::exchange(it->second.PendingQueries, {})) {
- Agent.OnRequestComplete(id, response, Agent.OtherRequestInFlight);
- }
- it->second.ResolveInFlight = false;
+ (AgentId, Agent.LogId), (Cookie, tag));
+ auto& resolveContext = context->Obtain<TResolveContext>();
+ if (const auto it = Cache.find(resolveContext.Key); it != Cache.end()) {
+ for (const auto& [id, mustRestoreFirst] : std::exchange(it->second.PendingQueries, {})) {
+ Agent.OnRequestComplete(id, TKeyResolved(TKeyResolved::ResolutionError, "BlobDepot tablet disconnected"),
+ Agent.OtherRequestInFlight);
+ }
+ if (!it->second.Value.IsEmpty()) {
+ --(resolveContext.MustRestoreFirst
+ ? it->second.MustRestoreFirstResolvePending
+ : it->second.OrdinaryResolvePending);
+ } else {
+ Cache.erase(it);
}
}
} else {
diff --git a/ydb/core/blob_depot/agent/blob_mapping_cache.h b/ydb/core/blob_depot/agent/blob_mapping_cache.h
index 09c3ca6424..57aaa3ff4c 100644
--- a/ydb/core/blob_depot/agent/blob_mapping_cache.h
+++ b/ydb/core/blob_depot/agent/blob_mapping_cache.h
@@ -9,13 +9,14 @@ namespace NKikimr::NBlobDepot {
: public TRequestSender
{
struct TCachedKeyItem : TIntrusiveListItem<TCachedKeyItem> {
- TStringBuf Key;
- TResolvedValueChain Values;
- bool ResolveInFlight = false;
- THashSet<ui64> PendingQueries;
+ TStringBuf Key; // key buffer (view of key part of the Cache set)
+ TResolvedValue Value; // recently resolved value, if any
+ ui32 OrdinaryResolvePending = 0;
+ ui32 MustRestoreFirstResolvePending = 0;
+ THashMap<ui64, bool> PendingQueries; // a set of queries waiting for this blob
TCachedKeyItem(TStringBuf key)
- : Key(std::move(key))
+ : Key(key)
{}
};
@@ -28,7 +29,9 @@ namespace NKikimr::NBlobDepot {
{}
void HandleResolveResult(ui64 tag, const NKikimrBlobDepot::TEvResolveResult& msg, TRequestContext::TPtr context);
- const TResolvedValueChain *ResolveKey(TString key, TQuery *query, TRequestContext::TPtr context);
+ const TResolvedValue *ResolveKey(TString key, TQuery *query, TRequestContext::TPtr context, bool mustRestoreFirst);
+
+ private:
void ProcessResponse(ui64 tag, TRequestContext::TPtr /*context*/, TResponse response) override;
};
diff --git a/ydb/core/blob_depot/agent/blocks.cpp b/ydb/core/blob_depot/agent/blocks.cpp
index 490bc26795..04dab7c1eb 100644
--- a/ydb/core/blob_depot/agent/blocks.cpp
+++ b/ydb/core/blob_depot/agent/blocks.cpp
@@ -26,7 +26,7 @@ namespace NKikimr::NBlobDepot {
if (status == NKikimrProto::UNKNOWN) {
block.PendingBlockChecks.PushBack(query);
}
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA01, "CheckBlockForTablet", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA01, "CheckBlockForTablet", (AgentId, Agent.LogId),
(QueryId, query->GetQueryId()), (TabletId, tabletId), (Generation, generation), (Status, status), (Now, now),
(ExpirationTimestamp, block.ExpirationTimestamp), (RefreshQueried, refreshQueried),
(RefreshId, block.RefreshId));
@@ -39,7 +39,7 @@ namespace NKikimr::NBlobDepot {
} else if (std::holds_alternative<TTabletDisconnected>(response)) {
auto& queryBlockContext = context->Obtain<TQueryBlockContext>();
auto& block = Blocks[queryBlockContext.TabletId];
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA36, "TBlocksManager::TTabletDisconnected", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA36, "TBlocksManager::TTabletDisconnected", (AgentId, Agent.LogId),
(TabletId, queryBlockContext.TabletId), (RefreshId, block.RefreshId));
block.RefreshId = 0;
IssueOnUpdateBlock(block);
@@ -50,7 +50,7 @@ namespace NKikimr::NBlobDepot {
void TBlobDepotAgent::TBlocksManager::Handle(TRequestContext::TPtr context, NKikimrBlobDepot::TEvQueryBlocksResult& msg) {
auto& queryBlockContext = context->Obtain<TQueryBlockContext>();
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA02, "TEvQueryBlocksResult", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA02, "TEvQueryBlocksResult", (AgentId, Agent.LogId),
(Msg, msg), (TabletId, queryBlockContext.TabletId));
auto& block = Blocks[queryBlockContext.TabletId];
Y_VERIFY(block.RefreshId);
@@ -95,7 +95,7 @@ namespace NKikimr::NBlobDepot {
for (const auto& tablet : tablets) {
if (const auto it = Blocks.find(tablet.GetTabletId()); it != Blocks.end()) {
auto& block = it->second;
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA37, "OnBlockedTablets", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA37, "OnBlockedTablets", (AgentId, Agent.LogId),
(TabletId, it->first), (RefreshId, block.RefreshId), (BlockedGeneration, tablet.GetBlockedGeneration()),
(IssuerGuid, tablet.GetIssuerGuid()));
block.BlockedGeneration = tablet.GetBlockedGeneration();
diff --git a/ydb/core/blob_depot/agent/channel_kind.cpp b/ydb/core/blob_depot/agent/channel_kind.cpp
index d28fcde537..3451ce6097 100644
--- a/ydb/core/blob_depot/agent/channel_kind.cpp
+++ b/ydb/core/blob_depot/agent/channel_kind.cpp
@@ -8,7 +8,7 @@ namespace NKikimr::NBlobDepot {
NumAvailableItems += range.GetEnd() - range.GetBegin();
}
- ProcessQueriesWaitingForId();
+ ProcessQueriesWaitingForId(true);
}
ui32 TBlobDepotAgent::TChannelKind::GetNumAvailableItems() const {
@@ -32,6 +32,7 @@ namespace NKikimr::NBlobDepot {
}
}
if (options.empty()) {
+ agent.IssueAllocateIdsIfNeeded(*this);
return std::nullopt;
}
@@ -67,10 +68,10 @@ namespace NKikimr::NBlobDepot {
QueriesWaitingForId.PushBack(query);
}
- void TBlobDepotAgent::TChannelKind::ProcessQueriesWaitingForId() {
+ void TBlobDepotAgent::TChannelKind::ProcessQueriesWaitingForId(bool success) {
TIntrusiveList<TQuery, TPendingId> temp;
temp.Swap(QueriesWaitingForId);
- temp.ForEach([&](TQuery *query) { query->OnIdAllocated(); });
+ temp.ForEach([&](TQuery *query) { query->OnIdAllocated(success); });
}
} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/agent/comm.cpp b/ydb/core/blob_depot/agent/comm.cpp
index ea5ea51235..843bb4a0ba 100644
--- a/ydb/core/blob_depot/agent/comm.cpp
+++ b/ydb/core/blob_depot/agent/comm.cpp
@@ -5,7 +5,7 @@ namespace NKikimr::NBlobDepot {
void TBlobDepotAgent::Handle(TEvTabletPipe::TEvClientConnected::TPtr ev) {
auto& msg = *ev->Get();
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA03, "TEvClientConnected", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA03, "TEvClientConnected", (AgentId, LogId),
(TabletId, msg.TabletId), (Status, msg.Status), (ClientId, msg.ClientId), (ServerId, msg.ServerId));
Y_VERIFY_DEBUG_S(msg.Status == NKikimrProto::OK, "Status# " << NKikimrProto::EReplyStatus_Name(msg.Status));
if (msg.Status != NKikimrProto::OK) {
@@ -17,7 +17,7 @@ namespace NKikimr::NBlobDepot {
void TBlobDepotAgent::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr ev) {
auto& msg = *ev->Get();
- STLOG(PRI_INFO, BLOB_DEPOT_AGENT, BDA04, "TEvClientDestroyed", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_INFO, BLOB_DEPOT_AGENT, BDA04, "TEvClientDestroyed", (AgentId, LogId),
(ClientId, msg.ClientId), (ServerId, msg.ServerId));
PipeId = PipeServerId = {};
OnDisconnect();
@@ -29,14 +29,14 @@ namespace NKikimr::NBlobDepot {
PipeId = Register(NTabletPipe::CreateClient(SelfId(), TabletId, NTabletPipe::TClientRetryPolicy::WithRetries()));
NextTabletRequestId = 1;
const ui64 id = NextTabletRequestId++;
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA05, "ConnectToBlobDepot", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA05, "ConnectToBlobDepot", (AgentId, LogId),
(PipeId, PipeId), (RequestId, id));
NTabletPipe::SendData(SelfId(), PipeId, new TEvBlobDepot::TEvRegisterAgent(VirtualGroupId, AgentInstanceId), id);
RegisterRequest(id, this, nullptr, {}, true);
}
void TBlobDepotAgent::Handle(TRequestContext::TPtr /*context*/, NKikimrBlobDepot::TEvRegisterAgentResult& msg) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA06, "TEvRegisterAgentResult", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA06, "TEvRegisterAgentResult", (AgentId, LogId),
(Msg, msg));
BlobDepotGeneration = msg.GetGeneration();
DecommitGroupId = msg.HasDecommitGroupId() ? std::make_optional(msg.GetDecommitGroupId()) : std::nullopt;
@@ -68,7 +68,7 @@ namespace NKikimr::NBlobDepot {
}
for (const NKikimrBlobDepot::TChannelKind::E kind : vanishedKinds) {
- STLOG(PRI_INFO, BLOB_DEPOT_AGENT, BDA07, "kind vanished", (VirtualGroupId, VirtualGroupId), (Kind, kind));
+ STLOG(PRI_INFO, BLOB_DEPOT_AGENT, BDA07, "kind vanished", (AgentId, LogId), (Kind, kind));
ChannelKinds.erase(kind);
}
@@ -92,9 +92,9 @@ namespace NKikimr::NBlobDepot {
}
void TBlobDepotAgent::IssueAllocateIdsIfNeeded(TChannelKind& kind) {
- if (!kind.IdAllocInFlight && kind.GetNumAvailableItems() < 100 && PipeId) {
+ if (!kind.IdAllocInFlight && kind.GetNumAvailableItems() < 100 && IsConnected) {
const ui64 id = NextTabletRequestId++;
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA08, "IssueAllocateIdsIfNeeded", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA08, "IssueAllocateIdsIfNeeded", (AgentId, LogId),
(ChannelKind, NKikimrBlobDepot::TChannelKind::E_Name(kind.Kind)),
(IdAllocInFlight, kind.IdAllocInFlight), (NumAvailableItems, kind.GetNumAvailableItems()),
(RequestId, id));
@@ -119,9 +119,11 @@ namespace NKikimr::NBlobDepot {
if (msg.HasGivenIdRange()) {
kind.IssueGivenIdRange(msg.GetGivenIdRange());
+ } else {
+ kind.ProcessQueriesWaitingForId(false);
}
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA09, "TEvAllocateIdsResult", (VirtualGroupId, VirtualGroupId), (Msg, msg),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA09, "TEvAllocateIdsResult", (AgentId, LogId), (Msg, msg),
(NumAvailableItems, kind.GetNumAvailableItems()));
}
@@ -134,7 +136,7 @@ namespace NKikimr::NBlobDepot {
while (!TabletRequestInFlight.empty()) {
auto node = TabletRequestInFlight.extract(TabletRequestInFlight.begin());
auto& requestInFlight = node.value();
- requestInFlight.Sender->OnRequestComplete(requestInFlight, TTabletDisconnected{});
+ requestInFlight.Sender->OnRequestComplete(requestInFlight, TTabletDisconnected{}, nullptr);
}
for (auto& [_, kind] : ChannelKinds) {
@@ -174,7 +176,7 @@ namespace NKikimr::NBlobDepot {
ui64 TBlobDepotAgent::Issue(std::unique_ptr<IEventBase> ev, TRequestSender *sender, TRequestContext::TPtr context) {
const ui64 id = NextTabletRequestId++;
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA10, "Issue", (VirtualGroupId, VirtualGroupId), (RequestId, id), (Msg, ev->ToString()));
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA10, "Issue", (AgentId, LogId), (RequestId, id), (Msg, ev->ToString()));
NTabletPipe::SendData(SelfId(), PipeId, ev.release(), id);
RegisterRequest(id, sender, std::move(context), {}, true);
return id;
@@ -182,7 +184,7 @@ namespace NKikimr::NBlobDepot {
void TBlobDepotAgent::Handle(TEvBlobDepot::TEvPushNotify::TPtr ev) {
auto& msg = ev->Get()->Record;
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA11, "TEvPushNotify", (VirtualGroupId, VirtualGroupId), (Msg, msg),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA11, "TEvPushNotify", (AgentId, LogId), (Msg, msg),
(Id, ev->Cookie), (Sender, ev->Sender), (PipeServerId, PipeServerId), (Match, ev->Sender == PipeServerId));
if (ev->Sender != PipeServerId) {
return; // race with previous connection
@@ -209,7 +211,7 @@ namespace NKikimr::NBlobDepot {
it->ToProto(response->Record.AddWritesInFlight());
}
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA12, "TrimChannel", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA12, "TrimChannel", (AgentId, LogId),
(Channel, int(channel)), (NumAvailableItemsBefore, numAvailableItemsBefore),
(NumAvailableItemsAfter, kind.GetNumAvailableItems()));
}
@@ -223,7 +225,7 @@ namespace NKikimr::NBlobDepot {
// it is essential to send response through the pipe -- otherwise we can break order with, for example, commits:
// this message can outrun previously sent commit and lead to data loss
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA33, "sending TEvPushNotifyResult", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA33, "sending TEvPushNotifyResult", (AgentId, LogId),
(RequestId, NextTabletRequestId));
NTabletPipe::SendData(SelfId(), PipeId, response.release(), NextTabletRequestId++);
diff --git a/ydb/core/blob_depot/agent/metrics.cpp b/ydb/core/blob_depot/agent/metrics.cpp
new file mode 100644
index 0000000000..30ffff5330
--- /dev/null
+++ b/ydb/core/blob_depot/agent/metrics.cpp
@@ -0,0 +1,16 @@
+#include "agent_impl.h"
+
+namespace NKikimr::NBlobDepot {
+
+ void TBlobDepotAgent::HandlePushMetrics() {
+ if (IsConnected) {
+ const ui64 bytesRead = BytesRead - std::exchange(LastBytesRead, BytesRead);
+ const ui64 bytesWritten = BytesWritten - std::exchange(LastBytesWritten, BytesWritten);
+ NTabletPipe::SendData(SelfId(), PipeId, new TEvBlobDepot::TEvPushMetrics(bytesRead, bytesWritten));
+ }
+
+ TActivationContext::Schedule(TDuration::MilliSeconds(2500), new IEventHandle(TEvPrivate::EvPushMetrics, 0, SelfId(),
+ {}, nullptr, 0));
+ }
+
+} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/agent/proxy.cpp b/ydb/core/blob_depot/agent/proxy.cpp
index a38f53e66e..2fc971680f 100644
--- a/ydb/core/blob_depot/agent/proxy.cpp
+++ b/ydb/core/blob_depot/agent/proxy.cpp
@@ -4,13 +4,50 @@ namespace NKikimr::NBlobDepot {
void TBlobDepotAgent::SendToProxy(ui32 groupId, std::unique_ptr<IEventBase> event, TRequestSender *sender,
TRequestContext::TPtr context) {
+ auto executionRelay = std::make_shared<TEvBlobStorage::TExecutionRelay>();
+
+ switch (event->Type()) {
+ case TEvBlobStorage::EvPut:
+ static_cast<TEvBlobStorage::TEvPut&>(*event).ExecutionRelay = executionRelay;
+ break;
+
+ case TEvBlobStorage::EvGet:
+ static_cast<TEvBlobStorage::TEvGet&>(*event).ExecutionRelay = executionRelay;
+ break;
+ }
+
const ui64 id = NextOtherRequestId++;
- if (groupId == DecommitGroupId) {
+ auto getQueryId = [&] {
+ auto *p = dynamic_cast<TQuery*>(sender);
+ return p ? std::make_optional(p->GetQueryId()) : std::nullopt;
+ };
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA46, "SendToProxy", (AgentId, LogId), (QueryId, getQueryId()),
+ (GroupId, groupId), (DecommitGroupId, DecommitGroupId), (Type, event->Type()), (Cookie, id));
+ if (groupId != DecommitGroupId) {
+ SendToBSProxy(SelfId(), groupId, event.release(), id);
+ } else if (ProxyId) {
Send(ProxyId, event.release(), 0, id);
} else {
- SendToBSProxy(SelfId(), groupId, event.release(), id);
+ std::unique_ptr<IEventBase> response;
+ switch (const ui32 type = event->Type()) {
+ case TEvBlobStorage::EvGet: {
+ auto& get = static_cast<TEvBlobStorage::TEvGet&>(*event);
+ response = get.MakeErrorResponse(NKikimrProto::OK, "proxy has vanished", groupId);
+ auto& r = static_cast<TEvBlobStorage::TEvGetResult&>(*response);
+ for (size_t i = 0; i < r.ResponseSz; ++i) {
+ r.Responses[i].Status = NKikimrProto::NODATA;
+ }
+ r.ExecutionRelay = std::move(get.ExecutionRelay);
+ break;
+ }
+
+ default:
+ Y_FAIL("unexpected request type for decommission proxy Type# 0x%08" PRIx32, type);
+ }
+ Send(SelfId(), response.release(), 0, id);
}
- RegisterRequest(id, sender, std::move(context), {}, false);
+
+ RegisterRequest(id, sender, std::move(context), {}, false, std::move(executionRelay));
}
} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/agent/query.cpp b/ydb/core/blob_depot/agent/query.cpp
index 5dd0f18364..0ab4456ca0 100644
--- a/ydb/core/blob_depot/agent/query.cpp
+++ b/ydb/core/blob_depot/agent/query.cpp
@@ -18,15 +18,21 @@ namespace NKikimr::NBlobDepot {
switch (ev->GetTypeRewrite()) {
case TEvBlobStorage::EvGet:
doForward = ev->Get<TEvBlobStorage::TEvGet>()->Decommission;
+ Y_VERIFY(!doForward || !ev->Get<TEvBlobStorage::TEvGet>()->MustRestoreFirst);
break;
case TEvBlobStorage::EvRange:
doForward = ev->Get<TEvBlobStorage::TEvRange>()->Decommission;
+ Y_VERIFY(!doForward || !ev->Get<TEvBlobStorage::TEvRange>()->MustRestoreFirst);
break;
}
if (doForward) {
- TActivationContext::Send(ev->Forward(ProxyId));
+ if (ProxyId) {
+ TActivationContext::Send(ev->Forward(ProxyId));
+ } else {
+ CreateQuery<0>(std::unique_ptr<IEventHandle>(ev.Release()))->EndWithError(NKikimrProto::ERROR, "proxy has vanished");
+ }
return;
}
@@ -92,7 +98,7 @@ namespace NKikimr::NBlobDepot {
void TBlobDepotAgent::ProcessStorageEvent(std::unique_ptr<IEventHandle> ev) {
TQuery *query = CreateQuery<0>(std::move(ev));
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA13, "new query", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA13, "new query", (AgentId, LogId),
(QueryId, query->GetQueryId()), (Name, query->GetName()));
if (!TabletId) {
query->EndWithError(NKikimrProto::ERROR, "group is in error state");
@@ -145,22 +151,26 @@ namespace NKikimr::NBlobDepot {
TBlobDepotAgent::TQuery::~TQuery() {
if (TDuration duration(TActivationContext::Monotonic() - StartTime); duration >= WatchdogDuration) {
STLOG(WatchdogPriority, BLOB_DEPOT_AGENT, BDA00, "query execution took too much time",
- (VirtualGroupId, Agent.VirtualGroupId), (QueryId, GetQueryId()), (Duration, duration));
+ (AgentId, Agent.LogId), (QueryId, GetQueryId()), (Duration, duration));
}
Agent.QueryWatchdogMap.erase(QueryWatchdogMapIter);
}
void TBlobDepotAgent::TQuery::CheckQueryExecutionTime(TMonotonic now) {
const auto prio = std::exchange(WatchdogPriority, NLog::PRI_NOTICE);
- STLOG(prio, BLOB_DEPOT_AGENT, BDA23, "query is still executing", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(prio, BLOB_DEPOT_AGENT, BDA23, "query is still executing", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Duration, now - StartTime));
auto nh = Agent.QueryWatchdogMap.extract(QueryWatchdogMapIter);
nh.key() = now + WatchdogDuration;
QueryWatchdogMapIter = Agent.QueryWatchdogMap.insert(std::move(nh));
+ for (const auto& cookie : SubrequestRelays) {
+ Y_VERIFY_S(!cookie.expired(), "AgentId# " << Agent.LogId << " QueryId# " << GetQueryId()
+ << " subrequest got stuck");
+ }
}
void TBlobDepotAgent::TQuery::EndWithError(NKikimrProto::EReplyStatus status, const TString& errorReason) {
- STLOG(PRI_INFO, BLOB_DEPOT_AGENT, BDA14, "query ends with error", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_INFO, BLOB_DEPOT_AGENT, BDA14, "query ends with error", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Status, status), (ErrorReason, errorReason),
(Duration, TActivationContext::Monotonic() - StartTime));
@@ -169,7 +179,9 @@ namespace NKikimr::NBlobDepot {
#define XX(TYPE) \
case TEvBlobStorage::TYPE: \
response = Event->Get<TEvBlobStorage::T##TYPE>()->MakeErrorResponse(status, errorReason, Agent.VirtualGroupId); \
- break;
+ static_cast<TEvBlobStorage::T##TYPE##Result&>(*response).ExecutionRelay = std::move(ExecutionRelay); \
+ break; \
+ //
ENUMERATE_INCOMING_EVENTS(XX)
#undef XX
@@ -181,8 +193,18 @@ namespace NKikimr::NBlobDepot {
}
void TBlobDepotAgent::TQuery::EndWithSuccess(std::unique_ptr<IEventBase> response) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA15, "query ends with success", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA15, "query ends with success", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Response, response->ToString()), (Duration, TActivationContext::Monotonic() - StartTime));
+ switch (response->Type()) {
+#define XX(TYPE) \
+ case TEvBlobStorage::TYPE##Result: \
+ static_cast<TEvBlobStorage::T##TYPE##Result&>(*response).ExecutionRelay = std::move(ExecutionRelay); \
+ break; \
+ //
+
+ ENUMERATE_INCOMING_EVENTS(XX)
+#undef XX
+ }
Agent.SelfId().Send(Event->Sender, response.release(), 0, Event->Cookie);
OnDestroy(true);
DoDestroy();
diff --git a/ydb/core/blob_depot/agent/read.cpp b/ydb/core/blob_depot/agent/read.cpp
index 43ab0ff651..f577a74bfb 100644
--- a/ydb/core/blob_depot/agent/read.cpp
+++ b/ydb/core/blob_depot/agent/read.cpp
@@ -2,27 +2,48 @@
namespace NKikimr::NBlobDepot {
- struct TBlobDepotAgent::TReadContext : TRequestContext {
- TQuery *Query;
- const ui64 Tag;
+ struct TBlobDepotAgent::TQuery::TReadContext
+ : TRequestContext
+ , std::enable_shared_from_this<TReadContext>
+ {
+ TReadArg ReadArg;
const ui64 Size;
TString Buffer;
bool Terminated = false;
+ bool StopProcessingParts = false;
ui32 NumPartsPending = 0;
+ TLogoBlobID BlobWithoutData;
- TReadContext(TQuery *query, ui64 tag, ui64 size)
- : Query(query)
- , Tag(tag)
+ TReadContext(TReadArg&& readArg, ui64 size)
+ : ReadArg(std::move(readArg))
, Size(size)
{}
- void EndWithError(NKikimrProto::EReplyStatus status, TString errorReason) {
- Query->OnRead(Tag, status, errorReason);
+ void Abort() {
Terminated = true;
}
- void EndWithSuccess() {
- Query->OnRead(Tag, NKikimrProto::OK, std::move(Buffer));
+ void EndWithSuccess(TQuery *query) {
+ Y_VERIFY(!Terminated);
+ query->OnRead(ReadArg.Tag, NKikimrProto::OK, std::move(Buffer));
+ Abort();
+ }
+
+ void EndWithError(TQuery *query, NKikimrProto::EReplyStatus status, TString errorReason) {
+ Y_VERIFY(!Terminated);
+ Y_VERIFY(status != NKikimrProto::NODATA && status != NKikimrProto::OK);
+ query->OnRead(ReadArg.Tag, status, errorReason);
+ Abort();
+ }
+
+ void EndWithNoData(TQuery *query) {
+ Y_VERIFY(!Terminated);
+ query->OnRead(ReadArg.Tag, NKikimrProto::NODATA, {});
+ Abort();
+ }
+
+ ui64 GetTag() const {
+ return ReadArg.Tag;
}
struct TPartContext : TRequestContext {
@@ -35,7 +56,11 @@ namespace NKikimr::NBlobDepot {
};
};
- bool TBlobDepotAgent::IssueRead(const TReadArg& arg, TString& error) {
+ bool TBlobDepotAgent::TQuery::IssueRead(TReadArg&& arg, TString& error) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA34, "IssueRead", (AgentId, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, arg.Tag), (Key, Agent.PrettyKey(arg.Key)), (Offset, arg.Offset), (Size, arg.Size),
+ (Value, arg.Value));
+
ui64 outputOffset = 0;
struct TReadItem {
@@ -50,16 +75,17 @@ namespace NKikimr::NBlobDepot {
ui64 offset = arg.Offset;
ui64 size = arg.Size;
- for (const auto& value : arg.Values) {
- const ui32 groupId = value.GetGroupId();
- const auto blobId = LogoBlobIDFromLogoBlobID(value.GetBlobId());
- const ui64 begin = value.GetSubrangeBegin();
- const ui64 end = value.HasSubrangeEnd() ? value.GetSubrangeEnd() : blobId.BlobSize();
+ for (const auto& value : arg.Value.Chain) {
+ const ui32 groupId = value.GroupId;
+ const auto& blobId = value.BlobId;
+ const ui32 begin = value.SubrangeBegin;
+ const ui32 end = value.SubrangeEnd;
if (end <= begin || blobId.BlobSize() < end) {
error = "incorrect SubrangeBegin/SubrangeEnd pair";
- STLOG(PRI_CRIT, BLOB_DEPOT_AGENT, BDA24, error, (VirtualGroupId, VirtualGroupId), (TabletId, TabletId),
- (Values, FormatList(arg.Values)));
+ STLOG(PRI_CRIT, BLOB_DEPOT_AGENT, BDA24, error, (AgentId, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, arg.Tag), (Key, Agent.PrettyKey(arg.Key)), (Offset, arg.Offset), (Size, arg.Size),
+ (Value, arg.Value));
return false;
}
@@ -90,14 +116,15 @@ namespace NKikimr::NBlobDepot {
if (size) {
error = "incorrect offset/size provided";
- STLOG(PRI_ERROR, BLOB_DEPOT_AGENT, BDA25, error, (VirtualGroupId, VirtualGroupId), (TabletId, TabletId),
- (Offset, arg.Offset), (Size, arg.Size), (Values, FormatList(arg.Values)));
+ STLOG(PRI_ERROR, BLOB_DEPOT_AGENT, BDA25, error, (AgentId, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, arg.Tag), (Key, Agent.PrettyKey(arg.Key)), (Offset, arg.Offset), (Size, arg.Size),
+ (Value, arg.Value));
return false;
}
- auto context = std::make_shared<TReadContext>(arg.Query, arg.Tag, outputOffset);
+ auto context = std::make_shared<TReadContext>(std::move(arg), outputOffset);
if (!outputOffset) {
- context->EndWithSuccess();
+ context->EndWithSuccess(this);
return true;
}
@@ -106,6 +133,7 @@ namespace NKikimr::NBlobDepot {
TEvBlobStorage::TEvGet::TQuery query;
query.Set(item.Id, item.Offset, item.Size);
queriesPerGroup[item.GroupId].emplace_back(item.OutputOffset, query);
+ Agent.BytesRead += item.Size;
}
for (const auto& [groupId, queries] : queriesPerGroup) {
@@ -118,9 +146,11 @@ namespace NKikimr::NBlobDepot {
partContext->Offsets.push_back(outputOffset);
}
- auto event = std::make_unique<TEvBlobStorage::TEvGet>(q, sz, TInstant::Max(), arg.GetHandleClass, arg.MustRestoreFirst);
- event->ReaderTabletData = arg.ReaderTabletData;
- SendToProxy(groupId, std::move(event), arg.Query, std::move(partContext));
+ auto event = std::make_unique<TEvBlobStorage::TEvGet>(q, sz, TInstant::Max(), context->ReadArg.GetHandleClass);
+ event->ReaderTabletData = context->ReadArg.ReaderTabletData;
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA39, "issuing TEvGet", (AgentId, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, context->GetTag()), (Key, Agent.PrettyKey(context->ReadArg.Key)), (GroupId, groupId), (Msg, *event));
+ Agent.SendToProxy(groupId, std::move(event), this, std::move(partContext));
++context->NumPartsPending;
}
@@ -129,43 +159,87 @@ namespace NKikimr::NBlobDepot {
return true;
}
- void TBlobDepotAgent::HandleGetResult(const TRequestContext::TPtr& context, TEvBlobStorage::TEvGetResult& msg) {
+ void TBlobDepotAgent::TQuery::HandleGetResult(const TRequestContext::TPtr& context, TEvBlobStorage::TEvGetResult& msg) {
auto& partContext = context->Obtain<TReadContext::TPartContext>();
auto& readContext = *partContext.Read;
- if (readContext.Terminated) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA41, "HandleGetResult", (AgentId, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, readContext.GetTag()), (Key, Agent.PrettyKey(readContext.ReadArg.Key)), (Msg, msg),
+ (Terminated, readContext.Terminated));
+ if (readContext.Terminated || readContext.StopProcessingParts) {
return; // just ignore this read
}
- if (msg.Status != NKikimrProto::OK) {
- readContext.EndWithError(msg.Status, std::move(msg.ErrorReason));
- } else {
- Y_VERIFY(msg.ResponseSz == partContext.Offsets.size());
-
- for (ui32 i = 0; i < msg.ResponseSz; ++i) {
- auto& blob = msg.Responses[i];
- if (blob.Status != NKikimrProto::OK) {
- return readContext.EndWithError(blob.Status, TStringBuilder() << "failed to read BlobId# " << blob.Id);
- }
+ Y_VERIFY(msg.ResponseSz == partContext.Offsets.size());
+
+ for (ui32 i = 0; i < msg.ResponseSz; ++i) {
+ auto& blob = msg.Responses[i];
+ if (blob.Status == NKikimrProto::NODATA) {
+ NKikimrBlobDepot::TEvResolve resolve;
+ auto *item = resolve.AddItems();
+ item->SetExactKey(readContext.ReadArg.Key);
+ item->SetMustRestoreFirst(readContext.ReadArg.MustRestoreFirst);
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA48, "issuing extra resolve", (Agent, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, readContext.GetTag()), (Key, Agent.PrettyKey(readContext.ReadArg.Key)), (Msg, resolve));
+ Agent.Issue(std::move(resolve), this, readContext.shared_from_this());
+ readContext.StopProcessingParts = true;
+ readContext.BlobWithoutData = blob.Id;
+ return;
+ } else if (blob.Status != NKikimrProto::OK) {
+ return readContext.EndWithError(this, blob.Status, TStringBuilder() << "failed to read BlobId# " << blob.Id);
+ }
- auto& buffer = readContext.Buffer;
- const ui64 offset = partContext.Offsets[i];
+ auto& buffer = readContext.Buffer;
+ const ui64 offset = partContext.Offsets[i];
- Y_VERIFY(offset < readContext.Size && blob.Buffer.size() <= readContext.Size - offset);
+ Y_VERIFY(offset < readContext.Size && blob.Buffer.size() <= readContext.Size - offset);
- if (!buffer && !offset) {
- buffer = std::move(blob.Buffer);
- buffer.resize(readContext.Size);
- } else {
- if (!buffer) {
- buffer = TString::Uninitialized(readContext.Size);
- }
- memcpy(buffer.Detach() + offset, blob.Buffer.data(), blob.Buffer.size());
+ if (!buffer && !offset) {
+ buffer = std::move(blob.Buffer);
+ buffer.resize(readContext.Size);
+ } else {
+ if (!buffer) {
+ buffer = TString::Uninitialized(readContext.Size);
}
+ memcpy(buffer.Detach() + offset, blob.Buffer.data(), blob.Buffer.size());
}
+ }
+
+ if (!--readContext.NumPartsPending) {
+ readContext.EndWithSuccess(this);
+ }
+ }
- if (!--readContext.NumPartsPending) {
- readContext.EndWithSuccess();
+ void TBlobDepotAgent::TQuery::HandleResolveResult(const TRequestContext::TPtr& context, TEvBlobDepot::TEvResolveResult& msg) {
+ auto& readContext = context->Obtain<TReadContext>();
+ if (readContext.Terminated) {
+ return;
+ }
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA42, "HandleResolveResult", (AgentId, Agent.LogId), (QueryId, GetQueryId()),
+ (ReadId, readContext.GetTag()), (Key, Agent.PrettyKey(readContext.ReadArg.Key)), (Msg, msg.Record));
+ if (msg.Record.GetStatus() != NKikimrProto::OK) {
+ readContext.EndWithError(this, msg.Record.GetStatus(), msg.Record.GetErrorReason());
+ } else if (msg.Record.ResolvedKeysSize() == 1) {
+ const auto& item = msg.Record.GetResolvedKeys(0);
+ if (TResolvedValue value(item); value.Supersedes(readContext.ReadArg.Value)) { // value chain has changed, we have to try again
+ readContext.ReadArg.Value = std::move(value);
+ TString error;
+ if (!IssueRead(std::move(readContext.ReadArg), error)) {
+ readContext.EndWithError(this, NKikimrProto::ERROR, TStringBuilder() << "failed to restart read Error# " << error);
+ }
+ } else if (!item.GetReliablyWritten()) { // this was unassimilated value and we got NODATA for it
+ readContext.EndWithNoData(this);
+ } else {
+ STLOG(PRI_CRIT, BLOB_DEPOT_AGENT, BDA40, "failed to read blob: data seems to be lost", (AgentId, Agent.LogId),
+ (QueryId, GetQueryId()), (ReadId, readContext.GetTag()), (Key, Agent.PrettyKey(readContext.ReadArg.Key)),
+ (BlobId, readContext.BlobWithoutData));
+ Y_VERIFY_DEBUG_S(false, "data seems to be lost AgentId# " << Agent.LogId << " QueryId# " << GetQueryId()
+ << " ReadId# " << readContext.GetTag() << " BlobId# " << readContext.BlobWithoutData);
+ readContext.EndWithError(this, NKikimrProto::ERROR, TStringBuilder() << "failed to read BlobId# "
+ << readContext.BlobWithoutData << ": data seems to be lost");
}
+ } else {
+ Y_VERIFY(!msg.Record.ResolvedKeysSize());
+ readContext.EndWithNoData(this);
}
}
diff --git a/ydb/core/blob_depot/agent/request.cpp b/ydb/core/blob_depot/agent/request.cpp
index 0cff513036..621d5be545 100644
--- a/ydb/core/blob_depot/agent/request.cpp
+++ b/ydb/core/blob_depot/agent/request.cpp
@@ -36,7 +36,12 @@ namespace NKikimr::NBlobDepot {
});
}
- void TRequestSender::OnRequestComplete(TRequestInFlight& requestInFlight, TResponse response) {
+ void TRequestSender::OnRequestComplete(TRequestInFlight& requestInFlight, TResponse response,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay) {
+ if (executionRelay) {
+ const size_t num = SubrequestRelays.erase(executionRelay);
+ Y_VERIFY(num);
+ }
requestInFlight.Unlink();
ProcessResponse(requestInFlight.Id, std::move(requestInFlight.Context), std::move(response));
}
@@ -63,16 +68,20 @@ namespace NKikimr::NBlobDepot {
// TBlobDepotAgent machinery
void TBlobDepotAgent::RegisterRequest(ui64 id, TRequestSender *sender, TRequestContext::TPtr context,
- TRequestInFlight::TCancelCallback cancelCallback, bool toBlobDepotTablet) {
+ TRequestInFlight::TCancelCallback cancelCallback, bool toBlobDepotTablet,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay) {
TRequestsInFlight& map = toBlobDepotTablet ? TabletRequestInFlight : OtherRequestInFlight;
const bool inserted = map.emplace(id, sender, std::move(context), std::move(cancelCallback),
toBlobDepotTablet).second;
Y_VERIFY(inserted);
+ if (executionRelay) {
+ sender->SubrequestRelays.emplace(executionRelay);
+ }
}
template<typename TEvent>
void TBlobDepotAgent::HandleTabletResponse(TAutoPtr<TEventHandle<TEvent>> ev) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA16, "HandleTabletResponse", (VirtualGroupId, VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA16, "HandleTabletResponse", (AgentId, LogId),
(Id, ev->Cookie), (Type, TypeName<TEvent>()), (Sender, ev->Sender), (PipeServerId, PipeServerId),
(Match, ev->Sender == PipeServerId));
if (ev->Sender == PipeServerId) {
@@ -91,18 +100,20 @@ namespace NKikimr::NBlobDepot {
template<typename TEvent>
void TBlobDepotAgent::HandleOtherResponse(TAutoPtr<TEventHandle<TEvent>> ev) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA17, "HandleOtherResponse", (VirtualGroupId, VirtualGroupId),
- (Id, ev->Cookie), (Type, TypeName<TEvent>()));
- OnRequestComplete(ev->Cookie, ev->Get(), OtherRequestInFlight);
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA17, "HandleOtherResponse", (AgentId, LogId), (Id, ev->Cookie),
+ (Type, TypeName<TEvent>()), (Msg, *ev->Get()));
+ Y_VERIFY(ev->Get()->ExecutionRelay);
+ OnRequestComplete(ev->Cookie, ev->Get(), OtherRequestInFlight, std::move(ev->Get()->ExecutionRelay));
}
template void TBlobDepotAgent::HandleOtherResponse(TEvBlobStorage::TEvGetResult::TPtr ev);
template void TBlobDepotAgent::HandleOtherResponse(TEvBlobStorage::TEvPutResult::TPtr ev);
- void TBlobDepotAgent::OnRequestComplete(ui64 id, TResponse response, TRequestsInFlight& map) {
+ void TBlobDepotAgent::OnRequestComplete(ui64 id, TResponse response, TRequestsInFlight& map,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay) {
if (auto node = map.extract(id)) {
auto& requestInFlight = node.value();
- requestInFlight.Sender->OnRequestComplete(requestInFlight, std::move(response));
+ requestInFlight.Sender->OnRequestComplete(requestInFlight, std::move(response), std::move(executionRelay));
}
}
diff --git a/ydb/core/blob_depot/agent/resolved_value.cpp b/ydb/core/blob_depot/agent/resolved_value.cpp
new file mode 100644
index 0000000000..901e56345b
--- /dev/null
+++ b/ydb/core/blob_depot/agent/resolved_value.cpp
@@ -0,0 +1,66 @@
+#include "resolved_value.h"
+
+namespace NKikimr::NBlobDepot {
+
+ TResolvedValue::TLink::TLink(const NKikimrBlobDepot::TResolvedValueChain& link)
+ : BlobId(LogoBlobIDFromLogoBlobID(link.GetBlobId()))
+ , GroupId(link.GetGroupId())
+ , SubrangeBegin(link.GetSubrangeBegin())
+ , SubrangeEnd(link.HasSubrangeEnd() ? link.GetSubrangeEnd() : BlobId.BlobSize())
+ {
+ Y_VERIFY_DEBUG(link.HasBlobId() && link.HasGroupId());
+ }
+
+ void TResolvedValue::TLink::Output(IOutputStream& s) const {
+ s << BlobId << '@' << GroupId << '{' << SubrangeBegin << '-' << SubrangeEnd - 1 << '}';
+ }
+
+ TString TResolvedValue::TLink::ToString() const {
+ TStringStream s;
+ Output(s);
+ return s.Str();
+ }
+
+ TResolvedValue::TResolvedValue(const NKikimrBlobDepot::TEvResolveResult::TResolvedKey& item)
+ : Defined(true)
+ , ReliablyWritten(item.GetReliablyWritten())
+ , Version(item.GetValueVersion())
+ , Chain([](auto& x) { return decltype(Chain)(x.begin(), x.end()); }(item.GetValueChain()))
+ {}
+
+ bool TResolvedValue::Supersedes(const TResolvedValue& old) const {
+ Y_VERIFY(Defined);
+ if (!old.Defined) {
+ return true;
+ } else if (Version < old.Version) {
+ return false;
+ } else if (Version == old.Version) {
+ Y_VERIFY(Chain == old.Chain);
+ Y_VERIFY(old.ReliablyWritten <= ReliablyWritten); // value may not become 'unreliably written'
+ return old.ReliablyWritten < ReliablyWritten;
+ } else {
+ Y_VERIFY(old.ReliablyWritten <= ReliablyWritten); // item can't suddenly become unreliably written
+ return true;
+ }
+ }
+
+ void TResolvedValue::Output(IOutputStream& s) const {
+ if (Defined) {
+ s << '{' << FormatList(Chain) << " Version# " << Version << " ReliablyWritten# " << ReliablyWritten << '}';
+ } else {
+ s << "{}";
+ }
+ }
+
+ TString TResolvedValue::ToString() const {
+ TStringStream s;
+ Output(s);
+ return s.Str();
+ }
+
+} // NKikimr::NBlobDepot
+
+template<>
+void Out<NKikimr::NBlobDepot::TResolvedValue::TLink>(IOutputStream& s, const NKikimr::NBlobDepot::TResolvedValue::TLink& x) {
+ x.Output(s);
+}
diff --git a/ydb/core/blob_depot/agent/resolved_value.h b/ydb/core/blob_depot/agent/resolved_value.h
new file mode 100644
index 0000000000..a3194e65ec
--- /dev/null
+++ b/ydb/core/blob_depot/agent/resolved_value.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include "defs.h"
+
+namespace NKikimr::NBlobDepot {
+
+ struct TResolvedValue {
+ struct TLink {
+ TLogoBlobID BlobId;
+ ui32 GroupId;
+ ui32 SubrangeBegin;
+ ui32 SubrangeEnd;
+
+ TLink(const NKikimrBlobDepot::TResolvedValueChain& link);
+
+ void Output(IOutputStream& s) const;
+ TString ToString() const;
+
+ friend bool operator ==(const TLink& x, const TLink& y) {
+ return x.BlobId == y.BlobId && x.GroupId == y.GroupId && x.SubrangeBegin == y.SubrangeBegin &&
+ x.SubrangeEnd == y.SubrangeEnd;
+ }
+ };
+
+ bool Defined = false;
+ bool ReliablyWritten = false;
+ ui32 Version = 0;
+ std::vector<TLink> Chain;
+
+ TResolvedValue() = default;
+ TResolvedValue(const TResolvedValue&) = default;
+ TResolvedValue(TResolvedValue&&) = default;
+ TResolvedValue(const NKikimrBlobDepot::TEvResolveResult::TResolvedKey& item);
+
+ TResolvedValue& operator =(const TResolvedValue&) = default;
+ TResolvedValue& operator =(TResolvedValue&&) = default;
+
+ bool Supersedes(const TResolvedValue& old) const;
+ void Output(IOutputStream& s) const;
+ TString ToString() const;
+
+ bool IsEmpty() const { // check if no data attached
+ return Chain.empty();
+ }
+ };
+
+} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/agent/storage_discover.cpp b/ydb/core/blob_depot/agent/storage_discover.cpp
index 92b45b6b06..da5deaf459 100644
--- a/ydb/core/blob_depot/agent/storage_discover.cpp
+++ b/ydb/core/blob_depot/agent/storage_discover.cpp
@@ -16,6 +16,8 @@ namespace NKikimr::NBlobDepot {
TString Buffer;
ui32 BlockedGeneration = 0;
+ NKikimrBlobDepot::TEvResolve Resolve;
+
public:
using TBlobStorageQuery::TBlobStorageQuery;
@@ -23,6 +25,7 @@ namespace NKikimr::NBlobDepot {
BDEV_QUERY(BDEV16, "TEvDiscover_begin", (U.TabletId, Request.TabletId), (U.ReadBody, Request.ReadBody),
(U.MinGeneration, Request.MinGeneration));
+ GenerateInitialResolve();
IssueResolve();
if (Request.DiscoverBlockedGeneration) {
@@ -37,13 +40,12 @@ namespace NKikimr::NBlobDepot {
}
}
- void IssueResolve() {
+ void GenerateInitialResolve() {
const ui8 channel = 0;
const TLogoBlobID from(Request.TabletId, Request.MinGeneration, 0, channel, 0, 0);
const TLogoBlobID to(Request.TabletId, Max<ui32>(), Max<ui32>(), channel, TLogoBlobID::MaxBlobSize, TLogoBlobID::MaxCookie);
- NKikimrBlobDepot::TEvResolve resolve;
- auto *item = resolve.AddItems();
+ auto *item = Resolve.AddItems();
auto *range = item->MutableKeyRange();
range->SetBeginningKey(from.AsBinaryString());
range->SetIncludeBeginning(true);
@@ -53,24 +55,30 @@ namespace NKikimr::NBlobDepot {
range->SetReverse(true);
item->SetTabletId(Request.TabletId);
item->SetMustRestoreFirst(true);
+ }
- Agent.Issue(std::move(resolve), this, nullptr);
+ void IssueResolve() {
+ Agent.Issue(Resolve, this, nullptr);
}
void ProcessResponse(ui64 id, TRequestContext::TPtr context, TResponse response) override {
if (std::holds_alternative<TTabletDisconnected>(response)) {
return EndWithError(NKikimrProto::ERROR, "BlobDepot tablet disconnected");
} else if (auto *p = std::get_if<TEvBlobStorage::TEvGetResult*>(&response)) {
- Agent.HandleGetResult(context, **p);
+ TQuery::HandleGetResult(context, **p);
} else if (auto *p = std::get_if<TEvBlobDepot::TEvResolveResult*>(&response)) {
- HandleResolveResult(id, std::move(context), **p);
+ if (context) {
+ TQuery::HandleResolveResult(std::move(context), **p);
+ } else {
+ HandleResolveResult(id, std::move(context), **p);
+ }
} else {
Y_FAIL();
}
}
void OnUpdateBlock() override {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA18, "OnUpdateBlock", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA18, "OnUpdateBlock", (AgentId, Agent.LogId),
(QueryId, GetQueryId()));
const auto status = Agent.BlocksManager.CheckBlockForTablet(Request.TabletId, Max<ui32>(), this, &BlockedGeneration);
@@ -85,7 +93,7 @@ namespace NKikimr::NBlobDepot {
}
void HandleResolveResult(ui64 id, TRequestContext::TPtr context, TEvBlobDepot::TEvResolveResult& msg) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA19, "HandleResolveResult", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA19, "HandleResolveResult", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Msg, msg.Record));
Agent.BlobMappingCache.HandleResolveResult(id, msg.Record, nullptr);
@@ -102,19 +110,23 @@ namespace NKikimr::NBlobDepot {
return EndWithError(NKikimrProto::ERROR, TStringBuilder() << "failed to resolve blob# " << Id
<< ": " << item.GetErrorReason());
}
- Y_VERIFY(item.ValueChainSize() == 1);
if (Request.ReadBody) {
+ if (!item.ValueChainSize()) {
+ // FIXME(alexvru): hypothetically this can be considered normal and we may continue scan
+ return EndWithError(NKikimrProto::ERROR, TStringBuilder() << "empty ValueChain");
+ }
TReadArg arg{
- item.GetValueChain(),
+ item,
NKikimrBlobStorage::Discover,
true,
- this,
0,
0,
0,
- {}};
+ {},
+ item.GetKey(),
+ };
TString error;
- if (!Agent.IssueRead(arg, error)) {
+ if (!IssueRead(std::move(arg), error)) {
return EndWithError(NKikimrProto::ERROR, TStringBuilder() << "failed to read discovered blob: "
<< error);
}
@@ -135,19 +147,29 @@ namespace NKikimr::NBlobDepot {
}
void OnRead(ui64 /*tag*/, NKikimrProto::EReplyStatus status, TString dataOrErrorReason) override {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA20, "OnRead", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA20, "OnRead", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Status, status));
- if (status == NKikimrProto::OK) {
- Buffer = std::move(dataOrErrorReason);
- DoneWithData = true;
- CheckIfDone();
- } else if (status == NKikimrProto::NODATA) {
- // this may indicate a data race between locator and key value, we have to restart our resolution query
- IssueResolve();
- // FIXME: infinite cycle?
- } else {
- EndWithError(status, dataOrErrorReason);
+ switch (status) {
+ case NKikimrProto::OK:
+ Buffer = std::move(dataOrErrorReason);
+ DoneWithData = true;
+ CheckIfDone();
+ break;
+
+ case NKikimrProto::NODATA: {
+ // we are reading blob from the original group and it may be partially written -- it is totally
+ // okay to have some; we need to advance to the next readable blob
+ auto *range = Resolve.MutableItems(0)->MutableKeyRange();
+ range->SetEndingKey(Id.AsBinaryString());
+ range->ClearIncludeEnding();
+ IssueResolve();
+ break;
+ }
+
+ default:
+ EndWithError(status, std::move(dataOrErrorReason));
+ break;
}
}
diff --git a/ydb/core/blob_depot/agent/storage_get.cpp b/ydb/core/blob_depot/agent/storage_get.cpp
index 1a5ee96328..697dfb2d49 100644
--- a/ydb/core/blob_depot/agent/storage_get.cpp
+++ b/ydb/core/blob_depot/agent/storage_get.cpp
@@ -51,13 +51,13 @@ namespace NKikimr::NBlobDepot {
response.RequestedSize = query.Size;
TString blobId = query.Id.AsBinaryString();
- if (const TResolvedValueChain *value = Agent.BlobMappingCache.ResolveKey(blobId, this,
- std::make_shared<TResolveKeyContext>(i))) {
- if (!ProcessSingleResult(i, value, std::nullopt)) {
- return;
+ if (const TResolvedValue *value = Agent.BlobMappingCache.ResolveKey(blobId, this,
+ std::make_shared<TResolveKeyContext>(i), Request.MustRestoreFirst)) {
+ if (!ProcessSingleResult(i, value)) {
+ return; // error occured
}
} else {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA29, "resolve pending", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA29, "resolve pending", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (QueryIdx, i), (BlobId, query.Id));
}
}
@@ -65,51 +65,35 @@ namespace NKikimr::NBlobDepot {
CheckAndFinish();
}
- bool ProcessSingleResult(ui32 queryIdx, const TResolvedValueChain *value, const std::optional<TString>& errorReason) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA27, "ProcessSingleResult", (VirtualGroupId, Agent.VirtualGroupId),
- (QueryId, GetQueryId()), (QueryIdx, queryIdx), (Value, value), (ErrorReason, errorReason));
+ bool ProcessSingleResult(ui32 queryIdx, const TKeyResolved& result) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA27, "ProcessSingleResult", (AgentId, Agent.LogId),
+ (QueryId, GetQueryId()), (QueryIdx, queryIdx), (Result, result));
auto& r = Response->Responses[queryIdx];
Y_VERIFY(r.Status == NKikimrProto::UNKNOWN);
- if (errorReason) {
+ if (result.Error()) {
r.Status = NKikimrProto::ERROR;
--AnswersRemain;
- } else if (!value) {
+ } else if (const TResolvedValue *value = result.GetResolvedValue(); !value) {
r.Status = NKikimrProto::NODATA;
--AnswersRemain;
} else if (Request.IsIndexOnly) {
r.Status = NKikimrProto::OK;
--AnswersRemain;
} else {
+ Y_VERIFY(Request.MustRestoreFirst <= value->ReliablyWritten);
TReadArg arg{
*value,
Request.GetHandleClass,
Request.MustRestoreFirst,
- this,
Request.Queries[queryIdx].Shift,
Request.Queries[queryIdx].Size,
queryIdx,
- Request.ReaderTabletData};
- TString error;
- auto makeValueChain = [&] {
- TStringStream str;
- str << '[';
- for (int i = 0; i < value->size(); ++i) {
- const auto& item = value->at(i);
- if (i != 0) {
- str << ' ';
- }
- const auto blobId = LogoBlobIDFromLogoBlobID(item.GetBlobId());
- const ui64 subrangeBegin = item.GetSubrangeBegin();
- const ui64 subrangeEnd = item.HasSubrangeEnd() ? item.GetSubrangeEnd() : blobId.BlobSize();
- str << blobId << '@' << item.GetGroupId() << '{' << subrangeBegin << '-' << (subrangeEnd - 1) << '}';
- }
- str << ']';
- return str.Str();
+ Request.ReaderTabletData,
+ Request.Queries[queryIdx].Id.AsBinaryString(),
};
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA34, "IssueRead", (VirtualGroupId, Agent.VirtualGroupId),
- (Offset, arg.Offset), (Size, arg.Size), (ValueChain, makeValueChain()), (Tag, arg.Tag));
- const bool success = Agent.IssueRead(arg, error);
+ TString error;
+ const bool success = IssueRead(std::move(arg), error);
if (!success) {
EndWithError(NKikimrProto::ERROR, std::move(error));
return false;
@@ -119,9 +103,10 @@ namespace NKikimr::NBlobDepot {
}
void OnRead(ui64 tag, NKikimrProto::EReplyStatus status, TString buffer) override {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA35, "OnRead", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA35, "OnRead", (AgentId, Agent.LogId), (QueryId, GetQueryId()),
(Tag, tag), (Status, status), (Buffer.size, status == NKikimrProto::OK ? buffer.size() : 0),
(ErrorReason, status != NKikimrProto::OK ? buffer : ""));
+
auto& resp = Response->Responses[tag];
Y_VERIFY(resp.Status == NKikimrProto::UNKNOWN);
resp.Status = status;
@@ -172,13 +157,15 @@ namespace NKikimr::NBlobDepot {
void ProcessResponse(ui64 /*id*/, TRequestContext::TPtr context, TResponse response) override {
if (auto *p = std::get_if<TKeyResolved>(&response)) {
- ProcessSingleResult(context->Obtain<TResolveKeyContext>().QueryIdx, p->ValueChain, p->ErrorReason);
+ ProcessSingleResult(context->Obtain<TResolveKeyContext>().QueryIdx, *p);
CheckAndFinish();
} else if (auto *p = std::get_if<TEvBlobStorage::TEvGetResult*>(&response)) {
- Agent.HandleGetResult(context, **p);
+ TQuery::HandleGetResult(context, **p);
+ } else if (auto *p = std::get_if<TEvBlobDepot::TEvResolveResult*>(&response)) {
+ TQuery::HandleResolveResult(context, **p);
} else if (std::holds_alternative<TTabletDisconnected>(response)) {
if (auto *resolveContext = dynamic_cast<TResolveKeyContext*>(context.get())) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA26, "TTabletDisconnected", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA26, "TTabletDisconnected", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (QueryIdx, resolveContext->QueryIdx));
Response->Responses[resolveContext->QueryIdx].Status = NKikimrProto::ERROR;
--AnswersRemain;
diff --git a/ydb/core/blob_depot/agent/storage_put.cpp b/ydb/core/blob_depot/agent/storage_put.cpp
index cf65a13cbe..856d4e9019 100644
--- a/ydb/core/blob_depot/agent/storage_put.cpp
+++ b/ydb/core/blob_depot/agent/storage_put.cpp
@@ -80,7 +80,7 @@ namespace NKikimr::NBlobDepot {
auto& kind = it->second;
std::optional<TBlobSeqId> blobSeqId = kind.Allocate(Agent);
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA21, "allocated BlobSeqId", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA21, "allocated BlobSeqId", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (BlobSeqId, blobSeqId), (BlobId, Request.Id));
if (!blobSeqId) {
return kind.EnqueueQueryWaitingForId(this);
@@ -124,6 +124,7 @@ namespace NKikimr::NBlobDepot {
ev->ExtraBlockChecks.emplace_back(Request.Id.TabletID(), Request.Id.Generation());
BDEV_QUERY(BDEV10, "TEvPut_sendToProxy", (BlobSeqId, BlobSeqId), (GroupId, groupId), (BlobId, id));
Agent.SendToProxy(groupId, std::move(ev), this, nullptr);
+ Agent.BytesWritten += id.BlobSize();
++PutsInFlight;
};
@@ -157,7 +158,7 @@ namespace NKikimr::NBlobDepot {
item->ClearUncertainWrite();
}
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA30, "IssueCommitBlobSeq", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA30, "IssueCommitBlobSeq", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (UncertainWrite, uncertainWrite), (Msg, CommitBlobSeq));
Agent.Issue(CommitBlobSeq, this, nullptr);
@@ -167,7 +168,7 @@ namespace NKikimr::NBlobDepot {
}
void RemoveBlobSeqFromInFlight() {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA32, "RemoveBlobSeqFromInFlight", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA32, "RemoveBlobSeqFromInFlight", (AgentId, Agent.LogId),
(QueryId, GetQueryId()));
Y_VERIFY(IsInFlight);
@@ -188,8 +189,12 @@ namespace NKikimr::NBlobDepot {
CheckBlocks(); // just restart request
}
- void OnIdAllocated() override {
- IssuePuts();
+ void OnIdAllocated(bool success) override {
+ if (success) {
+ IssuePuts();
+ } else {
+ EndWithError(NKikimrProto::ERROR, "out of space");
+ }
}
void ProcessResponse(ui64 /*id*/, TRequestContext::TPtr context, TResponse response) override {
@@ -205,7 +210,7 @@ namespace NKikimr::NBlobDepot {
}
void HandlePutResult(TRequestContext::TPtr /*context*/, TEvBlobStorage::TEvPutResult& msg) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA22, "TEvPutResult", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA22, "TEvPutResult", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Msg, msg));
BDEV_QUERY(BDEV11, "TEvPut_resultFromProxy", (BlobId, msg.Id), (Status, msg.Status),
@@ -235,7 +240,7 @@ namespace NKikimr::NBlobDepot {
}
void HandleCommitBlobSeqResult(TRequestContext::TPtr /*context*/, NKikimrBlobDepot::TEvCommitBlobSeqResult& msg) {
- STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA31, "TEvCommitBlobSeqResult", (VirtualGroupId, Agent.VirtualGroupId),
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA31, "TEvCommitBlobSeqResult", (AgentId, Agent.LogId),
(QueryId, GetQueryId()), (Msg, msg));
Y_VERIFY(WaitingForCommitBlobSeq);
diff --git a/ydb/core/blob_depot/agent/storage_range.cpp b/ydb/core/blob_depot/agent/storage_range.cpp
index 0a4f4e89f4..d9a2b049f6 100644
--- a/ydb/core/blob_depot/agent/storage_range.cpp
+++ b/ydb/core/blob_depot/agent/storage_range.cpp
@@ -5,11 +5,14 @@ namespace NKikimr::NBlobDepot {
template<>
TBlobDepotAgent::TQuery *TBlobDepotAgent::CreateQuery<TEvBlobStorage::EvRange>(std::unique_ptr<IEventHandle> ev) {
class TRangeQuery : public TBlobStorageQuery<TEvBlobStorage::TEvRange> {
+ struct TRead {
+ TLogoBlobID Id;
+ };
+
std::unique_ptr<TEvBlobStorage::TEvRangeResult> Response;
ui32 ReadsInFlight = 0;
- ui32 ResolvesInFlight = 0;
std::map<TLogoBlobID, TString> FoundBlobs;
- std::vector<TLogoBlobID> Reads;
+ std::vector<TRead> Reads;
bool Reverse = false;
bool Finished = false;
@@ -23,10 +26,7 @@ namespace NKikimr::NBlobDepot {
Response = std::make_unique<TEvBlobStorage::TEvRangeResult>(NKikimrProto::OK, Request.From, Request.To,
Agent.VirtualGroupId);
- IssueResolve();
- }
-
- void IssueResolve() {
+ // issue resolve query
TString from = Request.From.AsBinaryString();
TString to = Request.To.AsBinaryString();
Reverse = Request.To < Request.From;
@@ -46,25 +46,17 @@ namespace NKikimr::NBlobDepot {
item->SetMustRestoreFirst(Request.MustRestoreFirst);
Agent.Issue(std::move(resolve), this, nullptr);
- ++ResolvesInFlight;
- }
-
- void IssueResolve(TLogoBlobID id) {
- NKikimrBlobDepot::TEvResolve resolve;
- auto *item = resolve.AddItems();
- item->SetExactKey(id.AsBinaryString());
- item->SetTabletId(Request.TabletId);
- item->SetMustRestoreFirst(Request.MustRestoreFirst);
-
- Agent.Issue(std::move(resolve), this, nullptr);
- ++ResolvesInFlight;
}
void ProcessResponse(ui64 id, TRequestContext::TPtr context, TResponse response) override {
if (auto *p = std::get_if<TEvBlobDepot::TEvResolveResult*>(&response)) {
- HandleResolveResult(id, std::move(context), (*p)->Record);
+ if (context) {
+ TQuery::HandleResolveResult(std::move(context), **p);
+ } else {
+ HandleResolveResult(id, std::move(context), (*p)->Record);
+ }
} else if (auto *p = std::get_if<TEvBlobStorage::TEvGetResult*>(&response)) {
- Agent.HandleGetResult(context, **p);
+ TQuery::HandleGetResult(context, **p);
} else if (std::holds_alternative<TTabletDisconnected>(response)) {
EndWithError(NKikimrProto::ERROR, "BlobDepot tablet disconnected");
} else {
@@ -73,7 +65,8 @@ namespace NKikimr::NBlobDepot {
}
void HandleResolveResult(ui64 id, TRequestContext::TPtr context, NKikimrBlobDepot::TEvResolveResult& msg) {
- --ResolvesInFlight;
+ STLOG(PRI_DEBUG, BLOB_DEPOT_AGENT, BDA47, "HandleResolveResult", (AgentId, Agent.LogId),
+ (QueryId, GetQueryId()), (Msg, msg));
if (msg.GetStatus() != NKikimrProto::OK && msg.GetStatus() != NKikimrProto::OVERRUN) {
return EndWithError(msg.GetStatus(), msg.GetErrorReason());
@@ -86,27 +79,31 @@ namespace NKikimr::NBlobDepot {
if (key.HasErrorReason()) {
return EndWithError(NKikimrProto::ERROR, TStringBuilder() << "failed to resolve blob# " << id
<< ": " << key.GetErrorReason());
- } else if (!Request.IsIndexOnly) {
+ } else if (Request.IsIndexOnly) {
+ FoundBlobs.try_emplace(id);
+ } else if (key.ValueChainSize()) {
+ const ui64 tag = key.HasCookie() ? key.GetCookie() : Reads.size();
+ if (tag == Reads.size()) {
+ Reads.push_back(TRead{id});
+ } else {
+ Y_VERIFY(Reads[tag].Id == id);
+ }
TReadArg arg{
- key.GetValueChain(),
+ key,
NKikimrBlobStorage::EGetHandleClass::FastRead,
Request.MustRestoreFirst,
- this,
0,
0,
- Reads.size(),
- {}};
- Reads.push_back(id);
+ tag,
+ {},
+ key.GetKey(),
+ };
++ReadsInFlight;
TString error;
- if (!Agent.IssueRead(arg, error)) {
+ if (!IssueRead(std::move(arg), error)) {
return EndWithError(NKikimrProto::ERROR, TStringBuilder() << "failed to read discovered blob: "
<< error);
}
- } else if (Request.MustRestoreFirst) {
- Y_FAIL("not implemented yet");
- } else {
- FoundBlobs.try_emplace(id);
}
}
@@ -120,34 +117,36 @@ namespace NKikimr::NBlobDepot {
void OnRead(ui64 tag, NKikimrProto::EReplyStatus status, TString dataOrErrorReason) override {
--ReadsInFlight;
+ Y_VERIFY(tag < Reads.size());
+ TRead& read = Reads[tag];
+
switch (status) {
case NKikimrProto::OK: {
- const bool inserted = FoundBlobs.try_emplace(Reads[tag], std::move(dataOrErrorReason)).second;
- Y_VERIFY(inserted);
+ Y_VERIFY(dataOrErrorReason.size() == read.Id.BlobSize());
+ const bool inserted = FoundBlobs.try_emplace(read.Id, std::move(dataOrErrorReason)).second;
+ Y_VERIFY_S(inserted, "AgentId# " << Agent.LogId << " QueryId# " << GetQueryId()
+ << " duplicate BlobId# " << read.Id << " received");
break;
}
case NKikimrProto::NODATA:
- IssueResolve(Reads[tag]);
+ // this blob has just vanished since we found it in index -- may be it was partially written and
+ // now gone; it's okay to have this situation, not a data loss
break;
default:
return EndWithError(status, TStringBuilder() << "failed to retrieve BlobId# "
- << Reads[tag] << " Error# " << dataOrErrorReason);
+ << read.Id << " Error# " << dataOrErrorReason);
}
CheckAndFinish();
}
void CheckAndFinish() {
- if (!ReadsInFlight && !ResolvesInFlight && !Finished) {
+ if (!ReadsInFlight && !Finished) {
for (auto& [id, buffer] : FoundBlobs) {
- if (!Request.IsIndexOnly) {
- Y_VERIFY_S(buffer.size() == id.BlobSize(), "Id# " << id << " Buffer.size# " << buffer.size());
- }
- if (buffer || Request.IsIndexOnly) {
- Response->Responses.emplace_back(id, std::move(buffer));
- }
+ Y_VERIFY_S(buffer.size() == Request.IsIndexOnly ? 0 : id.BlobSize(), "Id# " << id << " Buffer.size# " << buffer.size());
+ Response->Responses.emplace_back(id, std::move(buffer));
}
if (Reverse) {
std::reverse(Response->Responses.begin(), Response->Responses.end());
diff --git a/ydb/core/blob_depot/assimilator.cpp b/ydb/core/blob_depot/assimilator.cpp
index 85afed1f7d..dd9d4dd5df 100644
--- a/ydb/core/blob_depot/assimilator.cpp
+++ b/ydb/core/blob_depot/assimilator.cpp
@@ -16,30 +16,36 @@ namespace NKikimr::NBlobDepot {
};
};
- class TAssimilator::TTxCommitAssimilatedBlob : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
- const TActorId AssimilatorId;
+ class TBlobDepot::TData::TTxCommitAssimilatedBlob : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
const NKikimrProto::EReplyStatus Status;
const TBlobSeqId BlobSeqId;
const TData::TKey Key;
- const ui64 GetId;
+ const ui32 NotifyEventType;
+ const TActorId ParentId;
+ const ui64 Cookie;
+ const bool Keep;
+ const bool DoNotKeep;
public:
TTxType GetTxType() const override { return NKikimrBlobDepot::TXTYPE_COMMIT_ASSIMILATED_BLOB; }
- TTxCommitAssimilatedBlob(TAssimilator *self, NKikimrProto::EReplyStatus status, TBlobSeqId blobSeqId, TData::TKey key,
- ui64 getId)
- : TTransactionBase(self->Self)
- , AssimilatorId(self->SelfId())
+ TTxCommitAssimilatedBlob(TBlobDepot *self, NKikimrProto::EReplyStatus status, TBlobSeqId blobSeqId,
+ TData::TKey key, ui32 notifyEventType, TActorId parentId, ui64 cookie, bool keep, bool doNotKeep)
+ : TTransactionBase(self)
, Status(status)
, BlobSeqId(blobSeqId)
, Key(std::move(key))
- , GetId(getId)
+ , NotifyEventType(notifyEventType)
+ , ParentId(parentId)
+ , Cookie(cookie)
+ , Keep(keep)
+ , DoNotKeep(doNotKeep)
{}
bool Execute(TTransactionContext& txc, const TActorContext&) override {
if (Status == NKikimrProto::OK) {
Y_VERIFY(!Self->Data->CanBeCollected(BlobSeqId));
- Self->Data->BindToBlob(Key, BlobSeqId, txc, this);
+ Self->Data->BindToBlob(Key, BlobSeqId, Keep, DoNotKeep, txc, this);
} else if (Status == NKikimrProto::NODATA) {
if (const TData::TValue *value = Self->Data->FindKey(Key); value && value->GoingToAssimilate) {
Self->Data->DeleteKey(Key, txc, this);
@@ -60,7 +66,7 @@ namespace NKikimr::NBlobDepot {
}
}
Self->Data->CommitTrash(this);
- TActivationContext::Send(new IEventHandle(TEvPrivate::EvTxComplete, 0, AssimilatorId, {}, nullptr, GetId));
+ TActivationContext::Send(new IEventHandle(NotifyEventType, 0, ParentId, {}, nullptr, Cookie));
}
};
@@ -103,13 +109,13 @@ namespace NKikimr::NBlobDepot {
switch (const ui32 type = ev->GetTypeRewrite()) {
hFunc(TEvBlobStorage::TEvAssimilateResult, Handle);
- hFunc(TEvents::TEvUndelivered, Handle);
hFunc(TEvBlobStorage::TEvGetResult, Handle);
hFunc(TEvBlobStorage::TEvPutResult, Handle);
hFunc(TEvTabletPipe::TEvClientConnected, Handle);
hFunc(TEvTabletPipe::TEvClientDestroyed, Handle);
hFunc(TEvBlobStorage::TEvControllerGroupDecommittedResponse, Handle);
cFunc(TEvPrivate::EvResume, Action);
+ cFunc(TEvPrivate::EvResumeScanDataForCopying, HandleResumeScanDataForCopying);
fFunc(TEvPrivate::EvTxComplete, HandleTxComplete);
cFunc(TEvents::TSystem::Poison, PassAway);
@@ -121,14 +127,20 @@ namespace NKikimr::NBlobDepot {
}
void TAssimilator::Action() {
+ Y_VERIFY(!ActionInProgress);
+ ActionInProgress = true;
+
if (Self->DecommitState < EDecommitState::BlobsFinished) {
SendAssimilateRequest();
} else if (Self->DecommitState < EDecommitState::BlobsCopied) {
ScanDataForCopying();
} else if (Self->DecommitState == EDecommitState::BlobsCopied) {
+ Y_VERIFY(!PipeId);
CreatePipe();
} else if (Self->DecommitState != EDecommitState::Done) {
Y_UNREACHABLE();
+ } else {
+ Y_UNREACHABLE();
}
}
@@ -140,13 +152,6 @@ namespace NKikimr::NBlobDepot {
SkipBarriersUpTo, SkipBlobsUpTo));
}
- void TAssimilator::Handle(TEvents::TEvUndelivered::TPtr ev) {
- STLOG(PRI_ERROR, BLOB_DEPOT, BDT55, "received TEvUndelivered", (Id, Self->GetLogId()), (Sender, ev->Sender),
- (Cookie, ev->Cookie), (Type, ev->Get()->SourceType), (Reason, ev->Get()->Reason));
- TActivationContext::Schedule(TDuration::Seconds(1), new IEventHandle(TEvPrivate::EvResume, 0, SelfId(), {},
- nullptr, 0));
- }
-
void TAssimilator::Handle(TEvBlobStorage::TEvAssimilateResult::TPtr ev) {
class TTxPutAssimilatedData : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
TAssimilator* const Self;
@@ -259,6 +264,7 @@ namespace NKikimr::NBlobDepot {
Self->Self->ProcessRegisterAgentQ();
}
+ Self->ActionInProgress = false;
Self->Action();
}
}
@@ -270,6 +276,7 @@ namespace NKikimr::NBlobDepot {
STLOG(PRI_INFO, BLOB_DEPOT, BDT75, "TEvAssimilate failed", (Id, Self->GetLogId()),
(Status, ev->Get()->Status), (ErrorReason, ev->Get()->ErrorReason));
+ ActionInProgress = false;
Action();
}
}
@@ -307,15 +314,19 @@ namespace NKikimr::NBlobDepot {
}
};
- Self->Data->ScanRange(LastScannedKey ? std::make_optional<TData::TKey>(*LastScannedKey) : std::nullopt,
- std::optional<TData::TKey>(), {}, callback);
+ TData::TScanRange r{LastScannedKey ? TData::TKey(*LastScannedKey) : TData::TKey::Min(), TData::TKey::Max()};
+ Self->Data->ScanRange(r, nullptr, nullptr, callback);
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT56, "ScanDataForCopying step", (Id, Self->GetLogId()),
(LastScannedKey, LastScannedKey), (ScanQ.size, ScanQ.size()), (TotalSize, TotalSize),
(EntriesToProcess, EntriesToProcess), (Timeout, timeout), (NumGetsUnprocessed, GetIdToUnprocessedPuts.size()));
if (timeout) { // timeout hit, reschedule work
- TActivationContext::Send(new IEventHandle(TEvPrivate::EvResume, 0, SelfId(), {}, nullptr, 0));
+ if (!ResumeScanDataForCopyingInFlight) {
+ TActivationContext::Send(new IEventHandle(TEvPrivate::EvResumeScanDataForCopying, 0, SelfId(), {}, nullptr, 0));
+ ResumeScanDataForCopyingInFlight = true;
+ }
+ break;
} else if (!ScanQ.empty()) {
using TQuery = TEvBlobStorage::TEvGet::TQuery;
const ui32 sz = ScanQ.size();
@@ -344,6 +355,12 @@ namespace NKikimr::NBlobDepot {
}
}
+ void TAssimilator::HandleResumeScanDataForCopying() {
+ Y_VERIFY(ResumeScanDataForCopyingInFlight);
+ ResumeScanDataForCopyingInFlight = false;
+ ScanDataForCopying();
+ }
+
void TAssimilator::Handle(TEvBlobStorage::TEvGetResult::TPtr ev) {
auto& msg = *ev->Get();
const auto it = GetIdToUnprocessedPuts.find(ev->Cookie);
@@ -355,22 +372,23 @@ namespace NKikimr::NBlobDepot {
(Status, resp.Status), (NumGetsUnprocessed, GetIdToUnprocessedPuts.size()));
if (resp.Status == NKikimrProto::OK) {
std::vector<ui8> channels(1);
- Self->PickChannels(NKikimrBlobDepot::TChannelKind::Data, channels);
- TChannelInfo& channel = Self->Channels[channels.front()];
- const ui64 value = channel.NextBlobSeqId++;
- const auto blobSeqId = TBlobSeqId::FromSequentalNumber(channel.Index, Self->Executor()->Generation(), value);
- const TLogoBlobID id = blobSeqId.MakeBlobId(Self->TabletID(), EBlobType::VG_DATA_BLOB, 0, resp.Id.BlobSize());
- const ui64 putId = NextPutId++;
- SendToBSProxy(SelfId(), channel.GroupId, new TEvBlobStorage::TEvPut(id, resp.Buffer, TInstant::Max()), putId);
- const bool inserted = channel.AssimilatedBlobsInFlight.insert(value).second; // prevent from barrier advancing
- Y_VERIFY(inserted);
- const bool inserted1 = PutIdToKey.try_emplace(putId, TData::TKey(resp.Id), it->first).second;
- Y_VERIFY(inserted1);
- ++it->second;
- getBytes += id.BlobSize();
+ if (Self->PickChannels(NKikimrBlobDepot::TChannelKind::Data, channels)) {
+ TChannelInfo& channel = Self->Channels[channels.front()];
+ const ui64 value = channel.NextBlobSeqId++;
+ const auto blobSeqId = TBlobSeqId::FromSequentalNumber(channel.Index, Self->Executor()->Generation(), value);
+ const TLogoBlobID id = blobSeqId.MakeBlobId(Self->TabletID(), EBlobType::VG_DATA_BLOB, 0, resp.Id.BlobSize());
+ const ui64 putId = NextPutId++;
+ SendToBSProxy(SelfId(), channel.GroupId, new TEvBlobStorage::TEvPut(id, resp.Buffer, TInstant::Max()), putId);
+ const bool inserted = channel.AssimilatedBlobsInFlight.insert(value).second; // prevent from barrier advancing
+ Y_VERIFY(inserted);
+ const bool inserted1 = PutIdToKey.try_emplace(putId, TData::TKey(resp.Id), it->first).second;
+ Y_VERIFY(inserted1);
+ ++it->second;
+ }
+ getBytes += resp.Id.BlobSize();
} else if (resp.Status == NKikimrProto::NODATA) {
- Self->Execute(std::make_unique<TTxCommitAssimilatedBlob>(this, NKikimrProto::NODATA, TBlobSeqId(),
- TData::TKey(resp.Id), it->first));
+ Self->Data->ExecuteTxCommitAssimilatedBlob(NKikimrProto::NODATA, TBlobSeqId(), TData::TKey(resp.Id),
+ TEvPrivate::EvTxComplete, SelfId(), it->first);
++it->second;
}
}
@@ -379,7 +397,9 @@ namespace NKikimr::NBlobDepot {
}
if (!it->second) {
GetIdToUnprocessedPuts.erase(it);
- Action();
+ if (!ResumeScanDataForCopyingInFlight) {
+ ScanDataForCopying();
+ }
}
}
@@ -388,7 +408,9 @@ namespace NKikimr::NBlobDepot {
Y_VERIFY(it != GetIdToUnprocessedPuts.end());
if (!--it->second) {
GetIdToUnprocessedPuts.erase(it);
- Action();
+ if (!ResumeScanDataForCopyingInFlight) {
+ ScanDataForCopying();
+ }
}
}
@@ -402,13 +424,14 @@ namespace NKikimr::NBlobDepot {
const auto& [key, getId] = it->second;
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT37, "got TEvPutResult", (Id, Self->GetLogId()), (Msg, msg),
(NumGetsUnprocessed, GetIdToUnprocessedPuts.size()), (Key, key));
- Self->Execute(std::make_unique<TTxCommitAssimilatedBlob>(this, msg.Status, TBlobSeqId::FromLogoBlobId(msg.Id),
- std::move(key), getId));
+ Self->Data->ExecuteTxCommitAssimilatedBlob(msg.Status, TBlobSeqId::FromLogoBlobId(msg.Id), std::move(key),
+ TEvPrivate::EvTxComplete, SelfId(), getId);
PutIdToKey.erase(it);
}
void TAssimilator::OnCopyDone() {
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT38, "data copying is done", (Id, Self->GetLogId()));
+ Y_VERIFY(GetIdToUnprocessedPuts.empty());
class TTxFinishCopying : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
TAssimilator* const Self;
@@ -431,10 +454,12 @@ namespace NKikimr::NBlobDepot {
}
void Complete(const TActorContext&) override {
+ Self->ActionInProgress = false;
Self->Action();
}
};
+ Y_VERIFY(ActionInProgress);
Self->Execute(std::make_unique<TTxFinishCopying>(this));
}
@@ -463,7 +488,7 @@ namespace NKikimr::NBlobDepot {
const NKikimrProto::EReplyStatus status = msg.Record.GetStatus();
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT41, "received TEvControllerGroupDecommittedResponse", (Id, Self->GetLogId()),
(Status, status));
- if (status == NKikimrProto::OK) {
+ if (status == NKikimrProto::OK || status == NKikimrProto::ALREADY) {
class TTxFinishDecommission : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
public:
TTxType GetTxType() const override { return NKikimrBlobDepot::TXTYPE_FINISH_DECOMMISSION; }
@@ -489,7 +514,7 @@ namespace NKikimr::NBlobDepot {
PassAway();
} else {
NTabletPipe::CloseAndForgetClient(SelfId(), PipeId);
- Action();
+ TActivationContext::Schedule(TDuration::Seconds(5), new IEventHandle(TEvPrivate::EvResume, 0, SelfId(), {}, nullptr, 0));
}
}
@@ -515,8 +540,14 @@ namespace NKikimr::NBlobDepot {
return stream.Str();
}
+ void TBlobDepot::TData::ExecuteTxCommitAssimilatedBlob(NKikimrProto::EReplyStatus status, TBlobSeqId blobSeqId,
+ TData::TKey key, ui32 notifyEventType, TActorId parentId, ui64 cookie, bool keep, bool doNotKeep) {
+ Self->Execute(std::make_unique<TTxCommitAssimilatedBlob>(Self, status, blobSeqId, std::move(key),
+ notifyEventType, parentId, cookie, keep, doNotKeep));
+ }
+
void TBlobDepot::StartGroupAssimilator() {
- if (Config.GetIsDecommittingGroup()) {
+ if (Config.GetIsDecommittingGroup() && DecommitState != EDecommitState::Done) {
Y_VERIFY(!GroupAssimilatorId);
Y_VERIFY(Data->IsLoaded());
GroupAssimilatorId = RegisterWithSameMailbox(new TGroupAssimilator(this));
diff --git a/ydb/core/blob_depot/assimilator.h b/ydb/core/blob_depot/assimilator.h
index 427097f4d0..bb54cd14a0 100644
--- a/ydb/core/blob_depot/assimilator.h
+++ b/ydb/core/blob_depot/assimilator.h
@@ -10,6 +10,7 @@ namespace NKikimr::NBlobDepot {
struct TEvPrivate {
enum {
EvResume = EventSpaceBegin(TEvents::ES_PRIVATE),
+ EvResumeScanDataForCopying,
EvTxComplete,
};
};
@@ -38,7 +39,8 @@ namespace NKikimr::NBlobDepot {
ui64 NextPutId = 1;
THashMap<ui64, std::tuple<TData::TKey, ui64>> PutIdToKey;
- class TTxCommitAssimilatedBlob;
+ bool ActionInProgress = false;
+ bool ResumeScanDataForCopyingInFlight = false;
public:
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
@@ -59,9 +61,9 @@ namespace NKikimr::NBlobDepot {
private:
void Action();
void SendAssimilateRequest();
- void Handle(TEvents::TEvUndelivered::TPtr ev);
void Handle(TEvBlobStorage::TEvAssimilateResult::TPtr ev);
void ScanDataForCopying();
+ void HandleResumeScanDataForCopying();
void Handle(TEvBlobStorage::TEvGetResult::TPtr ev);
void HandleTxComplete(TAutoPtr<IEventHandle> ev);
void Handle(TEvBlobStorage::TEvPutResult::TPtr ev);
diff --git a/ydb/core/blob_depot/blob_depot.cpp b/ydb/core/blob_depot/blob_depot.cpp
index 8c5e1627a2..60aa159111 100644
--- a/ydb/core/blob_depot/blob_depot.cpp
+++ b/ydb/core/blob_depot/blob_depot.cpp
@@ -48,7 +48,9 @@ namespace NKikimr::NBlobDepot {
try {
auto handleFromAgentPipe = [this](auto& ev) {
const auto it = PipeServers.find(ev->Recipient);
- Y_VERIFY(it != PipeServers.end());
+ if (it == PipeServers.end()) {
+ return; // this may be a race with TEvServerDisconnected and postpone queue; it's okay to have this
+ }
auto& info = it->second;
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT69, "HandleFromAgentPipe", (Id, GetLogId()), (RequestId, ev->Cookie),
@@ -84,10 +86,11 @@ namespace NKikimr::NBlobDepot {
fFunc(TEvBlobDepot::EvPushNotifyResult, handleFromAgentPipe);
fFunc(TEvBlobDepot::EvCollectGarbage, handleFromAgentPipe);
+ hFunc(TEvBlobDepot::TEvPushMetrics, Handle);
+
cFunc(TEvPrivate::EvProcessRegisterAgentQ, ProcessRegisterAgentQ);
hFunc(TEvBlobStorage::TEvCollectGarbageResult, Data->Handle);
- hFunc(TEvBlobStorage::TEvRangeResult, Data->Handle);
hFunc(TEvBlobStorage::TEvGetResult, Data->UncertaintyResolver->Handle);
hFunc(TEvBlobStorage::TEvStatusResult, SpaceMonitor->Handle);
@@ -99,6 +102,7 @@ namespace NKikimr::NBlobDepot {
cFunc(TEvPrivate::EvCommitCertainKeys, Data->HandleCommitCertainKeys);
cFunc(TEvPrivate::EvDoGroupMetricsExchange, DoGroupMetricsExchange);
hFunc(TEvBlobStorage::TEvControllerGroupMetricsExchange, Handle);
+ cFunc(TEvPrivate::EvUpdateThroughputs, UpdateThroughputs);
default:
if (!HandleDefaultEvents(ev, ctx)) {
@@ -179,22 +183,31 @@ namespace NKikimr::NBlobDepot {
}
}
- void TBlobDepot::PickChannels(NKikimrBlobDepot::TChannelKind::E kind, std::vector<ui8>& channels) {
+ bool TBlobDepot::PickChannels(NKikimrBlobDepot::TChannelKind::E kind, std::vector<ui8>& channels) {
const auto kindIt = ChannelKinds.find(kind);
Y_VERIFY(kindIt != ChannelKinds.end());
auto& kindv = kindIt->second;
if (kindv.GroupAccumWeights.empty()) {
- // recalculate group weights
- ui64 accum = 0;
- THashSet<ui32> seenGroups;
- for (const auto& [channel, groupId] : kindv.ChannelGroups) {
- if (const auto& [_, inserted] = seenGroups.insert(groupId); inserted) {
- accum += SpaceMonitor->GetGroupAllocationWeight(groupId);
- kindv.GroupAccumWeights.emplace_back(groupId, accum);
+ for (const bool stopOnLightYellow : {true, false}) {
+ // recalculate group weights
+ ui64 accum = 0;
+ THashSet<ui32> seenGroups;
+ for (const auto& [channel, groupId] : kindv.ChannelGroups) {
+ if (const auto& [_, inserted] = seenGroups.insert(groupId); inserted) {
+ if (const ui64 w = SpaceMonitor->GetGroupAllocationWeight(groupId, stopOnLightYellow)) {
+ accum += w;
+ kindv.GroupAccumWeights.emplace_back(groupId, accum);
+ }
+ }
}
+ if (!kindv.GroupAccumWeights.empty()) {
+ break;
+ }
+ }
+ if (kindv.GroupAccumWeights.empty()) {
+ return false; // no allocation possible
}
- Y_VERIFY(!kindv.GroupAccumWeights.empty());
}
const auto [_, accum] = kindv.GroupAccumWeights.back();
@@ -216,6 +229,8 @@ namespace NKikimr::NBlobDepot {
const size_t channelIndex = RandomNumber(channels.size());
channel = channels[channelIndex];
}
+
+ return true;
}
IActor *CreateBlobDepot(const TActorId& tablet, TTabletStorageInfo *info) {
diff --git a/ydb/core/blob_depot/blob_depot_tablet.h b/ydb/core/blob_depot/blob_depot_tablet.h
index e229220259..277257d211 100644
--- a/ydb/core/blob_depot/blob_depot_tablet.h
+++ b/ydb/core/blob_depot/blob_depot_tablet.h
@@ -15,6 +15,8 @@ namespace NKikimr::NBlobDepot {
using NTabletFlatExecutor::TTabletExecutedFlat;
+ struct TToken {};
+
class TBlobDepot
: public TActor<TBlobDepot>
, public TTabletExecutedFlat
@@ -26,6 +28,7 @@ namespace NKikimr::NBlobDepot {
EvDoGroupMetricsExchange,
EvKickSpaceMonitor,
EvProcessRegisterAgentQ,
+ EvUpdateThroughputs,
};
};
@@ -50,7 +53,6 @@ namespace NKikimr::NBlobDepot {
static constexpr TDuration ExpirationTimeout = TDuration::Minutes(1);
- struct TToken {};
std::shared_ptr<TToken> Token = std::make_shared<TToken>();
struct TAgent {
@@ -176,6 +178,7 @@ namespace NKikimr::NBlobDepot {
ProcessRegisterAgentQ();
KickSpaceMonitor();
StartDataLoad();
+ UpdateThroughputs();
}
void StartDataLoad();
@@ -197,16 +200,21 @@ namespace NKikimr::NBlobDepot {
void InitChannelKinds();
void InvalidateGroupForAllocation(ui32 groupId);
- void PickChannels(NKikimrBlobDepot::TChannelKind::E kind, std::vector<ui8>& channels);
+ bool PickChannels(NKikimrBlobDepot::TChannelKind::E kind, std::vector<ui8>& channels);
TString GetLogId() const {
const auto *executor = Executor();
const ui32 generation = executor ? executor->Generation() : 0;
+ TStringBuilder sb;
+ sb << '{' << TabletID();
if (Config.HasVirtualGroupId()) {
- return TStringBuilder() << "{" << TabletID() << ":" << generation << "@" << Config.GetVirtualGroupId() << "}";
- } else {
- return TStringBuilder() << "{" << TabletID() << ":" << generation << "}";
+ sb << '@' << Config.GetVirtualGroupId();
}
+ sb << '}';
+ if (generation) {
+ sb << ':' << generation;
+ }
+ return sb;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -302,8 +310,14 @@ namespace NKikimr::NBlobDepot {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Group metrics exchange
+ ui64 BytesRead = 0;
+ ui64 BytesWritten = 0;
+ std::deque<std::tuple<TMonotonic, ui64, ui64>> MetricsQ;
+
void DoGroupMetricsExchange();
void Handle(TEvBlobStorage::TEvControllerGroupMetricsExchange::TPtr ev);
+ void Handle(TEvBlobDepot::TEvPushMetrics::TPtr ev);
+ void UpdateThroughputs(bool reschedule = true);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Validation
diff --git a/ydb/core/blob_depot/blocks.cpp b/ydb/core/blob_depot/blocks.cpp
index a5ee2c14ba..001d5890eb 100644
--- a/ydb/core/blob_depot/blocks.cpp
+++ b/ydb/core/blob_depot/blocks.cpp
@@ -121,7 +121,7 @@ namespace NKikimr::NBlobDepot {
// skip the origin agent
continue;
}
- if (info.ExpirationTimestamp <= now) { // includes case when agent is connected right now
+ if (now < info.ExpirationTimestamp) { // includes case when agent is connected right now
TAgent& agent = Self->GetAgent(agentId);
// enqueue push notification
@@ -134,7 +134,6 @@ namespace NKikimr::NBlobDepot {
// add node to wait list; also start timer to remove this node from the wait queue
NodesWaitingForPushResult.insert(agentId);
- Y_VERIFY(info.ExpirationTimestamp <= now);
TActivationContext::Schedule(info.ExpirationTimestamp, new IEventHandle(TEvPrivate::EvCheckWaitingNode,
0, SelfId(), {}, nullptr, agentId));
@@ -161,7 +160,7 @@ namespace NKikimr::NBlobDepot {
if (NodesWaitingForPushResult.contains(agentId)) {
const TMonotonic now = TActivationContext::Monotonic();
const auto& info = Self->BlocksManager->Blocks[TabletId].PerAgentInfo[agentId];
- if (info.ExpirationTimestamp <= now) { // node still can write data for this tablet, reschedule timer
+ if (now < info.ExpirationTimestamp) { // node still can write data for this tablet, reschedule timer
TActivationContext::Schedule(info.ExpirationTimestamp, new IEventHandle(TEvPrivate::EvCheckWaitingNode,
0, SelfId(), {}, nullptr, agentId));
} else {
diff --git a/ydb/core/blob_depot/closed_interval_set.h b/ydb/core/blob_depot/closed_interval_set.h
new file mode 100644
index 0000000000..b8338b37fc
--- /dev/null
+++ b/ydb/core/blob_depot/closed_interval_set.h
@@ -0,0 +1,270 @@
+#pragma once
+
+#include "defs.h"
+
+namespace NKikimr {
+
+ template<typename T>
+ class TClosedIntervalSet {
+ struct TByLeft {
+ const T& Value;
+ };
+
+ struct TByRight {
+ const T& Value;
+ };
+
+ struct TInterval {
+ T Left;
+ T Right;
+
+ TInterval(T&& left, T&& right)
+ : Left(std::move(left))
+ , Right(std::move(right))
+ {}
+
+ struct TCompare {
+ using is_transparent = void;
+
+ bool operator ()(const TInterval& x, const TInterval& y) const { return x.Left < y.Left; }
+ bool operator ()(const TByLeft& x, const TInterval& y) const { return x.Value < y.Left; }
+ bool operator ()(const TInterval& x, const TByLeft& y) const { return x.Left < y.Value; }
+ bool operator ()(const TByRight& x, const TInterval& y) const { return x.Value < y.Right; }
+ bool operator ()(const TInterval& x, const TByRight& y) const { return x.Right < y.Value; }
+ };
+ };
+ std::set<TInterval, typename TInterval::TCompare> Intervals;
+
+ public:
+ TClosedIntervalSet() = default;
+ TClosedIntervalSet(const TClosedIntervalSet&) = default;
+ TClosedIntervalSet(TClosedIntervalSet&&) = default;
+
+ TClosedIntervalSet& operator =(const TClosedIntervalSet&) = default;
+ TClosedIntervalSet& operator =(TClosedIntervalSet&&) = default;
+
+ TClosedIntervalSet& operator |=(const std::pair<T, T>& range) { AddRange(range); return *this; }
+ TClosedIntervalSet& operator |=(std::pair<T, T>&& range) { AddRange(std::move(range)); return *this; }
+
+ template<typename TRange>
+ void AddRange(TRange&& range) {
+ auto&& [left, right] = range;
+ const auto leftIt = Intervals.lower_bound(TByRight{left});
+ const auto rightIt = Intervals.upper_bound(TByLeft{right});
+ if (leftIt == rightIt) {
+ Intervals.emplace(std::move(left), std::move(right));
+ } else {
+ auto& current = const_cast<TInterval&>(*leftIt);
+ auto& last = const_cast<TInterval&>(*std::prev(rightIt));
+ if (left < current.Left) {
+ current.Left = std::move(left);
+ }
+ if (current.Right < right || current.Right < last.Right) {
+ current.Right = right < last.Right ? std::move(last.Right) : std::move(right);
+ }
+ Intervals.erase(std::next(leftIt), rightIt);
+ }
+ }
+
+ TClosedIntervalSet& operator -=(const TClosedIntervalSet& other) {
+ auto myIt = Intervals.begin();
+ auto otherIt = other.Intervals.begin();
+ while (myIt != Intervals.end() && otherIt != other.Intervals.end()) {
+ auto& my = const_cast<TInterval&>(*myIt);
+
+ if (my.Right < otherIt->Left) {
+ ++myIt;
+ if (myIt != Intervals.end() && myIt->Right < otherIt->Left) {
+ myIt = Intervals.lower_bound(TByRight{otherIt->Left});
+ }
+ } else if (otherIt->Right < my.Left) {
+ ++otherIt;
+ if (otherIt != other.Intervals.end() && otherIt->Right < my.Left) {
+ otherIt = other.Intervals.lower_bound(TByRight{my.Left});
+ }
+ } else if (otherIt->Left <= my.Left) {
+ if (my.Right <= otherIt->Right) {
+ myIt = Intervals.erase(myIt);
+ } else {
+ my.Left = otherIt->Right;
+ ++otherIt;
+ }
+ } else if (my.Right <= otherIt->Right) {
+ my.Right = otherIt->Left;
+ ++myIt;
+ } else {
+ if (otherIt->Left < otherIt->Right) {
+ myIt = Intervals.emplace_hint(std::next(myIt), T(otherIt->Right), std::exchange(my.Right, otherIt->Left));
+ }
+ ++otherIt;
+ }
+ }
+ return *this;
+ }
+
+ static std::optional<std::pair<T, T>> PartialSubtractFromRange(T myLeft, T myRight, const TClosedIntervalSet& other) {
+ for (auto otherIt = other.Intervals.begin(); otherIt != other.Intervals.end(); ) {
+ if (myRight < otherIt->Left) {
+ break;
+ } else if (otherIt->Right < myLeft) {
+ ++otherIt;
+ if (otherIt != other.Intervals.end() && otherIt->Right < myLeft) {
+ otherIt = other.Intervals.lower_bound(TByRight{myLeft});
+ }
+ } else if (otherIt->Left <= myLeft) {
+ if (myRight <= otherIt->Right) {
+ return std::nullopt;
+ } else {
+ myLeft = otherIt->Right;
+ ++otherIt;
+ }
+ } else if (myRight <= otherIt->Right) {
+ myRight = otherIt->Left;
+ break;
+ } else {
+ if (otherIt->Left < otherIt->Right) {
+ myRight = otherIt->Left;
+ break;
+ }
+ ++otherIt;
+ }
+ }
+
+ return std::make_pair(std::move(myLeft), std::move(myRight));
+ }
+
+ // returns the first subrange of the full subtraction result
+ std::optional<std::pair<T, T>> PartialSubtract(const TClosedIntervalSet& other) const {
+ if (auto myIt = Intervals.begin(); myIt != Intervals.end()) {
+ const T *myLeft = &myIt->Left;
+ const T *myRight = &myIt->Right;
+
+ for (auto otherIt = other.Intervals.begin(); otherIt != other.Intervals.end(); ) {
+ if (*myRight < otherIt->Left) {
+ return std::make_pair(*myLeft, *myRight);
+ } else if (otherIt->Right < *myLeft) {
+ ++otherIt;
+ if (otherIt != other.Intervals.end() && otherIt->Right < *myLeft) {
+ otherIt = other.Intervals.lower_bound(TByRight{*myLeft});
+ }
+ } else if (otherIt->Left <= *myLeft) {
+ if (*myRight <= otherIt->Right) {
+ ++myIt;
+ if (myIt == Intervals.end()) {
+ return std::nullopt;
+ }
+ std::tie(myLeft, myRight) = std::make_pair(&myIt->Left, &myIt->Right);
+ } else {
+ myLeft = &otherIt->Right;
+ ++otherIt;
+ }
+ } else if (*myRight <= otherIt->Right) {
+ return std::make_pair(*myLeft, otherIt->Left);
+ } else {
+ if (otherIt->Left < otherIt->Right) {
+ return std::make_pair(*myLeft, otherIt->Left);
+ }
+ ++otherIt;
+ }
+ }
+
+ return std::make_pair(*myLeft, *myRight);
+ } else {
+ return std::nullopt;
+ }
+ }
+
+ operator bool() const {
+ return !Intervals.empty();
+ }
+
+ bool operator [](const T& pt) const {
+ const auto it = Intervals.lower_bound(TByRight{pt});
+ return it != Intervals.end() && it->Left <= pt;
+ }
+
+ template<typename TCallback>
+ bool operator ()(TCallback&& callback) const {
+ for (const auto& i : Intervals) {
+ if (!callback(i.Left, i.Right)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template<typename TCallback>
+ void EnumInRange(const T& left, const T& right, bool reverse, TCallback&& callback) const {
+ if (reverse) {
+ const T *cursor = &right;
+ for (auto it = Intervals.upper_bound(TByLeft{right}); it != Intervals.begin(); ) {
+ --it;
+ if (it->Right < *cursor) {
+ if (it->Right < left) {
+ callback(left, *cursor, false);
+ return;
+ }
+ if (!callback(it->Right, *cursor, false)) {
+ return;
+ }
+ cursor = &it->Right;
+ }
+ if (it->Left <= left) {
+ callback(left, *cursor, true);
+ return;
+ }
+ if (!callback(it->Left, *cursor, true)) {
+ return;
+ }
+ cursor = &it->Left;
+ }
+ if (left < *cursor) {
+ callback(left, *cursor, false);
+ }
+ } else {
+ const T *cursor = &left;
+ for (auto it = Intervals.lower_bound(TByRight{left}); it != Intervals.end(); ++it) {
+ if (*cursor < it->Left) {
+ if (right < it->Left) {
+ callback(*cursor, right, false);
+ return;
+ }
+ if (!callback(*cursor, it->Left, false)) {
+ return;
+ }
+ cursor = &it->Left;
+ }
+ if (right <= it->Right) {
+ callback(*cursor, right, true);
+ return;
+ }
+ if (!callback(*cursor, it->Right, true)) {
+ return;
+ }
+ cursor = &it->Right;
+ }
+ if (*cursor < right) {
+ callback(*cursor, right, false);
+ }
+ }
+ }
+
+ void Output(IOutputStream& s) const {
+ s << '{';
+ for (auto it = Intervals.begin(); it != Intervals.end(); ++it) {
+ if (it != Intervals.begin()) {
+ s << ' ';
+ }
+ s << it->Left << '-' << it->Right;
+ }
+ s << '}';
+ }
+
+ TString ToString() const {
+ TStringStream s;
+ Output(s);
+ return s.Str();
+ }
+ };
+
+} // NKikimr
diff --git a/ydb/core/blob_depot/closed_interval_set_ut.cpp b/ydb/core/blob_depot/closed_interval_set_ut.cpp
new file mode 100644
index 0000000000..484074efa7
--- /dev/null
+++ b/ydb/core/blob_depot/closed_interval_set_ut.cpp
@@ -0,0 +1,154 @@
+#include "closed_interval_set.h"
+#include <library/cpp/testing/unittest/registar.h>
+
+using namespace NKikimr;
+
+using T = TClosedIntervalSet<ui8>;
+
+TString ToString(const T& ivs) {
+ TStringStream s("[");
+ bool flag = true;
+ ivs([&](ui8 first, ui8 last) {
+ s << (std::exchange(flag, false) ? "" : " ") << (unsigned)first << "-" << (unsigned)last;
+ return true;
+ });
+ s << "]";
+ return s.Str();
+}
+
+ui64 Convert(const T& ivs) {
+ ui64 res = 0;
+ ivs([&](ui8 first, ui8 last) {
+ const ui64 mask = (ui64(1) << last + 1) - (ui64(1) << first);
+ UNIT_ASSERT_VALUES_EQUAL_C(res & mask, 0, ToString(ivs));
+ res |= mask;
+ return true;
+ });
+ return res;
+}
+
+T Make(ui64 mask) {
+ const ui64 original = mask;
+ unsigned pos = 0;
+ T res;
+ while (mask) {
+ const ui64 bit = mask & 1;
+ const unsigned n = CountTrailingZeroBits(mask ^ -bit);
+ if (bit) {
+ res |= {pos, pos + n - 1};
+ }
+ mask >>= n;
+ pos += n;
+ }
+ UNIT_ASSERT_VALUES_EQUAL(Convert(res), original);
+ return res;
+}
+
+Y_UNIT_TEST_SUITE(ClosedIntervalSet) {
+
+ Y_UNIT_TEST(Union) {
+ for (ui32 i = 0; i < 4096; ++i) {
+ for (ui32 begin = 0; begin <= 12; ++begin) {
+ for (ui32 end = begin; end <= 12; ++end) {
+ T x = Make(i);
+ x |= {begin, end};
+ UNIT_ASSERT_VALUES_EQUAL(Convert(x), i | ((1 << end + 1) - (1 << begin)));
+ }
+ }
+ }
+ }
+
+ Y_UNIT_TEST(Difference) {
+ for (ui32 i = 0; i < 1024; ++i) {
+ for (ui32 j = 0; j < 1024; ++j) {
+ T x = Make(i);
+ T y = Make(j);
+ ui64 expected = i & ~j;
+
+ ui64 xLeft = 0, xRight = 0;
+ x([&](ui8 left, ui8 right) {
+ xLeft |= ui64(1) << left;
+ xRight |= ui64(1) << right;
+ return true;
+ });
+
+ y([&](ui8 left, ui8 right) {
+ expected |= i & ~xLeft & ui64(1) << left;
+ expected |= i & ~xRight & ui64(1) << right;
+ return true;
+ });
+
+ x -= y;
+ UNIT_ASSERT_VALUES_EQUAL(Convert(x), expected);
+
+ std::optional<std::pair<ui8, ui8>> firstRange;
+ x([&](ui8 first, ui8 last) {
+ UNIT_ASSERT(!firstRange);
+ firstRange = {first, last};
+ return false;
+ });
+
+ const auto interval = Make(i).PartialSubtract(y);
+ UNIT_ASSERT_EQUAL(interval, firstRange);
+ }
+ }
+ }
+
+ Y_UNIT_TEST(Contains) {
+ for (ui32 i = 0; i < 4096; ++i) {
+ T x = Make(i);
+ for (ui32 j = 0; j < 12; ++j) {
+ UNIT_ASSERT_VALUES_EQUAL(x[j], (i >> j) & 1);
+ }
+ }
+ }
+
+ Y_UNIT_TEST(EnumInRange) {
+ for (ui32 i = 0; i < 4096; ++i) {
+ T x = Make(i);
+ for (ui32 j = 0; j <= 12; ++j) {
+ for (ui32 k = j; k <= 12; ++k) {
+ ui8 expectedLeft = j;
+ ui32 res = 0;
+ x.EnumInRange(j, k, false, [&](ui8 left, ui8 right, bool inside) {
+ UNIT_ASSERT_VALUES_EQUAL(left, expectedLeft);
+ UNIT_ASSERT(left <= right);
+ expectedLeft = right;
+ if (inside) {
+ const ui32 mask = (1 << right + 1) - (1 << left);
+ res |= mask;
+ }
+ return true;
+ });
+ UNIT_ASSERT_VALUES_EQUAL(expectedLeft, k);
+ UNIT_ASSERT_VALUES_EQUAL(res, i & ((1 << k + 1) - (1 << j)));
+ }
+ }
+ }
+ }
+
+ Y_UNIT_TEST(EnumInRangeReverse) {
+ for (ui32 i = 0; i < 4096; ++i) {
+ T x = Make(i);
+ for (ui32 j = 0; j <= 12; ++j) {
+ for (ui32 k = j; k <= 12; ++k) {
+ ui8 expectedRight = k;
+ ui32 res = 0;
+ x.EnumInRange(j, k, true, [&](ui8 left, ui8 right, bool inside) {
+ UNIT_ASSERT_VALUES_EQUAL(right, expectedRight);
+ UNIT_ASSERT(left <= right);
+ expectedRight = left;
+ if (inside) {
+ const ui32 mask = (1 << right + 1) - (1 << left);
+ res |= mask;
+ }
+ return true;
+ });
+ UNIT_ASSERT_VALUES_EQUAL(expectedRight, j);
+ UNIT_ASSERT_VALUES_EQUAL(res, i & ((1 << k + 1) - (1 << j)));
+ }
+ }
+ }
+ }
+
+}
diff --git a/ydb/core/blob_depot/coro_tx.cpp b/ydb/core/blob_depot/coro_tx.cpp
new file mode 100644
index 0000000000..319bcb8573
--- /dev/null
+++ b/ydb/core/blob_depot/coro_tx.cpp
@@ -0,0 +1,200 @@
+#include "coro_tx.h"
+
+namespace NKikimr::NBlobDepot {
+
+ thread_local TCoroTx *TCoroTx::Current = nullptr;
+
+ enum class EOutcome {
+ UNSET,
+ FINISH_TX,
+ RESTART_TX,
+ RUN_SUCCESSOR_TX,
+ END_CORO
+ };
+
+#ifndef NDEBUG
+ static constexpr ui64 StackSentinel = 0x8E0CDBFD41F04520;
+ static constexpr size_t NumStackSentinels = 8;
+#endif
+
+ class TCoroTx::TContext : public ITrampoLine {
+ TMappedAllocation Stack;
+ TExceptionSafeContext Context;
+ TExceptionSafeContext *BackContext = nullptr;
+
+ EOutcome Outcome = EOutcome::UNSET;
+
+ std::weak_ptr<TToken> Token;
+ std::function<void()> Body;
+
+ bool Finished = false;
+
+ public:
+ TContext(const std::weak_ptr<TToken>& token, std::function<void()>&& body)
+ : Stack(65536)
+ , Context({this, TArrayRef(Stack.Begin(), Stack.End())})
+ , Token(token)
+ , Body(std::move(body))
+ {
+#ifndef NDEBUG
+ char *p;
+# if STACK_GROW_DOWN
+ p = Stack.Begin();
+# else
+ p = Stack.End() - sizeof(StackSentinel) * NumStackSentinels;
+# endif
+ for (size_t i = 0; i < NumStackSentinels; ++i) {
+ memcpy(p + i * sizeof(StackSentinel), &StackSentinel, sizeof(StackSentinel));
+ }
+#endif
+ }
+
+ ~TContext() {
+ if (!Finished) {
+ Finished = true;
+ Resume();
+ }
+ }
+
+ EOutcome Resume() {
+ Outcome = EOutcome::UNSET;
+
+ TExceptionSafeContext returnContext;
+ Y_VERIFY(!BackContext);
+ BackContext = &returnContext;
+ returnContext.SwitchTo(&Context);
+ Y_VERIFY(BackContext == &returnContext);
+ BackContext = nullptr;
+
+ // validate stack
+#ifndef NDEBUG
+ char *p;
+# if STACK_GROW_DOWN
+ p = Stack.Begin();
+# else
+ p = Stack.End() - sizeof(StackSentinel) * NumStackSentinels;
+# endif
+ for (size_t i = 0; i < NumStackSentinels; ++i) {
+ ui64 temp;
+ memcpy(&temp, p + i * sizeof(StackSentinel), sizeof(StackSentinel));
+ Y_VERIFY(StackSentinel == temp);
+ }
+#endif
+
+ Y_VERIFY(Outcome != EOutcome::UNSET);
+ return Outcome;
+ }
+
+ void Return(EOutcome outcome) {
+ Y_VERIFY(Outcome == EOutcome::UNSET);
+ Outcome = outcome;
+ Y_VERIFY(BackContext);
+ Context.SwitchTo(BackContext);
+ if (Token.expired() || Finished) {
+ throw TExDead();
+ }
+ }
+
+ private:
+ void DoRun() override {
+ if (!Token.expired()) {
+ try {
+ Body();
+ } catch (const TExDead&) {
+ // just do nothing
+ }
+ }
+ Finished = true;
+ Return(EOutcome::END_CORO);
+ }
+ };
+
+ TCoroTx::TCoroTx(TBlobDepot *self, const std::weak_ptr<TToken>& token, std::function<void()> body)
+ : TTransactionBase(self)
+ , Context(std::make_unique<TContext>(token, std::move(body)))
+ {}
+
+ TCoroTx::TCoroTx(TCoroTx& predecessor)
+ : TTransactionBase(predecessor.Self)
+ , Context(std::move(predecessor.Context))
+ {}
+
+ TCoroTx::~TCoroTx()
+ {}
+
+ bool TCoroTx::Execute(NTabletFlatExecutor::TTransactionContext& txc, const TActorContext&) {
+ // prepare environment
+ Y_VERIFY(TxContext == nullptr && Current == nullptr);
+ TxContext = &txc;
+ Current = this;
+
+ Y_VERIFY(Context);
+ const EOutcome outcome = Context->Resume();
+
+ // clear environment back
+ Y_VERIFY(TxContext == &txc && Current == this);
+ TxContext = nullptr;
+ Current = nullptr;
+
+ switch (outcome) {
+ case EOutcome::FINISH_TX:
+ return true;
+
+ case EOutcome::RESTART_TX:
+ return false;
+
+ default:
+ Y_FAIL();
+ }
+ }
+
+ void TCoroTx::Complete(const TActorContext&) {
+ // prepare environment
+ Y_VERIFY(TxContext == nullptr && Current == nullptr);
+ Current = this;
+
+ Y_VERIFY(Context);
+ const EOutcome outcome = Context->Resume();
+
+ // clear environment back
+ Y_VERIFY(TxContext == nullptr && Current == this);
+ Current = nullptr;
+
+ switch (outcome) {
+ case EOutcome::RUN_SUCCESSOR_TX:
+ Self->Execute(std::make_unique<TCoroTx>(*this));
+ break;
+
+ case EOutcome::END_CORO:
+ break;
+
+ default:
+ Y_FAIL();
+ }
+ }
+
+ TCoroTx *TCoroTx::CurrentTx() {
+ return Current;
+ }
+
+ NTabletFlatExecutor::TTransactionContext *TCoroTx::GetTxc() {
+ Y_VERIFY(Current->TxContext);
+ return Current->TxContext;
+ }
+
+ void TCoroTx::FinishTx() {
+ Y_VERIFY(Current);
+ Current->Context->Return(EOutcome::FINISH_TX);
+ }
+
+ void TCoroTx::RestartTx() {
+ Y_VERIFY(Current);
+ Current->Context->Return(EOutcome::RESTART_TX);
+ }
+
+ void TCoroTx::RunSuccessorTx() {
+ Y_VERIFY(Current);
+ Current->Context->Return(EOutcome::RUN_SUCCESSOR_TX);
+ }
+
+} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/coro_tx.h b/ydb/core/blob_depot/coro_tx.h
new file mode 100644
index 0000000000..f731ff88dd
--- /dev/null
+++ b/ydb/core/blob_depot/coro_tx.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include "defs.h"
+#include "blob_depot_tablet.h"
+
+namespace NKikimr::NBlobDepot {
+
+ struct TExDead {};
+
+ class TCoroTx : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
+ class TContext;
+ std::unique_ptr<TContext> Context;
+ TTransactionContext *TxContext = nullptr;
+ static thread_local TCoroTx *Current;
+
+ public:
+ TCoroTx(TBlobDepot *self, const std::weak_ptr<TToken>& token, std::function<void()> body);
+ TCoroTx(TCoroTx& predecessor);
+ ~TCoroTx();
+
+ private:
+ bool Execute(NTabletFlatExecutor::TTransactionContext& txc, const TActorContext&) override;
+ void Complete(const TActorContext&) override;
+
+ public:
+ static NTabletFlatExecutor::TTransactionContext *GetTxc();
+ static TCoroTx *CurrentTx(); // obtain pointer to current tx
+ static void FinishTx(); // finish this transaction; function returns on Complete() entry
+ static void RestartTx(); // restart transaction; function returns on next Execute() entry
+ static void RunSuccessorTx(); // restart in new transaction -- called after FinishTx()
+ };
+
+} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/data.cpp b/ydb/core/blob_depot/data.cpp
index fd509ead95..5251191bd4 100644
--- a/ydb/core/blob_depot/data.cpp
+++ b/ydb/core/blob_depot/data.cpp
@@ -92,6 +92,10 @@ namespace NKikimr::NBlobDepot {
const bool wasUncertain = value.IsWrittenUncertainly();
const bool wasGoingToAssimilate = value.GoingToAssimilate;
+#ifndef NDEBUG
+ TValue originalValue(value);
+#endif
+
if (!inserted) {
EnumerateBlobsForValueChain(value.ValueChain, Self->TabletID(), [&](TLogoBlobID id, ui32, ui32) {
const auto it = RefCount.find(id);
@@ -104,6 +108,11 @@ namespace NKikimr::NBlobDepot {
EUpdateOutcome outcome = callback(value, inserted);
+#ifndef NDEBUG
+ Y_VERIFY(outcome != EUpdateOutcome::NO_CHANGE || !value.Changed(originalValue));
+ Y_VERIFY(inserted || value.ValueVersion == originalValue.ValueVersion + 1 || IsSameValueChain(value.ValueChain, originalValue.ValueChain));
+#endif
+
if ((underSoft && value.KeepState != EKeepState::Keep) || underHard) {
outcome = EUpdateOutcome::DROP;
}
@@ -159,13 +168,13 @@ namespace NKikimr::NBlobDepot {
auto row = NIceDb::TNiceDb(txc.DB).Table<Schema::Data>().Key(key.MakeBinaryKey());
switch (outcome) {
case EUpdateOutcome::DROP:
+ if (wasGoingToAssimilate) {
+ Self->TabletCounters->Simple()[NKikimrBlobDepot::COUNTER_BYTES_TO_DECOMMIT] -= key.GetBlobId().BlobSize();
+ }
UncertaintyResolver->DropKey(key);
Data.erase(it);
row.Delete();
ValidateRecords();
- if (wasGoingToAssimilate) {
- Self->TabletCounters->Simple()[NKikimrBlobDepot::COUNTER_BYTES_TO_DECOMMIT] -= key.GetBlobId().BlobSize();
- }
return true;
case EUpdateOutcome::CHANGE:
@@ -195,6 +204,7 @@ namespace NKikimr::NBlobDepot {
}
const TData::TValue *TData::FindKey(const TKey& key) const {
+ Y_VERIFY(IsKeyLoaded(key));
const auto it = Data.find(key);
return it != Data.end() ? &it->second : nullptr;
}
@@ -202,7 +212,7 @@ namespace NKikimr::NBlobDepot {
void TData::UpdateKey(const TKey& key, const NKikimrBlobDepot::TEvCommitBlobSeq::TItem& item,
NTabletFlatExecutor::TTransactionContext& txc, void *cookie) {
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT10, "UpdateKey", (Id, Self->GetLogId()), (Key, key), (Item, item));
- Y_VERIFY(Loaded || IsKeyLoaded(key));
+ Y_VERIFY(IsKeyLoaded(key));
UpdateKey(key, txc, cookie, "UpdateKey", [&](TValue& value, bool inserted) {
if (!inserted) { // update value items
value.Meta = item.GetMeta();
@@ -214,6 +224,7 @@ namespace NKikimr::NBlobDepot {
auto *chain = value.ValueChain.Add();
auto *locator = chain->MutableLocator();
locator->CopyFrom(item.GetBlobLocator());
+ ++value.ValueVersion;
// clear assimilation flag -- we have blob overwritten with fresh copy (of the same data)
value.GoingToAssimilate = false;
@@ -223,11 +234,20 @@ namespace NKikimr::NBlobDepot {
}, item);
}
- void TData::BindToBlob(const TKey& key, TBlobSeqId blobSeqId, NTabletFlatExecutor::TTransactionContext& txc, void *cookie) {
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT49, "BindToBlob", (Id, Self->GetLogId()), (Key, key), (BlobSeqId, blobSeqId));
- Y_VERIFY(Loaded || IsKeyLoaded(key));
- UpdateKey(key, txc, cookie, "BindToBlob", [&](TValue& value, bool inserted) {
- if (inserted || value.GoingToAssimilate) {
+ void TData::BindToBlob(const TKey& key, TBlobSeqId blobSeqId, bool keep, bool doNotKeep, NTabletFlatExecutor::TTransactionContext& txc, void *cookie) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT49, "BindToBlob", (Id, Self->GetLogId()), (Key, key), (BlobSeqId, blobSeqId),
+ (Keep, keep), (DoNotKeep, doNotKeep));
+ Y_VERIFY(IsKeyLoaded(key));
+ UpdateKey(key, txc, cookie, "BindToBlob", [&](TValue& value, bool /*inserted*/) {
+ EUpdateOutcome outcome = EUpdateOutcome::NO_CHANGE;
+ if (doNotKeep && value.KeepState < EKeepState::DoNotKeep) {
+ value.KeepState = EKeepState::DoNotKeep;
+ outcome = EUpdateOutcome::CHANGE;
+ } else if (keep && value.KeepState < EKeepState::Keep) {
+ value.KeepState = EKeepState::Keep;
+ outcome = EUpdateOutcome::CHANGE;
+ }
+ if (value.ValueChain.empty()) {
auto *chain = value.ValueChain.Add();
auto *locator = chain->MutableLocator();
locator->SetGroupId(Self->Info()->GroupFor(blobSeqId.Channel, blobSeqId.Generation));
@@ -235,9 +255,10 @@ namespace NKikimr::NBlobDepot {
locator->SetTotalDataLen(key.GetBlobId().BlobSize());
locator->SetFooterLen(0);
value.GoingToAssimilate = false;
- return inserted ? EUpdateOutcome::DROP : EUpdateOutcome::CHANGE;
+ ++value.ValueVersion;
+ outcome = EUpdateOutcome::CHANGE;
}
- return EUpdateOutcome::NO_CHANGE;
+ return outcome;
});
}
@@ -308,33 +329,14 @@ namespace NKikimr::NBlobDepot {
return it->second;
}
- void TData::AddLoadSkip(TKey key) {
- Y_VERIFY(!Loaded);
- if (!LastLoadedKey || *LastLoadedKey < key) {
- LoadSkip.insert(std::move(key));
- }
- }
-
- void TData::AddDataOnLoad(TKey key, TString value, bool uncertainWrite, bool skip) {
- if (skip) {
- Y_VERIFY_DEBUG(!LastLoadedKey || *LastLoadedKey < key);
- AddLoadSkip(key);
- } else {
- // delete keys that might have been loaded and deleted while we were still loading data
- LoadSkip.erase(LoadSkip.begin(), LoadSkip.lower_bound(key));
-
- // check if we have to skip currently loaded key
- if (LoadSkip.erase(key)) {
- return;
- }
- }
+ TData::TValue *TData::AddDataOnLoad(TKey key, TString value, bool uncertainWrite) {
+ Y_VERIFY_S(!IsKeyLoaded(key), "Id# " << Self->GetLogId() << " Key# " << key.ToString());
NKikimrBlobDepot::TValue proto;
const bool success = proto.ParseFromString(value);
Y_VERIFY(success);
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT79, "AddDataOnLoad", (Id, Self->GetLogId()), (Key, key), (Value, proto),
- (Skip, skip));
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT79, "AddDataOnLoad", (Id, Self->GetLogId()), (Key, key), (Value, proto));
// we can only add key that is not loaded before; if key exists, it MUST have been loaded from the dataset
const auto [it, inserted] = Data.try_emplace(std::move(key), std::move(proto), uncertainWrite);
@@ -349,11 +351,13 @@ namespace NKikimr::NBlobDepot {
}
ValidateRecords();
+
+ return &it->second;
}
bool TData::AddDataOnDecommit(const TEvBlobStorage::TEvAssimilateResult::TBlob& blob,
NTabletFlatExecutor::TTransactionContext& txc, void *cookie) {
- Y_VERIFY_S(Loaded || IsKeyLoaded(TKey(blob.Id)), "Id# " << Self->GetLogId() << " Blob# " << blob.ToString());
+ Y_VERIFY_S(IsKeyLoaded(TKey(blob.Id)), "Id# " << Self->GetLogId() << " Blob# " << blob.ToString());
return UpdateKey(TKey(blob.Id), txc, cookie, "AddDataOnDecommit", [&](TValue& value, bool inserted) {
bool change = inserted;
@@ -393,7 +397,7 @@ namespace NKikimr::NBlobDepot {
}
bool TData::UpdateKeepState(TKey key, EKeepState keepState, NTabletFlatExecutor::TTransactionContext& txc, void *cookie) {
- Y_VERIFY(Loaded || IsKeyLoaded(key));
+ Y_VERIFY(IsKeyLoaded(key));
return UpdateKey(std::move(key), txc, cookie, "UpdateKeepState", [&](TValue& value, bool inserted) {
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT51, "UpdateKeepState", (Id, Self->GetLogId()), (Key, key),
(KeepState, keepState), (Value, value));
@@ -450,7 +454,7 @@ namespace NKikimr::NBlobDepot {
};
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT13, "Trim", (Id, Self->GetLogId()), (AgentId, agent.Connection->NodeId),
- (Id, ev->Cookie), (Channel, channelIndex), (InvalidatedStep, invalidatedStep),
+ (Id, ev->Cookie), (Channel, int(channelIndex)), (InvalidatedStep, invalidatedStep),
(GivenIdRanges, channel.GivenIdRanges),
(Agent.GivenIdRanges, agent.GivenIdRanges[channelIndex]),
(WritesInFlight, makeWritesInFlight()));
@@ -483,18 +487,20 @@ namespace NKikimr::NBlobDepot {
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT18, "OnBarrierShift", (Id, Self->GetLogId()), (TabletId, tabletId),
(Channel, int(channel)), (Hard, hard), (Previous, previous), (Current, current), (MaxItems, maxItems));
- Y_VERIFY(Loaded || (LastLoadedKey && *LastLoadedKey > TKey(TLogoBlobID(tabletId, current.Generation(), current.Step(),
- channel, TLogoBlobID::MaxBlobSize, TLogoBlobID::MaxCookie, TLogoBlobID::MaxPartId, TLogoBlobID::MaxCrcMode))));
+ Y_VERIFY(Loaded);
const TData::TKey first(TLogoBlobID(tabletId, previous.Generation(), previous.Step(), channel, 0, 0));
const TData::TKey last(TLogoBlobID(tabletId, current.Generation(), current.Step(), channel,
TLogoBlobID::MaxBlobSize, TLogoBlobID::MaxCookie, TLogoBlobID::MaxPartId, TLogoBlobID::MaxCrcMode));
+ // find keys we have to delete
bool finished = true;
- Self->Data->ScanRange(&first, &last, TData::EScanFlags::INCLUDE_END, [&](auto& key, auto& value) {
+ TScanRange r{first, last, TData::EScanFlags::INCLUDE_END};
+ std::vector<TKey> keysToDelete;
+ Self->Data->ScanRange(r, nullptr, nullptr, [&](auto& key, auto& value) {
if (value.KeepState != EKeepState::Keep || hard) {
if (maxItems) {
- Self->Data->DeleteKey(key, txc, cookie);
+ keysToDelete.push_back(key);
--maxItems;
} else {
finished = false;
@@ -504,6 +510,11 @@ namespace NKikimr::NBlobDepot {
return true;
});
+ // delete selected keys
+ for (const TKey& key : keysToDelete) {
+ DeleteKey(key, txc, cookie);
+ }
+
return finished;
}
@@ -663,3 +674,8 @@ namespace NKikimr::NBlobDepot {
}
} // NKikimr::NBlobDepot
+
+template<>
+void Out<NKikimr::NBlobDepot::TBlobDepot::TData::TKey>(IOutputStream& s, const NKikimr::NBlobDepot::TBlobDepot::TData::TKey& x) {
+ x.Output(s);
+}
diff --git a/ydb/core/blob_depot/data.h b/ydb/core/blob_depot/data.h
index 536aafd09b..463b6979c7 100644
--- a/ydb/core/blob_depot/data.h
+++ b/ydb/core/blob_depot/data.h
@@ -2,6 +2,7 @@
#include "defs.h"
#include "blob_depot_tablet.h"
+#include "closed_interval_set.h"
#include <util/generic/hash_multi_map.h>
@@ -21,11 +22,18 @@ namespace NKikimr::NBlobDepot {
static constexpr size_t TypeLenByteIdx = 31;
static constexpr size_t MaxInlineStringLen = TypeLenByteIdx;
- static constexpr char BlobIdType = 32;
- static constexpr char StringType = 33;
+ static constexpr ui8 MinType = 32;
+ static constexpr ui8 BlobIdType = 33;
+ static constexpr ui8 StringType = 34;
+ static constexpr ui8 MaxType = 255;
static_assert(sizeof(Data) == 32);
+ private:
+ explicit TKey(ui8 type) {
+ Data.Type = type;
+ }
+
public:
TKey() {
Data.Type = EncodeInlineStringLenAsTypeByte(0);
@@ -74,6 +82,9 @@ namespace NKikimr::NBlobDepot {
Reset();
}
+ static TKey Min() { return TKey(MinType); }
+ static TKey Max() { return TKey(MaxType); }
+
TKey& operator =(const TKey& other) {
if (this != &other) {
if (Data.Type == StringType && other.Data.Type == StringType) {
@@ -121,8 +132,12 @@ namespace NKikimr::NBlobDepot {
TString MakeBinaryKey() const {
if (Data.Type == BlobIdType) {
return GetBlobId().AsBinaryString();
- } else {
+ } else if (Data.Type <= MaxInlineStringLen || Data.Type == StringType) {
return TString(GetStringBuf());
+ } else if (Data.Type == MinType) {
+ return {};
+ } else {
+ Y_FAIL();
}
}
@@ -143,22 +158,43 @@ namespace NKikimr::NBlobDepot {
void Output(IOutputStream& s) const {
if (Data.Type == BlobIdType) {
s << GetBlobId();
+ } else if (Data.Type == MinType) {
+ s << "<min>";
+ } else if (Data.Type == MaxType) {
+ s << "<max>";
} else {
s << EscapeC(GetStringBuf());
}
}
static int Compare(const TKey& x, const TKey& y) {
- if (x.Data.Type == BlobIdType && y.Data.Type == BlobIdType) {
- return x.GetBlobId() < y.GetBlobId() ? -1 : y.GetBlobId() < x.GetBlobId() ? 1 : 0;
- } else if (x.Data.Type == BlobIdType) {
+ const ui8 xType = x.Data.Type <= MaxInlineStringLen ? StringType : x.Data.Type;
+ const ui8 yType = y.Data.Type <= MaxInlineStringLen ? StringType : y.Data.Type;
+ if (xType < yType) {
return -1;
- } else if (y.Data.Type == BlobIdType) {
+ } else if (yType < xType) {
return 1;
} else {
- const TStringBuf sbx = x.GetStringBuf();
- const TStringBuf sby = y.GetStringBuf();
- return sbx < sby ? -1 : sby < sbx ? 1 : 0;
+ switch (xType) {
+ case StringType: {
+ const TStringBuf sbx = x.GetStringBuf();
+ const TStringBuf sby = y.GetStringBuf();
+ return sbx < sby ? -1 : sby < sbx ? 1 : 0;
+ }
+
+ case BlobIdType: {
+ const TLogoBlobID& xId = x.GetBlobId();
+ const TLogoBlobID& yId = y.GetBlobId();
+ return xId < yId ? -1 : yId < xId ? 1 : 0;
+ }
+
+ case MinType:
+ case MaxType:
+ return 0;
+
+ default:
+ Y_FAIL();
+ }
}
}
@@ -193,8 +229,10 @@ namespace NKikimr::NBlobDepot {
TStringBuf GetStringBuf() const {
if (Data.Type == StringType) {
return GetString();
- } else {
+ } else if (Data.Type <= MaxInlineStringLen) {
return TStringBuf(reinterpret_cast<const char*>(Data.Bytes), DecodeInlineStringLenFromTypeByte(Data.Type));
+ } else {
+ Y_FAIL();
}
}
@@ -224,21 +262,24 @@ namespace NKikimr::NBlobDepot {
EKeepState KeepState = EKeepState::Default;
bool Public = false;
bool GoingToAssimilate = false;
+ ui32 ValueVersion = 0;
bool UncertainWrite = false;
TValue() = default;
- TValue(const TValue&) = delete;
TValue(TValue&&) = default;
TValue& operator =(const TValue&) = delete;
TValue& operator =(TValue&&) = default;
+ explicit TValue(const TValue&) = default;
+
explicit TValue(NKikimrBlobDepot::TValue&& proto, bool uncertainWrite)
: Meta(proto.GetMeta())
, ValueChain(std::move(*proto.MutableValueChain()))
, KeepState(proto.GetKeepState())
, Public(proto.GetPublic())
, GoingToAssimilate(proto.GetGoingToAssimilate())
+ , ValueVersion(proto.GetValueVersion())
, UncertainWrite(uncertainWrite)
{}
@@ -278,6 +319,9 @@ namespace NKikimr::NBlobDepot {
if (GoingToAssimilate != proto->GetGoingToAssimilate()) {
proto->SetGoingToAssimilate(GoingToAssimilate);
}
+ if (ValueVersion != proto->GetValueVersion()) {
+ proto->SetValueVersion(ValueVersion);
+ }
}
static bool Validate(const NKikimrBlobDepot::TEvCommitBlobSeq::TItem& item);
@@ -304,9 +348,20 @@ namespace NKikimr::NBlobDepot {
<< " KeepState# " << EKeepState_Name(KeepState)
<< " Public# " << (Public ? "true" : "false")
<< " GoingToAssimilate# " << (GoingToAssimilate ? "true" : "false")
+ << " ValueVersion# " << ValueVersion
<< " UncertainWrite# " << (UncertainWrite ? "true" : "false")
<< "}";
}
+
+ bool Changed(const TValue& other) const {
+ return Meta != other.Meta ||
+ !IsSameValueChain(ValueChain, other.ValueChain) ||
+ KeepState != other.KeepState ||
+ Public != other.Public ||
+ GoingToAssimilate != other.GoingToAssimilate ||
+ ValueVersion != other.ValueVersion ||
+ UncertainWrite != other.UncertainWrite;
+ }
};
enum EScanFlags : ui32 {
@@ -317,6 +372,18 @@ namespace NKikimr::NBlobDepot {
Y_DECLARE_FLAGS(TScanFlags, EScanFlags)
+ struct TScanRange {
+ TKey Begin;
+ TKey End;
+ TScanFlags Flags = {};
+ ui64 MaxKeys = 0;
+ ui32 PrechargeRows = 0;
+ ui64 PrechargeBytes = 0;
+#ifndef NDEBUG
+ std::set<TKey> KeysInRange = {}; // runtime state
+#endif
+ };
+
private:
struct TRecordWithTrash {};
@@ -346,10 +413,9 @@ namespace NKikimr::NBlobDepot {
bool Loaded = false;
std::map<TKey, TValue> Data;
- std::set<TKey> LoadSkip; // keys to skip while loading
+ TClosedIntervalSet<TKey> LoadedKeys; // keys that are already scanned and loaded in the local database
THashMap<TLogoBlobID, ui32> RefCount;
THashMap<std::tuple<ui8, ui32>, TRecordsPerChannelGroup> RecordsPerChannelGroup;
- std::optional<TKey> LastLoadedKey; // keys are being loaded in ascending order
std::optional<TLogoBlobID> LastAssimilatedBlobId;
ui64 TotalStoredDataSize = 0;
ui64 TotalStoredTrashSize = 0;
@@ -359,22 +425,12 @@ namespace NKikimr::NBlobDepot {
THashMultiMap<void*, TLogoBlobID> InFlightTrash; // being committed, but not yet confirmed
- struct TResolveDecommitContext {
- TEvBlobDepot::TEvResolve::TPtr Ev; // original resolve request
- ui32 NumRangesInFlight;
- std::deque<TEvBlobStorage::TEvAssimilateResult::TBlob> DecommitBlobs = {};
- std::vector<std::tuple<TLogoBlobID, TLogoBlobID>> Errors = {};
- };
- ui64 LastRangeId = 0;
- THashMap<ui64, TResolveDecommitContext> ResolveDecommitContexts;
-
class TTxIssueGC;
class TTxConfirmGC;
class TTxDataLoad;
class TTxLoadSpecificKeys;
- class TTxResolve;
class TResolveResultAccumulator;
class TUncertaintyResolver;
@@ -391,39 +447,160 @@ namespace NKikimr::NBlobDepot {
ui64 LastCollectCmdId = 0;
std::unordered_map<ui64, TCollectCmd> CollectCmds;
+ struct TLoadRangeFromDB {
+ TData* const Data;
+ const TScanRange& Range;
+ bool* const Progress;
+ bool Processing = true;
+ std::optional<TKey> LastProcessedKey = {};
+
+ static constexpr struct TReverse {} Reverse{};
+ static constexpr struct TLeftBound {} LeftBound{};
+ static constexpr struct TRightBound {} RightBound{};
+
+ template<typename TCallback>
+ bool operator ()(NTabletFlatExecutor::TTransactionContext& txc, const TKey& left, const TKey& right, TCallback&& callback) {
+ auto table = NIceDb::TNiceDb(txc.DB).Table<Schema::Data>();
+ return Range.Flags & EScanFlags::REVERSE
+ ? Load(Reverse, table.Reverse(), left, right, std::forward<TCallback>(callback))
+ : Load(Reverse, std::move(table), left, right, std::forward<TCallback>(callback));
+ }
+
+ template<typename TTable, typename TCallback>
+ bool Load(TReverse, TTable&& table, const TKey& left, const TKey& right, TCallback&& callback) {
+ return left != TKey::Min()
+ ? Load(LeftBound, table.GreaterOrEqual(left.MakeBinaryKey()), left, right, std::forward<TCallback>(callback))
+ : right != TKey::Max()
+ ? Load(RightBound, table.LessOrEqual(right.MakeBinaryKey()), left, right, std::forward<TCallback>(callback))
+ : Load(RightBound, table.All(), left, right, std::forward<TCallback>(callback));
+ }
+
+ template<typename TTable, typename TCallback>
+ bool Load(TLeftBound, TTable&& table, const TKey& left, const TKey& right, TCallback&& callback) {
+ return right != TKey::Max()
+ ? Load(RightBound, table.LessOrEqual(right.MakeBinaryKey()), left, right, std::forward<TCallback>(callback))
+ : Load(RightBound, std::forward<TTable>(table), left, right, std::forward<TCallback>(callback));
+ }
+
+ template<typename TTable, typename TCallback>
+ bool Load(TRightBound, TTable&& table, const TKey& left, const TKey& right, TCallback&& callback) {
+ if ((Range.PrechargeRows || Range.PrechargeBytes) && !table.Precharge(Range.PrechargeRows, Range.PrechargeBytes)) {
+ return false;
+ }
+ auto rowset = table.Select();
+ if (!rowset.IsReady()) {
+ return false;
+ }
+ while (rowset.IsValid()) {
+ TKey key = TKey::FromBinaryKey(rowset.GetKey(), Data->Self->Config);
+ STLOG(PRI_TRACE, BLOB_DEPOT, BDT46, "ScanRange.Load", (Id, Data->Self->GetLogId()), (Left, left),
+ (Right, right), (Key, key));
+ if (left < key && key < right) {
+ TValue* const value = Data->AddDataOnLoad(key, rowset.template GetValue<Schema::Data::Value>(),
+ rowset.template GetValueOrDefault<Schema::Data::UncertainWrite>());
+ if (Processing) {
+ // we should not feed keys out of range when we are processing prefetched data outside the range
+ if (Range.Flags & EScanFlags::REVERSE) {
+ Processing = Range.Flags & EScanFlags::INCLUDE_BEGIN ? Range.Begin <= key : Range.Begin < key;
+ } else {
+ Processing = Range.Flags & EScanFlags::INCLUDE_END ? key <= Range.End : key < Range.End;
+ }
+ }
+ Processing = Processing && callback(key, *value);
+ *Progress = true;
+ } else {
+ Y_VERIFY_DEBUG(key == left || key == right);
+ }
+ LastProcessedKey.emplace(std::move(key));
+ if (!rowset.Next()) {
+ return false; // we break iteration anyway, because we can't read more data
+ }
+ }
+ return Processing;
+ };
+ };
+
public:
TData(TBlobDepot *self);
~TData();
- template<typename TCallback, typename T>
- bool ScanRange(const T& begin, const T& end, TScanFlags flags, TCallback&& callback) {
- auto beginIt = !begin ? Data.begin()
- : flags & EScanFlags::INCLUDE_BEGIN ? Data.lower_bound(*begin)
- : Data.upper_bound(*begin);
-
- auto endIt = !end ? Data.end()
- : flags & EScanFlags::INCLUDE_END ? Data.upper_bound(*end)
- : Data.lower_bound(*end);
-
- if (flags & EScanFlags::REVERSE) {
- if (beginIt != endIt) {
- --endIt;
- do {
- auto& current = *endIt--;
- if (!callback(current.first, current.second)) {
- return false;
- }
- } while (beginIt != endIt);
+ template<typename TCallback>
+ bool ScanRange(TScanRange& range, NTabletFlatExecutor::TTransactionContext *txc, bool *progress, TCallback&& callback) {
+ STLOG(PRI_TRACE, BLOB_DEPOT, BDT76, "ScanRange", (Id, Self->GetLogId()), (Begin, range.Begin), (End, range.End),
+ (Flags, range.Flags), (MaxKeys, range.MaxKeys));
+
+ const bool reverse = range.Flags & EScanFlags::REVERSE;
+ TLoadRangeFromDB loader{this, range, progress};
+
+ bool res = true;
+
+ auto issue = [&](const TKey& key, const TValue& value) {
+ Y_VERIFY_DEBUG(range.Flags & EScanFlags::INCLUDE_BEGIN ? range.Begin <= key : range.Begin < key);
+ Y_VERIFY_DEBUG(range.Flags & EScanFlags::INCLUDE_END ? key <= range.End : key < range.End);
+#ifndef NDEBUG
+ Y_VERIFY(range.KeysInRange.insert(key).second); // ensure that the generated key is unique
+#endif
+ if (!callback(key, value) || !--range.MaxKeys) {
+ return false; // scan aborted by user or finished scanning the required range
+ } else {
+ // remove already scanned items from the range query
+ return true;
}
- } else {
- while (beginIt != endIt) {
- auto& current = *beginIt++;
- if (!callback(current.first, current.second)) {
- return false;
+ };
+
+ const auto& from = reverse ? TKey::Min() : range.Begin;
+ const auto& to = reverse ? range.End : TKey::Max();
+ LoadedKeys.EnumInRange(from, to, reverse, [&](const TKey& left, const TKey& right, bool isRangeLoaded) {
+ STLOG(PRI_TRACE, BLOB_DEPOT, BDT83, "ScanRange.Step", (Id, Self->GetLogId()), (Left, left), (Right, right),
+ (IsRangeLoaded, isRangeLoaded), (From, from), (To, to));
+ if (!isRangeLoaded) {
+ // we have to load range (left, right), not including both ends
+ Y_VERIFY(txc && progress);
+ if (!loader(*txc, left, right, issue)) {
+ res = !loader.Processing;
+ return false; // break the iteration
+ }
+ } else if (reverse) {
+ for (auto it = Data.upper_bound(right); it != Data.begin(); ) {
+ const auto& [key, value] = *--it;
+ if (key < left) {
+ break;
+ } else if (range.Flags & EScanFlags::INCLUDE_BEGIN ? key < range.Begin : key <= range.Begin) {
+ return false; // just left the left side of the range
+ } else if ((key != range.End || range.Flags & EScanFlags::INCLUDE_END) && !issue(key, value)) {
+ return false; // enough keys processed
+ }
+ }
+ } else {
+ // we have a range of loaded keys in the interval [left, right], including both ends -- load
+ // data from memory
+ for (auto it = Data.lower_bound(left); it != Data.end() && it->first <= right; ++it) {
+ const auto& [key, value] = *it;
+ if (range.Flags & EScanFlags::INCLUDE_END ? range.End < key : range.End <= key) {
+ return false; // just left the right side of the range
+ } else if ((key != range.Begin || range.Flags & EScanFlags::INCLUDE_BEGIN) && !issue(key, value)) {
+ return false; // enough keys processed
+ }
}
}
+ if (!loader.LastProcessedKey || (reverse & EScanFlags::REVERSE ? left < *loader.LastProcessedKey :
+ *loader.LastProcessedKey < right)) {
+ loader.LastProcessedKey.emplace(reverse ? left : right);
+ }
+ return true;
+ });
+
+ if (loader.LastProcessedKey) {
+ if (reverse) {
+ LoadedKeys.AddRange(std::make_tuple(*loader.LastProcessedKey, range.End));
+ } else {
+ LoadedKeys.AddRange(std::make_tuple(range.Begin, *loader.LastProcessedKey));
+ }
+ (reverse ? range.End : range.Begin) = std::move(*loader.LastProcessedKey);
+ range.Flags.RemoveFlags(reverse ? EScanFlags::INCLUDE_END : EScanFlags::INCLUDE_BEGIN);
}
- return true;
+
+ return res;
}
template<typename TCallback>
@@ -445,7 +622,8 @@ namespace NKikimr::NBlobDepot {
void UpdateKey(const TKey& key, const NKikimrBlobDepot::TEvCommitBlobSeq::TItem& item,
NTabletFlatExecutor::TTransactionContext& txc, void *cookie);
- void BindToBlob(const TKey& key, TBlobSeqId blobSeqId, NTabletFlatExecutor::TTransactionContext& txc, void *cookie);
+ void BindToBlob(const TKey& key, TBlobSeqId blobSeqId, bool keep, bool doNotKeep,
+ NTabletFlatExecutor::TTransactionContext& txc, void *cookie);
void MakeKeyCertain(const TKey& key);
void HandleCommitCertainKeys();
@@ -453,8 +631,7 @@ namespace NKikimr::NBlobDepot {
TRecordsPerChannelGroup& GetRecordsPerChannelGroup(TLogoBlobID id);
TRecordsPerChannelGroup& GetRecordsPerChannelGroup(ui8 channel, ui32 groupId);
- void AddLoadSkip(TKey key);
- void AddDataOnLoad(TKey key, TString value, bool uncertainWrite, bool skip);
+ TValue *AddDataOnLoad(TKey key, TString value, bool uncertainWrite);
bool AddDataOnDecommit(const TEvBlobStorage::TEvAssimilateResult::TBlob& blob,
NTabletFlatExecutor::TTransactionContext& txc, void *cookie);
void AddTrashOnLoad(TLogoBlobID id);
@@ -495,12 +672,28 @@ namespace NKikimr::NBlobDepot {
}
void StartLoad();
+ bool LoadTrash(NTabletFlatExecutor::TTransactionContext& txc, TString& from, bool& progress);
void OnLoadComplete();
bool IsLoaded() const { return Loaded; }
- bool IsKeyLoaded(const TKey& key) const { return key <= LastLoadedKey || Data.contains(key) || LoadSkip.contains(key); }
+ bool IsKeyLoaded(const TKey& key) const { return Loaded || LoadedKeys[key]; }
+
+ bool EnsureKeyLoaded(const TKey& key, NTabletFlatExecutor::TTransactionContext& txc);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ class TResolveDecommitActor;
+ IActor *CreateResolveDecommitActor(TEvBlobDepot::TEvResolve::TPtr ev);
+
+ class TTxCommitAssimilatedBlob;
+ void ExecuteTxCommitAssimilatedBlob(NKikimrProto::EReplyStatus status, TBlobSeqId blobSeqId, TData::TKey key,
+ ui32 notifyEventType, TActorId parentId, ui64 cookie, bool keep = false, bool doNotKeep = false);
+
+ class TTxResolve;
+ void ExecuteTxResolve(TEvBlobDepot::TEvResolve::TPtr ev, THashSet<TLogoBlobID>&& resolutionErrors = {});
void Handle(TEvBlobDepot::TEvResolve::TPtr ev);
- void Handle(TEvBlobStorage::TEvRangeResult::TPtr ev);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ui64 GetTotalStoredDataSize() const {
return TotalStoredDataSize;
@@ -514,7 +707,7 @@ namespace NKikimr::NBlobDepot {
void EndCommittingBlobSeqId(TAgent& agent, TBlobSeqId blobSeqId);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+
TMonotonic LastRecordsValidationTimestamp;
void ValidateRecords();
diff --git a/ydb/core/blob_depot/data_decommit.cpp b/ydb/core/blob_depot/data_decommit.cpp
new file mode 100644
index 0000000000..dfdbbfbb37
--- /dev/null
+++ b/ydb/core/blob_depot/data_decommit.cpp
@@ -0,0 +1,366 @@
+#include "data.h"
+#include "coro_tx.h"
+
+namespace NKikimr::NBlobDepot {
+
+ class TBlobDepot::TData::TResolveDecommitActor : public TActorBootstrapped<TResolveDecommitActor> {
+ struct TEvPrivate {
+ enum {
+ EvTxComplete = EventSpaceBegin(TEvents::ES_PRIVATE),
+ };
+ };
+
+ TBlobDepot* const Self;
+ std::weak_ptr<TToken> Token;
+ std::vector<TEvBlobStorage::TEvAssimilateResult::TBlob> DecommitBlobs;
+ THashSet<TLogoBlobID> ResolutionErrors;
+ TEvBlobDepot::TEvResolve::TPtr Ev;
+
+ ui32 TxInFlight = 0;
+
+ ui32 RangesInFlight = 0;
+
+ std::deque<std::tuple<TLogoBlobID, bool>> GetQ;
+ ui32 GetsInFlight = 0;
+ ui32 GetBytesInFlight = 0;
+ static constexpr ui32 MaxGetsInFlight = 10;
+ static constexpr ui32 MaxGetBytesInFlight = 10'000'000;
+
+ ui32 PutsInFlight = 0;
+
+ THashMap<TLogoBlobID, TKey> IdToKey;
+
+ bool Finished = false;
+
+ public:
+ TResolveDecommitActor(TBlobDepot *self, TEvBlobDepot::TEvResolve::TPtr ev)
+ : Self(self)
+ , Token(self->Token)
+ , Ev(ev)
+ {}
+
+ void Bootstrap() {
+ if (Token.expired()) {
+ return PassAway();
+ }
+
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT42, "TResolveDecommitActor::Bootstrap", (Id, Self->GetLogId()),
+ (Sender, Ev->Sender), (Cookie, Ev->Cookie));
+
+ Self->Execute(std::make_unique<TCoroTx>(Self, Token, std::bind(&TThis::TxPrepare, this)));
+ ++TxInFlight;
+ Become(&TThis::StateFunc);
+ }
+
+ void TxPrepare() {
+ for (const auto& item : Ev->Get()->Record.GetItems()) {
+ switch (item.GetKeyDesignatorCase()) {
+ case NKikimrBlobDepot::TEvResolve::TItem::kKeyRange: {
+ if (!item.HasTabletId()) {
+ return FinishWithError(NLog::PRI_CRIT, "incorrect request");
+ }
+
+ const ui64 tabletId = item.GetTabletId();
+ const auto& range = item.GetKeyRange();
+
+ TLogoBlobID minId = range.HasBeginningKey()
+ ? TKey::FromBinaryKey(range.GetBeginningKey(), Self->Config).GetBlobId()
+ : TLogoBlobID(tabletId, 0, 0, 0, 0, 0);
+
+ TLogoBlobID maxId = range.HasEndingKey()
+ ? TKey::FromBinaryKey(range.GetEndingKey(), Self->Config).GetBlobId()
+ : TLogoBlobID(tabletId, Max<ui32>(), Max<ui32>(), TLogoBlobID::MaxChannel,
+ TLogoBlobID::MaxBlobSize, TLogoBlobID::MaxCookie, TLogoBlobID::MaxPartId,
+ TLogoBlobID::MaxCrcMode);
+
+ Y_VERIFY(minId <= maxId);
+
+ if (Self->Data->LastAssimilatedBlobId < maxId) {
+ // adjust minId to skip already assimilated items in range query
+ if (minId < Self->Data->LastAssimilatedBlobId) {
+ if (item.GetMustRestoreFirst()) {
+ InvokeOtherActor(*this, &TThis::ScanRange, TKey(minId),
+ TKey(*Self->Data->LastAssimilatedBlobId), EScanFlags::INCLUDE_BEGIN,
+ true /*issueGets*/);
+ }
+ minId = *Self->Data->LastAssimilatedBlobId;
+ }
+
+ // prepare the range first -- we must have it loaded in memory
+ InvokeOtherActor(*this, &TThis::ScanRange, TKey(minId), TKey(maxId),
+ EScanFlags::INCLUDE_BEGIN | EScanFlags::INCLUDE_END, false /*issueGets*/);
+
+ // issue scan query
+ InvokeOtherActor(*this, &TThis::IssueRange, tabletId, minId, maxId, item.GetMustRestoreFirst());
+ } else if (item.GetMustRestoreFirst()) {
+ InvokeOtherActor(*this, &TThis::ScanRange, TKey(minId), TKey(maxId),
+ EScanFlags::INCLUDE_BEGIN | EScanFlags::INCLUDE_END, true /*issueGets*/);
+ }
+
+ break;
+ }
+
+ case NKikimrBlobDepot::TEvResolve::TItem::kExactKey: {
+ TData::TKey key = TKey::FromBinaryKey(item.GetExactKey(), Self->Config);
+ while (!Self->Data->EnsureKeyLoaded(key, *TCoroTx::GetTxc())) {
+ TCoroTx::RestartTx();
+ }
+ const TValue *value = Self->Data->FindKey(key);
+ const bool doGet = (!value && Self->Data->LastAssimilatedBlobId < key.GetBlobId()) // value not yet assimilated
+ || (value && value->GoingToAssimilate && item.GetMustRestoreFirst()); // value has no local data yet
+ if (doGet) {
+ InvokeOtherActor(*this, &TThis::IssueGet, key.GetBlobId(), item.GetMustRestoreFirst());
+ }
+ break;
+ }
+
+ case NKikimrBlobDepot::TEvResolve::TItem::KEYDESIGNATOR_NOT_SET:
+ Y_VERIFY_DEBUG(false);
+ break;
+ }
+ }
+
+ TCoroTx::FinishTx();
+ TActivationContext::Send(new IEventHandle(TEvPrivate::EvTxComplete, 0, SelfId(), {}, nullptr, 0));
+ }
+
+ void ScanRange(TKey from, TKey to, TScanFlags flags, bool issueGets) {
+ bool progress = false;
+
+ auto callback = [&](const TKey& key, const TValue& value) {
+ if (issueGets && value.GoingToAssimilate) {
+ IssueGet(key.GetBlobId(), true /*mustRestoreFirst*/);
+ }
+ return true;
+ };
+
+ TScanRange r{from, to, flags};
+ while (!Self->Data->ScanRange(r, TCoroTx::GetTxc(), &progress, callback)) {
+ if (std::exchange(progress, false)) {
+ TCoroTx::FinishTx();
+ TCoroTx::RunSuccessorTx();
+ } else {
+ TCoroTx::RestartTx();
+ }
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // RANGE QUERIES are for metadata only -- they scan not yet assimilated parts of the original group and do not
+ // recover any data; thus they are IsIndexOnly and not MustRestoreFirst range queries
+
+ void IssueRange(ui64 tabletId, TLogoBlobID from, TLogoBlobID to, bool mustRestoreFirst) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT50, "going to TEvRange", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (TabletId, tabletId), (From, from), (To, to), (MustRestoreFirst, mustRestoreFirst));
+ auto ev = std::make_unique<TEvBlobStorage::TEvRange>(tabletId, from, to, false, TInstant::Max(), true);
+ ev->Decommission = true;
+ SendToBSProxy(SelfId(), Self->Config.GetVirtualGroupId(), ev.release(), mustRestoreFirst);
+ ++RangesInFlight;
+ }
+
+ void Handle(TEvBlobStorage::TEvRangeResult::TPtr ev) {
+ auto& msg = *ev->Get();
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT55, "TEvRangeResult", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (Msg, msg));
+
+ if (msg.Status == NKikimrProto::OK) {
+ for (const auto& r : msg.Responses) {
+ if (ev->Cookie) {
+ if (const TValue *value = Self->Data->FindKey(TKey(r.Id)); !value || value->GoingToAssimilate) {
+ IssueGet(r.Id, true /*mustRestoreFirst*/);
+ }
+ } else {
+ DecommitBlobs.push_back({r.Id, r.Keep, r.DoNotKeep});
+ }
+ }
+ } else {
+ return FinishWithError(NLog::PRI_NOTICE, TStringBuilder() << "TEvRange query failed: " << msg.ErrorReason);
+ }
+
+ --RangesInFlight;
+ CheckIfDone();
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // GET QUERIES may contain request either just for metadata, or for the data too; in case we receive data, we
+ // have to put it to BlobDepot storage
+
+ void IssueGet(TLogoBlobID id, bool mustRestoreFirst) {
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT86, "going to TEvGet", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (BlobId, id), (MustRestoreFirst, mustRestoreFirst));
+ GetQ.emplace_back(id, mustRestoreFirst);
+ ProcessGetQueue();
+ }
+
+ static ui32 GetBytesFor(const std::tuple<TLogoBlobID, bool>& q) {
+ const auto& [id, mustRestoreFirst] = q;
+ return mustRestoreFirst ? id.BlobSize() : 0;
+ }
+
+ void ProcessGetQueue() {
+ while (!GetQ.empty() && GetsInFlight < MaxGetsInFlight && GetBytesInFlight + GetBytesFor(GetQ.front()) <= MaxGetBytesInFlight) {
+ const auto [id, mustRestoreFirst] = GetQ.front();
+ ++GetsInFlight;
+ const ui32 bytes = GetBytesFor(GetQ.front());
+ GetBytesInFlight += bytes;
+ GetQ.pop_front();
+ auto ev = std::make_unique<TEvBlobStorage::TEvGet>(id, 0, 0, TInstant::Max(),
+ NKikimrBlobStorage::EGetHandleClass::FastRead, false /*mustRestoreFirst*/,
+ !mustRestoreFirst /*isIndexOnly*/);
+ ev->Decommission = true;
+ SendToBSProxy(SelfId(), Self->Config.GetVirtualGroupId(), ev.release(), bytes);
+ }
+ }
+
+ void Handle(TEvBlobStorage::TEvGetResult::TPtr ev) {
+ auto& msg = *ev->Get();
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT87, "TEvGetResult", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (Msg, msg));
+
+ for (ui32 i = 0; i < msg.ResponseSz; ++i) {
+ auto& r = msg.Responses[i];
+ if (r.Status == NKikimrProto::OK) {
+ if (r.Buffer) { // wasn't index read
+ IssuePut(TKey(r.Id), std::move(r.Buffer), r.Keep, r.DoNotKeep);
+ } else {
+ DecommitBlobs.push_back({r.Id, r.Keep, r.DoNotKeep});
+ }
+ } else if (r.Status == NKikimrProto::NODATA) {
+ Self->Data->ExecuteTxCommitAssimilatedBlob(NKikimrProto::NODATA, TBlobSeqId(), TData::TKey(r.Id),
+ TEvPrivate::EvTxComplete, SelfId(), 0);
+ ++TxInFlight;
+ } else {
+ // mark this specific key as unresolvable
+ ResolutionErrors.emplace(r.Id);
+ }
+ }
+
+ --GetsInFlight;
+ GetBytesInFlight -= ev->Cookie;
+
+ ProcessGetQueue();
+ CheckIfDone();
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // PUT QUERIES are used to store retrieved MustRestoreFirst blobs in local storage
+
+ void IssuePut(TKey key, TString&& buffer, bool keep, bool doNotKeep) {
+ std::vector<ui8> channels(1);
+ if (Self->PickChannels(NKikimrBlobDepot::TChannelKind::Data, channels)) {
+ TChannelInfo& channel = Self->Channels[channels.front()];
+ const ui64 value = channel.NextBlobSeqId++;
+ const auto blobSeqId = TBlobSeqId::FromSequentalNumber(channel.Index, Self->Executor()->Generation(), value);
+ const TLogoBlobID id = blobSeqId.MakeBlobId(Self->TabletID(), EBlobType::VG_DATA_BLOB, 0, buffer.size());
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT91, "going to TEvPut", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (Key, key), (BlobId, id));
+ SendToBSProxy(SelfId(), channel.GroupId, new TEvBlobStorage::TEvPut(id, std::move(buffer), TInstant::Max()),
+ (ui64)keep | (ui64)doNotKeep << 1);
+ const bool inserted = channel.AssimilatedBlobsInFlight.insert(value).second; // prevent from barrier advancing
+ Y_VERIFY(inserted);
+ const bool inserted1 = IdToKey.try_emplace(id, std::move(key)).second;
+ Y_VERIFY(inserted1);
+ ++PutsInFlight;
+ } else { // we couldn't restore this blob -- there was no place to write it to
+ ResolutionErrors.insert(key.GetBlobId());
+ ++PutsInFlight;
+ HandleTxComplete();
+ }
+ }
+
+ void Handle(TEvBlobStorage::TEvPutResult::TPtr ev) {
+ auto& msg = *ev->Get();
+
+ const auto it = IdToKey.find(msg.Id);
+ Y_VERIFY(it != IdToKey.end());
+ TKey key = std::move(it->second);
+ IdToKey.erase(it);
+
+ const bool keep = ev->Cookie & 1;
+ const bool doNotKeep = ev->Cookie >> 1 & 1;
+
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT88, "got TEvPutResult", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (Msg, msg), (Key, key), (Keep, keep), (DoNotKeep, doNotKeep));
+
+ Self->Data->ExecuteTxCommitAssimilatedBlob(msg.Status, TBlobSeqId::FromLogoBlobId(msg.Id), std::move(key),
+ TEvPrivate::EvTxComplete, SelfId(), 0, keep, doNotKeep);
+
+ if (msg.Status != NKikimrProto::OK) { // do not reply OK to this item
+ ResolutionErrors.insert(key.GetBlobId());
+ }
+ }
+
+ void HandleTxComplete() {
+ --TxInFlight;
+ CheckIfDone();
+ }
+
+ void CheckIfDone() {
+ if (TxInFlight + RangesInFlight + GetsInFlight + GetQ.size() + PutsInFlight == 0) {
+ FinishWithSuccess();
+ }
+ }
+
+ void FinishWithSuccess() {
+ Y_VERIFY(!Finished);
+ Finished = true;
+
+ STLOG(PRI_DEBUG, BLOB_DEPOT, BDT92, "request succeeded", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (ResolutionErrors.size, ResolutionErrors.size()),
+ (DecommitBlobs.size, DecommitBlobs.size()));
+
+ Self->Execute(std::make_unique<TCoroTx>(Self, Token, [self = Self, decommitBlobs = std::move(DecommitBlobs),
+ ev = Ev, resolutionErrors = std::move(ResolutionErrors)]() mutable {
+ ui32 numItemsProcessed = 0;
+ for (const auto& blob : decommitBlobs) {
+ if (numItemsProcessed == 10'000) {
+ TCoroTx::FinishTx();
+ self->Data->CommitTrash(TCoroTx::CurrentTx());
+ numItemsProcessed = 0;
+ TCoroTx::RunSuccessorTx();
+ }
+ numItemsProcessed += self->Data->AddDataOnDecommit(blob, *TCoroTx::GetTxc(), TCoroTx::CurrentTx());
+ }
+ TCoroTx::FinishTx();
+ self->Data->CommitTrash(TCoroTx::CurrentTx());
+ self->Data->ExecuteTxResolve(ev, std::move(resolutionErrors));
+ }));
+
+ PassAway();
+ }
+
+ void FinishWithError(NLog::EPriority prio, TString errorReason) {
+ Y_VERIFY(!Finished);
+ Finished = true;
+
+ STLOG(prio, BLOB_DEPOT, BDT89, "request failed", (Id, Self->GetLogId()), (Sender, Ev->Sender),
+ (Cookie, Ev->Cookie), (ErrorReason, errorReason));
+ auto [response, record] = TEvBlobDepot::MakeResponseFor(*Ev, NKikimrProto::ERROR, std::move(errorReason));
+ TActivationContext::Send(response.release());
+ PassAway();
+ }
+
+ STATEFN(StateFunc) {
+ if (Token.expired()) {
+ return PassAway();
+ }
+
+ switch (const ui32 type = ev->GetTypeRewrite()) {
+ hFunc(TEvBlobStorage::TEvGetResult, Handle);
+ hFunc(TEvBlobStorage::TEvRangeResult, Handle);
+ hFunc(TEvBlobStorage::TEvPutResult, Handle);
+ cFunc(TEvPrivate::EvTxComplete, HandleTxComplete);
+
+ default:
+ Y_VERIFY_DEBUG(false, "unexpected event Type# %08" PRIx32, type);
+ STLOG(PRI_CRIT, BLOB_DEPOT, BDT90, "unexpected event", (Id, Self->GetLogId()), (Type, type));
+ break;
+ }
+ }
+ };
+
+ IActor *TBlobDepot::TData::CreateResolveDecommitActor(TEvBlobDepot::TEvResolve::TPtr ev) {
+ return new TResolveDecommitActor(Self, ev);
+ }
+
+} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/data_load.cpp b/ydb/core/blob_depot/data_load.cpp
index 019cd93a16..3165c16873 100644
--- a/ydb/core/blob_depot/data_load.cpp
+++ b/ydb/core/blob_depot/data_load.cpp
@@ -1,112 +1,103 @@
#include "data.h"
#include "schema.h"
#include "garbage_collection.h"
+#include "coro_tx.h"
namespace NKikimr::NBlobDepot {
using TData = TBlobDepot::TData;
- class TData::TTxDataLoad : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
- std::optional<TString> LastTrashKey;
- std::optional<TString> LastDataKey;
- bool TrashLoaded = false;
- bool SuccessorTx = true;
-
- public:
- TTxType GetTxType() const override { return NKikimrBlobDepot::TXTYPE_DATA_LOAD; }
-
- TTxDataLoad(TBlobDepot *self)
- : TTransactionBase(self)
- {}
-
- TTxDataLoad(TTxDataLoad& predecessor)
- : TTransactionBase(predecessor.Self)
- , LastTrashKey(std::move(predecessor.LastTrashKey))
- , LastDataKey(std::move(predecessor.LastDataKey))
- , TrashLoaded(predecessor.TrashLoaded)
- {}
-
- bool Execute(TTransactionContext& txc, const TActorContext&) override {
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT28, "TData::TTxDataLoad::Execute", (Id, Self->GetLogId()));
-
- NIceDb::TNiceDb db(txc.DB);
+ void TData::StartLoad() {
+ Self->Execute(std::make_unique<TCoroTx>(Self, Self->Token, [&] {
bool progress = false;
- auto load = [&](auto t, auto& lastKey, auto callback) {
- auto table = t.GreaterOrEqual(lastKey.value_or(TString()));
- static constexpr ui64 PrechargeRows = 10'000;
- static constexpr ui64 PrechargeBytes = 1'000'000;
- if (!table.Precharge(PrechargeRows, PrechargeBytes)) {
- return false;
- }
- auto rows = table.Select();
- if (!rows.IsReady()) {
- return false;
- }
- while (rows.IsValid()) {
- if (auto key = rows.GetKey(); key != lastKey) {
- callback(key, rows);
- lastKey.emplace(std::move(key));
- progress = true;
- }
- if (!rows.Next()) {
- return false;
- }
- }
- lastKey.reset();
- return true;
+ TString trash;
+ bool trashLoaded = false;
+
+ TScanRange r{
+ .Begin = TKey::Min(),
+ .End = TKey::Max(),
+ .PrechargeRows = 10'000,
+ .PrechargeBytes = 1'000'000,
};
- if (!TrashLoaded) {
- auto addTrash = [this](const auto& key, const auto& /*rows*/) {
- Self->Data->AddTrashOnLoad(TLogoBlobID::FromBinary(key));
- };
- if (!load(db.Table<Schema::Trash>(), LastTrashKey, addTrash)) {
- return progress;
+ while (!(trashLoaded = LoadTrash(*TCoroTx::GetTxc(), trash, progress)) ||
+ !ScanRange(r, TCoroTx::GetTxc(), &progress, [](const TKey&, const TValue&) { return true; })) {
+ if (std::exchange(progress, false)) {
+ TCoroTx::FinishTx();
+ TCoroTx::RunSuccessorTx();
+ } else {
+ TCoroTx::RestartTx();
}
- TrashLoaded = true;
}
- auto addData = [this](const auto& key, const auto& rows) {
- auto k = TData::TKey::FromBinaryKey(key, Self->Config);
- Self->Data->AddDataOnLoad(k, rows.template GetValue<Schema::Data::Value>(),
- rows.template GetValueOrDefault<Schema::Data::UncertainWrite>(), false);
- Y_VERIFY(!Self->Data->LastLoadedKey || *Self->Data->LastLoadedKey < k);
- Self->Data->LastLoadedKey = std::move(k);
- };
- if (!load(db.Table<Schema::Data>(), LastDataKey, addData)) {
- return progress;
- }
+ TCoroTx::FinishTx();
+ Self->Data->OnLoadComplete();
+ }));
+ }
- SuccessorTx = false; // everything loaded
- return true;
+ bool TData::LoadTrash(NTabletFlatExecutor::TTransactionContext& txc, TString& from, bool& progress) {
+ NIceDb::TNiceDb db(txc.DB);
+ auto table = db.Table<Schema::Trash>().GreaterOrEqual(from);
+ static constexpr ui64 PrechargeRows = 10'000;
+ static constexpr ui64 PrechargeBytes = 1'000'000;
+ if (!table.Precharge(PrechargeRows, PrechargeBytes)) {
+ return false;
}
-
- void Complete(const TActorContext&) override {
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT29, "TData::TTxDataLoad::Complete", (Id, Self->GetLogId()),
- (TrashLoaded, TrashLoaded), (SuccessorTx, SuccessorTx));
-
- if (SuccessorTx) {
- Self->Execute(std::make_unique<TTxDataLoad>(*this));
- } else {
- Self->Data->OnLoadComplete();
+ auto rows = table.Select();
+ if (!rows.IsReady()) {
+ return false;
+ }
+ while (rows.IsValid()) {
+ if (auto key = rows.GetKey(); key != from) {
+ Self->Data->AddTrashOnLoad(TLogoBlobID::FromBinary(key));
+ from = std::move(key);
+ progress = true;
+ }
+ if (!rows.Next()) {
+ return false;
}
}
- };
-
- void TData::StartLoad() {
- Self->Execute(std::make_unique<TTxDataLoad>(Self));
+ return true;
}
void TData::OnLoadComplete() {
- Loaded = true;
- LoadSkip.clear();
+ Self->Data->LoadedKeys([&](const TKey& left, const TKey& right) {
+ // verify that LoadedKeys == {Min, Max} exactly
+ Y_VERIFY_S(left == TKey::Min() && right == TKey::Max() && !Loaded, "Id# " << Self->GetLogId()
+ << " Left# " << left.ToString()
+ << " Right# " << right.ToString()
+ << " Loaded# " << Loaded
+ << " LoadedKeys# " << LoadedKeys.ToString());
+ Loaded = true;
+ return true;
+ });
+ Y_VERIFY(Loaded);
Self->OnDataLoadComplete();
for (auto& [key, record] : RecordsPerChannelGroup) {
record.CollectIfPossible(this);
}
}
+ bool TData::EnsureKeyLoaded(const TKey& key, NTabletFlatExecutor::TTransactionContext& txc) {
+ if (IsKeyLoaded(key)) {
+ return true;
+ }
+
+ NIceDb::TNiceDb db(txc.DB);
+ using Table = Schema::Data;
+ auto row = db.Table<Table>().Key(key.MakeBinaryKey()).Select();
+ if (!row.IsReady()) {
+ return false;
+ } else {
+ if (row.IsValid()) {
+ AddDataOnLoad(key, row.GetValue<Table::Value>(), row.GetValueOrDefault<Table::UncertainWrite>());
+ }
+ Self->Data->LoadedKeys |= {key, key};
+ return true;
+ }
+ }
+
void TBlobDepot::StartDataLoad() {
Data->StartLoad();
}
diff --git a/ydb/core/blob_depot/data_mon.cpp b/ydb/core/blob_depot/data_mon.cpp
index e7f68c4eb4..9a286b6781 100644
--- a/ydb/core/blob_depot/data_mon.cpp
+++ b/ydb/core/blob_depot/data_mon.cpp
@@ -15,7 +15,6 @@ namespace NKikimr::NBlobDepot {
DIV_CLASS("panel-body") {
KEYVALUE_TABLE({
KEYVALUE_P("Loaded", Loaded ? "true" : "false");
- KEYVALUE_P("Last loaded key", LastLoadedKey ? LastLoadedKey->ToString() : "<null>");
KEYVALUE_P("Last assimilated blob id", LastAssimilatedBlobId ? LastAssimilatedBlobId->ToString() : "<null>");
KEYVALUE_P("Data size, number of keys", Data.size());
KEYVALUE_P("RefCount size, number of blobs", RefCount.size());
diff --git a/ydb/core/blob_depot/data_resolve.cpp b/ydb/core/blob_depot/data_resolve.cpp
index c81d1756cb..233924a275 100644
--- a/ydb/core/blob_depot/data_resolve.cpp
+++ b/ydb/core/blob_depot/data_resolve.cpp
@@ -83,127 +83,108 @@ namespace NKikimr::NBlobDepot {
class TData::TTxResolve : public NTabletFlatExecutor::TTransactionBase<TBlobDepot> {
std::unique_ptr<TEvBlobDepot::TEvResolve::THandle> Request;
- std::deque<TEvBlobStorage::TEvAssimilateResult::TBlob> DecommitBlobs;
- std::vector<std::tuple<TLogoBlobID, TLogoBlobID>> Errors;
-
- bool KeysLoaded = false;
- int ItemIndex = 0;
- std::optional<TKey> LastScannedKey;
- ui32 NumKeysRead = 0; // number of keys already read for this item
-
- // final state
+ THashSet<TLogoBlobID> ResolutionErrors;
+ size_t ItemIndex = 0;
+ std::optional<TScanRange> Range;
TResolveResultAccumulator Result;
- bool SuccessorTx = false;
std::deque<TKey> Uncertainties;
+ bool SuccessorTx = false;
+
public:
TTxType GetTxType() const override { return NKikimrBlobDepot::TXTYPE_RESOLVE; }
- TTxResolve(TBlobDepot *self, TEvBlobDepot::TEvResolve::TPtr request,
- std::deque<TEvBlobStorage::TEvAssimilateResult::TBlob>&& decommitBlobs = {},
- std::vector<std::tuple<TLogoBlobID, TLogoBlobID>>&& errors = {})
+ TTxResolve(TBlobDepot *self, TEvBlobDepot::TEvResolve::TPtr request, THashSet<TLogoBlobID>&& resolutionErrors)
: TTransactionBase(self)
, Request(request.Release())
- , DecommitBlobs(std::move(decommitBlobs))
- , Errors(std::move(errors))
+ , ResolutionErrors(std::move(resolutionErrors))
, Result(*Request)
{}
TTxResolve(TTxResolve& predecessor)
: TTransactionBase(predecessor.Self)
, Request(std::move(predecessor.Request))
- , DecommitBlobs(std::move(predecessor.DecommitBlobs))
- , Errors(std::move(predecessor.Errors))
- , KeysLoaded(predecessor.KeysLoaded)
+ , ResolutionErrors(std::move(predecessor.ResolutionErrors))
, ItemIndex(predecessor.ItemIndex)
- , LastScannedKey(std::move(predecessor.LastScannedKey))
- , NumKeysRead(predecessor.NumKeysRead)
+ , Range(std::move(predecessor.Range))
, Result(std::move(predecessor.Result))
+ , Uncertainties(std::move(predecessor.Uncertainties))
{}
- bool GetScanParams(const NKikimrBlobDepot::TEvResolve::TItem& item, std::optional<TKey> *begin,
- std::optional<TKey> *end, TScanFlags *flags, ui64 *maxKeys) {
- switch (item.GetKeyDesignatorCase()) {
- case NKikimrBlobDepot::TEvResolve::TItem::kKeyRange: {
- const auto& range = item.GetKeyRange();
- *flags = TScanFlags()
- | (range.GetIncludeBeginning() ? EScanFlags::INCLUDE_BEGIN : TScanFlags())
- | (range.GetIncludeEnding() ? EScanFlags::INCLUDE_END : TScanFlags())
- | (range.GetReverse() ? EScanFlags::REVERSE : TScanFlags());
- if (range.HasBeginningKey()) {
- begin->emplace(TKey::FromBinaryKey(range.GetBeginningKey(), Self->Config));
- } else {
- begin->reset();
- }
- if (range.HasEndingKey()) {
- end->emplace(TKey::FromBinaryKey(range.GetEndingKey(), Self->Config));
- } else {
- end->reset();
- }
- *maxKeys = range.GetMaxKeys();
- return true;
- }
-
- case NKikimrBlobDepot::TEvResolve::TItem::kExactKey:
- begin->emplace(TKey::FromBinaryKey(item.GetExactKey(), Self->Config));
- end->emplace(begin->value());
- *flags = EScanFlags::INCLUDE_BEGIN | EScanFlags::INCLUDE_END;
- *maxKeys = 1;
- return true;
-
- case NKikimrBlobDepot::TEvResolve::TItem::KEYDESIGNATOR_NOT_SET:
- return false;
- }
-
- return false;
- }
-
bool Execute(TTransactionContext& txc, const TActorContext&) override {
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT22, "TTxResolve::Execute", (Id, Self->GetLogId()),
- (Sender, Request->Sender), (Cookie, Request->Cookie), (ItemIndex, ItemIndex),
- (LastScannedKey, LastScannedKey), (DecommitBlobs.size, DecommitBlobs.size()));
+ (Sender, Request->Sender), (Cookie, Request->Cookie), (ItemIndex, ItemIndex));
bool progress = false;
- if (!KeysLoaded && !LoadKeys(txc, progress)) {
- return progress;
- } else {
- KeysLoaded = true;
- }
-
- for (ui32 numItemsRemain = 10'000; !DecommitBlobs.empty(); DecommitBlobs.pop_front()) {
- if (numItemsRemain) {
- const auto& blob = DecommitBlobs.front();
- if (Self->Data->LastAssimilatedBlobId < blob.Id) {
- numItemsRemain -= Self->Data->AddDataOnDecommit(DecommitBlobs.front(), txc, this);
- }
- } else {
- SuccessorTx = true;
- return true;
- }
- }
const auto& record = Request->Get()->Record;
- for (const auto& item : record.GetItems()) {
+ for (; ItemIndex < record.ItemsSize(); ++ItemIndex) {
+ const auto& item = record.GetItems(ItemIndex);
std::optional<ui64> cookie = item.HasCookie() ? std::make_optional(item.GetCookie()) : std::nullopt;
+ std::optional<bool> status;
+ switch (item.GetKeyDesignatorCase()) {
+ case NKikimrBlobDepot::TEvResolve::TItem::kKeyRange:
+ status = ProcessKeyRange(item.GetKeyRange(), txc, progress, cookie, item.GetMustRestoreFirst());
+ break;
+
+ case NKikimrBlobDepot::TEvResolve::TItem::kExactKey:
+ status = ProcessExactKey(item.GetExactKey(), txc, progress, cookie, item.GetMustRestoreFirst());
+ break;
- std::optional<TKey> begin;
- std::optional<TKey> end;
- TScanFlags flags;
- ui64 maxKeys;
- const bool success = GetScanParams(item, &begin, &end, &flags, &maxKeys);
- Y_VERIFY_DEBUG(success);
-
- // we have everything we need contained in memory, generate response from memory
- auto callback = [&](const TKey& key, const TValue& value) {
- IssueResponseItem(cookie, key, value);
- return --maxKeys != 0;
- };
- Self->Data->ScanRange(begin, end, flags, callback);
+ case NKikimrBlobDepot::TEvResolve::TItem::KEYDESIGNATOR_NOT_SET:
+ Y_VERIFY_DEBUG(false, "incorrect query field");
+ break;
+ }
+ if (status) {
+ return *status;
+ }
}
return true;
}
+ std::optional<bool> ProcessKeyRange(const NKikimrBlobDepot::TEvResolve::TKeyRange& range,
+ TTransactionContext& txc, bool& progress, const std::optional<ui64>& cookie, bool mustRestoreFirst) {
+ if (!Range) {
+ Range.emplace();
+ Range->Begin = range.HasBeginningKey()
+ ? TKey::FromBinaryKey(range.GetBeginningKey(), Self->Config)
+ : TKey::Min();
+ Range->End = range.HasEndingKey()
+ ? TKey::FromBinaryKey(range.GetEndingKey(), Self->Config)
+ : TKey::Max();
+ Range->Flags = TScanFlags()
+ | (range.GetIncludeBeginning() ? EScanFlags::INCLUDE_BEGIN : TScanFlags())
+ | (range.GetIncludeEnding() ? EScanFlags::INCLUDE_END : TScanFlags())
+ | (range.GetReverse() ? EScanFlags::REVERSE : TScanFlags());
+ Range->MaxKeys = range.GetMaxKeys();
+ }
+ auto callback = [&](const TKey& key, const TValue& value) {
+ IssueResponseItem(cookie, key, value, mustRestoreFirst);
+ return true;
+ };
+ if (Self->Data->ScanRange(*Range, &txc, &progress, callback)) {
+ Range.reset();
+ return std::nullopt;
+ } else {
+ return SuccessorTx = progress;
+ }
+ }
+
+ std::optional<bool> ProcessExactKey(const TString& exactKey, TTransactionContext& txc, bool& progress,
+ const std::optional<ui64>& cookie, bool mustRestoreFirst) {
+ const auto key = TKey::FromBinaryKey(exactKey, Self->Config);
+ if (!Self->Data->EnsureKeyLoaded(key, txc)) {
+ return SuccessorTx = progress;
+ }
+ const TValue *value = Self->Data->FindKey(key);
+ if (value || (!ResolutionErrors.empty() && ResolutionErrors.contains(key.GetBlobId()))) {
+ static const TValue zero;
+ IssueResponseItem(cookie, key, value ? *value : zero, mustRestoreFirst);
+ }
+ return std::nullopt;
+ }
+
void Complete(const TActorContext&) override {
STLOG(PRI_DEBUG, BLOB_DEPOT, BDT30, "TTxResolve::Complete", (Id, Self->GetLogId()),
(Sender, Request->Sender), (Cookie, Request->Cookie), (SuccessorTx, SuccessorTx),
@@ -220,123 +201,7 @@ namespace NKikimr::NBlobDepot {
}
}
- bool LoadKeys(TTransactionContext& txc, bool& progress) {
- NIceDb::TNiceDb db(txc.DB);
-
- if (Self->Data->Loaded) {
- return true;
- }
-
- const auto& record = Request->Get()->Record;
- const auto& items = record.GetItems();
- for (; ItemIndex < items.size(); ++ItemIndex, LastScannedKey.reset(), NumKeysRead = 0) {
- const auto& item = items[ItemIndex];
-
- std::optional<TKey> begin;
- std::optional<TKey> end;
- TScanFlags flags;
- ui64 maxKeys;
- const bool success = GetScanParams(item, &begin, &end, &flags, &maxKeys);
- Y_VERIFY_DEBUG(success);
-
- // adjust range according to actually generated data
- if (LastScannedKey) {
- if (flags & EScanFlags::REVERSE) { // reverse scan
- end = *LastScannedKey;
- flags &= ~EScanFlags::INCLUDE_END;
- } else { // direct scan
- begin = *LastScannedKey;
- flags &= ~EScanFlags::INCLUDE_BEGIN;
- }
- }
-
- if (end && Self->Data->LastLoadedKey && *end <= *Self->Data->LastLoadedKey) {
- continue; // key is already loaded
- }
-
- if (Self->Data->LastLoadedKey && begin <= Self->Data->LastLoadedKey && !(flags & EScanFlags::REVERSE)) {
- Y_VERIFY(!end || *Self->Data->LastLoadedKey < *end);
-
- // special case -- forward scan and we have some data in memory
- auto callback = [&](const TKey& key, const TValue& /*value*/) {
- LastScannedKey = key;
- return ++NumKeysRead != maxKeys;
- };
- if (!Self->Data->ScanRange(begin, Self->Data->LastLoadedKey, flags | EScanFlags::INCLUDE_END, callback)) {
- continue; // we have read all the keys required (MaxKeys limit hit)
- }
-
- // adjust range beginning
- begin = Self->Data->LastLoadedKey;
- flags &= ~EScanFlags::INCLUDE_BEGIN;
- }
-
- auto processRange = [&](auto table) {
- for (auto rowset = table.Select();; rowset.Next()) {
- if (!rowset.IsReady()) {
- return false;
- } else if (!rowset.IsValid()) {
- // no more keys in our direction
- return true;
- }
- auto key = TKey::FromBinaryKey(rowset.template GetValue<Schema::Data::Key>(), Self->Config);
- if (key != LastScannedKey) {
- LastScannedKey = key;
- progress = true;
-
- if (!Self->Data->IsKeyLoaded(key)) {
- Self->Data->AddDataOnLoad(key, rowset.template GetValue<Schema::Data::Value>(),
- rowset.template GetValueOrDefault<Schema::Data::UncertainWrite>(), true);
- }
-
- const bool matchBegin = !begin || (flags & EScanFlags::INCLUDE_BEGIN ? *begin <= key : *begin < key);
- const bool matchEnd = !end || (flags & EScanFlags::INCLUDE_END ? key <= *end : key < *end);
- if (matchBegin && matchEnd) {
- const TValue *value = Self->Data->FindKey(key);
- Y_VERIFY(value); // value must exist as it was just loaded into memory and exists in the database
- if (++NumKeysRead == maxKeys) {
- // we have hit the MaxItems limit, exit
- return true;
- }
- } else if (flags & EScanFlags::REVERSE ? !matchBegin : !matchEnd) {
- // we have exceeded the opposite boundary, exit
- return true;
- }
- }
- }
- };
-
- auto applyEnd = [&](auto&& x) {
- return end
- ? processRange(x.LessOrEqual(end->MakeBinaryKey()))
- : processRange(std::forward<std::decay_t<decltype(x)>>(x));
- };
- auto applyBegin = [&](auto&& x) {
- return begin
- ? applyEnd(x.GreaterOrEqual(begin->MakeBinaryKey()))
- : applyEnd(std::forward<std::decay_t<decltype(x)>>(x));
- };
- auto applyReverse = [&](auto&& x) {
- return flags & EScanFlags::REVERSE
- ? applyBegin(x.Reverse())
- : applyBegin(std::forward<std::decay_t<decltype(x)>>(x));
- };
- if (applyReverse(db.Table<Schema::Data>())) {
- continue; // all work done for this item
- } else if (progress) {
- // we have already done something, so let's finish this transaction and start a new one, continuing
- // the job
- SuccessorTx = true;
- return true;
- } else {
- return false; // we'll have to restart this transaction to fetch some data
- }
- }
-
- return true;
- }
-
- void IssueResponseItem(std::optional<ui64> cookie, const TKey& key, const TValue& value) {
+ void IssueResponseItem(std::optional<ui64> cookie, const TKey& key, const TValue& value, bool reliablyWritten) {
NKikimrBlobDepot::TEvResolveResult::TResolvedKey item;
if (cookie) {
@@ -348,6 +213,7 @@ namespace NKikimr::NBlobDepot {
auto *out = item.AddValueChain();
out->SetGroupId(Self->Config.GetVirtualGroupId());
LogoBlobIDFromLogoBlobID(key.GetBlobId(), out->MutableBlobId());
+ item.SetReliablyWritten(reliablyWritten);
} else {
EnumerateBlobsForValueChain(value.ValueChain, Self->TabletID(), [&](const TLogoBlobID& id, ui32 begin, ui32 end) {
if (begin != end) {
@@ -362,28 +228,23 @@ namespace NKikimr::NBlobDepot {
}
}
});
+ item.SetReliablyWritten(true);
}
if (value.Meta) {
item.SetMeta(value.Meta.data(), value.Meta.size());
}
- bool foundError = false;
-
- if (!Errors.empty()) {
- const TLogoBlobID id = key.GetBlobId();
- for (const auto& [from, to] : Errors) {
- if (from <= id && id <= to) {
- foundError = true;
- break;
- }
- }
- }
-
- if (foundError) {
+ if (!ResolutionErrors.empty() && ResolutionErrors.contains(key.GetBlobId())) {
item.SetErrorReason("item resolution error");
- } else if (!item.ValueChainSize()) {
- STLOG(PRI_WARN, BLOB_DEPOT, BDT48, "empty ValueChain on Resolve", (Id, Self->GetLogId()),
- (Key, key), (Value, value), (Item, item), (Sender, Request->Sender), (Cookie, Request->Cookie));
+ item.ClearValueChain();
+ } else {
+ if (!item.ValueChainSize()) {
+ STLOG(PRI_WARN, BLOB_DEPOT, BDT48, "empty ValueChain on Resolve", (Id, Self->GetLogId()),
+ (Key, key), (Value, value), (Item, item), (Sender, Request->Sender), (Cookie, Request->Cookie));
+ }
+ if (item.GetValueVersion() != value.ValueVersion) {
+ item.SetValueVersion(value.ValueVersion);
+ }
}
Result.AddItem(std::move(item), Self->Config);
@@ -398,107 +259,14 @@ namespace NKikimr::NBlobDepot {
(Sender, ev->Sender), (Cookie, ev->Cookie), (LastAssimilatedBlobId, LastAssimilatedBlobId));
if (Self->Config.GetIsDecommittingGroup() && Self->DecommitState <= EDecommitState::BlobsFinished) {
- std::vector<std::tuple<ui64, bool, TLogoBlobID, TLogoBlobID>> queries;
-
- for (const auto& item : ev->Get()->Record.GetItems()) {
- if (!item.HasTabletId()) {
- STLOG(PRI_CRIT, BLOB_DEPOT, BDT42, "incorrect request", (Id, Self->GetLogId()), (Item, item));
- auto [response, record] = TEvBlobDepot::MakeResponseFor(*ev, NKikimrProto::ERROR,
- "incorrect request");
- TActivationContext::Send(response.release());
- return;
- }
-
- const ui64 tabletId = item.GetTabletId();
- if (LastAssimilatedBlobId && tabletId < LastAssimilatedBlobId->TabletID()) {
- continue; // fast path
- }
-
- TLogoBlobID minId(tabletId, 0, 0, 0, 0, 0);
- TLogoBlobID maxId(tabletId, Max<ui32>(), Max<ui32>(), TLogoBlobID::MaxChannel, TLogoBlobID::MaxBlobSize,
- TLogoBlobID::MaxCookie, TLogoBlobID::MaxPartId, TLogoBlobID::MaxCrcMode);
-
- switch (item.GetKeyDesignatorCase()) {
- case NKikimrBlobDepot::TEvResolve::TItem::kKeyRange: {
- const auto& range = item.GetKeyRange();
- if (range.HasBeginningKey()) {
- minId = TKey::FromBinaryKey(range.GetBeginningKey(), Self->Config).GetBlobId();
- }
- if (range.HasEndingKey()) {
- maxId = TKey::FromBinaryKey(range.GetEndingKey(), Self->Config).GetBlobId();
- }
- break;
- }
-
- case NKikimrBlobDepot::TEvResolve::TItem::kExactKey:
- minId = maxId = TKey::FromBinaryKey(item.GetExactKey(), Self->Config).GetBlobId();
- break;
-
- case NKikimrBlobDepot::TEvResolve::TItem::KEYDESIGNATOR_NOT_SET:
- Y_VERIFY_DEBUG(false);
- break;
- }
-
- Y_VERIFY_DEBUG(minId.TabletID() == tabletId);
- Y_VERIFY_DEBUG(maxId.TabletID() == tabletId);
-
- if (!LastAssimilatedBlobId || *LastAssimilatedBlobId < maxId) {
- if (LastAssimilatedBlobId && minId < *LastAssimilatedBlobId) {
- minId = *LastAssimilatedBlobId;
- }
- if (minId == maxId) {
- const auto it = Data.find(TKey(minId));
- if (it != Data.end() && !it->second.GoingToAssimilate) {
- continue; // fast path for extreme queries
- }
- }
- queries.emplace_back(tabletId, item.GetMustRestoreFirst(), minId, maxId);
- }
- }
-
- if (!queries.empty()) {
- const ui64 id = ++LastRangeId;
- for (const auto& [tabletId, mustRestoreFirst, minId, maxId] : queries) {
- auto ev = std::make_unique<TEvBlobStorage::TEvRange>(tabletId, minId, maxId, mustRestoreFirst,
- TInstant::Max(), true);
- ev->Decommission = true;
-
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT46, "going to TEvRange", (Id, Self->GetLogId()), (TabletId, tabletId),
- (MinId, minId), (MaxId, maxId), (MustRestoreFirst, mustRestoreFirst), (Cookie, id));
- SendToBSProxy(Self->SelfId(), Self->Config.GetVirtualGroupId(), ev.release(), id);
- }
- ResolveDecommitContexts[id] = {ev, (ui32)queries.size()};
- return;
- }
+ Self->RegisterWithSameMailbox(CreateResolveDecommitActor(ev));
+ } else {
+ ExecuteTxResolve(ev);
}
-
- Self->Execute(std::make_unique<TTxResolve>(Self, ev));
}
- void TData::Handle(TEvBlobStorage::TEvRangeResult::TPtr ev) {
- auto& msg = *ev->Get();
- STLOG(PRI_DEBUG, BLOB_DEPOT, BDT50, "TEvRangeResult", (Id, Self->GetLogId()), (Msg, msg), (Cookie, ev->Cookie));
-
- auto& contexts = Self->Data->ResolveDecommitContexts;
- if (const auto it = contexts.find(ev->Cookie); it != contexts.end()) {
- auto& context = it->second;
-
- if (msg.Status == NKikimrProto::OK) {
- for (const auto& response : msg.Responses) {
- if (LastAssimilatedBlobId < response.Id) {
- context.DecommitBlobs.push_back({response.Id, response.Keep, response.DoNotKeep});
- }
- }
- } else {
- context.Errors.emplace_back(msg.From, msg.To);
- }
-
- if (!--context.NumRangesInFlight) {
- Self->Execute(std::make_unique<TTxResolve>(Self, context.Ev, std::move(context.DecommitBlobs),
- std::move(context.Errors)));
- contexts.erase(it);
- }
- }
+ void TData::ExecuteTxResolve(TEvBlobDepot::TEvResolve::TPtr ev, THashSet<TLogoBlobID>&& resolutionErrors) {
+ Self->Execute(std::make_unique<TTxResolve>(Self, ev, std::move(resolutionErrors)));
}
} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/events.h b/ydb/core/blob_depot/events.h
index 501d78ae95..5f19c5dac0 100644
--- a/ydb/core/blob_depot/events.h
+++ b/ydb/core/blob_depot/events.h
@@ -27,6 +27,7 @@ namespace NKikimr {
EvResolve,
EvResolveResult,
EvDiscardSpoiledBlobSeq,
+ EvPushMetrics,
};
#define BLOBDEPOT_PARAM_ARG(ARG) std::optional<std::decay_t<decltype(Record.Get##ARG())>> param##ARG,
@@ -71,6 +72,7 @@ namespace NKikimr {
BLOBDEPOT_EVENT_PB_NO_ARGS(EvResolve);
BLOBDEPOT_EVENT_PB(EvResolveResult, Status, ErrorReason);
BLOBDEPOT_EVENT_PB_NO_ARGS(EvDiscardSpoiledBlobSeq);
+ BLOBDEPOT_EVENT_PB(EvPushMetrics, BytesRead, BytesWritten);
template<typename TEvent>
struct TResponseFor {};
diff --git a/ydb/core/blob_depot/garbage_collection.cpp b/ydb/core/blob_depot/garbage_collection.cpp
index 9994114bc3..60ea091567 100644
--- a/ydb/core/blob_depot/garbage_collection.cpp
+++ b/ydb/core/blob_depot/garbage_collection.cpp
@@ -184,8 +184,6 @@ namespace NKikimr::NBlobDepot {
.HardGenCtr = hardGenCtr,
.Hard = hard,
};
-
- Self->BarrierServer->ValidateBlobInvariant(tabletId, channel);
}
bool TBlobDepot::TBarrierServer::AddBarrierOnDecommit(const TEvBlobStorage::TEvAssimilateResult::TBarrier& barrier,
@@ -275,8 +273,9 @@ namespace NKikimr::NBlobDepot {
const TData::TKey last(TLogoBlobID(tabletId, barrierGenStep.Generation(), barrierGenStep.Step(),
channel, TLogoBlobID::MaxBlobSize, TLogoBlobID::MaxCookie, TLogoBlobID::MaxPartId,
TLogoBlobID::MaxCrcMode));
- Self->Data->ScanRange(&first, &last, TData::EScanFlags::INCLUDE_BEGIN | TData::EScanFlags::INCLUDE_END,
- [&](const TData::TKey& key, const TData::TValue& value) {
+
+ TData::TScanRange r{first, last, TData::EScanFlags::INCLUDE_BEGIN | TData::EScanFlags::INCLUDE_END};
+ Self->Data->ScanRange(r, nullptr, nullptr, [&](const TData::TKey& key, const TData::TValue& value) {
// there must be no blobs under the hard barrier and no blobs with mode other than Keep under the soft one
Y_VERIFY_S(!hard && value.KeepState == NKikimrBlobDepot::EKeepState::Keep, "Key# " << key.ToString()
<< " Value# " << value.ToString());
@@ -284,7 +283,8 @@ namespace NKikimr::NBlobDepot {
});
}
# if 0
- Self->Data->ScanRange(nullptr, nullptr, {}, [&](const TData::TKey& key, const TData::TValue& value) {
+ TData::TScanRange r{TData::TKey::Min(), TData::TKey::Max()};
+ Self->Data->ScanRange(r, nullptr, nullptr, [&](const TData::TKey& key, const TData::TValue& value) {
bool underSoft, underHard;
Self->BarrierServer->GetBlobBarrierRelation(key.GetBlobId(), &underSoft, &underHard);
Y_VERIFY(!underHard && (!underSoft || value.KeepState == NKikimrBlobDepot::EKeepState::Keep));
diff --git a/ydb/core/blob_depot/given_id_range_ut.cpp b/ydb/core/blob_depot/given_id_range_ut.cpp
new file mode 100644
index 0000000000..f7739134fb
--- /dev/null
+++ b/ydb/core/blob_depot/given_id_range_ut.cpp
@@ -0,0 +1,177 @@
+#include "types.h"
+#include <library/cpp/testing/unittest/registar.h>
+
+using namespace NKikimr::NBlobDepot;
+
+ui32 GenerateRandomValue(ui32 min, ui32 max) {
+ return min + RandomNumber(max - min + 1);
+}
+
+TGivenIdRange GenerateRandomRange(ui32 maxItems) {
+ TGivenIdRange res;
+
+ for (ui32 issuePos = 0; issuePos != maxItems; ) {
+ const bool value = RandomNumber(2u);
+ const ui32 numItems = GenerateRandomValue(1, maxItems - issuePos);
+ if (value) {
+ res.IssueNewRange(issuePos, issuePos + numItems);
+ }
+ issuePos += numItems;
+ }
+
+ res.CheckConsistency();
+ return res;
+}
+
+TGivenIdRange RangeFromArray(const std::vector<bool>& array) {
+ TGivenIdRange res;
+
+ std::optional<ui32> sequenceBegin;
+ for (ui32 i = 0; i < array.size(); ++i) {
+ if (array[i]) {
+ if (!sequenceBegin) {
+ sequenceBegin = i;
+ }
+ } else {
+ if (sequenceBegin) {
+ res.IssueNewRange(*sequenceBegin, i);
+ }
+ sequenceBegin.reset();
+ }
+ }
+ if (sequenceBegin) {
+ res.IssueNewRange(*sequenceBegin, array.size());
+ }
+
+ res.CheckConsistency();
+ UNIT_ASSERT_EQUAL(res.ToDebugArray(array.size()), array);
+ return res;
+}
+
+Y_UNIT_TEST_SUITE(GivenIdRange) {
+ Y_UNIT_TEST(IssueNewRange) {
+ for (ui32 i = 0; i < 1000; ++i) {
+ GenerateRandomRange(GenerateRandomValue(1, 1000));
+ }
+ }
+
+ Y_UNIT_TEST(Trim) {
+ for (ui32 i = 0; i < 1000; ++i) {
+ const ui32 maxItems = GenerateRandomValue(1, 1000);
+ TGivenIdRange range = GenerateRandomRange(maxItems);
+ TGivenIdRange originalRange(range);
+ const ui32 validSince = GenerateRandomValue(0, maxItems);
+ TGivenIdRange trimmed = range.Trim(validSince);
+ trimmed.CheckConsistency();
+ std::vector<bool> originalRangeArr = originalRange.ToDebugArray(maxItems);
+ std::vector<bool> rangeArr = range.ToDebugArray(maxItems);
+ std::vector<bool> trimmedArr = trimmed.ToDebugArray(maxItems);
+ for (ui32 i = 0; i < maxItems; ++i) {
+ UNIT_ASSERT_VALUES_EQUAL(originalRangeArr[i], rangeArr[i] + trimmedArr[i]);
+ if (i < validSince) {
+ UNIT_ASSERT(!rangeArr[i]);
+ } else {
+ UNIT_ASSERT(!trimmedArr[i]);
+ }
+ }
+ }
+ }
+
+ Y_UNIT_TEST(Subtract) {
+ for (ui32 i = 0; i < 10000; ++i) {
+ const ui32 maxItems = GenerateRandomValue(1, 1000);
+ TGivenIdRange range = GenerateRandomRange(maxItems);
+ std::vector<bool> rangeArr = range.ToDebugArray(maxItems);
+ std::vector<bool> subtractArr = GenerateRandomRange(maxItems).ToDebugArray(maxItems);
+ std::vector<bool> resArr = rangeArr;
+ for (ui32 i = 0; i < rangeArr.size(); ++i) {
+ if (subtractArr[i]) {
+ if (rangeArr[i]) {
+ resArr[i] = false;
+ } else {
+ subtractArr[i] = false;
+ }
+ }
+ }
+ TGivenIdRange subtract = RangeFromArray(subtractArr);
+ range.Subtract(subtract);
+ range.CheckConsistency();
+ UNIT_ASSERT_EQUAL(range.ToDebugArray(maxItems), resArr);
+ }
+ }
+
+ Y_UNIT_TEST(Points) {
+ for (ui32 i = 0; i < 100; ++i) {
+ const ui32 maxItems = GenerateRandomValue(1, 1000);
+ std::vector<bool> items(maxItems, false);
+ TGivenIdRange range;
+
+ for (ui32 j = 0; j < 1000; ++j) {
+ const ui32 index = RandomNumber(maxItems);
+ if (items[index]) {
+ range.RemovePoint(index);
+ } else {
+ range.AddPoint(index);
+ }
+ items[index] = !items[index];
+ range.CheckConsistency();
+ UNIT_ASSERT_EQUAL(range.ToDebugArray(maxItems), items);
+ }
+
+ for (ui32 i = 0; i < maxItems; ++i) {
+ UNIT_ASSERT_VALUES_EQUAL(range.GetPoint(i), items[i]);
+ }
+
+ const size_t index = std::find(items.begin(), items.end(), true) - items.begin();
+ if (index != items.size()) {
+ UNIT_ASSERT(!range.IsEmpty());
+ UNIT_ASSERT_VALUES_EQUAL(range.GetMinimumValue(), index);
+ } else {
+ UNIT_ASSERT(range.IsEmpty());
+ }
+ }
+ }
+
+ Y_UNIT_TEST(Runs) {
+ for (ui32 i = 0; i < 100; ++i) {
+ const ui32 maxItems = GenerateRandomValue(1, 1000);
+ std::vector<bool> items(maxItems, false);
+ TGivenIdRange range;
+
+ for (ui32 j = 0; j < 100; ++j) {
+ const ui32 index = RandomNumber(maxItems);
+ const bool value = items[index];
+ ui32 maxRunLen = 0;
+ while (index + maxRunLen < maxItems && items[index + maxRunLen] == value) {
+ ++maxRunLen;
+ }
+ const ui32 runLen = GenerateRandomValue(1, maxRunLen);
+ std::fill(items.begin() + index, items.begin() + index + runLen, !value);
+ if (value) {
+ for (ui32 i = 0; i < runLen; ++i) {
+ range.RemovePoint(index + i);
+ }
+ } else {
+ range.IssueNewRange(index, index + runLen);
+ }
+ range.CheckConsistency();
+ UNIT_ASSERT_EQUAL(range.ToDebugArray(maxItems), items);
+ }
+ }
+ }
+
+ Y_UNIT_TEST(Allocate) {
+ for (ui32 i = 0; i < 100; ++i) {
+ const ui32 maxItems = GenerateRandomValue(1, 1000);
+ TGivenIdRange range = GenerateRandomRange(maxItems);
+ std::vector<bool> items = range.ToDebugArray(maxItems);
+ while (!range.IsEmpty()) {
+ const ui32 index = range.Allocate();
+ UNIT_ASSERT_EQUAL(items.begin() + index, std::find(items.begin(), items.end(), true));
+ items[index] = false;
+ range.CheckConsistency();
+ UNIT_ASSERT_EQUAL(range.ToDebugArray(maxItems), items);
+ }
+ }
+ }
+}
diff --git a/ydb/core/blob_depot/group_metrics_exchange.cpp b/ydb/core/blob_depot/group_metrics_exchange.cpp
index 2b86d5edcf..052e583395 100644
--- a/ydb/core/blob_depot/group_metrics_exchange.cpp
+++ b/ydb/core/blob_depot/group_metrics_exchange.cpp
@@ -86,8 +86,6 @@ namespace NKikimr::NBlobDepot {
wb.SetGroupID(Config.GetVirtualGroupId());
wb.SetAllocatedSize(Data->GetTotalStoredDataSize());
wb.SetAvailableSize(params->GetAvailableSize());
- wb.SetReadThroughput(0);
- wb.SetWriteThroughput(0);
Send(NNodeWhiteboard::MakeNodeWhiteboardServiceId(SelfId().NodeId()), ev.release());
params->SetAllocatedSize(Data->GetTotalStoredDataSize());
@@ -101,4 +99,55 @@ namespace NKikimr::NBlobDepot {
}
}
+ void TBlobDepot::Handle(TEvBlobDepot::TEvPushMetrics::TPtr ev) {
+ const auto& record = ev->Get()->Record;
+ BytesRead += record.GetBytesRead();
+ BytesWritten += record.GetBytesWritten();
+ MetricsQ.emplace_back(TActivationContext::Monotonic(), BytesRead, BytesWritten);
+ UpdateThroughputs(false);
+ }
+
+ void TBlobDepot::UpdateThroughputs(bool reschedule) {
+ static constexpr TDuration Window = TDuration::Seconds(3);
+
+ if (Config.HasVirtualGroupId() && !MetricsQ.empty()) {
+ const TMonotonic now = TActivationContext::Monotonic();
+ const TMonotonic left = now - Window;
+ const auto comp = [](TMonotonic x, const auto& y) { return x < std::get<0>(y); };
+ if (const auto it = std::upper_bound(MetricsQ.begin(), MetricsQ.end(), left, comp); it != MetricsQ.begin()) {
+ MetricsQ.erase(MetricsQ.begin(), std::prev(it)); // remove all obsolete entries
+ if (MetricsQ.size() >= 2) {
+ auto& [xTimestamp, xRead, xWritten] = MetricsQ[0];
+ const auto& [yTimestamp, yRead, yWritten] = MetricsQ[1];
+ Y_VERIFY(xTimestamp <= left && left < yTimestamp);
+ static constexpr ui64 scale = 1'000'000;
+ const ui64 factor = (left - xTimestamp).MicroSeconds() * scale / (yTimestamp - xTimestamp).MicroSeconds();
+ xTimestamp = left;
+ xRead += (yRead - xRead) * factor / scale;
+ xWritten += (yWritten - xWritten) * factor / scale;
+ }
+ }
+
+ ui64 readThroughput = 0;
+ ui64 writeThroughput = 0;
+ const auto& [ts, read, written] = MetricsQ.front();
+ if (ts + TDuration::Seconds(1) < now) {
+ readThroughput = (BytesRead - read) * 1'000'000 / (now - ts).MicroSeconds();
+ writeThroughput = (BytesWritten - written) * 1'000'000 / (now - ts).MicroSeconds();
+ }
+
+ auto ev = std::make_unique<NNodeWhiteboard::TEvWhiteboard::TEvBSGroupStateUpdate>();
+ auto& wb = ev->Record;
+ wb.SetGroupID(Config.GetVirtualGroupId());
+ wb.SetReadThroughput(readThroughput);
+ wb.SetWriteThroughput(writeThroughput);
+ Send(NNodeWhiteboard::MakeNodeWhiteboardServiceId(SelfId().NodeId()), ev.release());
+ }
+
+ if (reschedule) {
+ TActivationContext::Schedule(TDuration::Seconds(1), new IEventHandle(TEvPrivate::EvUpdateThroughputs, 0,
+ SelfId(), {}, nullptr, 0));
+ }
+ }
+
} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/op_commit_blob_seq.cpp b/ydb/core/blob_depot/op_commit_blob_seq.cpp
index 964e0e90b1..2373af001c 100644
--- a/ydb/core/blob_depot/op_commit_blob_seq.cpp
+++ b/ydb/core/blob_depot/op_commit_blob_seq.cpp
@@ -133,24 +133,13 @@ namespace NKikimr::NBlobDepot {
if (Self->Data->IsLoaded()) {
return true;
}
- bool success = true;
for (const auto& item : Request->Get()->Record.GetItems()) {
auto key = TData::TKey::FromBinaryKey(item.GetKey(), Self->Config);
- if (Self->Data->IsKeyLoaded(key)) {
- continue;
- }
- using Table = Schema::Data;
- auto row = db.Table<Table>().Key(item.GetKey()).Select();
- if (!row.IsReady()) {
- success = false;
- } else if (row.IsValid()) {
- Self->Data->AddDataOnLoad(std::move(key), row.GetValue<Table::Value>(),
- row.GetValueOrDefault<Table::UncertainWrite>(), true);
- } else {
- Self->Data->AddLoadSkip(std::move(key));
+ if (!Self->Data->EnsureKeyLoaded(key, txc)) {
+ return false;
}
}
- return success;
+ return true;
}
bool CheckKeyAgainstBarrier(const TData::TKey& key, TString *error) {
diff --git a/ydb/core/blob_depot/space_monitor.cpp b/ydb/core/blob_depot/space_monitor.cpp
index 2809d3a4c7..033fdcd659 100644
--- a/ydb/core/blob_depot/space_monitor.cpp
+++ b/ydb/core/blob_depot/space_monitor.cpp
@@ -23,9 +23,31 @@ namespace NKikimr::NBlobDepot {
group.StatusFlags = msg.StatusFlags;
group.ApproximateFreeSpaceShare = msg.ApproximateFreeSpaceShare;
Self->InvalidateGroupForAllocation(groupId);
+
+ if (group.StatusFlags.Check(NKikimrBlobStorage::StatusDiskSpaceLightYellowMove)) {
+ HandleYellowChannels();
+ }
}
}
+ void TSpaceMonitor::HandleYellowChannels() {
+ TVector<ui32> yellowMove, yellowStop;
+
+ for (const auto& [groupId, group] : Groups) {
+ if (group.StatusFlags.Check(NKikimrBlobStorage::StatusDiskSpaceLightYellowMove)) {
+ yellowMove.insert(yellowMove.end(), group.Channels.begin(), group.Channels.end());
+ } else if (group.StatusFlags.Check(NKikimrBlobStorage::StatusDiskSpaceYellowStop)) {
+ yellowStop.insert(yellowMove.end(), group.Channels.begin(), group.Channels.end());
+ }
+ }
+
+ Y_VERIFY(yellowMove || yellowStop);
+ STLOG(PRI_INFO, BLOB_DEPOT, BDT28, "asking to reassign channels", (Id, Self->GetLogId()),
+ (YellowMove, FormatList(yellowMove)),
+ (YellowStop, FormatList(yellowStop)));
+ Self->Executor()->OnYellowChannels(std::move(yellowMove), std::move(yellowStop));
+ }
+
void TSpaceMonitor::Kick() {
if (Groups.empty()) {
Init();
@@ -49,11 +71,11 @@ namespace NKikimr::NBlobDepot {
}
const TChannelKind& kind = it->second;
for (const auto& [channel, group] : kind.ChannelGroups) {
- Groups.try_emplace(group);
+ Groups[group].Channels.push_back(channel);
}
}
- ui64 TSpaceMonitor::GetGroupAllocationWeight(ui32 groupId) const {
+ ui64 TSpaceMonitor::GetGroupAllocationWeight(ui32 groupId, bool stopOnLightYellow) const {
const auto it = Groups.find(groupId);
if (it == Groups.end()) {
Y_VERIFY_DEBUG(false);
@@ -61,8 +83,10 @@ namespace NKikimr::NBlobDepot {
}
const TGroupRecord& group = it->second;
- if (group.StatusFlags.Check(NKikimrBlobStorage::StatusDiskSpaceLightYellowMove)) {
- return 0; // do not write data to this group
+ if (group.StatusFlags.Check(stopOnLightYellow
+ ? NKikimrBlobStorage::StatusDiskSpaceLightYellowMove
+ : NKikimrBlobStorage::StatusDiskSpaceYellowStop)) {
+ return 0;
}
if (!group.ApproximateFreeSpaceShare) { // not collected yet?
diff --git a/ydb/core/blob_depot/space_monitor.h b/ydb/core/blob_depot/space_monitor.h
index 8f4330063e..d3876a3db7 100644
--- a/ydb/core/blob_depot/space_monitor.h
+++ b/ydb/core/blob_depot/space_monitor.h
@@ -12,6 +12,7 @@ namespace NKikimr::NBlobDepot {
bool StatusRequestInFlight = false;
TStorageStatusFlags StatusFlags;
float ApproximateFreeSpaceShare = 0.0f;
+ std::vector<ui8> Channels;
};
std::unordered_map<ui32, TGroupRecord> Groups;
@@ -27,13 +28,14 @@ namespace NKikimr::NBlobDepot {
void Handle(TEvBlobStorage::TEvStatusResult::TPtr ev);
void Kick();
- ui64 GetGroupAllocationWeight(ui32 groupId) const;
+ ui64 GetGroupAllocationWeight(ui32 groupId, bool stopOnLightYellow) const;
void SetSpaceColor(NKikimrBlobStorage::TPDiskSpaceColor::E spaceColor, float approximateFreeSpaceShare);
NKikimrBlobStorage::TPDiskSpaceColor::E GetSpaceColor() const;
float GetApproximateFreeSpaceShare() const;
private:
void Init();
+ void HandleYellowChannels();
};
} // NKikimr::NBlobDepot
diff --git a/ydb/core/blob_depot/types.h b/ydb/core/blob_depot/types.h
index 72714424d6..ba9a3f0148 100644
--- a/ydb/core/blob_depot/types.h
+++ b/ydb/core/blob_depot/types.h
@@ -151,7 +151,6 @@ namespace NKikimr::NBlobDepot {
};
using TValueChain = NProtoBuf::RepeatedPtrField<NKikimrBlobDepot::TValueChain>;
- using TResolvedValueChain = NProtoBuf::RepeatedPtrField<NKikimrBlobDepot::TResolvedValueChain>;
template<typename TCallback>
void EnumerateBlobsForValueChain(const TValueChain& valueChain, ui64 tabletId, TCallback&& callback) {
@@ -170,6 +169,26 @@ namespace NKikimr::NBlobDepot {
}
}
+ inline bool IsSameValueChain(const TValueChain& x, const TValueChain& y) {
+ if (x.size() != y.size()) {
+ return false;
+ }
+ for (int i = 0; i < x.size(); ++i) {
+ TString a;
+ bool success = x[i].SerializeToString(&a);
+ Y_VERIFY(success);
+
+ TString b;
+ success = y[i].SerializeToString(&b);
+ Y_VERIFY(success);
+
+ if (a != b) {
+ return false;
+ }
+ }
+ return true;
+ }
+
class TGenStep {
ui64 Value = 0;
diff --git a/ydb/core/blob_depot/ut/CMakeLists.darwin.txt b/ydb/core/blob_depot/ut/CMakeLists.darwin.txt
new file mode 100644
index 0000000000..2b3e361ae8
--- /dev/null
+++ b/ydb/core/blob_depot/ut/CMakeLists.darwin.txt
@@ -0,0 +1,44 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-core-blob_depot-ut)
+target_include_directories(ydb-core-blob_depot-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot
+)
+target_link_libraries(ydb-core-blob_depot-ut PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ ydb-core-blob_depot
+)
+target_link_options(ydb-core-blob_depot-ut PRIVATE
+ -Wl,-no_deduplicate
+ -Wl,-sdk_version,10.15
+ -fPIC
+ -fPIC
+ -framework
+ CoreFoundation
+)
+target_sources(ydb-core-blob_depot-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/closed_interval_set_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/given_id_range_ut.cpp
+)
+add_test(
+ NAME
+ ydb-core-blob_depot-ut
+ COMMAND
+ ydb-core-blob_depot-ut
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+vcs_info(ydb-core-blob_depot-ut)
diff --git a/ydb/core/blob_depot/ut/CMakeLists.linux-aarch64.txt b/ydb/core/blob_depot/ut/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..977e0101d9
--- /dev/null
+++ b/ydb/core/blob_depot/ut/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,47 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-core-blob_depot-ut)
+target_include_directories(ydb-core-blob_depot-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot
+)
+target_link_libraries(ydb-core-blob_depot-ut PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-lfalloc
+ cpp-testing-unittest_main
+ ydb-core-blob_depot
+)
+target_link_options(ydb-core-blob_depot-ut PRIVATE
+ -ldl
+ -lrt
+ -Wl,--no-as-needed
+ -fPIC
+ -fPIC
+ -lpthread
+ -lrt
+ -ldl
+)
+target_sources(ydb-core-blob_depot-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/closed_interval_set_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/given_id_range_ut.cpp
+)
+add_test(
+ NAME
+ ydb-core-blob_depot-ut
+ COMMAND
+ ydb-core-blob_depot-ut
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+vcs_info(ydb-core-blob_depot-ut)
diff --git a/ydb/core/blob_depot/ut/CMakeLists.linux.txt b/ydb/core/blob_depot/ut/CMakeLists.linux.txt
new file mode 100644
index 0000000000..d765987522
--- /dev/null
+++ b/ydb/core/blob_depot/ut/CMakeLists.linux.txt
@@ -0,0 +1,49 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-core-blob_depot-ut)
+target_include_directories(ydb-core-blob_depot-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot
+)
+target_link_libraries(ydb-core-blob_depot-ut PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ ydb-core-blob_depot
+)
+target_link_options(ydb-core-blob_depot-ut PRIVATE
+ -ldl
+ -lrt
+ -Wl,--no-as-needed
+ -fPIC
+ -fPIC
+ -lpthread
+ -lrt
+ -ldl
+)
+target_sources(ydb-core-blob_depot-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/closed_interval_set_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blob_depot/given_id_range_ut.cpp
+)
+add_test(
+ NAME
+ ydb-core-blob_depot-ut
+ COMMAND
+ ydb-core-blob_depot-ut
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+vcs_info(ydb-core-blob_depot-ut)
diff --git a/ydb/core/blob_depot/ut/CMakeLists.txt b/ydb/core/blob_depot/ut/CMakeLists.txt
new file mode 100644
index 0000000000..3e0811fb22
--- /dev/null
+++ b/ydb/core/blob_depot/ut/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (APPLE)
+ include(CMakeLists.darwin.txt)
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux.txt)
+endif()
diff --git a/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp b/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp
index 1156f3180e..f25cf8e082 100644
--- a/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp
+++ b/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp
@@ -478,7 +478,7 @@ private:
SessionId = ev->Sender;
if (ConnectionFailureTime) {
- QLOG_WARN_S("BSQ20", "TEvNodeConnected NodeId# " << ev->Get()->NodeId
+ QLOG_INFO_S("BSQ20", "TEvNodeConnected NodeId# " << ev->Get()->NodeId
<< " ConnectionFailureTime# " << ConnectionFailureTime
<< " connection was recovered");
ConnectionFailureTime = TInstant();
@@ -490,7 +490,7 @@ private:
if (ev->Get()->NodeId == RemoteVDisk.NodeId()) {
if (!ConnectionFailureTime) {
ConnectionFailureTime = ctx.Now();
- QLOG_WARN_S("BSQ13", "TEvNodeDisconnected NodeId# " << ev->Get()->NodeId
+ QLOG_INFO_S("BSQ13", "TEvNodeDisconnected NodeId# " << ev->Get()->NodeId
<< " ConnectionFailureTime# " << ConnectionFailureTime);
}
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy.h b/ydb/core/blobstorage/dsproxy/dsproxy.h
index c4bb0d7e39..365f7950c9 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy.h
+++ b/ydb/core/blobstorage/dsproxy/dsproxy.h
@@ -131,6 +131,33 @@ NActors::NLog::EPriority PriorityForStatusOutbound(NKikimrProto::EReplyStatus st
NActors::NLog::EPriority PriorityForStatusResult(NKikimrProto::EReplyStatus status);
NActors::NLog::EPriority PriorityForStatusInbound(NKikimrProto::EReplyStatus status);
+inline void SetExecutionRelay(IEventBase& ev, std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay) {
+ switch (const ui32 type = ev.Type()) {
+#define XX(T) \
+ case TEvBlobStorage::Ev##T: \
+ static_cast<TEvBlobStorage::TEv##T&>(ev).ExecutionRelay = std::move(executionRelay); \
+ break; \
+ case TEvBlobStorage::Ev##T##Result: \
+ static_cast<TEvBlobStorage::TEv##T##Result&>(ev).ExecutionRelay = std::move(executionRelay); \
+ break; \
+ //
+
+ XX(Put)
+ XX(Get)
+ XX(Block)
+ XX(Discover)
+ XX(Range)
+ XX(CollectGarbage)
+ XX(Status)
+ XX(Patch)
+ XX(Assimilate)
+#undef XX
+
+ default:
+ Y_FAIL("unexpected event Type# 0x%08" PRIx32, type);
+ }
+}
+
template<typename TDerived>
class TBlobStorageGroupRequestActor : public TActor<TBlobStorageGroupRequestActor<TDerived>> {
public:
@@ -141,7 +168,8 @@ public:
TBlobStorageGroupRequestActor(TIntrusivePtr<TBlobStorageGroupInfo> info, TIntrusivePtr<TGroupQueues> groupQueues,
TIntrusivePtr<TBlobStorageGroupProxyMon> mon, const TActorId& source, ui64 cookie, NWilson::TTraceId traceId,
NKikimrServices::EServiceKikimr logComponent, bool logAccEnabled, TMaybe<TGroupStat::EKind> latencyQueueKind,
- TInstant now, TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters, ui32 restartCounter, TString name)
+ TInstant now, TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters, ui32 restartCounter, TString name,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay)
: TActor<TBlobStorageGroupRequestActor<TDerived>>(&TThis::InitialStateFunc, TDerived::ActorActivityType())
, Info(std::move(info))
, GroupQueues(std::move(groupQueues))
@@ -155,6 +183,7 @@ public:
, LatencyQueueKind(latencyQueueKind)
, RequestStartTime(now)
, RacingDomains(&Info->GetTopology())
+ , ExecutionRelay(std::move(executionRelay))
{
TDerived::ActiveCounter(Mon)->Inc();
Span
@@ -221,7 +250,7 @@ public:
// sanity check for correct VDisk generation ??? possible race
Y_VERIFY_S(status == NKikimrProto::RACE || vdiskId.GroupGeneration <= Info->GroupGeneration ||
- TEvent::EventType == TEvBlobStorage::EvVStatusResult,
+ TEvent::EventType == TEvBlobStorage::EvVStatusResult || TEvent::EventType == TEvBlobStorage::EvVAssimilateResult,
"status# " << NKikimrProto::EReplyStatus_Name(status) << " vdiskId.GroupGeneration# " << vdiskId.GroupGeneration
<< " Info->GroupGeneration# " << Info->GroupGeneration << " Response# " << ev->Get()->ToString());
@@ -272,6 +301,9 @@ public:
// make NodeWarden restart the query just after proxy reconfiguration
Y_VERIFY_DEBUG(RestartCounter < 100);
auto q = self.RestartQuery(RestartCounter + 1);
+ if (q->Type() != TEvBlobStorage::EvBunchOfEvents) {
+ SetExecutionRelay(*q, std::exchange(ExecutionRelay, {}));
+ }
++*Mon->NodeMon->RestartHisto[Min<size_t>(Mon->NodeMon->RestartHisto.size() - 1, RestartCounter)];
const TActorId& proxyId = MakeBlobStorageProxyID(Info->GroupID);
TActivationContext::Send(new IEventHandle(nodeWardenId, Source, q.release(), 0, Cookie, &proxyId, Span.GetTraceId()));
@@ -414,6 +446,9 @@ public:
}
void PassAway() override {
+ // ensure we didn't keep execution relay on occasion
+ Y_VERIFY_DEBUG_S(!ExecutionRelay, LogCtx.RequestPrefix << " actor died without properly sending response");
+
// ensure that we are dying for the first time
Y_VERIFY(!std::exchange(Dead, true));
TDerived::ActiveCounter(Mon)->Dec();
@@ -452,6 +487,13 @@ public:
#undef XX
}
+ if (ExecutionRelay) {
+ SetExecutionRelay(*ev, std::exchange(ExecutionRelay, {}));
+ ExecutionRelayUsed = true;
+ } else {
+ Y_VERIFY(!ExecutionRelayUsed);
+ }
+
// ensure that we are dying for the first time
Y_VERIFY(!Dead);
if (RequestHandleClass && PoolCounters) {
@@ -516,7 +558,7 @@ private:
protected:
using TThis = TDerived;
- TIntrusivePtr<TBlobStorageGroupInfo> Info;
+ const TIntrusivePtr<TBlobStorageGroupInfo> Info;
TIntrusivePtr<TGroupQueues> GroupQueues;
TIntrusivePtr<TBlobStorageGroupProxyMon> Mon;
TIntrusivePtr<TStoragePoolCounters> PoolCounters;
@@ -543,6 +585,8 @@ private:
std::deque<std::unique_ptr<IEventHandle>> PostponedQ;
TBlobStorageGroupInfo::TGroupFailDomains RacingDomains; // a set of domains we've received RACE from
TActorId ProxyActorId;
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> ExecutionRelay;
+ bool ExecutionRelayUsed = false;
};
void Encrypt(char *destination, const char *source, size_t shift, size_t sizeBytes, const TLogoBlobID &id,
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_assimilate.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_assimilate.cpp
index 5b8394ccfb..3e76e63db8 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_assimilate.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_assimilate.cpp
@@ -268,7 +268,7 @@ public:
NWilson::TTraceId traceId, TInstant now, TIntrusivePtr<TStoragePoolCounters>& storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_ASSIMILATE, false, {}, now, storagePoolCounters, ev->RestartCounter,
- "DSProxy.Assimilate")
+ "DSProxy.Assimilate", std::move(ev->ExecutionRelay))
, SkipBlocksUpTo(ev->SkipBlocksUpTo)
, SkipBarriersUpTo(ev->SkipBarriersUpTo)
, SkipBlobsUpTo(ev->SkipBlobsUpTo)
@@ -314,7 +314,7 @@ public:
const auto& record = ev->Get()->Record;
const TVDiskID vdiskId = VDiskIDFromVDiskID(record.GetVDiskID());
- const ui32 orderNumber = Info->GetOrderNumber(vdiskId);
+ const ui32 orderNumber = Info->GetTopology().GetOrderNumber(vdiskId);
Y_VERIFY(orderNumber < PerVDiskInfo.size());
if (record.GetStatus() == NKikimrProto::OK) {
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_block.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_block.cpp
index f381d505a7..117b9f6588 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_block.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_block.cpp
@@ -139,7 +139,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_BLOCK, false, {}, now, storagePoolCounters, ev->RestartCounter,
- "DSProxy.Block")
+ "DSProxy.Block", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, Generation(ev->Generation)
, Deadline(ev->Deadline)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_collect.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_collect.cpp
index d5875e7095..de0d07e30c 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_collect.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_collect.cpp
@@ -111,7 +111,7 @@ class TBlobStorageGroupCollectGarbageRequest : public TBlobStorageGroupRequestAc
auto result = std::make_unique<TEvBlobStorage::TEvCollectGarbageResult>(status, TabletId, RecordGeneration,
PerGenerationCounter, Channel);
result->ErrorReason = ErrorReason;
- A_LOG_LOG_S(true, PriorityForStatusOutbound(status), "DSPC02", "Result# " << result->Print(false));
+ A_LOG_LOG_S(true, status == NKikimrProto::OK ? NLog::PRI_INFO : NLog::PRI_NOTICE, "DSPC02", "Result# " << result->Print(false));
SendResponseAndDie(std::move(result));
}
@@ -147,7 +147,7 @@ public:
NWilson::TTraceId traceId, TInstant now, TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_COLLECT, false, {}, now, storagePoolCounters, ev->RestartCounter,
- "DSProxy.CollectGarbage")
+ "DSProxy.CollectGarbage", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, RecordGeneration(ev->RecordGeneration)
, PerGenerationCounter(ev->PerGenerationCounter)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp
index b9201f1692..ca296d76ad 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp
@@ -886,7 +886,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_DISCOVER, true, {}, now, storagePoolCounters, ev->RestartCounter,
- "DSProxy.Discover")
+ "DSProxy.Discover", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, MinGeneration(ev->MinGeneration)
, ReadBody(ev->ReadBody)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3dc.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3dc.cpp
index 9a5c04380e..31ceba6c38 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3dc.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3dc.cpp
@@ -464,7 +464,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(std::move(info), std::move(state), std::move(mon), source, cookie,
std::move(traceId), NKikimrServices::BS_PROXY_DISCOVER, false, {}, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.Discover(mirror-3-dc)")
+ ev->RestartCounter, "DSProxy.Discover(mirror-3-dc)", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, MinGeneration(ev->MinGeneration)
, StartTime(now)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3of4.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3of4.cpp
index 2b350fe8a6..4e7ff9c2ce 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3of4.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_discover_m3of4.cpp
@@ -36,7 +36,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(std::move(info), std::move(state), std::move(mon), source, cookie,
std::move(traceId), NKikimrServices::BS_PROXY_DISCOVER, false, {}, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.Discover(mirror-3of4)")
+ ev->RestartCounter, "DSProxy.Discover(mirror-3of4)", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, MinGeneration(ev->MinGeneration)
, StartTime(now)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_get.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_get.cpp
index 0b89004dd2..bd5ed008ea 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_get.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_get.cpp
@@ -465,6 +465,7 @@ class TBlobStorageGroupGetRequest : public TBlobStorageGroupRequestActor<TBlobSt
LWPROBE(DSProxyRequestDuration, TEvBlobStorage::EvGet, requestSize, duration.SecondsFloat() * 1000.0, tabletId,
evResult->GroupId, channel, NKikimrBlobStorage::EGetHandleClass_Name(GetImpl.GetHandleClass()),
success);
+ A_LOG_LOG_S(true, success ? NLog::PRI_INFO : NLog::PRI_NOTICE, "BPG68", "Result# " << evResult->Print(false));
return SendResponseAndDie(std::unique_ptr<TEvBlobStorage::TEvGetResult>(evResult.Release()));
}
@@ -493,7 +494,8 @@ public:
TInstant now, TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters, bool isVMultiPutMode)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_GET, ev->IsVerboseNoDataEnabled || ev->CollectDebugInfo,
- latencyQueueKind, now, storagePoolCounters, ev->RestartCounter, "DSProxy.Get")
+ latencyQueueKind, now, storagePoolCounters, ev->RestartCounter, "DSProxy.Get",
+ std::move(ev->ExecutionRelay))
, GetImpl(info, state, ev, std::move(nodeLayout), LogCtx.RequestPrefix)
, Orbit(std::move(ev->Orbit))
, Deadline(ev->Deadline)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_get_impl.h b/ydb/core/blobstorage/dsproxy/dsproxy_get_impl.h
index 5a80f045d5..8119877453 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_get_impl.h
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_get_impl.h
@@ -124,14 +124,15 @@ public:
TString DumpQuery() const {
TStringStream str;
- str << "{";
+ str << '{';
+ str << "MustRestoreFirst# " << MustRestoreFirst;
for (ui32 i = 0; i < QuerySize; ++i) {
- str << (i ? " " : "")
+ str << ' '
<< Queries[i].Id
- << "@" << Queries[i].Shift
- << ":" << Queries[i].Size;
+ << '@' << Queries[i].Shift
+ << ':' << Queries[i].Size;
}
- str << "}";
+ str << '}';
return str.Str();
}
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_impl.h b/ydb/core/blobstorage/dsproxy/dsproxy_impl.h
index 47d60411f3..8e46ae6c36 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_impl.h
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_impl.h
@@ -285,6 +285,7 @@ class TBlobStorageGroupProxy : public TActorBootstrapped<TBlobStorageGroupProxy>
? NKikimrProto::ERROR
: NKikimrProto::NO_GROUP;
auto response = ev->Get()->MakeErrorResponse(status, ErrorDescription, GroupId);
+ SetExecutionRelay(*response, std::move(ev->Get()->ExecutionRelay));
NActors::NLog::EPriority priority = CheckPriorityForErrorState();
LOG_LOG_S(*TlsActivationContext, priority, NKikimrServices::BS_PROXY, ExtraLogInfo << "Group# " << GroupId
<< " HandleError ev# " << ev->Get()->Print(false)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_indexrestoreget.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_indexrestoreget.cpp
index 82499e1108..c15adde217 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_indexrestoreget.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_indexrestoreget.cpp
@@ -35,7 +35,7 @@ class TBlobStorageGroupIndexRestoreGetRequest
THashMap<TLogoBlobID, std::pair<bool, bool>> KeepFlags;
void ReplyAndDie(NKikimrProto::EReplyStatus status) {
- A_LOG_DEBUG_S("DSPI14", "ReplyAndDie"
+ A_LOG_INFO_S("DSPI14", "ReplyAndDie"
<< " Reply with status# " << NKikimrProto::EReplyStatus_Name(status)
<< " PendingResult# " << (PendingResult ? PendingResult->ToString().data() : "nullptr"));
if (status != NKikimrProto::OK) {
@@ -270,7 +270,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_INDEXRESTOREGET, false, latencyQueueKind, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.IndexRestoreGet")
+ ev->RestartCounter, "DSProxy.IndexRestoreGet", std::move(ev->ExecutionRelay))
, QuerySize(ev->QuerySize)
, Queries(ev->Queries.Release())
, Deadline(ev->Deadline)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_multicollect.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_multicollect.cpp
index 28d623e7d7..e16fb06f16 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_multicollect.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_multicollect.cpp
@@ -97,7 +97,7 @@ public:
NWilson::TTraceId traceId, TInstant now, TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_MULTICOLLECT, false, {}, now, storagePoolCounters, 0,
- "DSProxy.MultiCollect")
+ "DSProxy.MultiCollect", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, RecordGeneration(ev->RecordGeneration)
, PerGenerationCounter(ev->PerGenerationCounter)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_multiget.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_multiget.cpp
index e5d734c9d7..eba8d52a25 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_multiget.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_multiget.cpp
@@ -97,7 +97,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_MULTIGET, false, latencyQueueKind, now, storagePoolCounters, 0,
- "DSProxy.MultiGet")
+ "DSProxy.MultiGet", std::move(ev->ExecutionRelay))
, QuerySize(ev->QuerySize)
, Queries(ev->Queries.Release())
, Deadline(ev->Deadline)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
index d74aa9d096..8950f18d7d 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
@@ -108,7 +108,7 @@ public:
bool useVPatch = false)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_PATCH, false, {}, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.Patch")
+ ev->RestartCounter, "DSProxy.Patch", std::move(ev->ExecutionRelay))
, OriginalGroupId(ev->OriginalGroupId)
, OriginalId(ev->OriginalId)
, PatchedId(ev->PatchedId)
@@ -706,8 +706,8 @@ public:
handoffForParts.resize(inPrimary.size());
for (auto &[subgroupIdx, partId] : FoundParts) {
- if (subgroupIdx == partId) {
- inPrimary[subgroupIdx] = true;
+ if (subgroupIdx == partId - 1) {
+ inPrimary[partId - 1] = true;
} else {
handoffForParts[partId - 1].push_back(subgroupIdx);
}
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_put.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_put.cpp
index 5c682482e6..a9ce350f30 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_put.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_put.cpp
@@ -329,7 +329,7 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor<TBlobSt
void SendReply(std::unique_ptr<TEvBlobStorage::TEvPutResult> &putResult, ui64 blobIdx) {
NKikimrProto::EReplyStatus status = putResult->Status;
- A_LOG_LOG_S(false, status == NKikimrProto::OK ? NLog::PRI_DEBUG : NLog::PRI_NOTICE, "BPP21",
+ A_LOG_LOG_S(false, status == NKikimrProto::OK ? NLog::PRI_INFO : NLog::PRI_NOTICE, "BPP21",
"SendReply putResult# " << putResult->ToString() << " ResponsesSent# " << ResponsesSent
<< " PutImpl.Blobs.size# " << PutImpl.Blobs.size()
<< " Last# " << (ResponsesSent + 1 == PutImpl.Blobs.size() ? "true" : "false"));
@@ -353,6 +353,7 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor<TBlobSt
LWTRACK(DSProxyPutReply, PutImpl.Blobs[blobIdx].Orbit);
putResult->Orbit = std::move(PutImpl.Blobs[blobIdx].Orbit);
putResult->WrittenBeyondBarrier = PutImpl.WrittenBeyondBarrier[blobIdx];
+ putResult->ExecutionRelay = std::move(PutImpl.Blobs[blobIdx].ExecutionRelay);
if (!IsManyPuts) {
SendResponse(std::move(putResult), TimeStatsEnabled ? &TimeStats : nullptr);
} else {
@@ -402,6 +403,7 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor<TBlobSt
item.Span.GetTraceId()
));
put->RestartCounter = counter;
+ put->ExecutionRelay = std::move(item.ExecutionRelay);
}
return ev;
}
@@ -429,7 +431,7 @@ public:
bool enableRequestMod3x3ForMinLatecy)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_PUT, false, latencyQueueKind, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.Put")
+ ev->RestartCounter, "DSProxy.Put", nullptr)
, PutImpl(info, state, ev, mon, enableRequestMod3x3ForMinLatecy, source, cookie, Span.GetTraceId())
, WaitingVDiskResponseCount(info->GetTotalVDisksNum())
, Deadline(ev->Deadline)
@@ -472,7 +474,7 @@ public:
bool enableRequestMod3x3ForMinLatecy)
: TBlobStorageGroupRequestActor(info, state, mon, TActorId(), 0, NWilson::TTraceId(),
NKikimrServices::BS_PROXY_PUT, false, latencyQueueKind, now, storagePoolCounters,
- MaxRestartCounter(events), "DSProxy.Put")
+ MaxRestartCounter(events), "DSProxy.Put", nullptr)
, PutImpl(info, state, events, mon, handleClass, tactic, enableRequestMod3x3ForMinLatecy)
, WaitingVDiskResponseCount(info->GetTotalVDisksNum())
, IsManyPuts(true)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_put_impl.h b/ydb/core/blobstorage/dsproxy/dsproxy_put_impl.h
index b9ef53f45a..186f39c2d9 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_put_impl.h
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_put_impl.h
@@ -55,9 +55,11 @@ private:
bool Replied = false;
std::vector<std::pair<ui64, ui32>> ExtraBlockChecks;
NWilson::TSpan Span;
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> ExecutionRelay;
TBlobInfo(TLogoBlobID id, TRope&& buffer, TActorId recipient, ui64 cookie, NWilson::TTraceId traceId,
- NLWTrace::TOrbit&& orbit, std::vector<std::pair<ui64, ui32>> extraBlockChecks, bool single)
+ NLWTrace::TOrbit&& orbit, std::vector<std::pair<ui64, ui32>> extraBlockChecks, bool single,
+ std::shared_ptr<TEvBlobStorage::TExecutionRelay> executionRelay)
: BlobId(id)
, Buffer(std::move(buffer))
, BufferSize(Buffer.size())
@@ -66,6 +68,7 @@ private:
, Orbit(std::move(orbit))
, ExtraBlockChecks(std::move(extraBlockChecks))
, Span(single ? NWilson::TSpan() : NWilson::TSpan(TWilson::BlobStorage, std::move(traceId), "DSProxy.Put.Blob"))
+ , ExecutionRelay(std::move(executionRelay))
{}
void Output(IOutputStream& s) const {
@@ -118,7 +121,7 @@ public:
, Tactic(ev->Tactic)
{
Blobs.emplace_back(ev->Id, TRope(ev->Buffer), recipient, cookie, std::move(traceId), std::move(ev->Orbit),
- std::move(ev->ExtraBlockChecks), true);
+ std::move(ev->ExtraBlockChecks), true, std::move(ev->ExecutionRelay));
auto& blob = Blobs.back();
LWPROBE(DSProxyBlobPutTactics, blob.BlobId.TabletID(), Info->GroupID, blob.BlobId.ToString(), Tactic,
@@ -147,7 +150,7 @@ public:
Y_VERIFY(msg.HandleClass == putHandleClass);
Y_VERIFY(msg.Tactic == tactic);
Blobs.emplace_back(msg.Id, TRope(msg.Buffer), ev->Sender, ev->Cookie, std::move(ev->TraceId),
- std::move(msg.Orbit), std::move(msg.ExtraBlockChecks), false);
+ std::move(msg.Orbit), std::move(msg.ExtraBlockChecks), false, std::move(msg.ExecutionRelay));
Deadline = Max(Deadline, msg.Deadline);
auto& blob = Blobs.back();
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp
index 11f86adae9..d1783af11f 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp
@@ -26,8 +26,6 @@ class TBlobStorageGroupRangeRequest : public TBlobStorageGroupRequestActor<TBlob
const bool Decommission;
TInstant StartTime;
- TAutoPtr<TEvBlobStorage::TEvRangeResult> Reply;
-
TMap<TLogoBlobID, TBlobStatusTracker> BlobStatus;
TBlobStorageGroupInfo::TGroupVDisks FailedDisks;
@@ -285,7 +283,7 @@ class TBlobStorageGroupRangeRequest : public TBlobStorageGroupRequestActor<TBlob
Y_VERIFY(response.Id == BlobsToGet[i].BlobId);
if (getResult.Responses[i].Status == NKikimrProto::OK) {
- result->Responses.emplace_back(response.Id, response.Buffer);
+ result->Responses.emplace_back(response.Id, std::move(response.Buffer), response.Keep, response.DoNotKeep);
} else if (getResult.Responses[i].Status != NKikimrProto::NODATA || BlobsToGet[i].RequiredToBePresent) {
// it's okay to get NODATA if blob wasn't confirmed -- this blob is simply thrown out of resulting
// set; otherwise we return error about lost data
@@ -301,7 +299,7 @@ class TBlobStorageGroupRangeRequest : public TBlobStorageGroupRequestActor<TBlob
if (To < From) {
std::reverse(result->Responses.begin(), result->Responses.end());
}
- A_LOG_LOG_S(true, PriorityForStatusOutbound(status), "DSR05", "Result# " << result->Print(false));
+ A_LOG_LOG_S(true, NLog::PRI_INFO, "DSR05", "Result# " << result->Print(false));
SendReply(result);
}
@@ -309,7 +307,7 @@ class TBlobStorageGroupRangeRequest : public TBlobStorageGroupRequestActor<TBlob
std::unique_ptr<TEvBlobStorage::TEvRangeResult> result(new TEvBlobStorage::TEvRangeResult(
status, From, To, Info->GroupID));
result->ErrorReason = ErrorReason;
- A_LOG_LOG_S(true, PriorityForStatusOutbound(status), "DSR06", "Result# " << result->Print(false));
+ A_LOG_LOG_S(true, NLog::PRI_NOTICE, "DSR06", "Result# " << result->Print(false));
SendReply(result);
}
@@ -344,7 +342,7 @@ public:
TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_RANGE, false, {}, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.Range")
+ ev->RestartCounter, "DSProxy.Range", std::move(ev->ExecutionRelay))
, TabletId(ev->TabletId)
, From(ev->From)
, To(ev->To)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_request.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_request.cpp
index 87b4d72b5d..6a622b7b7a 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_request.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_request.cpp
@@ -91,6 +91,7 @@ namespace NKikimr {
std::unique_ptr<TEvBlobStorage::TEvPutResult> result(
new TEvBlobStorage::TEvPutResult(NKikimrProto::ERROR, ev->Get()->Id, 0, GroupId, 0.f));
result->ErrorReason = str.Str();
+ result->ExecutionRelay = std::move(ev->Get()->ExecutionRelay);
LOG_ERROR_S(*TlsActivationContext, NKikimrServices::BS_PROXY,
"HandleNormal ev# " << ev->Get()->Print(false)
<< " result# " << result->Print(false)
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_status.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_status.cpp
index dfbe247be8..8ddf88414f 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_status.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_status.cpp
@@ -90,7 +90,7 @@ public:
ui64 cookie, NWilson::TTraceId traceId, TInstant now, TIntrusivePtr<TStoragePoolCounters> &storagePoolCounters)
: TBlobStorageGroupRequestActor(info, state, mon, source, cookie, std::move(traceId),
NKikimrServices::BS_PROXY_STATUS, false, {}, now, storagePoolCounters,
- ev->RestartCounter, "DSProxy.Status")
+ ev->RestartCounter, "DSProxy.Status", std::move(ev->ExecutionRelay))
, Deadline(ev->Deadline)
, Requests(0)
, Responses(0)
diff --git a/ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.cpp b/ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.cpp
index b9404a73b1..4917dad272 100644
--- a/ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.cpp
+++ b/ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.cpp
@@ -15,43 +15,50 @@ namespace NKikimr {
void Handle(TEvBlobStorage::TEvPut::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM01, "TEvPut", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, Model->Handle(ev->Get()),0, ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), Model->Handle(ev->Get())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvGet::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM02, "TEvGet", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, Model->Handle(ev->Get()), 0, ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), Model->Handle(ev->Get())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvBlock::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM03, "TEvBlock", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, Model->Handle(ev->Get()), 0, ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), Model->Handle(ev->Get())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvDiscover::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM04, "TEvDiscover", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, Model->Handle(ev->Get()), 0, ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), Model->Handle(ev->Get())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvRange::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM05, "TEvRange", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, Model->Handle(ev->Get()), 0, ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), Model->Handle(ev->Get())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvCollectGarbage::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM06, "TEvCollectGarbage", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, Model->Handle(ev->Get()), 0, ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), Model->Handle(ev->Get())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvStatus::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM07, "TEvStatus", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, new TEvBlobStorage::TEvStatusResult(NKikimrProto::OK, Model->GetStorageStatusFlags()), 0,
- ev->Cookie);
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), new TEvBlobStorage::TEvStatusResult(NKikimrProto::OK,
+ Model->GetStorageStatusFlags())), 0, ev->Cookie);
}
void Handle(TEvBlobStorage::TEvAssimilate::TPtr& ev) {
STLOG(PRI_DEBUG, BS_PROXY, BSPM09, "TEvAssimilate", (Msg, ev->Get()->ToString()));
- Send(ev->Sender, new TEvBlobStorage::TEvAssimilateResult(NKikimrProto::ERROR, "not implemented"));
+ Send(ev->Sender, CopyExecutionRelay(ev->Get(), new TEvBlobStorage::TEvAssimilateResult(NKikimrProto::ERROR,
+ "not implemented")), 0, ev->Cookie);
+ }
+
+ template<typename TOut, typename TIn>
+ TOut *CopyExecutionRelay(TIn *in, TOut *out) {
+ out->ExecutionRelay = std::move(in->ExecutionRelay);
+ return out;
}
void HandlePoison(TEvents::TEvPoisonPill::TPtr& ev) {
diff --git a/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp b/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp
index e663567105..6a8fa70cc4 100644
--- a/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp
+++ b/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp
@@ -816,7 +816,7 @@ TVDiskID TBlobStorageGroupInfo::GetVDiskInSubgroup(ui32 idxInSubgroup, ui32 hash
ui32 TBlobStorageGroupInfo::GetOrderNumber(const TVDiskID &vdisk) const {
Y_VERIFY_S(vdisk.GroupID == GroupID, "Expected GroupID# " << GroupID << ", given GroupID# " << vdisk.GroupID);
- Y_VERIFY_S(vdisk.GroupGeneration == GroupGeneration, "Expected GroupGeeration# " << GroupGeneration
+ Y_VERIFY_S(vdisk.GroupGeneration == GroupGeneration, "Expected GroupGeneration# " << GroupGeneration
<< ", given GroupGeneration# " << vdisk.GroupGeneration);
return Topology->GetOrderNumber(vdisk);
}
diff --git a/ydb/core/blobstorage/nodewarden/node_warden_impl.cpp b/ydb/core/blobstorage/nodewarden/node_warden_impl.cpp
index 7e66d81f4c..f38c0a60e7 100644
--- a/ydb/core/blobstorage/nodewarden/node_warden_impl.cpp
+++ b/ydb/core/blobstorage/nodewarden/node_warden_impl.cpp
@@ -8,6 +8,9 @@ using namespace NKikimr;
using namespace NStorage;
TVector<NPDisk::TDriveData> TNodeWarden::ListLocalDrives() {
+ return {};
+
+#if 0
TVector<NPDisk::TDriveData> drives = ListDevicesWithPartlabel();
try {
@@ -30,6 +33,7 @@ TVector<NPDisk::TDriveData> TNodeWarden::ListLocalDrives() {
});
return drives;
+#endif
}
void TNodeWarden::StartInvalidGroupProxy() {
@@ -182,31 +186,38 @@ void TNodeWarden::Handle(TEvInterconnect::TEvNodeInfo::TPtr ev) {
void TNodeWarden::Handle(NPDisk::TEvSlayResult::TPtr ev) {
const NPDisk::TEvSlayResult &msg = *ev->Get();
const TVSlotId vslotId(LocalNodeId, msg.PDiskId, msg.VSlotId);
- STLOG(PRI_INFO, BS_NODE, NW28, "Handle(NPDisk::TEvSlayResult)", (Msg, msg.ToString()));
+ const auto it = SlayInFlight.find(vslotId);
+ Y_VERIFY_DEBUG(it != SlayInFlight.end());
+ STLOG(PRI_INFO, BS_NODE, NW28, "Handle(NPDisk::TEvSlayResult)", (Msg, msg.ToString()),
+ (ExpectedRound, it != SlayInFlight.end() ? std::make_optional(it->second) : std::nullopt));
+ if (it == SlayInFlight.end() || it->second != msg.SlayOwnerRound) {
+ return; // outdated response
+ }
switch (msg.Status) {
- case NKikimrProto::NOTREADY:
+ case NKikimrProto::NOTREADY: {
+ const ui64 round = NextLocalPDiskInitOwnerRound();
TActivationContext::Schedule(TDuration::Seconds(1), new IEventHandle(MakeBlobStoragePDiskID(LocalNodeId,
- msg.PDiskId), SelfId(), new NPDisk::TEvSlay(msg.VDiskId, msg.SlayOwnerRound, msg.PDiskId, msg.VSlotId)));
+ msg.PDiskId), SelfId(), new NPDisk::TEvSlay(msg.VDiskId, round, msg.PDiskId, msg.VSlotId)));
+ it->second = round;
break;
+ }
case NKikimrProto::OK:
- case NKikimrProto::ALREADY: {
+ case NKikimrProto::ALREADY:
+ SlayInFlight.erase(it);
if (const auto vdiskIt = LocalVDisks.find(vslotId); vdiskIt == LocalVDisks.end()) {
SendVDiskReport(vslotId, msg.VDiskId, NKikimrBlobStorage::TEvControllerNodeReport::DESTROYED);
} else {
SendVDiskReport(vslotId, msg.VDiskId, NKikimrBlobStorage::TEvControllerNodeReport::WIPED);
-
TVDiskRecord& vdisk = vdiskIt->second;
- Y_VERIFY(vdisk.SlayInFlight);
- vdisk.SlayInFlight = false;
StartLocalVDiskActor(vdisk, TDuration::Zero()); // restart actor after successful wiping
SendDiskMetrics(false);
}
break;
- }
- case NKikimrProto::CORRUPTED:
+ case NKikimrProto::CORRUPTED: // this branch doesn't really work
case NKikimrProto::ERROR:
+ SlayInFlight.erase(it);
STLOG(PRI_ERROR, BS_NODE, NW29, "Handle(NPDisk::TEvSlayResult) error", (Msg, msg.ToString()));
SendVDiskReport(vslotId, msg.VDiskId, NKikimrBlobStorage::TEvControllerNodeReport::OPERATION_ERROR);
break;
diff --git a/ydb/core/blobstorage/nodewarden/node_warden_impl.h b/ydb/core/blobstorage/nodewarden/node_warden_impl.h
index fed2d406c3..fb329fc516 100644
--- a/ydb/core/blobstorage/nodewarden/node_warden_impl.h
+++ b/ydb/core/blobstorage/nodewarden/node_warden_impl.h
@@ -261,8 +261,6 @@ namespace NKikimr::NStorage {
std::optional<TVDiskID> WhiteboardVDiskId;
ui64 WhiteboardInstanceGuid;
- bool SlayInFlight = false;
-
NKikimrBlobStorage::EVDiskStatus Status = NKikimrBlobStorage::EVDiskStatus::INIT_PENDING;
std::optional<NKikimrBlobStorage::EVDiskStatus> ReportedVDiskStatus; // last reported to BSC
@@ -307,6 +305,7 @@ namespace NKikimr::NStorage {
};
std::map<TVSlotId, TVDiskRecord> LocalVDisks;
+ std::map<TVSlotId, ui64> SlayInFlight;
TIntrusiveList<TVDiskRecord, TUnreportedMetricTag> VDisksWithUnreportedMetrics;
void DestroyLocalVDisk(TVDiskRecord& vdisk);
diff --git a/ydb/core/blobstorage/nodewarden/node_warden_pdisk.cpp b/ydb/core/blobstorage/nodewarden/node_warden_pdisk.cpp
index bdd741f6d4..c088f728a0 100644
--- a/ydb/core/blobstorage/nodewarden/node_warden_pdisk.cpp
+++ b/ydb/core/blobstorage/nodewarden/node_warden_pdisk.cpp
@@ -230,9 +230,11 @@ namespace NKikimr::NStorage {
PoisonLocalVDisk(value);
vdisks << (std::exchange(first, false) ? "" : ", ") << value.GetVDiskId().ToString();
- if (value.SlayInFlight) {
- Send(MakeBlobStoragePDiskID(key.NodeId, key.PDiskId), new NPDisk::TEvSlay(value.GetVDiskId(),
- NextLocalPDiskInitOwnerRound(), key.PDiskId, key.VDiskSlotId));
+ if (const auto it = SlayInFlight.find(key); it != SlayInFlight.end()) {
+ const ui64 round = NextLocalPDiskInitOwnerRound();
+ Send(MakeBlobStoragePDiskID(key.NodeId, key.PDiskId), new NPDisk::TEvSlay(value.GetVDiskId(), round,
+ key.PDiskId, key.VDiskSlotId));
+ it->second = round;
} else {
StartLocalVDiskActor(value, TDuration::Zero());
}
@@ -245,7 +247,7 @@ namespace NKikimr::NStorage {
} else {
for (auto it = LocalVDisks.lower_bound(from); it != LocalVDisks.end() && it->first <= to; ++it) {
auto& [key, value] = *it;
- if (!value.RuntimeData && !value.SlayInFlight) {
+ if (!value.RuntimeData && !SlayInFlight.contains(key)) {
StartLocalVDiskActor(value, TDuration::Zero());
}
}
diff --git a/ydb/core/blobstorage/nodewarden/node_warden_pipe.cpp b/ydb/core/blobstorage/nodewarden/node_warden_pipe.cpp
index 0a2067e924..a29b3f6d50 100644
--- a/ydb/core/blobstorage/nodewarden/node_warden_pipe.cpp
+++ b/ydb/core/blobstorage/nodewarden/node_warden_pipe.cpp
@@ -70,6 +70,8 @@ void TNodeWarden::SendRegisterNode() {
}
}
+ WorkingLocalDrives = ListLocalDrives();
+
auto ev = std::make_unique<TEvBlobStorage::TEvControllerRegisterNode>(LocalNodeId, startedDynamicGroups, generations,
WorkingLocalDrives);
FillInVDiskStatus(ev->Record.MutableVDiskStatus(), true);
diff --git a/ydb/core/blobstorage/nodewarden/node_warden_proxy.cpp b/ydb/core/blobstorage/nodewarden/node_warden_proxy.cpp
index 46ba7f1102..876c324ceb 100644
--- a/ydb/core/blobstorage/nodewarden/node_warden_proxy.cpp
+++ b/ydb/core/blobstorage/nodewarden/node_warden_proxy.cpp
@@ -41,7 +41,12 @@ void TNodeWarden::StartLocalProxy(ui32 groupId) {
[[fallthrough]];
case NKikimrBlobStorage::TGroupDecommitStatus::DONE:
proxy.reset(NBlobDepot::CreateBlobDepotAgent(groupId, info, proxyActorId));
+ group.AgentProxy = true;
break;
+
+ case NKikimrBlobStorage::TGroupDecommitStatus_E_TGroupDecommitStatus_E_INT_MIN_SENTINEL_DO_NOT_USE_:
+ case NKikimrBlobStorage::TGroupDecommitStatus_E_TGroupDecommitStatus_E_INT_MAX_SENTINEL_DO_NOT_USE_:
+ Y_UNREACHABLE();
}
} else {
// create proxy with configuration
diff --git a/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp b/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp
index 22a59222f8..3933308efc 100644
--- a/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp
+++ b/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp
@@ -59,10 +59,10 @@ namespace NKikimr::NStorage {
const bool donorMode = vdisk.Config.HasDonorMode();
STLOG(PRI_DEBUG, BS_NODE, NW23, "StartLocalVDiskActor", (RestartInFlight, restartInFlight),
- (SlayInFlight, vdisk.SlayInFlight), (VDiskId, vdisk.GetVDiskId()), (VSlotId, vslotId),
+ (SlayInFlight, SlayInFlight.contains(vslotId)), (VDiskId, vdisk.GetVDiskId()), (VSlotId, vslotId),
(PDiskGuid, pdiskGuid), (DonorMode, donorMode));
- if (restartInFlight || vdisk.SlayInFlight) {
+ if (restartInFlight || SlayInFlight.contains(vslotId)) {
return;
}
@@ -268,15 +268,16 @@ namespace NKikimr::NStorage {
}
void TNodeWarden::Slay(TVDiskRecord& vdisk) {
+ const TVSlotId vslotId = vdisk.GetVSlotId();
STLOG(PRI_INFO, BS_NODE, NW33, "Slay", (VDiskId, vdisk.GetVDiskId()), (VSlotId, vdisk.GetVSlotId()),
- (SlayInFlight, vdisk.SlayInFlight));
- if (!vdisk.SlayInFlight) {
+ (SlayInFlight, SlayInFlight.contains(vslotId)));
+ if (!SlayInFlight.contains(vslotId)) {
PoisonLocalVDisk(vdisk);
const TVSlotId vslotId = vdisk.GetVSlotId();
const TActorId pdiskServiceId = MakeBlobStoragePDiskID(vslotId.NodeId, vslotId.PDiskId);
- Send(pdiskServiceId, new NPDisk::TEvSlay(vdisk.GetVDiskId(), NextLocalPDiskInitOwnerRound(),
- vslotId.PDiskId, vslotId.VDiskSlotId));
- vdisk.SlayInFlight = true;
+ const ui64 round = NextLocalPDiskInitOwnerRound();
+ Send(pdiskServiceId, new NPDisk::TEvSlay(vdisk.GetVDiskId(), round, vslotId.PDiskId, vslotId.VDiskSlotId));
+ SlayInFlight.emplace(vslotId, round);
}
}
@@ -301,6 +302,9 @@ namespace NKikimr::NStorage {
if (!vdisk.RuntimeData) {
return;
}
+ if (newInfo->DecommitStatus == NKikimrBlobStorage::TGroupDecommitStatus::DONE) {
+ return; // group is decomitted, VDisks will be deleted soon
+ }
TIntrusivePtr<TBlobStorageGroupInfo>& currentInfo = vdisk.RuntimeData->GroupInfo;
Y_VERIFY(newInfo->GroupID == currentInfo->GroupID);
diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_config.h b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_config.h
index 94f4803ff5..8106255d5e 100644
--- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_config.h
+++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_config.h
@@ -220,11 +220,19 @@ struct TPDiskConfig : public TThrRefBase {
}
bool CheckSerial(const TString& deviceSerial) const {
- if (SerialManagementStage == NKikimrBlobStorage::TSerialManagementStage::CHECK_SERIAL ||
- SerialManagementStage == NKikimrBlobStorage::TSerialManagementStage::ONLY_SERIAL) {
+ switch (SerialManagementStage) {
+ case NKikimrBlobStorage::TSerialManagementStage::CHECK_SERIAL:
if (ExpectedSerial && ExpectedSerial != deviceSerial) {
return false;
}
+ break;
+ case NKikimrBlobStorage::TSerialManagementStage::ONLY_SERIAL:
+ if (ExpectedSerial != deviceSerial) {
+ return false;
+ }
+ break;
+ default:
+ break;
}
return true;
}
diff --git a/ydb/core/blobstorage/testing/group_overseer/group_state.cpp b/ydb/core/blobstorage/testing/group_overseer/group_state.cpp
index 839781449b..cb49a95694 100644
--- a/ydb/core/blobstorage/testing/group_overseer/group_state.cpp
+++ b/ydb/core/blobstorage/testing/group_overseer/group_state.cpp
@@ -59,13 +59,7 @@ namespace NKikimr::NTesting {
isBlocked = Max(isBlocked, IsBlocked(tabletId, generation));
}
- const EConfidence isCollected = IsCollected(msg.Id,
- blob.ConfirmedKeep ? EConfidence::CONFIRMED :
- blob.NumKeepsInFlight ? EConfidence::POSSIBLE :
- EConfidence::SURELY_NOT,
- blob.ConfirmedDoNotKeep ? EConfidence::CONFIRMED :
- blob.NumDoNotKeepsInFlight ? EConfidence::POSSIBLE :
- EConfidence::SURELY_NOT);
+ const EConfidence isCollected = IsCollected(msg.Id, &blob);
const bool inserted = blob.PutsInFlight.emplace(queryId, TBlobInfo::TQueryContext{
.IsBlocked = isBlocked == EConfidence::CONFIRMED, // if true, we can't get OK answer
@@ -161,6 +155,10 @@ namespace NKikimr::NTesting {
.PerGenerationCounter = msg.PerGenerationCounter,
.CollectGeneration = msg.CollectGeneration,
.CollectStep = msg.CollectStep
+ },
+ .Flags{
+ msg.DoNotKeep ? std::set<TLogoBlobID>(msg.DoNotKeep->begin(), msg.DoNotKeep->end()) : std::set<TLogoBlobID>{},
+ msg.Keep ? std::set<TLogoBlobID>(msg.Keep->begin(), msg.Keep->end()) : std::set<TLogoBlobID>{}
}
});
@@ -282,74 +280,54 @@ namespace NKikimr::NTesting {
return it == Blocks.end() ? EConfidence::SURELY_NOT : it->second.IsBlocked(generation);
}
- TGroupState::EConfidence TGroupState::IsCollected(TLogoBlobID id, EConfidence keep, EConfidence doNotKeep) const {
- EConfidence result = EConfidence::SURELY_NOT;
-
+ TGroupState::EConfidence TGroupState::IsCollected(TLogoBlobID id, const TBlobInfo *blob) const {
const TBarrierId barrierId(id.TabletID(), id.Channel());
if (const auto it = Barriers.find(barrierId); it != Barriers.end()) {
const TBarrierInfo& barrier = it->second;
const auto genstep = std::make_tuple(id.Generation(), id.Step());
- EConfidence isCollectedBySoftBarrier;
- switch (keep) {
- case EConfidence::SURELY_NOT:
- isCollectedBySoftBarrier = EConfidence::CONFIRMED;
- break;
-
- case EConfidence::POSSIBLE:
- switch (doNotKeep) {
- case EConfidence::SURELY_NOT:
- case EConfidence::POSSIBLE:
- isCollectedBySoftBarrier = EConfidence::POSSIBLE;
- break;
+ bool confirmedHard = (barrier.Confirmed[true] && genstep <= barrier.Confirmed[true]->GetCollectGenStep());
- case EConfidence::CONFIRMED:
- // this case should not occur
- isCollectedBySoftBarrier = EConfidence::SURELY_NOT;
- break;
- }
- break;
-
- case EConfidence::CONFIRMED:
- switch (doNotKeep) {
- case EConfidence::SURELY_NOT:
- isCollectedBySoftBarrier = EConfidence::SURELY_NOT;
- break;
-
- case EConfidence::POSSIBLE:
- case EConfidence::CONFIRMED:
- isCollectedBySoftBarrier = EConfidence::POSSIBLE;
- break;
- }
- break;
- }
-
- auto getBarrierState = [&](const auto& confirmed, const auto& inflight) {
- if (confirmed && genstep <= confirmed->GetCollectGenStep()) {
- return EConfidence::CONFIRMED;
- }
+ bool inflightHard = false;
+ {
+ const auto& inflight = barrier.InFlight[true];
if (!inflight.empty()) {
const auto& most = *--inflight.end();
if (genstep <= most.Value.GetCollectGenStep()) {
- return EConfidence::POSSIBLE;
+ inflightHard = true;
}
}
- return EConfidence::SURELY_NOT;
- };
+ }
- result = Max(getBarrierState(barrier.Confirmed[true], barrier.InFlight[true]),
- Min(isCollectedBySoftBarrier, getBarrierState(barrier.Confirmed[false], barrier.InFlight[false])));
- }
+ bool confirmedSoft = (!blob || blob->ConfirmedDoNotKeep || !blob->ConfirmedKeep) &&
+ (barrier.Confirmed[false] && genstep <= barrier.Confirmed[false]->GetCollectGenStep());
- return result;
- }
+ bool inflightSoft = false;
+ if (blob && !blob->ConfirmedDoNotKeep) {
+ const auto& inflight = barrier.InFlight[false];
+ auto it = inflight.begin();
+ for (; it != inflight.end() && genstep > it->Value.GetCollectGenStep(); ++it) {}
- TGroupState::EConfidence TGroupState::IsCollected(TLogoBlobID id, const TBlobInfo *blob) const {
- const EConfidence keep = blob->ConfirmedKeep ? EConfidence::CONFIRMED :
- blob->NumKeepsInFlight ? EConfidence::POSSIBLE : EConfidence::SURELY_NOT;
- const EConfidence doNotKeep = blob->ConfirmedDoNotKeep ? EConfidence::CONFIRMED :
- blob->NumDoNotKeepsInFlight ? EConfidence::POSSIBLE : EConfidence::SURELY_NOT;
- return IsCollected(id, keep, doNotKeep);
+ if (it != inflight.end()) {
+ for (; it != inflight.end(); ++it) {
+ if (!it->Flags[true].count(id) || it->Flags[false].count(id)) {
+ // The blob can be collected after applying this barrier
+ inflightSoft = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (confirmedHard || confirmedSoft) {
+ return EConfidence::CONFIRMED;
+ }
+ if (inflightHard || inflightSoft) {
+ return EConfidence::POSSIBLE;
+ }
+ return EConfidence::SURELY_NOT;
+ }
+ return EConfidence::SURELY_NOT;
}
void TGroupState::ApplyBarrier(TBarrierId barrierId, std::optional<std::tuple<ui32, ui32>> prevGenStep,
@@ -398,7 +376,7 @@ namespace NKikimr::NTesting {
blob = LookupBlob(id, false);
}
if (!blob) {
- switch (IsCollected(id, EConfidence::SURELY_NOT, EConfidence::SURELY_NOT)) {
+ switch (IsCollected(id, nullptr)) {
case EConfidence::SURELY_NOT: return EBlobState::NOT_WRITTEN;
case EConfidence::POSSIBLE: return EBlobState::NOT_WRITTEN;
case EConfidence::CONFIRMED: return EBlobState::CERTAINLY_COLLECTED_OR_NEVER_WRITTEN;
diff --git a/ydb/core/blobstorage/testing/group_overseer/group_state.h b/ydb/core/blobstorage/testing/group_overseer/group_state.h
index 4a9fc65142..af491151f5 100644
--- a/ydb/core/blobstorage/testing/group_overseer/group_state.h
+++ b/ydb/core/blobstorage/testing/group_overseer/group_state.h
@@ -96,6 +96,7 @@ namespace NKikimr::NTesting {
struct TInFlightCollect {
bool Hard;
TValue Value;
+ std::set<TLogoBlobID> Flags[2]; // doNotKeep, keep
friend bool operator <(const TInFlightCollect& x, const TInFlightCollect& y) { return x.Value < y.Value; }
};
diff --git a/ydb/core/blobstorage/ut_blobstorage/CMakeLists.darwin.txt b/ydb/core/blobstorage/ut_blobstorage/CMakeLists.darwin.txt
index 696d70b638..6deaa41d0f 100644
--- a/ydb/core/blobstorage/ut_blobstorage/CMakeLists.darwin.txt
+++ b/ydb/core/blobstorage/ut_blobstorage/CMakeLists.darwin.txt
@@ -52,15 +52,11 @@ target_sources(ydb-core-blobstorage-ut_blobstorage PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/snapshots.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/space_check.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/sync.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/replication.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/get.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/discover.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/multiget.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/osiris.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/patch.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/race.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/scrub.cpp
)
add_test(
NAME
diff --git a/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux-aarch64.txt b/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux-aarch64.txt
index b2cfca2e1e..8c3720c83d 100644
--- a/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux-aarch64.txt
@@ -55,15 +55,11 @@ target_sources(ydb-core-blobstorage-ut_blobstorage PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/snapshots.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/space_check.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/sync.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/replication.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/get.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/discover.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/multiget.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/osiris.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/patch.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/race.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/scrub.cpp
)
add_test(
NAME
diff --git a/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux.txt b/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux.txt
index cfa831c655..edbb9626de 100644
--- a/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux.txt
+++ b/ydb/core/blobstorage/ut_blobstorage/CMakeLists.linux.txt
@@ -57,15 +57,11 @@ target_sources(ydb-core-blobstorage-ut_blobstorage PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/snapshots.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/space_check.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/sync.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/replication.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/get.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/discover.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/multiget.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/osiris.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/patch.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/race.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/ut_blobstorage/scrub.cpp
)
add_test(
NAME
diff --git a/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp b/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp
index 29a83a61c6..2c4ef621a9 100644
--- a/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp
+++ b/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp
@@ -4,7 +4,7 @@ Y_UNIT_TEST_SUITE(VDiskAssimilation) {
Y_UNIT_TEST(Test) {
TEnvironmentSetup env{{
.NodeCount = 8,
- .Erasure = TBlobStorageGroupType::Erasure4Plus2Block,
+ .Erasure = TBlobStorageGroupType::ErasureNone,
}};
auto& runtime = env.Runtime;
@@ -94,6 +94,7 @@ Y_UNIT_TEST_SUITE(VDiskAssimilation) {
const TActorId client = runtime->AllocateEdgeActor(vdiskId.NodeId(), __FILE__, __LINE__);
auto ev = std::make_unique<TEvBlobStorage::TEvVAssimilate>(info->GetVDiskId(i), lastBlock, lastBarrier,
lastBlob);
+ ev->Record.SetIgnoreDecommitState(true);
runtime->Send(new IEventHandle(vdiskId, client, ev.release()), vdiskId.NodeId());
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvVAssimilateResult>(client);
const auto& record = res->Get()->Record;
diff --git a/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp b/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp
index 6262ee3e95..13d07ac7ec 100644
--- a/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp
+++ b/ydb/core/blobstorage/ut_blobstorage/big_cluster.cpp
@@ -3,7 +3,7 @@
Y_UNIT_TEST_SUITE(BigCluster) {
Y_UNIT_TEST(Test) {
- for (ui32 num : {10, 100}) {
+ for (ui32 num : {10, NSan::MSanIsOn() ? 20 : 100}) {
THPTimer timer;
{
TEnvironmentSetup env(num, nullptr);
diff --git a/ydb/core/blobstorage/ut_blobstorage/defrag.cpp b/ydb/core/blobstorage/ut_blobstorage/defrag.cpp
index 2ffe65b104..f17f60066c 100644
--- a/ydb/core/blobstorage/ut_blobstorage/defrag.cpp
+++ b/ydb/core/blobstorage/ut_blobstorage/defrag.cpp
@@ -47,24 +47,9 @@ static TIntrusivePtr<TBlobStorageGroupInfo> PrepareEnv(TEnvironmentSetup& env, T
}
std::set<TLogoBlobID> blobsToDelete;
- bool first = true;
for (auto& [_, blobsOfChunk] : chunkToBlob) {
- blobsToDelete.insert(blobsOfChunk.begin(), blobsOfChunk.end());
- if (first && blobsOfChunk.size() > 1) {
- first = false;
- UNIT_ASSERT(blobsOfChunk.size() >= targetNumChunks);
-
- // keep all blobs but targetNumChunks - 1
- for (ui32 i = 0; i < blobsOfChunk.size() - (targetNumChunks - 1); ++i) {
- keep->push_back(blobsOfChunk[i]);
- }
- } else {
- // keep one blob
- keep->push_back(blobsOfChunk.front());
- }
- }
- for (const TLogoBlobID& id : *keep) {
- blobsToDelete.erase(id);
+ blobsToDelete.insert(std::next(blobsOfChunk.begin()), blobsOfChunk.end());
+ keep->push_back(blobsOfChunk.front());
}
// issue gc command
@@ -86,7 +71,7 @@ static TIntrusivePtr<TBlobStorageGroupInfo> PrepareEnv(TEnvironmentSetup& env, T
env.StopNode(node);
}
env.StartNode(actorId.NodeId());
- env.Sim(TDuration::Seconds(30));
+ env.Sim(TDuration::Seconds(20));
for (;;) {
// trigger compaction
@@ -110,16 +95,15 @@ static TIntrusivePtr<TBlobStorageGroupInfo> PrepareEnv(TEnvironmentSetup& env, T
}
}
if (numUndeleted) {
- env.Sim(TDuration::Minutes(1));
+ env.Sim(TDuration::Seconds(10));
continue;
}
- ui32 num1 = 0, numOther = 0;
for (const auto& [_, numBlobs] : chunkToBlobs) {
- Cerr << "numBlobs# " << numBlobs << Endl;
- ++(numBlobs == 1 ? num1 : numOther);
+ if (numBlobs == targetNumChunks && chunkToBlobs.size() == 1) {
+ return nullptr; // all done
+ }
+ UNIT_ASSERT_VALUES_EQUAL(numBlobs, 1);
}
- UNIT_ASSERT_VALUES_EQUAL(numOther, 1);
- UNIT_ASSERT_VALUES_EQUAL(num1, targetNumChunks - 1);
break;
}
@@ -135,6 +119,9 @@ Y_UNIT_TEST_SUITE(Defragmentation) {
TVector<TLogoBlobID> keep;
TIntrusivePtr<TBlobStorageGroupInfo> info = PrepareEnv(env, &keep);
+ if (!info) {
+ return;
+ }
const ui32 orderNum = 0;
const TActorId& actorId = info->GetActorId(orderNum);
@@ -167,6 +154,9 @@ Y_UNIT_TEST_SUITE(Defragmentation) {
TVector<TLogoBlobID> keep;
TIntrusivePtr<TBlobStorageGroupInfo> info = PrepareEnv(env, &keep);
+ if (!info) {
+ return;
+ }
const ui32 orderNum = 0;
const TActorId& actorId = info->GetActorId(orderNum);
diff --git a/ydb/core/blobstorage/ut_blobstorage/race.cpp b/ydb/core/blobstorage/ut_blobstorage/race.cpp
index 13c08f3e31..5d5c1ae99e 100644
--- a/ydb/core/blobstorage/ut_blobstorage/race.cpp
+++ b/ydb/core/blobstorage/ut_blobstorage/race.cpp
@@ -231,8 +231,6 @@ void RunGroupReconfigurationRaceTest(TBlobStorageGroupType type) {
Y_UNIT_TEST_SUITE(GroupReconfigurationRace) {
Y_UNIT_TEST(Test_block42) {
- for (ui32 i = 0; i < 100; ++i) {
- RunGroupReconfigurationRaceTest(TBlobStorageGroupType::Erasure4Plus2Block);
- }
+ RunGroupReconfigurationRaceTest(TBlobStorageGroupType::Erasure4Plus2Block);
}
}
diff --git a/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp b/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp
index 4ad388e5ff..8d3d055319 100644
--- a/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp
+++ b/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp
@@ -4,6 +4,13 @@
Y_UNIT_TEST_SUITE(GroupLayoutSanitizer) {
Y_UNIT_TEST(Test3dc) {
+ // There is a bug in group layout sanitzier, which makes it consume CPU infinitely
+ // Since group layout sanitizer now is being tested and disabled on clusters
+ // this test is not representative and not needed yet
+ // TODO serg-belyakov@: fix the bug
+
+ return;
+
const ui32 numRacks = 15;
TBlobStorageGroupType groupType = TBlobStorageGroupType::ErasureMirror3dc;
std::vector<ui32> nodesPerRack(numRacks);
diff --git a/ydb/core/blobstorage/ut_blobstorage/sync.cpp b/ydb/core/blobstorage/ut_blobstorage/sync.cpp
index 1ec41aa179..d092eac9b9 100644
--- a/ydb/core/blobstorage/ut_blobstorage/sync.cpp
+++ b/ydb/core/blobstorage/ut_blobstorage/sync.cpp
@@ -3,6 +3,8 @@
Y_UNIT_TEST_SUITE(BlobStorageSync) {
Y_UNIT_TEST(SyncWhenDiskGetsDown) {
+ return; // re-enable when protocol issue is resolved
+
TEnvironmentSetup env{{
.NodeCount = 8,
.Erasure = TBlobStorageGroupType::Erasure4Plus2Block,
diff --git a/ydb/core/blobstorage/ut_testshard/main.cpp b/ydb/core/blobstorage/ut_testshard/main.cpp
index 441283881a..d2593c414d 100644
--- a/ydb/core/blobstorage/ut_testshard/main.cpp
+++ b/ydb/core/blobstorage/ut_testshard/main.cpp
@@ -31,7 +31,9 @@ Y_UNIT_TEST_SUITE(BlobDepotWithTestShard) {
record.SetOwnerIdx(1 + i);
record.SetTabletType(TTabletTypes::TestShard);
for (ui32 j = 0; j < 3; ++j) {
- record.AddBindedChannels()->SetStoragePoolName("virtual");
+ auto *ch = record.AddBindedChannels();
+ ch->SetStoragePoolName("virtual");
+ ch->SetPhysicalGroupsOnly(false);
}
NTabletPipe::SendData(edge, clientId, ev.release());
});
@@ -106,7 +108,7 @@ Y_UNIT_TEST_SUITE(BlobDepotWithTestShard) {
}
});
- for (ui32 i = 0; i < 1000; ++i) {
+ for (ui32 i = 0; i < 100; ++i) {
for (IActor *actor : blobDepots) {
NBlobDepot::ValidateBlobDepot(actor, env.GroupOverseer);
}
diff --git a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugerecovery.cpp b/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugerecovery.cpp
index 92425a0e30..1ed28f6b42 100644
--- a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugerecovery.cpp
+++ b/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugerecovery.cpp
@@ -63,22 +63,15 @@ namespace NKikimr {
}
void THullHugeRecoveryLogPos::ParseFromArray(const char* data, size_t size) {
- Y_UNUSED(size);
const char *cur = data;
- ChunkAllocationLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
- ChunkFreeingLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
- HugeBlobLoggedLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
- LogoBlobsDbSlotDelLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
- BlocksDbSlotDelLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
- BarriersDbSlotDelLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
- EntryPointLsn = *(const ui64 *)cur;
- cur += sizeof(ui64);
+ const char *end = data + size;
+ for (ui64 *var : {&ChunkAllocationLsn, &ChunkFreeingLsn, &HugeBlobLoggedLsn, &LogoBlobsDbSlotDelLsn,
+ &BlocksDbSlotDelLsn, &BarriersDbSlotDelLsn, &EntryPointLsn}) {
+ Y_VERIFY(static_cast<size_t>(end - cur) >= sizeof(*var));
+ memcpy(var, cur, sizeof(*var));
+ cur += sizeof(*var);
+ }
+ Y_VERIFY(cur == end);
}
bool THullHugeRecoveryLogPos::CheckEntryPoint(const TString &serialized) {
diff --git a/ydb/core/blobstorage/vdisk/query/assimilation.cpp b/ydb/core/blobstorage/vdisk/query/assimilation.cpp
index 07ef96c24d..376cf139e8 100644
--- a/ydb/core/blobstorage/vdisk/query/assimilation.cpp
+++ b/ydb/core/blobstorage/vdisk/query/assimilation.cpp
@@ -133,15 +133,13 @@ namespace NKikimr {
const TMemRecBarrier& memRec = iter;
if (next.TabletId != key.TabletId || next.Channel != key.Channel) {
break;
+ } else if (memRec.Ingress.IsQuorum(Snap.HullCtx->IngressCache.Get())) {
+ auto *value = next.Hard ? pb->MutableHard() : pb->MutableSoft();
+ value->SetRecordGeneration(next.Gen);
+ value->SetPerGenerationCounter(next.GenCounter);
+ value->SetCollectGeneration(memRec.CollectGen);
+ value->SetCollectStep(memRec.CollectStep);
}
-
- auto *value = next.Hard ? pb->MutableHard() : pb->MutableSoft();
- value->SetRecordGeneration(next.Gen);
- value->SetPerGenerationCounter(next.GenCounter);
- // TODO(alexvru): should we obtain quorum here? it looks not, because as the GC command was issued, then
- // all the keep flags already have been set, so we can choose the latest issued barrier for the tablet
- value->SetCollectGeneration(memRec.CollectGen);
- value->SetCollectStep(memRec.CollectStep);
}
using T = NKikimrBlobStorage::TEvVAssimilateResult::TBarrier;
diff --git a/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp b/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp
index 437b514a10..3922576af3 100644
--- a/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp
+++ b/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp
@@ -279,7 +279,7 @@ namespace NKikimr {
friend class TActorBootstrapped<THullReplJobActor>;
- std::optional<std::pair<TLogoBlobID, TRecoveryMachine::TPartSet>> CurrentKeyAndParts;
+ std::optional<TRecoveryMachine::TPartSet> CurrentItem;
TLogoBlobID LastProcessedKey;
void Finish() {
@@ -529,16 +529,16 @@ namespace NKikimr {
TimeAccount.SetState(ETimeState::MERGE);
// acquire current key; front item contains the least key
- if (!CurrentKeyAndParts) {
+ if (!CurrentItem) {
const TLogoBlobID id = MergeHeap.front()->GenLogoBlobId();
- CurrentKeyAndParts.emplace(id, ReplCtx->VCtx->Top->GType);
+ CurrentItem.emplace(id, ReplCtx->VCtx->Top->GType);
Y_VERIFY(std::exchange(LastProcessedKey, id) < id);
}
- auto& [currentKey, currentParts] = *CurrentKeyAndParts;
+ auto& item = *CurrentItem;
// find out which proxies carry items with the same key
TVector<TVDiskProxyPtr>::iterator lastIter = MergeHeap.end();
- while (lastIter != MergeHeap.begin() && MergeHeap.front()->GenLogoBlobId() == currentKey) {
+ while (lastIter != MergeHeap.begin() && MergeHeap.front()->GenLogoBlobId() == item.Id) {
PopHeap(MergeHeap.begin(), lastIter, TVDiskProxy::TPtrGreater());
--lastIter;
}
@@ -549,17 +549,17 @@ namespace NKikimr {
while (lastIter != MergeHeap.end()) {
// process all items with specified current key
TVDiskProxyPtr proxy = *lastIter;
- while (proxy->Valid() && proxy->GenLogoBlobId() == currentKey) {
+ while (proxy->Valid() && proxy->GenLogoBlobId() == item.Id) {
TLogoBlobID id;
NKikimrProto::EReplyStatus status;
TTrackableString data(TMemoryConsumer(ReplCtx->VCtx->Replication));
proxy->GetData(&id, &status, &data);
if (status != NKikimrProto::OK || data.size()) {
- currentParts.AddData(ReplCtx->VCtx->Top->GetOrderNumber(proxy->VDiskId), id, status, data.GetBaseConstRef());
+ item.AddData(ReplCtx->VCtx->Top->GetOrderNumber(proxy->VDiskId), id, status, data.GetBaseConstRef());
}
proxy->Next();
}
- Y_VERIFY_DEBUG(!proxy->Valid() || currentKey < proxy->GenLogoBlobId());
+ Y_VERIFY_DEBUG(!proxy->Valid() || item.Id < proxy->GenLogoBlobId());
// if proxy is not exhausted yet, then put it back into merge queue
if (proxy->Valid()) {
@@ -590,12 +590,12 @@ namespace NKikimr {
// recover data
NMatrix::TVectorType parts;
- if (!RecoveryMachine->Recover(currentKey, currentParts, RecoveryQueue, parts)) {
+ if (!RecoveryMachine->Recover(item, RecoveryQueue, parts)) {
STLOG(PRI_INFO, BS_REPL, BSVR33, VDISKP(ReplCtx->VCtx->VDiskLogPrefix, "Sending phantom validation query"),
- (GroupId, GInfo->GroupID), (CurKey, currentKey));
- PhantomChecksPending.emplace_back(currentKey, parts);
+ (GroupId, GInfo->GroupID), (CurKey, item.Id));
+ PhantomChecksPending.emplace_back(item.Id, parts);
}
- CurrentKeyAndParts.reset();
+ CurrentItem.reset();
// process recovered items, if any; queueProcessed.first will be false when writer is not ready for new data
EProcessQueueAction action = ProcessQueue();
diff --git a/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine.h b/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine.h
index e3035f5cb9..64dd28a3f5 100644
--- a/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine.h
+++ b/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine.h
@@ -61,22 +61,26 @@ namespace NKikimr {
using TRecoveredBlobsQueue = TQueue<TRecoveredBlobInfo>;
struct TPartSet {
+ const TLogoBlobID Id;
TDataPartSet PartSet;
ui32 DisksRepliedOK = 0;
ui32 DisksRepliedNODATA = 0;
ui32 DisksRepliedNOT_YET = 0;
ui32 DisksRepliedOther = 0;
- TPartSet(TBlobStorageGroupType gtype) {
+ TPartSet(TLogoBlobID id, TBlobStorageGroupType gtype)
+ : Id(id)
+ {
+ PartSet.FullDataSize = Id.BlobSize();
PartSet.Parts.resize(gtype.TotalPartCount());
}
void AddData(ui32 diskIdx, const TLogoBlobID& id, NKikimrProto::EReplyStatus status, TString data) {
+ Y_VERIFY(id.FullID() == Id);
switch (status) {
case NKikimrProto::OK: {
const ui8 partIdx = id.PartId() - 1;
Y_VERIFY(partIdx < PartSet.Parts.size());
- PartSet.FullDataSize = id.BlobSize();
PartSet.PartsMask |= 1 << partIdx;
PartSet.Parts[partIdx].ReferenceTo(data);
DisksRepliedOK |= 1 << diskIdx;
@@ -118,7 +122,8 @@ namespace NKikimr {
, Arena(&TRopeArenaBackend::Allocate)
{}
- bool Recover(const TLogoBlobID& id, TPartSet& partSet, TRecoveredBlobsQueue& rbq, NMatrix::TVectorType& parts) {
+ bool Recover(TPartSet& item, TRecoveredBlobsQueue& rbq, NMatrix::TVectorType& parts) {
+ const TLogoBlobID& id = item.Id;
Y_VERIFY(!id.PartId());
Y_VERIFY(!LastRecoveredId || *LastRecoveredId < id);
LastRecoveredId = id;
@@ -147,15 +152,15 @@ namespace NKikimr {
bool hasExactParts = false;
bool needToRestore = false;
for (ui8 i = parts.FirstPosition(); i != parts.GetSize(); i = parts.NextPosition(i)) {
- if (partSet.PartSet.PartsMask & (1 << i)) {
+ if (item.PartSet.PartsMask & (1 << i)) {
hasExactParts = true;
} else {
needToRestore = true;
}
}
- Y_VERIFY_DEBUG((partSet.PartSet.PartsMask >> groupType.TotalPartCount()) == 0);
- const ui32 presentParts = PopCount(partSet.PartSet.PartsMask);
+ Y_VERIFY_DEBUG((item.PartSet.PartsMask >> groupType.TotalPartCount()) == 0);
+ const ui32 presentParts = PopCount(item.PartSet.PartsMask);
bool canRestore = presentParts >= groupType.MinimalRestorablePartCount();
bool nonPhantom = true;
@@ -166,21 +171,19 @@ namespace NKikimr {
} else {
STLOG(PRI_INFO, BS_REPL, BSVR28, VDISKP(ReplCtx->VCtx->VDiskLogPrefix, "not enough data parts to recover"),
(BlobId, id), (NumPresentParts, presentParts), (MinParts, groupType.DataParts()),
- (PartSet, partSet.ToString()), (Ingress, lost.Ingress.ToString(ReplCtx->VCtx->Top.get(),
+ (PartSet, item.ToString()), (Ingress, lost.Ingress.ToString(ReplCtx->VCtx->Top.get(),
ReplCtx->VCtx->ShortSelfVDisk, id)));
BlobDone(id, false, &TEvReplFinished::TInfo::ItemsNotRecovered);
}
} else {
// recover
try {
- Y_VERIFY(partSet.PartSet.FullDataSize == id.BlobSize());
+ Y_VERIFY(item.PartSet.FullDataSize == id.BlobSize());
// PartSet contains some data, other data will be restored and written in the same PartSet
- TRope recoveredData;
if (canRestore && needToRestore) {
- groupType.RestoreData((TErasureType::ECrcMode)id.CrcMode(), partSet.PartSet, recoveredData,
- true, false, true);
- partSet.PartSet.PartsMask = (1 << groupType.TotalPartCount()) - 1;
+ groupType.RestoreData((TErasureType::ECrcMode)id.CrcMode(), item.PartSet, true, false, true);
+ item.PartSet.PartsMask = (1 << groupType.TotalPartCount()) - 1;
}
ui32 numSmallParts = 0, numMissingParts = 0, numHuge = 0;
@@ -188,7 +191,7 @@ namespace NKikimr {
NMatrix::TVectorType small(0, parts.GetSize());
for (ui8 i = parts.FirstPosition(); i != parts.GetSize(); i = parts.NextPosition(i)) {
- if (~partSet.PartSet.PartsMask & (1 << i)) {
+ if (~item.PartSet.PartsMask & (1 << i)) {
++numMissingParts; // ignore this missing part
continue;
}
@@ -196,10 +199,10 @@ namespace NKikimr {
const ui32 partSize = groupType.PartSize(partId);
Y_VERIFY(partSize); // no metadata here
partsSize += partSize;
- TRope data(partSet.PartSet.Parts[i].OwnedString); // TODO(alexvru): employ rope in TDataPartSet
+ TRope data(item.PartSet.Parts[i].OwnedString); // TODO(alexvru): employ rope in TDataPartSet
Y_VERIFY(data.GetSize() == partSize);
if (ReplCtx->HugeBlobCtx->IsHugeBlob(groupType, id)) {
- AddBlobToQueue(partId, TDiskBlob::Create(partSet.PartSet.FullDataSize, i + 1,
+ AddBlobToQueue(partId, TDiskBlob::Create(id.BlobSize(), i + 1,
groupType.TotalPartCount(), std::move(data), Arena), {}, true, rbq);
++numHuge;
} else {
@@ -211,7 +214,7 @@ namespace NKikimr {
if (numSmallParts) {
// fill in disk blob buffer
AddBlobToQueue(id, TDiskBlob::CreateFromDistinctParts(&partData[0], &partData[numSmallParts],
- small, partSet.PartSet.FullDataSize, Arena), small, false, rbq);
+ small, id.BlobSize(), Arena), small, false, rbq);
}
ReplInfo->LogoBlobsRecovered += !!numSmallParts;
diff --git a/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine_ut.cpp b/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine_ut.cpp
index fe835e0eac..45b50d9089 100644
--- a/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine_ut.cpp
+++ b/ydb/core/blobstorage/vdisk/repl/blobstorage_replrecoverymachine_ut.cpp
@@ -134,7 +134,7 @@ namespace NKikimr {
TBlobStorageGroupInfo::TServiceIds services;
groupInfo->PickSubgroup(id.Hash(), &varray, &services);
- NRepl::TRecoveryMachine::TPartSet p(groupInfo->Type);
+ NRepl::TRecoveryMachine::TPartSet p(id, groupInfo->Type);
for (ui32 i = 1; i < v.size(); ++i) {
if (v[i].empty()) {
continue;
@@ -150,7 +150,7 @@ namespace NKikimr {
}
NRepl::TRecoveryMachine::TRecoveredBlobsQueue rbq;
NMatrix::TVectorType parts;
- const bool success = m.Recover(id, p, rbq, parts);
+ const bool success = m.Recover(p, rbq, parts);
Y_VERIFY(success);
ui8 partIndex;
diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_db.h b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_db.h
index 2bd127bbba..9d59142938 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_db.h
+++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_db.h
@@ -84,8 +84,8 @@ namespace NKikimr {
VDiskIncarnationGuid = g;
}
- TVDiskIncarnationGuid GetVDiskIncarnationGuid() const {
- Y_VERIFY_DEBUG(VDiskIncarnationGuidSet);
+ TVDiskIncarnationGuid GetVDiskIncarnationGuid(bool allowUnset = false) const {
+ Y_VERIFY_DEBUG(VDiskIncarnationGuidSet || allowUnset);
return VDiskIncarnationGuid;
}
diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
index 74bfc0da38..7b3cada16d 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
@@ -111,6 +111,11 @@ namespace NKikimr {
case NKikimrBlobStorage::TGroupDecommitStatus::IN_PROGRESS:
case NKikimrBlobStorage::TGroupDecommitStatus::DONE:
return true;
+
+ case NKikimrBlobStorage::TGroupDecommitStatus_E_TGroupDecommitStatus_E_INT_MIN_SENTINEL_DO_NOT_USE_:
+ case NKikimrBlobStorage::TGroupDecommitStatus_E_TGroupDecommitStatus_E_INT_MAX_SENTINEL_DO_NOT_USE_:
+ Y_VERIFY_DEBUG(false);
+ return true;
}
}
@@ -1296,7 +1301,7 @@ namespace NKikimr {
void Handle(TEvBlobStorage::TEvVAssimilate::TPtr& ev, const TActorContext& ctx) {
if (!SelfVDiskId.SameDisk(ev->Get()->Record.GetVDiskID())) {
ReplyError(NKikimrProto::RACE, "group generation mismatch", ev, ctx, TAppData::TimeProvider->Now());
- } else if (!BlockWrites(GInfo->DecommitStatus)) {
+ } else if (!BlockWrites(GInfo->DecommitStatus) && !ev->Get()->Record.GetIgnoreDecommitState()) {
ReplyError(NKikimrProto::ERROR, "decommission didn't start yet", ev, ctx, TAppData::TimeProvider->Now());
} else {
const TActorId actorId = RunInBatchPool(ctx, CreateAssimilationActor(Hull->GetIndexSnapshot(), ev, SelfVDiskId));
@@ -2154,7 +2159,7 @@ namespace NKikimr {
}
TABLER() {
TABLED() {str << "VDiskIncarnationGuid";}
- TABLED() {str << Db->GetVDiskIncarnationGuid();}
+ TABLED() {str << Db->GetVDiskIncarnationGuid(true);}
}
}
}
diff --git a/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor.cpp b/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor.cpp
index fbcb4c7881..535bc09227 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor.cpp
@@ -58,16 +58,13 @@ namespace NKikimr::NPrivate {
struct TXorDiffs {
TVector<TDiff> Diffs;
ui8 PartId;
- std::unique_ptr<TEvBlobStorage::TEvVPatchXorDiffResult> ResultEvent;
TActorId Sender;
ui64 Cookie;
- TXorDiffs(TVector<TDiff> &&diffs, ui8 partId, std::unique_ptr<TEvBlobStorage::TEvVPatchXorDiffResult> &&result,
- const TActorId &sender, ui64 cookie)
+ TXorDiffs(TVector<TDiff> &&diffs, ui8 partId, const TActorId &sender, ui64 cookie)
: Diffs(std::move(diffs))
, PartId(partId)
- , ResultEvent(std::move(result))
, Sender(sender)
, Cookie(cookie)
{
@@ -156,7 +153,7 @@ namespace NKikimr::NPrivate {
void Bootstrap() {
STLOG(PRI_INFO, BS_VDISK_PATCH, BSVSP03,
- VDiskLogPrefix << " TEvVPatch: bootsrapped;",
+ VDiskLogPrefix << " TEvVPatch: bootstrapped;",
(OriginalBlobId, OriginalBlobId),
(Deadline, Deadline));
ui32 cookie = 0;
@@ -166,9 +163,18 @@ namespace NKikimr::NPrivate {
TLogoBlobID::MaxPartId, nullptr);
Send(LeaderId, msg.release());
+ TInstant now = TActivationContext::Now();
+ if (Deadline != TInstant::Zero() && Deadline < now) {
+ ErrorReason = "DEADLINE";
+ SendVPatchFoundParts(NKikimrProto::ERROR);
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
+ return;
+ }
+
Become(&TThis::StartState);
- TDuration liveDuration = Deadline - TActivationContext::Now();
+ TDuration liveDuration = Deadline - now;
if (!Deadline || liveDuration > CommonLiveTime) {
liveDuration = CommonLiveTime;
}
@@ -182,6 +188,7 @@ namespace NKikimr::NPrivate {
(OriginalBlobId, OriginalBlobId),
(FoundParts, FormatList(FoundOriginalParts)),
(Status, status));
+ FoundPartsEvent->Record.SetErrorReason(ErrorReason);
for (ui8 part : FoundOriginalParts) {
FoundPartsEvent->AddPart(part);
}
@@ -217,14 +224,16 @@ namespace NKikimr::NPrivate {
ErrorReason = TStringBuilder() << "Recieve not OK status from VGetRange,"
<< " received status# " << NKikimrProto::EReplyStatus_Name(record.GetStatus());
SendVPatchFoundParts(NKikimrProto::ERROR);
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
return;
}
if (record.ResultSize() != 1) {
ErrorReason = TStringBuilder() << "Expected only one result, but given " << record.ResultSize()
<< " received status# " << NKikimrProto::EReplyStatus_Name(record.GetStatus());
SendVPatchFoundParts(NKikimrProto::ERROR);
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
return;
}
@@ -240,7 +249,9 @@ namespace NKikimr::NPrivate {
SendVPatchFoundParts(NKikimrProto::OK);
if (FoundOriginalParts.empty()) {
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
+ return;
}
}
@@ -303,9 +314,11 @@ namespace NKikimr::NPrivate {
(PatchedBlobId, PatchedBlobId),
(OriginalPartId, (ui32)OriginalPartId),
(PatchedPartId, (ui32)PatchedPartId),
+ (DataParts, (ui32)GType.DataParts()),
(ReceivedBlobId, blobId),
(Status, record.GetStatus()),
- (ResultSize, record.ResultSize()));
+ (ResultSize, record.ResultSize()),
+ (ParityPart, (blobId.PartId() <= GType.DataParts() ? "no" : "yes")));
ui8 *buffer = reinterpret_cast<ui8*>(Buffer.UnsafeGetContiguousSpanMut().data());
if (blobId.PartId() <= GType.DataParts()) {
@@ -319,9 +332,8 @@ namespace NKikimr::NPrivate {
ui32 dataSize = blobId.BlobSize();
for (ui32 idx = ReceivedXorDiffs.size(); idx != 0; --idx) {
- auto &[diffs, partId, result, sender, cookie] = ReceivedXorDiffs.back();
+ auto &[diffs, partId, sender, cookie] = ReceivedXorDiffs.back();
GType.ApplyXorDiff(TErasureType::CrcModeNone, dataSize, buffer, diffs, partId - 1, toPart - 1);
- SendVDiskResponse(TActivationContext::AsActorContext(), sender, result.release(), cookie);
ReceivedXorDiffs.pop_back();
}
@@ -417,7 +429,9 @@ namespace NKikimr::NPrivate {
(OriginalBlobId, OriginalBlobId),
(PatchedBlobId, PatchedBlobId),
(OriginalPartId, (ui32)OriginalPartId),
- (PatchedPartId, (ui32)PatchedPartId));
+ (PatchedPartId, (ui32)PatchedPartId),
+ (ReceivedXorDiffs, ReceivedXorDiffCount),
+ (ExpectedXorDiffs, WaitedXorDiffCount));
ui64 cookie = OriginalBlobId.Hash();
std::unique_ptr<IEventBase> put = std::make_unique<TEvBlobStorage::TEvVPut>(TLogoBlobID(PatchedBlobId, PatchedPartId),
Buffer, VDiskId, false, &cookie, Deadline, NKikimrBlobStorage::AsyncBlob);
@@ -436,6 +450,18 @@ namespace NKikimr::NPrivate {
SendVPatchResult(NKikimrProto::ERROR);
}
+ void HandleForceEnd(TEvBlobStorage::TEvVPatchDiff::TPtr &ev) {
+ bool forceEnd = ev->Get()->IsForceEnd();
+ SendVPatchFoundParts(NKikimrProto::ERROR);
+ if (forceEnd) {
+ SendVPatchResult(NKikimrProto::OK);
+ } else {
+ SendVPatchResult(NKikimrProto::ERROR);
+ }
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
+ }
+
void Handle(TEvBlobStorage::TEvVPatchDiff::TPtr &ev) {
NKikimrBlobStorage::TEvVPatchDiff &record = ev->Get()->Record;
Y_VERIFY(record.HasCookie());
@@ -463,6 +489,7 @@ namespace NKikimr::NPrivate {
(OriginalPartId, (ui32)OriginalPartId),
(PatchedPartId, (ui32)PatchedPartId),
(XorReceiver, (isXorReceiver ? "yes" : "no")),
+ (ParityPart, (PatchedPartId <= GType.DataParts() ? "no" : "yes")),
(ForceEnd, (forceEnd ? "yes" : "no")));
Y_VERIFY(!ResultEvent);
@@ -476,7 +503,8 @@ namespace NKikimr::NPrivate {
if (forceEnd) {
SendVPatchResult(NKikimrProto::OK);
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
return;
}
@@ -522,7 +550,8 @@ namespace NKikimr::NPrivate {
ResultEvent->SetStatusFlagsAndFreeSpace(record.GetStatusFlags(), record.GetApproximateFreeSpaceShare());
SendVPatchResult(status);
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
}
void HandleError(TEvBlobStorage::TEvVPatchXorDiff::TPtr &ev) {
@@ -553,17 +582,13 @@ namespace NKikimr::NPrivate {
TInstant now = TActivationContext::Now();
std::unique_ptr<TEvBlobStorage::TEvVPatchXorDiffResult> resultEvent = std::make_unique<TEvBlobStorage::TEvVPatchXorDiffResult>(
NKikimrProto::OK, now, &record, SkeletonFrontIDPtr, VPatchResMsgsPtr, nullptr);
+ SendVDiskResponse(TActivationContext::AsActorContext(), ev->Sender, resultEvent.release(), ev->Cookie);
if (!CheckDiff(xorDiffs, "XorDiff from datapart")) {
- for (auto &[diffs, partId, result, sender, cookie] : ReceivedXorDiffs) {
- SendVDiskResponse(TActivationContext::AsActorContext(), sender, result.release(), cookie);
- }
- SendVDiskResponse(TActivationContext::AsActorContext(), ev->Sender, resultEvent.release(), ev->Cookie);
-
if (ResultEvent) {
SendVPatchResult(NKikimrProto::ERROR);
- NotifySkeletonAboutDying();
}
+ NotifySkeletonAboutDying();
Become(&TThis::ErrorState);
return;
}
@@ -571,6 +596,7 @@ namespace NKikimr::NPrivate {
if (Buffer) {
ui8 *buffer = reinterpret_cast<ui8*>(Buffer.UnsafeGetContiguousSpanMut().data());
ui32 dataSize = OriginalBlobId.BlobSize();
+
GType.ApplyXorDiff(TErasureType::CrcModeNone, dataSize, buffer, xorDiffs, fromPart - 1, toPart - 1);
if (ReceivedXorDiffCount == WaitedXorDiffCount) {
@@ -578,19 +604,14 @@ namespace NKikimr::NPrivate {
}
xorDiffs.clear();
- SendVDiskResponse(TActivationContext::AsActorContext(), ev->Sender, resultEvent.release(), ev->Cookie);
} else {
- ReceivedXorDiffs.emplace_back(std::move(xorDiffs), fromPart, std::move(resultEvent),
+ ReceivedXorDiffs.emplace_back(std::move(xorDiffs), fromPart,
ev->Sender, ev->Cookie);
}
}
- void NotifySkeletonAndDie() {
- NotifySkeletonAboutDying();
- PassAway();
- }
-
void NotifySkeletonAboutDying() {
+ STLOG(PRI_DEBUG, BS_VDISK_PATCH, BSVSP17, VDiskLogPrefix << " NotifySkeletonAboutDying;");
Send(LeaderId, new TEvVPatchDyingRequest(PatchedBlobId));
}
@@ -598,7 +619,8 @@ namespace NKikimr::NPrivate {
ErrorReason = "TEvVPatch: the vpatch actor died due to a deadline, before receiving diff";
STLOG(PRI_ERROR, BS_VDISK_PATCH, BSVSP11, VDiskLogPrefix << " " << ErrorReason << ";");
SendVPatchFoundParts(NKikimrProto::ERROR);
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
}
void HandleInWaitState(TKikimrEvents::TEvWakeup::TPtr &/*ev*/) {
@@ -612,12 +634,13 @@ namespace NKikimr::NPrivate {
ErrorReason = "TEvVPatch: the vpatch actor died due to a deadline, after receiving diff";
STLOG(PRI_ERROR, BS_VDISK_PATCH, BSVSP12, VDiskLogPrefix << " " << ErrorReason << ";");
SendVPatchResult(NKikimrProto::ERROR);
- NotifySkeletonAndDie();
+ NotifySkeletonAboutDying();
+ Become(&TThis::ErrorState);
}
void HandleInParityStates(TKikimrEvents::TEvWakeup::TPtr &/*ev*/) {
ErrorReason = "TEvVPatch: the vpatch actor died due to a deadline, after receiving diff";
- STLOG(PRI_ERROR, BS_VDISK_PATCH, BSVSP12, VDiskLogPrefix << " " << ErrorReason << ";");
+ STLOG(PRI_ERROR, BS_VDISK_PATCH, BSVSP20, VDiskLogPrefix << " " << ErrorReason << ";");
SendVPatchResult(NKikimrProto::ERROR);
NotifySkeletonAboutDying();
Become(&TThis::ErrorState);
@@ -627,8 +650,9 @@ namespace NKikimr::NPrivate {
switch (ev->GetTypeRewrite()) {
hFunc(TEvBlobStorage::TEvVGetResult, HandleVGetRangeResult)
hFunc(TEvBlobStorage::TEvVPatchXorDiff, Handle)
+ hFunc(TEvBlobStorage::TEvVPatchDiff, HandleForceEnd)
hFunc(TKikimrEvents::TEvWakeup, HandleInStartState)
- default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << ToString(ev->GetTypeRewrite()));
+ default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << TypeName(*ev->GetBase()));
}
}
@@ -637,7 +661,7 @@ namespace NKikimr::NPrivate {
hFunc(TEvBlobStorage::TEvVPatchDiff, Handle)
hFunc(TEvBlobStorage::TEvVPatchXorDiff, Handle)
hFunc(TKikimrEvents::TEvWakeup, HandleInWaitState)
- default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << ToString(ev->GetTypeRewrite()));
+ default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << TypeName(*ev->GetBase()));
}
}
@@ -645,9 +669,10 @@ namespace NKikimr::NPrivate {
switch (ev->GetTypeRewrite()) {
hFunc(TEvBlobStorage::TEvVPatchDiff, HandleError)
hFunc(TEvBlobStorage::TEvVPatchXorDiff, HandleError)
+ IgnoreFunc(TEvBlobStorage::TEvVPatchXorDiffResult)
hFunc(TKikimrEvents::TEvWakeup, HandleInWaitState)
sFunc(TEvVPatchDyingConfirm, PassAway)
- default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << ToString(ev->GetTypeRewrite()));
+ default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << TypeName(*ev->GetBase()));
}
}
@@ -657,7 +682,7 @@ namespace NKikimr::NPrivate {
hFunc(TEvBlobStorage::TEvVPutResult, Handle)
IgnoreFunc(TEvBlobStorage::TEvVPatchXorDiffResult)
hFunc(TKikimrEvents::TEvWakeup, HandleInDataStates)
- default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << ToString(ev->GetTypeRewrite()));
+ default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << TypeName(*ev->GetBase()));
}
}
@@ -667,7 +692,7 @@ namespace NKikimr::NPrivate {
hFunc(TEvBlobStorage::TEvVPutResult, Handle)
hFunc(TEvBlobStorage::TEvVPatchXorDiff, Handle)
hFunc(TKikimrEvents::TEvWakeup, HandleInParityStates)
- default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << ToString(ev->GetTypeRewrite()));
+ default: Y_FAIL_S(VDiskLogPrefix << " unexpected event " << TypeName(*ev->GetBase()));
}
}
};
diff --git a/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor_ut.cpp b/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor_ut.cpp
index 4e3f904579..fc79573172 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor_ut.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor_ut.cpp
@@ -57,6 +57,11 @@ namespace NKikimr {
}
bool DoBeforeSending(TAutoPtr<IEventHandle> &ev) override {
+ if (ev->GetBase()) {
+ Cerr << "Send " << TypeName(*ev->GetBase()) << Endl;
+ } else {
+ Cerr << "Send " << ev->Type << Endl;
+ }
if (IsCheckingEvents) {
UNIT_ASSERT_LT_C(SendingIdx, SequenceOfSendingEvents.size(), "SequenceOfSendingEvents overbounded");
UNIT_ASSERT_VALUES_EQUAL_C(SequenceOfSendingEvents[SendingIdx], ev->Type, "sending idx " << SendingIdx);
@@ -71,6 +76,11 @@ namespace NKikimr {
PassAway();
return false;
}
+ if (ev->GetBase()) {
+ Cerr << "Recv " << TypeName(*ev->GetBase()) << Endl;
+ } else {
+ Cerr << "Recv " << ev->Type << Endl;
+ }
InStateFunc = true;
if (IsCheckingEvents) {
@@ -314,9 +324,15 @@ namespace NKikimr {
auto result = testData.Runtime.GrabEdgeEventRethrow<TEvBlobStorage::TEvVPatchResult>(handle);
UNIT_ASSERT(result->Record.GetStatus() == NKikimrProto::OK);
+ auto diyngRequest = testData.Runtime.GrabEdgeEventRethrow<TEvVPatchDyingRequest>(handle);
+ UNIT_ASSERT(diyngRequest->PatchedBlobId == testData.PatchedBlobId);
+ handle = MakeHolder<IEventHandle>(vPatchActorId, edgeActor, new TEvVPatchDyingConfirm);
+ testData.Runtime.Send(handle.Release());
} else {
auto diyngRequest = testData.Runtime.GrabEdgeEventRethrow<TEvVPatchDyingRequest>(handle);
UNIT_ASSERT(diyngRequest->PatchedBlobId == testData.PatchedBlobId);
+ handle = MakeHolder<IEventHandle>(vPatchActorId, edgeActor, new TEvVPatchDyingConfirm);
+ testData.Runtime.Send(handle.Release());
}
testData.WaitEndTest();
@@ -325,7 +341,8 @@ namespace NKikimr {
Y_UNIT_TEST(FindingPartsWhenPartsAreDontExist) {
TVector<ui64> receivingEvents {
TEvents::TSystem::Bootstrap,
- TEvBlobStorage::EvVGetResult};
+ TEvBlobStorage::EvVGetResult,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -337,7 +354,8 @@ namespace NKikimr {
TVector<ui64> receivingEvents {
TEvents::TSystem::Bootstrap,
TEvBlobStorage::EvVGetResult,
- TEvBlobStorage::EvVPatchDiff};
+ TEvBlobStorage::EvVPatchDiff,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -350,7 +368,8 @@ namespace NKikimr {
TVector<ui64> receivingEvents {
TEvents::TSystem::Bootstrap,
TEvBlobStorage::EvVGetResult,
- TEvBlobStorage::EvVPatchDiff};
+ TEvBlobStorage::EvVPatchDiff,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -362,7 +381,8 @@ namespace NKikimr {
Y_UNIT_TEST(FindingPartsWhenError) {
TVector<ui64> receivingEvents {
TEvents::TSystem::Bootstrap,
- TEvBlobStorage::EvVGetResult};
+ TEvBlobStorage::EvVGetResult,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -377,7 +397,10 @@ namespace NKikimr {
TActorId edgeActor = testData.EdgeActors[0];
testData.IsCheckingEventsByDecorator = true;
- testData.SequenceOfReceivingEvents = {TEvents::TSystem::Bootstrap, TKikimrEvents::TSystem::Wakeup};
+ testData.SequenceOfReceivingEvents = {
+ TEvents::TSystem::Bootstrap,
+ TKikimrEvents::TSystem::Wakeup,
+ TEvBlobStorage::EvVPatchDyingConfirm};
testData.SequenceOfSendingEvents = {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -396,6 +419,8 @@ namespace NKikimr {
auto dyingRequest = runtime.GrabEdgeEventRethrow<TEvVPatchDyingRequest>(handle);
UNIT_ASSERT_VALUES_EQUAL(dyingRequest->PatchedBlobId, testData.PatchedBlobId);
+ handle = MakeHolder<IEventHandle>(actorId, edgeActor, new TEvVPatchDyingConfirm);
+ testData.Runtime.Send(handle.Release());
testData.WaitEndTest();
}
@@ -500,6 +525,12 @@ namespace NKikimr {
UNIT_ASSERT(result->Record.GetStatus() == expectedResultStatus);
UNIT_ASSERT(result->Record.GetStatusFlags() == testData.StatusFlags);
UNIT_ASSERT(result->Record.GetApproximateFreeSpaceShare() == testData.ApproximateFreeSpaceShare);
+
+
+ auto diyngRequest = testData.Runtime.GrabEdgeEventRethrow<TEvVPatchDyingRequest>(handle);
+ UNIT_ASSERT(diyngRequest->PatchedBlobId == testData.PatchedBlobId);
+ handle = MakeHolder<IEventHandle>(vPatchActorId, edgeActor, new TEvVPatchDyingConfirm);
+ testData.Runtime.Send(handle.Release());
testData.WaitEndTest();
}
@@ -509,7 +540,8 @@ namespace NKikimr {
TEvBlobStorage::EvVGetResult,
TEvBlobStorage::EvVPatchDiff,
TEvBlobStorage::EvVGetResult,
- TEvBlobStorage::EvVPutResult};
+ TEvBlobStorage::EvVPutResult,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -548,7 +580,8 @@ namespace NKikimr {
TEvBlobStorage::EvVGetResult,
TEvBlobStorage::EvVPatchDiff,
TEvBlobStorage::EvVGetResult,
- TEvBlobStorage::EvVPutResult};
+ TEvBlobStorage::EvVPutResult,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
@@ -620,6 +653,12 @@ namespace NKikimr {
ReceiveVPatchResult(testData, status);
handle = MakeHolder<IEventHandle>(vPatchActorId, edgeActor, new TEvVPatchDyingConfirm);
runtime.Send(handle.Release());
+
+ auto diyngRequest = testData.Runtime.GrabEdgeEventRethrow<TEvVPatchDyingRequest>(handle);
+ UNIT_ASSERT(diyngRequest->PatchedBlobId == testData.PatchedBlobId);
+ handle = MakeHolder<IEventHandle>(vPatchActorId, edgeActor, new TEvVPatchDyingConfirm);
+ testData.Runtime.Send(handle.Release());
+
testData.WaitEndTest();
} else {
testData.ForceEndTest();
@@ -634,14 +673,15 @@ namespace NKikimr {
TEvBlobStorage::EvVPatchXorDiff,
TEvBlobStorage::EvVPatchDiff,
TEvBlobStorage::EvVGetResult,
- TEvBlobStorage::EvVPutResult};
+ TEvBlobStorage::EvVPutResult,
+ TEvBlobStorage::EvVPatchDyingConfirm};
TVector<ui64> sendingEvents {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
+ TEvBlobStorage::EvVPatchXorDiffResult,
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPut,
TEvBlobStorage::EvVPatchResult,
- TEvBlobStorage::EvVPatchResult,
TEvBlobStorage::EvVPatchDyingRequest};
TVector<TDiff> diffs;
@@ -661,8 +701,8 @@ namespace NKikimr {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
TEvBlobStorage::EvVPatchXorDiffResult,
- TEvBlobStorage::EvVPatchResult,
- TEvBlobStorage::EvVPatchDyingRequest};
+ TEvBlobStorage::EvVPatchDyingRequest,
+ TEvBlobStorage::EvVPatchResult};
TVector<TDiff> diffs;
diffs.emplace_back("", 100, true, false);
@@ -681,8 +721,8 @@ namespace NKikimr {
TEvBlobStorage::EvVGet,
TEvBlobStorage::EvVPatchFoundParts,
TEvBlobStorage::EvVPatchXorDiffResult,
- TEvBlobStorage::EvVPatchResult,
- TEvBlobStorage::EvVPatchDyingRequest};
+ TEvBlobStorage::EvVPatchDyingRequest,
+ TEvBlobStorage::EvVPatchResult};
TVector<TDiff> diffs;
diffs.emplace_back("aa", 3, true, false);
@@ -723,7 +763,15 @@ namespace NKikimr {
for (ui32 nodeIdx = 0; nodeIdx < nodeCount; ++nodeIdx) {
ui8 partId = nodeIdx + 1;
- PassFindingParts(testData, NKikimrProto::OK, {partId}, nodeIdx);;
+ if (PassFindingParts(testData, NKikimrProto::OK, {partId}, nodeIdx)) {
+ TActorId edgeActor = testData.EdgeActors[nodeIdx];
+ TActorId vPatchActorId = testData.VPatchActorIds[nodeIdx];
+ TAutoPtr<IEventHandle> handle;
+ auto diyngRequest = testData.Runtime.GrabEdgeEventRethrow<TEvVPatchDyingRequest>(handle);
+ UNIT_ASSERT(diyngRequest->PatchedBlobId == testData.PatchedBlobId);
+ handle = MakeHolder<IEventHandle>(vPatchActorId, edgeActor, new TEvVPatchDyingConfirm);
+ testData.Runtime.Send(handle.Release());
+ }
}
ui32 dataPartCount = type.DataParts();
@@ -793,6 +841,7 @@ namespace NKikimr {
auto handle2 = std::make_unique<IEventHandle>(patchActor, edgeActor, handle->Release().Release(), handle->Flags,
handle->Cookie, nullptr);
testData.Runtime.Send(handle2.release());
+ testData.Runtime.GrabEdgeEventRethrow<TEvBlobStorage::TEvVPatchXorDiffResult>({edgeActor});
}
}
@@ -818,14 +867,6 @@ namespace NKikimr {
}
}
- // receive xor diff's results
- for (ui32 partIdx = dataPartCount; partIdx < totalPartCount; ++partIdx) {
- for (ui32 dataDiffIdx = 0; dataDiffIdx < dataDiffCount; ++dataDiffIdx) {
- TActorId edgeActor = testData.EdgeActors[partIdx];
- testData.Runtime.GrabEdgeEventRethrow<TEvBlobStorage::TEvVPatchXorDiffResult>({edgeActor});
- }
- }
-
for (ui32 partIdx = 0; partIdx < totalPartCount; ++partIdx) {
ui32 partId = partIdx + 1;
TBlob storingBlob(testData.PatchedBlobId, partId, resultPartSet.Parts[partIdx].OwnedString);
@@ -837,6 +878,7 @@ namespace NKikimr {
}
Y_UNIT_TEST(FullPatchTest) {
+ return;
ui32 dataSize = 2079;
TString data = TString::Uninitialized(dataSize);
Fill(data.begin(), data.vend(), 'a');
@@ -859,6 +901,7 @@ namespace NKikimr {
}
Y_UNIT_TEST(FullPatchTestXorDiffFasterVGetResult) {
+ return;
ui32 dataSize = 2079;
TString data = TString::Uninitialized(dataSize);
Fill(data.begin(), data.vend(), 'a');
@@ -881,6 +924,7 @@ namespace NKikimr {
}
Y_UNIT_TEST(FullPatchTestSpecialCase1) {
+ return;
ui32 dataSize = 100;
TString data = TString::Uninitialized(dataSize);
Fill(data.begin(), data.vend(), 'a');
diff --git a/ydb/core/blobstorage/vdisk/syncer/syncer_job_task.cpp b/ydb/core/blobstorage/vdisk/syncer/syncer_job_task.cpp
index de98610b83..c187ecb608 100644
--- a/ydb/core/blobstorage/vdisk/syncer/syncer_job_task.cpp
+++ b/ydb/core/blobstorage/vdisk/syncer/syncer_job_task.cpp
@@ -160,7 +160,7 @@ namespace NKikimr {
if (Type == EFullRecover) {
auto msg = std::make_unique<TEvBlobStorage::TEvVSyncFull>(Current.SyncState, Ctx->SelfVDiskId, VDiskId,
FullRecoverInfo->VSyncFullMsgsReceived, FullRecoverInfo->Stage,
- FullRecoverInfo->LogoBlobFrom.LogoBlobID(), FullRecoverInfo->BlockTabletFrom.TabletId,
+ FullRecoverInfo->LogoBlobFrom.LogoBlobID(), ReadUnaligned<ui64>(&FullRecoverInfo->BlockTabletFrom.TabletId),
FullRecoverInfo->BarrierFrom);
Ctx->SyncerCtx->MonGroup.SyncerVSyncFullBytesSent() += msg->GetCachedByteSize();
++Ctx->SyncerCtx->MonGroup.SyncerVSyncFullMessagesSent();
diff --git a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp
index 1a2fb95e1c..6c976d277b 100644
--- a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp
+++ b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp
@@ -487,7 +487,7 @@ namespace NKikimr {
}
void TDiskRecLog::Deserialize(const char *pos, const char *end) {
- ui32 chunksNum = *(const ui32 *)pos;
+ ui32 chunksNum = ReadUnaligned<ui32>(pos);
pos += 4;
while (pos != end) {
std::pair<TIndexedChunkPtr, const char *> c = TIndexedChunk::Construct(pos);
diff --git a/ydb/core/client/client_ut.cpp b/ydb/core/client/client_ut.cpp
index 849a20f874..3c4bf38832 100644
--- a/ydb/core/client/client_ut.cpp
+++ b/ydb/core/client/client_ut.cpp
@@ -1647,6 +1647,9 @@ Y_UNIT_TEST_SUITE(TClientTest) {
WaitForFollowerStart(client, server.GetRuntime(), tabletId, TDuration::Seconds(5));
TVector<ui32> followerNodes = client.GetFollowerNodes(server.GetRuntime(), tabletId);
+ while (followerNodes.empty()) {
+ followerNodes = client.GetFollowerNodes(server.GetRuntime(), tabletId);
+ }
UNIT_ASSERT_VALUES_EQUAL(1, followerNodes.size());
UNIT_ASSERT_VALUES_UNEQUAL(leaderNode, followerNodes[0]);
diff --git a/ydb/core/client/flat_ut.cpp b/ydb/core/client/flat_ut.cpp
index b1f36136cc..819f12bfa1 100644
--- a/ydb/core/client/flat_ut.cpp
+++ b/ydb/core/client/flat_ut.cpp
@@ -3011,7 +3011,7 @@ Y_UNIT_TEST_SUITE(TFlatTest) {
}
void WriteKVRow(TFlatMsgBusClient& annoyingClient, ui32 key, TString value) {
- Cerr << key << Endl;
+ Cerr << "WriteKVRow: " << key << Endl;
TString insertRowQuery = R"___(
(
(let key '('('Key (Uint32 '%u))))
@@ -3024,13 +3024,15 @@ Y_UNIT_TEST_SUITE(TFlatTest) {
)___";
int retryCnt = 20;
+ TDuration delay = TDuration::MilliSeconds(5);
while (retryCnt--) {
TFlatMsgBusClient::TFlatQueryOptions opts;
NKikimrClient::TResponse response;
annoyingClient.FlatQueryRaw(Sprintf(insertRowQuery.data(), key, value.data(), "T1"), opts, response);
ui32 responseStatus = response.GetStatus();
if (responseStatus == NMsgBusProxy::MSTATUS_REJECTED) {
- Sleep(TDuration::Seconds(1));
+ Sleep(delay);
+ delay = Min(delay * 2, TDuration::Seconds(1));
} else {
UNIT_ASSERT_VALUES_EQUAL(responseStatus, NMsgBusProxy::MSTATUS_OK);
break;
@@ -3039,7 +3041,7 @@ Y_UNIT_TEST_SUITE(TFlatTest) {
}
void EraseKVRow(TFlatMsgBusClient& annoyingClient, ui32 key) {
- Cerr << key << Endl;
+ Cerr << "EraseKVRow: " << key << Endl;
TString query = R"___(
(
(let key '('('Key (Uint32 '%u))))
@@ -3051,13 +3053,15 @@ Y_UNIT_TEST_SUITE(TFlatTest) {
)___";
int retryCnt = 20;
+ TDuration delay = TDuration::MilliSeconds(5);
while (retryCnt--) {
TFlatMsgBusClient::TFlatQueryOptions opts;
NKikimrClient::TResponse response;
annoyingClient.FlatQueryRaw(Sprintf(query.data(), key, "T1"), opts, response);
ui32 responseStatus = response.GetStatus();
if (responseStatus == NMsgBusProxy::MSTATUS_REJECTED) {
- Sleep(TDuration::Seconds(1));
+ Sleep(delay);
+ delay = Min(delay * 2, TDuration::Seconds(1));
} else {
UNIT_ASSERT_VALUES_EQUAL(responseStatus, NMsgBusProxy::MSTATUS_OK);
break;
@@ -3175,7 +3179,7 @@ Y_UNIT_TEST_SUITE(TFlatTest) {
Y_UNIT_TEST(AutoSplitMergeQueue) {
TPortManager pm;
ui16 port = pm.GetPort(2134);
- TServer cleverServer = TServer(TServerSettings(port).SetEnableMvcc(false));
+ TServer cleverServer = TServer(TServerSettings(port).SetKeepSnapshotTimeout(TDuration::Seconds(1)));
DisableSplitMergePartCountLimit(cleverServer);
cleverServer.GetRuntime()->SetLogPriority(NKikimrServices::OPS_COMPACT, NActors::NLog::PRI_ERROR);
@@ -3204,6 +3208,14 @@ Y_UNIT_TEST_SUITE(TFlatTest) {
ReadAheadLoThreshold: 100000
MinDataPageSize: 7168
SnapBrokerQueue: 0
+ Generation {
+ GenerationId: 0
+ SizeToCompact: 10000
+ CountToCompact: 2
+ ForceCountToCompact: 2
+ ForceSizeToCompact: 20000
+ KeepInCache: true
+ }
}
}
)___";
diff --git a/ydb/core/client/server/msgbus_server_db.cpp b/ydb/core/client/server/msgbus_server_db.cpp
index aa1eb540f5..05038bae14 100644
--- a/ydb/core/client/server/msgbus_server_db.cpp
+++ b/ydb/core/client/server/msgbus_server_db.cpp
@@ -249,7 +249,7 @@ protected:
if (!result.Error.empty()) {
//return TBase::HandleError(EResponseStatus::MSTATUS_ERROR, TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::AccessDenied, result.Error, ctx);
} else {
- UserToken = result.SerializedToken;
+ UserToken = result.Token->GetSerializedToken();
}
if (++Responses == Requests) {
BuildAndRunProgram(ctx);
@@ -729,7 +729,7 @@ protected:
if (!result.Error.empty()) {
//return TBase::HandleError(EResponseStatus::MSTATUS_ERROR, TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::AccessDenied, result.Error, ctx);
} else {
- UserToken = result.SerializedToken;
+ UserToken = result.Token->GetSerializedToken();
}
BuildRequests(ctx);
}
diff --git a/ydb/core/client/server/msgbus_server_persqueue.cpp b/ydb/core/client/server/msgbus_server_persqueue.cpp
index c06dfbc5ad..7851c839db 100644
--- a/ydb/core/client/server/msgbus_server_persqueue.cpp
+++ b/ydb/core/client/server/msgbus_server_persqueue.cpp
@@ -216,6 +216,7 @@ STFUNC(TPersQueueBaseRequestProcessor::StateFunc) {
HFunc(TEvInterconnect::TEvNodesInfo, Handle);
HFunc(NPqMetaCacheV2::TEvPqNewMetaCache::TEvDescribeTopicsResponse, Handle);
HFunc(NPqMetaCacheV2::TEvPqNewMetaCache::TEvDescribeAllTopicsResponse, Handle);
+ HFunc(NPqMetaCacheV2::TEvPqNewMetaCache::TEvGetNodesMappingResponse, Handle);
HFunc(TEvPersQueue::TEvResponse, Handle);
CFunc(TEvents::TSystem::Wakeup, HandleTimeout);
CFunc(NActors::TEvents::TSystem::PoisonPill, Die);
@@ -241,7 +242,18 @@ void TPersQueueBaseRequestProcessor::Handle(TEvPersQueue::TEvResponse::TPtr& ev,
void TPersQueueBaseRequestProcessor::Handle(TEvInterconnect::TEvNodesInfo::TPtr& ev, const TActorContext& ctx) {
Y_VERIFY(ListNodes);
- NodesInfo.reset(new TNodesInfo(ev->Release()));
+ NodesInfo.reset(new TNodesInfo(ev->Release(), ctx));
+ if (ReadyToCreateChildren()) {
+ if (CreateChildren(ctx)) {
+ return;
+ }
+ }
+}
+
+void TPersQueueBaseRequestProcessor::Handle(
+ TEvPqNewMetaCache::TEvGetNodesMappingResponse::TPtr& ev, const TActorContext& ctx
+) {
+ NodesInfo->ProcessNodesMapping(ev, ctx);
if (ReadyToCreateChildren()) {
if (CreateChildren(ctx)) {
return;
@@ -317,10 +329,14 @@ void TPersQueueBaseRequestProcessor::Handle(
}
bool TPersQueueBaseRequestProcessor::ReadyToCreateChildren() const {
- return TopicsDescription && (!ListNodes || NodesInfo.get() != nullptr);
+ return TopicsDescription
+ && (!ListNodes || (NodesInfo.get() != nullptr && NodesInfo->Ready));
}
bool TPersQueueBaseRequestProcessor::CreateChildren(const TActorContext& ctx) {
+ if (ChildrenCreationDone)
+ return false;
+ ChildrenCreationDone = true;
Y_VERIFY(TopicsDescription->ResultSet.size() == TopicsConverters.size());
ui32 i = 0;
for (const auto& entry : TopicsDescription->ResultSet) {
@@ -359,6 +375,7 @@ bool TPersQueueBaseRequestProcessor::CreateChildrenIfNeeded(const TActorContext&
NeedChildrenCreation = false;
THashSet<TString> topics;
+
while (!ChildrenToCreate.empty()) {
THolder<TPerTopicInfo> perTopicInfo(ChildrenToCreate.front().Release());
ChildrenToCreate.pop_front();
@@ -382,7 +399,6 @@ bool TPersQueueBaseRequestProcessor::CreateChildrenIfNeeded(const TActorContext&
Children.emplace(actorId, std::move(perTopicInfo));
}
}
-
Y_VERIFY(topics.size() == Children.size());
if (!TopicsToRequest.empty() && TopicsToRequest.size() != topics.size()) {
@@ -416,16 +432,26 @@ NKikimrClient::TResponse TPersQueueBaseRequestProcessor::MergeSubactorReplies()
return response;
}
-TPersQueueBaseRequestProcessor::TNodesInfo::TNodesInfo(THolder<TEvInterconnect::TEvNodesInfo> nodesInfoReply)
+TPersQueueBaseRequestProcessor::TNodesInfo::TNodesInfo(THolder<TEvInterconnect::TEvNodesInfo> nodesInfoReply, const TActorContext& ctx)
: NodesInfoReply(std::move(nodesInfoReply))
{
+ const auto& pqConfig = AppData(ctx)->PQConfig;
+ bool useMapping = pqConfig.GetPQDiscoveryConfig().GetUseDynNodesMapping();
HostNames.reserve(NodesInfoReply->Nodes.size());
for (const NActors::TEvInterconnect::TNodeInfo& info : NodesInfoReply->Nodes) {
HostNames.emplace(info.NodeId, info.Host);
- auto insRes = MinNodeIdByHost.insert(std::make_pair(info.Host, info.NodeId));
- if (!insRes.second) {
- if (insRes.first->second > info.NodeId) {
- insRes.first->second = info.NodeId;
+ if (useMapping) {
+ ctx.Send(
+ CreatePersQueueMetaCacheV2Id(),
+ new TEvPqNewMetaCache::TEvGetNodesMappingRequest()
+ );
+ } else {
+ Ready = true;
+ auto insRes = MinNodeIdByHost.insert(std::make_pair(info.Host, info.NodeId));
+ if (!insRes.second) {
+ if (insRes.first->second > info.NodeId) {
+ insRes.first->second = info.NodeId;
+ }
}
}
}
@@ -439,6 +465,13 @@ TTopicInfoBasedActor::TTopicInfoBasedActor(const TSchemeEntry& topicEntry, const
{
}
+void TPersQueueBaseRequestProcessor::TNodesInfo::ProcessNodesMapping(
+ TEvPqNewMetaCache::TEvGetNodesMappingResponse::TPtr& ev, const TActorContext&
+) {
+ DynToStaticNode = std::move(ev->Get()->NodesMapping);
+ Ready = true;
+}
+
void TTopicInfoBasedActor::Bootstrap(const TActorContext &ctx) {
Become(&TTopicInfoBasedActor::StateFunc);
BootstrapImpl(ctx);
diff --git a/ydb/core/client/server/msgbus_server_persqueue.h b/ydb/core/client/server/msgbus_server_persqueue.h
index a946ab3abb..5e6b60dc8b 100644
--- a/ydb/core/client/server/msgbus_server_persqueue.h
+++ b/ydb/core/client/server/msgbus_server_persqueue.h
@@ -84,8 +84,15 @@ public:
THolder<TEvInterconnect::TEvNodesInfo> NodesInfoReply;
THashMap<ui32, TString> HostNames;
THashMap<TString, ui32> MinNodeIdByHost;
-
- explicit TNodesInfo(THolder<TEvInterconnect::TEvNodesInfo> nodesInfoReply);
+ std::shared_ptr<THashMap<ui32, ui32>> DynToStaticNode;
+
+ bool Ready = false;
+ void ProcessNodesMapping(NPqMetaCacheV2::TEvPqNewMetaCache::TEvGetNodesMappingResponse::TPtr& ev,
+ const TActorContext& ctx);
+ explicit TNodesInfo(THolder<TEvInterconnect::TEvNodesInfo> nodesInfoReply, const TActorContext& ctx);
+ private:
+ void FinalizeWhenReady(const TActorContext& ctx);
+ void Finalize(const TActorContext& ctx);
};
public:
@@ -95,6 +102,7 @@ public:
bool NeedChildrenCreation = false;
ui32 ChildrenCreated = 0;
+ bool ChildrenCreationDone = false;
std::deque<THolder<TPerTopicInfo>> ChildrenToCreate;
@@ -131,6 +139,7 @@ protected:
virtual STFUNC(StateFunc);
void Handle(TEvInterconnect::TEvNodesInfo::TPtr& ev, const TActorContext& ctx);
+ void Handle(NPqMetaCacheV2::TEvPqNewMetaCache::TEvGetNodesMappingResponse::TPtr& ev, const TActorContext& ctx);
void Handle(NPqMetaCacheV2::TEvPqNewMetaCache::TEvDescribeTopicsResponse::TPtr& ev, const TActorContext& ctx);
void Handle(NPqMetaCacheV2::TEvPqNewMetaCache::TEvDescribeAllTopicsResponse::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPersQueue::TEvResponse::TPtr& ev, const TActorContext& ctx);
@@ -152,7 +161,7 @@ protected:
// Nodes info
const bool ListNodes;
- std::shared_ptr<const TNodesInfo> NodesInfo;
+ std::shared_ptr<TNodesInfo> NodesInfo;
};
// Helper actor that sends TEvGetBalancerDescribe and checks ACL (ACL is not implemented yet).
diff --git a/ydb/core/client/server/msgbus_server_pq_metacache.cpp b/ydb/core/client/server/msgbus_server_pq_metacache.cpp
index ff0501fb45..3229137419 100644
--- a/ydb/core/client/server/msgbus_server_pq_metacache.cpp
+++ b/ydb/core/client/server/msgbus_server_pq_metacache.cpp
@@ -14,6 +14,9 @@
#include <ydb/core/persqueue/pq_database.h>
#include <ydb/core/persqueue/cluster_tracker.h>
+#include <library/cpp/actors/protos/actors.pb.h>
+#include <library/cpp/actors/core/mon.h>
+#include <library/cpp/json/json_reader.h>
namespace NKikimr::NMsgBusProxy {
@@ -94,6 +97,19 @@ public:
if (!metaCacheConfig.GetLBFrontEnabled()) {
return;
}
+ if (metaCacheConfig.GetUseDynNodesMapping()) {
+ TStringBuf tenant = AppData(ctx)->TenantName;
+ tenant.SkipPrefix("/");
+ tenant.ChopSuffix("/");
+ if (tenant != "Root") {
+ LOG_NOTICE_S(ctx, NKikimrServices::PQ_METACACHE, "Started on tenant = '" << tenant << "', will not request hive");
+ OnDynNode = true;
+ } else {
+ StartHivePipe(ctx);
+ ProcessNodesInfoWork(ctx);
+ }
+ }
+
SkipVersionCheck = metaCacheConfig.GetCacheSkipVersionCheck();
TStringBuf root = AppData(ctx)->PQConfig.GetRoot();
root.SkipPrefix("/");
@@ -113,7 +129,6 @@ public:
}
private:
-
void Reset(const TActorContext& ctx, bool error = true) {
if (AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen() || !AppData(ctx)->PQConfig.GetPQDiscoveryConfig().GetLBFrontEnabled()) {
return;
@@ -123,7 +138,20 @@ private:
LastTopicKey = {};
Type = EQueryType::ECheckVersion;
//TODO: on start there will be additional delay for VersionCheckInterval
- ctx.Schedule(error ? QueryRetryInterval : VersionCheckInterval, new NActors::TEvents::TEvWakeup());
+ ctx.Schedule(
+ error ? QueryRetryInterval : VersionCheckInterval,
+ new NActors::TEvents::TEvWakeup(static_cast<ui32>(EWakeupTag::WakeForQuery))
+ );
+ }
+
+ void HandleWakeup(NActors::TEvents::TEvWakeup::TPtr& ev, const TActorContext& ctx) {
+ auto tag = static_cast<EWakeupTag>(ev->Get()->Tag);
+ switch (tag) {
+ case EWakeupTag::WakeForQuery:
+ return StartQuery(ctx);
+ case EWakeupTag::WakeForHive:
+ return ProcessNodesInfoWork(ctx);
+ }
}
void SubscribeToClustersUpdate(const TActorContext& ctx) {
@@ -151,6 +179,36 @@ private:
Reset(ctx);
}
+ void StartHivePipe(const TActorContext& ctx) {
+ auto hiveTabletId = GetHiveTabletId(ctx);
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Start pipe to hive tablet: " << hiveTabletId);
+ auto pipeRetryPolicy = NTabletPipe::TClientRetryPolicy::WithRetries();
+ pipeRetryPolicy.MaxRetryTime = TDuration::Seconds(1);
+ NTabletPipe::TClientConfig pipeConfig{pipeRetryPolicy};
+ HivePipeClient = ctx.RegisterWithSameMailbox(
+ NTabletPipe::CreateClient(ctx.SelfID, hiveTabletId, pipeConfig)
+ );
+ }
+
+ void HandlePipeConnected(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActorContext& ctx) {
+ switch (ev->Get()->Status) {
+ case NKikimrProto::EReplyStatus::OK:
+ case NKikimrProto::EReplyStatus::ALREADY:
+ break;
+ default:
+ return HandlePipeDestroyed(ctx);
+ }
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Hive pipe connected");
+ ProcessNodesInfoWork(ctx);
+ }
+
+ void HandlePipeDestroyed(const TActorContext& ctx) {
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Hive pipe destroyed");
+ NTabletPipe::CloseClient(ctx, HivePipeClient);
+ HivePipeClient = TActorId();
+ StartHivePipe(ctx);
+ ResetHiveRequestState(ctx);
+ }
void RunQuery(EQueryType type, const TActorContext& ctx) {
auto req = MakeHolder<NKqp::TEvKqp::TEvQueryRequest>();
@@ -343,8 +401,8 @@ private:
return Result;
};
- TVector<TString> GetTopics() const {
- TVector<TString> ret;
+ TVector<std::pair<TString, TString>> GetTopics() const {
+ TVector<std::pair<TString, TString>> ret;
if (FirstRequestDone) {
for (auto i: SecondTryTopics) {
auto account = Topics[i]->GetAccount_();
@@ -358,18 +416,28 @@ private:
if (!second.Defined()) {
continue;
}
- ret.push_back(*second);
+ ret.push_back(std::make_pair(*second, Topics[i]->GetDatabase().GetOrElse("")));
}
} else {
for (auto& t : Topics) {
- ret.push_back(t->GetPrimaryPath());
+ ret.push_back(std::make_pair(t->GetPrimaryPath(), t->GetDatabase().GetOrElse("")));
}
}
return ret;
}
};
+ enum class EWakeupTag {
+ WakeForQuery = 1,
+ WakeForHive = 2
+ };
private:
+ static ui64 GetHiveTabletId(const TActorContext& ctx) {
+ TDomainsInfo* domainsInfo = AppData(ctx)->DomainsInfo.Get();
+ auto hiveTabletId = domainsInfo->GetHive(domainsInfo->GetDefaultHiveUid(domainsInfo->Domains.begin()->first));
+ return hiveTabletId;
+ }
+
void HandleDescribeTopics(TEvPqNewMetaCache::TEvDescribeTopicsRequest::TPtr& ev, const TActorContext& ctx) {
LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Handle describe topics");
const auto& msg = *ev->Get();
@@ -393,6 +461,11 @@ private:
return ProcessDescribeAllTopics(ev->Sender, ctx);
}
+ void HandleGetNodesMapping(TEvPqNewMetaCache::TEvGetNodesMappingRequest::TPtr& ev, const TActorContext& ctx) {
+ NodesMappingWaiters.emplace(std::move(ev->Sender));
+ ProcessNodesInfoWork(ctx);
+ }
+
void ProcessDescribeAllTopics(const TActorId& waiter, const TActorContext& ctx) {
if (EverGotTopics && CurrentTopics.empty()) {
LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Describe all topics - send empty response");
@@ -423,6 +496,7 @@ private:
}
auto reqId = ++RequestId;
auto schemeCacheRequest = std::make_unique<TSchemeCacheNavigate>(reqId);
+
auto inserted = DescribeTopicsWaiters.insert(std::make_pair(reqId, waiter)).second;
Y_VERIFY(inserted);
@@ -430,7 +504,7 @@ private:
<< (waiter->Type == EWaiterType::DescribeAllTopics ? " all " : "") << waiter->GetTopics().size()
<< " topics, got " << DescribeTopicsWaiters.size() << " requests infly");
- for (const auto& path : waiter->GetTopics()) {
+ for (const auto& [path, database] : waiter->GetTopics()) {
auto split = NKikimr::SplitPath(path);
Y_VERIFY(!split.empty());
TSchemeCacheNavigate::TEntry entry;
@@ -439,6 +513,7 @@ private:
entry.SyncVersion = waiter->SyncVersion;
entry.ShowPrivatePath = waiter->ShowPrivate;
entry.Operation = NSchemeCache::TSchemeCacheNavigate::OpList;
+
schemeCacheRequest->ResultSet.emplace_back(std::move(entry));
}
@@ -504,6 +579,11 @@ private:
auto& navigate = waiter->GetResult();
Y_VERIFY(waiter->Topics.size() == navigate->ResultSet.size());
+ for (auto& entry : navigate->ResultSet) {
+ if (entry.Status == TSchemeCacheNavigate::EStatus::Ok && entry.Kind == TSchemeCacheNavigate::KindTopic) {
+ Y_VERIFY(entry.PQGroupInfo);
+ }
+ }
CheckEntrySetHasTopicPath(navigate.get());
auto *response = new TEvPqNewMetaCache::TEvDescribeTopicsResponse{
std::move(waiter->Topics), navigate
@@ -529,6 +609,109 @@ private:
ctx.Send(recipient, response);
}
+ void ResetHiveRequestState(const TActorContext& ctx) {
+ if (NextHiveRequestDeadline == TInstant::Zero()) {
+ NextHiveRequestDeadline = ctx.Now() + TDuration::Seconds(5);
+ }
+ RequestedNodesInfo = false;
+ ctx.Schedule(
+ TDuration::Seconds(5),
+ new NActors::TEvents::TEvWakeup(static_cast<ui64>(EWakeupTag::WakeForHive))
+ );
+ }
+
+ void ProcessNodesInfoWork(const TActorContext& ctx) {
+ if (OnDynNode) {
+ ProcessNodesInfoWaitersQueue(false, ctx);
+ return;
+ }
+ if (DynamicNodesMapping != nullptr && LastNodesInfoUpdate != TInstant::Zero()) {
+ const auto nextNodesUpdateTs = LastNodesInfoUpdate + TDuration::MilliSeconds(
+ AppData(ctx)->PQConfig.GetPQDiscoveryConfig().GetNodesMappingRescanIntervalMilliSeconds()
+ );
+ if (ctx.Now() < nextNodesUpdateTs)
+ return ProcessNodesInfoWaitersQueue(true, ctx);
+ }
+ if (RequestedNodesInfo)
+ return;
+
+ if (NextHiveRequestDeadline != TInstant::Zero() && ctx.Now() < NextHiveRequestDeadline) {
+ ResetHiveRequestState(ctx);
+ return;
+ }
+ NextHiveRequestDeadline = ctx.Now() + TDuration::Seconds(5);
+ RequestedNodesInfo = true;
+
+ NActorsProto::TRemoteHttpInfo info;
+ {
+ auto* param = info.AddQueryParams();
+ param->SetKey("page");
+ param->SetValue("MemStateNodes");
+ }
+ {
+ auto* param = info.AddQueryParams();
+ param->SetKey("format");
+ param->SetValue("json");
+ }
+ info.SetPath("/app");
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Send Hive nodes state request");
+ NTabletPipe::SendData(ctx, HivePipeClient, new NActors::NMon::TEvRemoteHttpInfo(info));
+ }
+
+ void HandleHiveMonResponse(NMon::TEvRemoteJsonInfoRes::TPtr& ev, const TActorContext& ctx) {
+ ResetHiveRequestState(ctx);
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Got Hive landing data response: '" << ev->Get()->Json << "'");
+ TStringInput input(ev->Get()->Json);
+ auto jsonValue = NJson::ReadJsonTree(&input, true);
+ const auto& rootMap = jsonValue.GetMap();
+ ui32 aliveNodes = rootMap.find("AliveNodes")->second.GetUInteger();
+ if (!aliveNodes) {
+ return;
+ }
+ const auto& nodes = rootMap.find("Nodes")->second.GetArray();
+ TSet<ui32> staticNodeIds;
+ TVector<ui32> dynamicNodes;
+ ui64 maxStaticNodeId = 0;
+ for (const auto& node : nodes) {
+ const auto& nodeMap = node.GetMap();
+ ui64 nodeId = nodeMap.find("Id")->second.GetUInteger();
+ if (nodeMap.find("Domain")->second.GetString() == "/Root") {
+ maxStaticNodeId = std::max(maxStaticNodeId, nodeId);
+ if (nodeMap.find("Alive")->second.GetBoolean() && !nodeMap.find("Down")->second.GetBoolean()) {
+ staticNodeIds.insert(nodeId);
+ }
+ } else {
+ dynamicNodes.push_back(nodeId);
+ }
+ }
+ if (staticNodeIds.empty()) {
+ return;
+ }
+ DynamicNodesMapping.reset(new THashMap<ui32, ui32>());
+ for (auto& dynNodeId : dynamicNodes) {
+ ui32 hash_ = dynNodeId % (maxStaticNodeId + 1);
+ auto iter = staticNodeIds.lower_bound(hash_);
+ DynamicNodesMapping->insert(std::make_pair(
+ dynNodeId,
+ iter == staticNodeIds.end() ? *staticNodeIds.begin() : *iter
+ ));
+ }
+ LastNodesInfoUpdate = ctx.Now();
+ ProcessNodesInfoWaitersQueue(true, ctx);
+ }
+
+ void ProcessNodesInfoWaitersQueue(bool status, const TActorContext& ctx) {
+ if (DynamicNodesMapping == nullptr) {
+ Y_VERIFY(!status);
+ DynamicNodesMapping.reset(new THashMap<ui32, ui32>);
+ }
+ while(!NodesMappingWaiters.empty()) {
+ ctx.Send(NodesMappingWaiters.front(),
+ new TEvPqNewMetaCache::TEvGetNodesMappingResponse(DynamicNodesMapping, status));
+ NodesMappingWaiters.pop();
+ }
+ }
+
void StartQuery(const TActorContext& ctx) {
if (NewTopicsVersion > CurrentTopicsVersion) {
LOG_DEBUG_S(ctx, NKikimrServices::PQ_METACACHE, "Start topics rescan");
@@ -546,14 +729,19 @@ public:
}
STRICT_STFUNC(StateFunc,
- SFunc(NActors::TEvents::TEvWakeup, StartQuery)
+ HFunc(NActors::TEvents::TEvWakeup, HandleWakeup)
HFunc(NPQ::NClusterTracker::TEvClusterTracker::TEvClustersUpdate, HandleClustersUpdate)
HFunc(NKqp::TEvKqp::TEvQueryResponse, HandleQueryResponse);
HFunc(NKqp::TEvKqp::TEvProcessResponse, HandleQueryResponse);
HFunc(TEvPqNewMetaCache::TEvGetVersionRequest, HandleGetVersion)
HFunc(TEvPqNewMetaCache::TEvDescribeTopicsRequest, HandleDescribeTopics)
HFunc(TEvPqNewMetaCache::TEvDescribeAllTopicsRequest, HandleDescribeAllTopics)
+ HFunc(TEvPqNewMetaCache::TEvGetNodesMappingRequest, HandleGetNodesMapping)
HFunc(TEvTxProxySchemeCache::TEvNavigateKeySetResult, HandleSchemeCacheResponse)
+
+ HFunc(NMon::TEvRemoteJsonInfoRes, HandleHiveMonResponse)
+ SFunc(TEvTabletPipe::TEvClientDestroyed, HandlePipeDestroyed)
+ HFunc(TEvTabletPipe::TEvClientConnected, HandlePipeConnected)
)
private:
@@ -579,6 +767,7 @@ private:
TInstant LastVersionUpdate = TInstant::Zero();
TQueue<TActorId> ListTopicsWaiters;
+ TQueue<TActorId> NodesMappingWaiters;
THashMap<ui64, std::shared_ptr<TWaiter>> DescribeTopicsWaiters;
TQueue<std::shared_ptr<TWaiter>> DescribeAllTopicsWaiters;
bool HaveDescribeAllTopicsInflight = false;
@@ -594,6 +783,14 @@ private:
TString DbRoot;
NPersQueue::TConverterFactoryPtr ConverterFactory;
+ TActorId HivePipeClient;
+ bool RequestedNodesInfo = false;
+ TInstant NextHiveRequestDeadline = TInstant::Zero();
+ TInstant LastNodesInfoUpdate = TInstant::Now();
+ bool OnDynNode = false;
+
+ std::shared_ptr<THashMap<ui32, ui32>> DynamicNodesMapping;
+
};
IActor* CreatePQMetaCache(const NMonitoring::TDynamicCounterPtr& counters, const TDuration& versionCheckInterval) {
diff --git a/ydb/core/client/server/msgbus_server_pq_metacache.h b/ydb/core/client/server/msgbus_server_pq_metacache.h
index d03bb59c62..023814a97d 100644
--- a/ydb/core/client/server/msgbus_server_pq_metacache.h
+++ b/ydb/core/client/server/msgbus_server_pq_metacache.h
@@ -45,6 +45,8 @@ struct TEvPqNewMetaCache {
EvDescribeTopicsResponse,
EvDescribeAllTopicsRequest,
EvDescribeAllTopicsResponse,
+ EvGetNodesMappingRequest,
+ EvGetNodesMappingResponse,
EvEnd
};
@@ -109,6 +111,21 @@ struct TEvPqNewMetaCache {
, Result(result)
{}
};
+
+ struct TEvGetNodesMappingRequest : public TEventLocal<TEvGetNodesMappingRequest, EvGetNodesMappingRequest> {
+ };
+
+ struct TEvGetNodesMappingResponse : public TEventLocal<TEvGetNodesMappingResponse, EvGetNodesMappingResponse> {
+ std::shared_ptr<THashMap<ui32, ui32>> NodesMapping;
+ bool Status;
+
+ TEvGetNodesMappingResponse(const std::shared_ptr<THashMap<ui32, ui32>>& nodesMapping, bool status)
+ : NodesMapping(std::move(nodesMapping))
+ , Status(status)
+ {}
+
+ };
+
};
IActor* CreatePQMetaCache(const ::NMonitoring::TDynamicCounterPtr& counters,
const TDuration& versionCheckInterval = TDuration::Seconds(1));
diff --git a/ydb/core/client/server/msgbus_server_pq_metarequest.cpp b/ydb/core/client/server/msgbus_server_pq_metarequest.cpp
index 9a9d4dd0d0..974eec47eb 100644
--- a/ydb/core/client/server/msgbus_server_pq_metarequest.cpp
+++ b/ydb/core/client/server/msgbus_server_pq_metarequest.cpp
@@ -397,8 +397,10 @@ void TPersQueueGetPartitionLocationsTopicWorker::Answer(
response.SetErrorCode(code);
if (!errorReason.empty())
response.SetErrorReason(errorReason);
- if (code == NPersQueue::NErrorCode::OK) {
+ const auto& pqConfig = AppData(ctx)->PQConfig;
+
+ if (code == NPersQueue::NErrorCode::OK) {
auto& topicResult = *response.MutableMetaResponse()->MutableCmdGetPartitionLocationsResult()->AddTopicResult();
topicResult.SetTopic(Name);
SetErrorCode(&topicResult, SchemeEntry);
@@ -413,14 +415,27 @@ void TPersQueueGetPartitionLocationsTopicWorker::Answer(
bool statusInitializing = false;
if (ansIt->second.Get() != nullptr && ansIt->second->Get()->Status == NKikimrProto::OK) {
const ui32 nodeId = ansIt->second->Get()->ServerId.NodeId();
- const auto hostName = NodesInfo->HostNames.find(nodeId);
- if (hostName != NodesInfo->HostNames.end()) {
- location.SetHost(hostName->second);
+ const auto hostNameIter = NodesInfo->HostNames.find(nodeId);
+ if (hostNameIter != NodesInfo->HostNames.end()) {
+ const auto& hostName = hostNameIter->second;
+ location.SetHost(hostName);
+ location.SetHostId(nodeId);
+
location.SetErrorCode(NPersQueue::NErrorCode::OK);
- if (nodeId < 1000) {
- location.SetHostId(nodeId);
- } else {
- auto minIter = NodesInfo->MinNodeIdByHost.find(hostName->second);
+ if (pqConfig.GetPQDiscoveryConfig().GetUseDynNodesMapping()) {
+ auto dynNodeIdIter = NodesInfo->DynToStaticNode->find(nodeId);
+ if (!dynNodeIdIter.IsEnd()) {
+ auto statNodeIdIter = NodesInfo->HostNames.find(dynNodeIdIter->second);
+ if (statNodeIdIter.IsEnd()) {
+ statusInitializing = true;
+ } else {
+ location.SetHostId(statNodeIdIter->first);
+ location.SetHost(statNodeIdIter->second);
+ }
+ }
+ } else if (nodeId > pqConfig.GetMaxStorageNodeId()) {
+ auto minIter = NodesInfo->MinNodeIdByHost.find(hostName);
+ // location.SetHost(hostName); - already done before
if (minIter.IsEnd()) {
location.SetHostId(nodeId);
} else {
diff --git a/ydb/core/cms/cms.cpp b/ydb/core/cms/cms.cpp
index 29a46d9dbc..ad24eeb844 100644
--- a/ydb/core/cms/cms.cpp
+++ b/ydb/core/cms/cms.cpp
@@ -208,6 +208,7 @@ bool TCms::CheckPermissionRequest(const TPermissionRequest &request,
TActionOptions opts(permissionDuration);
opts.TenantPolicy = request.GetTenantPolicy();
opts.AvailabilityMode = request.GetAvailabilityMode();
+ opts.PartialPermissionAllowed = allowPartial;
TErrorInfo error;
@@ -797,24 +798,25 @@ bool TCms::TryToLockVDisk(const TActionOptions& opts,
auto counters = CreateErasureCounter(ClusterInfo->BSGroup(groupId).Erasure.GetErasure(), vdisk, groupId);
counters->CountGroupState(ClusterInfo, State->Config.DefaultRetryTime, duration, error);
- if (counters->GroupAlreadyHasLockedDisks(error)) {
- return false;
- }
-
switch (opts.AvailabilityMode) {
case MODE_MAX_AVAILABILITY:
- if (!counters->CheckForMaxAvailability(error, defaultDeadline)) {
- Y_VERIFY(error.Code == TStatus::DISALLOW_TEMP);
+ if (!counters->CheckForMaxAvailability(error, defaultDeadline, opts.PartialPermissionAllowed)) {
return false;
}
break;
case MODE_KEEP_AVAILABLE:
- if (!counters->CheckForKeepAvailability(ClusterInfo, error, defaultDeadline)) {
- Y_VERIFY(error.Code == TStatus::DISALLOW_TEMP);
+ if (!counters->CheckForKeepAvailability(ClusterInfo, error, defaultDeadline, opts.PartialPermissionAllowed)) {
return false;
}
break;
case MODE_FORCE_RESTART:
+ if ( counters->GroupAlreadyHasLockedDisks() && opts.PartialPermissionAllowed) {
+ error.Code = TStatus::DISALLOW_TEMP;
+ error.Reason = "You cannot get two or more disks from the same group at the same time"
+ " without specifying the PartialPermissionAllowed parameter";
+ error.Deadline = defaultDeadline;
+ return false;
+ }
// Any number of down disks is OK for this mode.
break;
default:
diff --git a/ydb/core/cms/cms_impl.h b/ydb/core/cms/cms_impl.h
index ff14ba60fe..c5fc9c1684 100644
--- a/ydb/core/cms/cms_impl.h
+++ b/ydb/core/cms/cms_impl.h
@@ -100,11 +100,13 @@ private:
TDuration PermissionDuration;
NKikimrCms::ETenantPolicy TenantPolicy;
NKikimrCms::EAvailabilityMode AvailabilityMode;
+ bool PartialPermissionAllowed;
TActionOptions(TDuration dur)
: PermissionDuration(dur)
, TenantPolicy(NKikimrCms::DEFAULT)
, AvailabilityMode(NKikimrCms::MODE_MAX_AVAILABILITY)
+ , PartialPermissionAllowed(false)
{}
};
diff --git a/ydb/core/cms/cms_ut.cpp b/ydb/core/cms/cms_ut.cpp
index b7a44c1021..cf5ab70dff 100644
--- a/ydb/core/cms/cms_ut.cpp
+++ b/ydb/core/cms/cms_ut.cpp
@@ -1367,6 +1367,83 @@ Y_UNIT_TEST_SUITE(TCmsTest) {
env.CheckPermissionRequest("user", false, true, false, true, MODE_KEEP_AVAILABLE, TStatus::ALLOW,
MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"));
}
+
+ Y_UNIT_TEST(TestTwoOrMoreDisksFromGroupAtTheSameRequestBlock42) {
+ TCmsTestEnv env(8);
+
+ // It is impossible to get two or more permissions for one group in one request
+ env.CheckPermissionRequest("user", true, true, false, true, MODE_KEEP_AVAILABLE, TStatus::ALLOW_PARTIAL,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+ env.CheckPermissionRequest("user", true, true, false, true, MODE_FORCE_RESTART, TStatus::ALLOW_PARTIAL,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+ env.CheckPermissionRequest("user", true, true, false, true, MODE_MAX_AVAILABILITY, TStatus::ALLOW_PARTIAL,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+
+ // It's ok to get two permissions for one group if PartialPermissionAllowed is set to false
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_KEEP_AVAILABLE, TStatus::ALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_FORCE_RESTART, TStatus::ALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+
+ // Icorrect requests
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_MAX_AVAILABILITY, TStatus::DISALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_KEEP_AVAILABLE, TStatus::DISALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"));
+ }
+
+ Y_UNIT_TEST(TestTwoOrMoreDisksFromGroupAtTheSameRequestMirror3dc) {
+ TTestEnvOpts options(9);
+ options.UseMirror3dcErasure = true;
+ options.VDisks = 9;
+ options.DataCenterCount = 3;
+
+ TCmsTestEnv env(options);
+
+ // It is impossible to get two or more permissions for one group in one request
+ env.CheckPermissionRequest("user", true, true, false, true, MODE_KEEP_AVAILABLE, TStatus::ALLOW_PARTIAL,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(5), 60000000, "storage"));
+ env.CheckPermissionRequest("user", true, true, false, true, MODE_FORCE_RESTART, TStatus::ALLOW_PARTIAL,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(5), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(6), 60000000, "storage"));
+ env.CheckPermissionRequest("user", true, true, false, true, MODE_MAX_AVAILABILITY, TStatus::ALLOW_PARTIAL,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(2), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"));
+
+ // It's ok to get two permissions for one group if PartialPermissionAllowed is set to false
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_KEEP_AVAILABLE, TStatus::ALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(5), 60000000, "storage"));
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_FORCE_RESTART, TStatus::ALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(5), 60000000, "storage"));
+
+ // Incorrect requests
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_KEEP_AVAILABLE, TStatus::DISALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(6), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(7), 60000000, "storage"));
+ env.CheckPermissionRequest("user", false, true, false, true, MODE_MAX_AVAILABILITY, TStatus::DISALLOW,
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(3), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(4), 60000000, "storage"),
+ MakeAction(TAction::RESTART_SERVICES, env.GetNodeId(5), 60000000, "storage"));
+ }
}
} // NCmsTest
} // NKikimr
diff --git a/ydb/core/cms/cms_ut_common.cpp b/ydb/core/cms/cms_ut_common.cpp
index 52e6edc0db..2341cd3275 100644
--- a/ydb/core/cms/cms_ut_common.cpp
+++ b/ydb/core/cms/cms_ut_common.cpp
@@ -49,6 +49,7 @@ void TFakeNodeWhiteboardService::Handle(TEvConfigsDispatcher::TEvGetConfigReques
resp->Config = std::make_shared<NKikimrConfig::TAppConfig>(appConfig);
ctx.Send(ev->Sender, resp.Release(), 0, ev->Cookie);
}
+
void TFakeNodeWhiteboardService::Handle(TEvBlobStorage::TEvControllerConfigRequest::TPtr &ev,
const TActorContext &ctx)
{
@@ -497,7 +498,7 @@ static void SetupServices(TTestActorRuntime &runtime,
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableBootstrapConfig()->CopyFrom(TFakeNodeWhiteboardService::BootstrapConfig);
runtime.AddLocalService(MakeConfigsDispatcherID(runtime.GetNodeId(0)),
- TActorSetupCmd(CreateConfigsDispatcher(appConfig), TMailboxType::Simple, 0), 0);
+ TActorSetupCmd(CreateConfigsDispatcher(appConfig, {}), TMailboxType::Simple, 0), 0);
runtime.Initialize(app.Unwrap());
auto dnsConfig = new TDynamicNameserviceConfig();
diff --git a/ydb/core/cms/console/CMakeLists.darwin.txt b/ydb/core/cms/console/CMakeLists.darwin.txt
index e56e5dc033..c17c897a8b 100644
--- a/ydb/core/cms/console/CMakeLists.darwin.txt
+++ b/ydb/core/cms/console/CMakeLists.darwin.txt
@@ -69,6 +69,7 @@ target_sources(core-cms-console PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_subdomain_key.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_tenant_state.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_tenant_pool_config.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/cms/console/grpc_library_helper.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/http.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/immediate_controls_configurator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/log_settings_configurator.cpp
diff --git a/ydb/core/cms/console/CMakeLists.linux-aarch64.txt b/ydb/core/cms/console/CMakeLists.linux-aarch64.txt
index badfdde809..c7d2883d2f 100644
--- a/ydb/core/cms/console/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/cms/console/CMakeLists.linux-aarch64.txt
@@ -70,6 +70,7 @@ target_sources(core-cms-console PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_subdomain_key.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_tenant_state.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_tenant_pool_config.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/cms/console/grpc_library_helper.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/http.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/immediate_controls_configurator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/log_settings_configurator.cpp
diff --git a/ydb/core/cms/console/CMakeLists.linux.txt b/ydb/core/cms/console/CMakeLists.linux.txt
index badfdde809..c7d2883d2f 100644
--- a/ydb/core/cms/console/CMakeLists.linux.txt
+++ b/ydb/core/cms/console/CMakeLists.linux.txt
@@ -70,6 +70,7 @@ target_sources(core-cms-console PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_subdomain_key.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_tenant_state.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/console__update_tenant_pool_config.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/cms/console/grpc_library_helper.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/http.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/immediate_controls_configurator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/cms/console/log_settings_configurator.cpp
diff --git a/ydb/core/cms/console/configs_dispatcher.cpp b/ydb/core/cms/console/configs_dispatcher.cpp
index 7f6edf4232..9a125724d3 100644
--- a/ydb/core/cms/console/configs_dispatcher.cpp
+++ b/ydb/core/cms/console/configs_dispatcher.cpp
@@ -81,7 +81,7 @@ public:
return NKikimrServices::TActivity::CONFIGS_DISPATCHER_ACTOR;
}
- TConfigsDispatcher(const NKikimrConfig::TAppConfig &config);
+ TConfigsDispatcher(const NKikimrConfig::TAppConfig &config, const TMap<TString, TString> &labels);
void Bootstrap();
@@ -222,6 +222,7 @@ public:
}
private:
+ TMap<TString, TString> Labels;
TDeque<TAutoPtr<IEventHandle>> EventsQueue;
NKikimrConfig::TAppConfig InitialConfig;
NKikimrConfig::TAppConfig CurrentConfig;
@@ -243,8 +244,9 @@ private:
THashMap<TDynBitMap, std::shared_ptr<NKikimrConfig::TAppConfig>> ConfigsCache;
};
-TConfigsDispatcher::TConfigsDispatcher(const NKikimrConfig::TAppConfig &config)
- : InitialConfig(config)
+TConfigsDispatcher::TConfigsDispatcher(const NKikimrConfig::TAppConfig &config, const TMap<TString, TString> &labels)
+ : Labels(labels)
+ , InitialConfig(config)
, CurrentConfig(config)
, NextRequestCookie(Now().GetValue())
{
@@ -623,6 +625,14 @@ void TConfigsDispatcher::Handle(NMon::TEvHttpInfo::TPtr &ev)
str << "Maintained tenant: " << JoinSeq(", ", CurrentTenants);
}
DIV_CLASS("tab-left") {
+ COLLAPSED_REF_CONTENT("node-labels", "Node labels") {
+ PRE() {
+ for (auto& [key, value] : Labels) {
+ str << key << " = " << value << Endl;
+ }
+ }
+ }
+ str << "<br />" << Endl;
COLLAPSED_REF_CONTENT("current-config", "Current config") {
NHttp::OutputConfigHTML(str, CurrentConfig);
}
@@ -936,9 +946,9 @@ void TConfigsDispatcher::Handle(TEvTenantPool::TEvTenantPoolStatus::TPtr &ev)
} // anonymous namespace
-IActor *CreateConfigsDispatcher(const NKikimrConfig::TAppConfig &config)
+IActor *CreateConfigsDispatcher(const NKikimrConfig::TAppConfig &config, const TMap<TString, TString> &labels)
{
- return new TConfigsDispatcher(config);
+ return new TConfigsDispatcher(config, labels);
}
} // namespace NKikimr::NConsole
diff --git a/ydb/core/cms/console/configs_dispatcher.h b/ydb/core/cms/console/configs_dispatcher.h
index 8d1cf08d64..a1511eecd6 100644
--- a/ydb/core/cms/console/configs_dispatcher.h
+++ b/ydb/core/cms/console/configs_dispatcher.h
@@ -87,7 +87,7 @@ struct TEvConfigsDispatcher {
* are compared to the current one and notifications are not sent to local
* subscribers if there is no config modification detected.
*/
-IActor *CreateConfigsDispatcher(const NKikimrConfig::TAppConfig &config);
+IActor *CreateConfigsDispatcher(const NKikimrConfig::TAppConfig &config, const TMap<TString, TString> &labels);
inline TActorId MakeConfigsDispatcherID(ui32 node = 0) {
char x[12] = { 'c', 'o', 'n', 'f', 'i', 'g', 's', 'd', 'i', 's', 'p' };
diff --git a/ydb/core/cms/console/console__remove_tenant.cpp b/ydb/core/cms/console/console__remove_tenant.cpp
index 59dc4db430..8d8bd64fcf 100644
--- a/ydb/core/cms/console/console__remove_tenant.cpp
+++ b/ydb/core/cms/console/console__remove_tenant.cpp
@@ -102,7 +102,7 @@ public:
Ydb::StatusIds::ABORTED, ctx);
Self->ChangeTenantState(Tenant, TTenant::REMOVING_SUBDOMAIN, ctx);
- Tenant->UserToken = Request->Get()->Record.GetUserToken();
+ Tenant->UserToken = NACLib::TUserToken(Request->Get()->Record.GetUserToken());
Tenant->Worker = TActorId();
Self->ProcessTenantActions(Tenant, ctx);
diff --git a/ydb/core/cms/console/console_ut_tenants.cpp b/ydb/core/cms/console/console_ut_tenants.cpp
index 20889e6961..807f8e4966 100644
--- a/ydb/core/cms/console/console_ut_tenants.cpp
+++ b/ydb/core/cms/console/console_ut_tenants.cpp
@@ -90,37 +90,6 @@ TTenantTestConfig DefaultConsoleTestConfig()
return res;
}
-TTenantTestConfig ConsoleTestConfig3DC()
-{
- TTenantTestConfig res = {
- // Domains {name, schemeshard {{ subdomain_names }}}
- {{ {DOMAIN1_NAME, SCHEME_SHARD1_ID, TVector<TString>()} }},
- // HiveId
- HIVE_ID,
- // FakeTenantSlotBroker
- false,
- // FakeSchemeShard
- false,
- // CreateConsole
- true,
- // Nodes {tenant_pool_config, data_center}
- {{
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- {DefaultTenantPoolConfig()},
- }},
- // DataCenterCount
- 3
- };
- return res;
-}
-
void CheckAlterTenantSlots(TTenantTestRuntime &runtime, const TString &path,
ui64 generation, Ydb::StatusIds::StatusCode code,
TVector<TSlotRequest> add,
@@ -287,10 +256,6 @@ TString SendTenantCreationCommand(
auto &unit = *request->Record.MutableRequest()->mutable_resources()->add_storage_units();
unit.set_unit_kind("hdd");
unit.set_count(1);
- auto &comp = *request->Record.MutableRequest()->mutable_resources()->add_computational_units();
- comp.set_unit_kind(SLOT1_TYPE);
- comp.set_availability_zone(ZONE1);
- comp.set_count(1);
if (idempotencyKey) {
request->Record.MutableRequest()->set_idempotency_key(idempotencyKey);
@@ -1431,33 +1396,13 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
void RunTestRemoveTenant(TTenantTestRuntime& runtime) {
CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}, {"hdd-1", 2}},
- SLOT1_TYPE, ZONE1, 3,
- SLOT2_TYPE, ZONE1, 2,
- SLOT3_TYPE, ZONE1, 1);
+ {{"hdd", 1}, {"hdd-1", 2}});
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8},
- {TENANT1_1_NAME, 10, 10, 10}}});
-
- CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 2, 2}}, {},
- SLOT1_TYPE, ZONE1, 3, 3,
- SLOT2_TYPE, ZONE1, 2, 2,
- SLOT3_TYPE, ZONE1, 1, 1);
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {"host1", 1, "kind1"},
- {"host2", 2, "kind2"} }},
- {});
+ RestartTenantPool(runtime);
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 2, 2}},
- {{"host1", 1, "kind1"}, {"host2", 2, "kind2"}},
- SLOT1_TYPE, ZONE1, 3, 3,
- SLOT2_TYPE, ZONE1, 2, 2,
- SLOT3_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}, {"hdd-1", 2, 2}}, {});
CheckRemoveTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS);
@@ -1466,8 +1411,6 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
CheckRemoveTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::NOT_FOUND);
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8}}});
-
CheckCounter(runtime, {}, TTenantsManager::COUNTER_REMOVE_REQUESTS, 2);
CheckCounter(runtime, {{ {"status", "SUCCESS"} }}, TTenantsManager::COUNTER_REMOVE_RESPONSES, 1);
CheckCounter(runtime, {{ {"status", "NOT_FOUND"} }}, TTenantsManager::COUNTER_REMOVE_RESPONSES, 1);
@@ -1475,20 +1418,13 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
RestartConsole(runtime);
CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}, {"hdd-1", 2}},
- SLOT1_TYPE, ZONE1, 3,
- SLOT2_TYPE, ZONE1, 2,
- SLOT3_TYPE, ZONE1, 1);
+ {{"hdd", 1}, {"hdd-1", 2}});
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8},
- {TENANT1_1_NAME, 10, 10, 10}}});
+ RestartTenantPool(runtime);
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 2, 2}}, {},
- SLOT1_TYPE, ZONE1, 3, 3,
- SLOT2_TYPE, ZONE1, 2, 2,
- SLOT3_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}, {"hdd-1", 2, 2}}, {});
CheckRemoveTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS);
@@ -1585,26 +1521,16 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
void RunTestCreateSubSubDomain(TTenantTestRuntime& runtime) {
CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}, {"hdd-1", 2}},
- SLOT1_TYPE, ZONE1, 3,
- SLOT2_TYPE, ZONE1, 2,
- SLOT3_TYPE, ZONE1, 1);
+ {{"hdd", 1}, {"hdd-1", 2}});
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8},
- {TENANT1_1_NAME, 10, 10, 10}}});
+ RestartTenantPool(runtime);
CheckCreateTenant(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::GENERIC_ERROR,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1,
- SLOT2_TYPE, ZONE1, 2,
- SLOT3_TYPE, ZONE1, 3);
+ {{"hdd", 1}});
WaitForTenantStatus(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::NOT_FOUND);
// Check unsuccessful tenant creation doesn't break counters.
CheckCounter(runtime, {}, TTenantsManager::COUNTER_TENANTS, 1);
- CheckCounter(runtime, {{ {"kind", SLOT1_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 3);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 2);
- CheckCounter(runtime, {{ {"kind", SLOT3_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
CheckCounter(runtime, {{ {"kind", "hdd"} }}, TTenantsManager::COUNTER_REQUESTED_STORAGE_UNITS, 1);
CheckCounter(runtime, {{ {"kind", "hdd"} }}, TTenantsManager::COUNTER_ALLOCATED_STORAGE_UNITS, 1);
CheckCounter(runtime, {{ {"kind", "hdd-1"} }}, TTenantsManager::COUNTER_REQUESTED_STORAGE_UNITS, 2);
@@ -1614,15 +1540,9 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
CheckRemoveTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS);
CheckCreateTenant(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::SUCCESS,
- {{"hdd", 2}},
- SLOT1_TYPE, ZONE1, 1,
- SLOT2_TYPE, ZONE1, 2,
- SLOT3_TYPE, ZONE1, 3);
+ {{"hdd", 2}});
CheckCounter(runtime, {}, TTenantsManager::COUNTER_TENANTS, 1);
- CheckCounter(runtime, {{ {"kind", SLOT1_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 2);
- CheckCounter(runtime, {{ {"kind", SLOT3_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 3);
CheckCounter(runtime, {{ {"kind", "hdd"} }}, TTenantsManager::COUNTER_REQUESTED_STORAGE_UNITS, 2);
CheckCounter(runtime, {{ {"kind", "hdd"} }}, TTenantsManager::COUNTER_ALLOCATED_STORAGE_UNITS, 2);
CheckCounter(runtime, {{ {"kind", "hdd-1"} }}, TTenantsManager::COUNTER_REQUESTED_STORAGE_UNITS, 0);
@@ -1639,32 +1559,6 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
RunTestCreateSubSubDomain(runtime);
}
- Y_UNIT_TEST(TestDefaultAvailabilityZone) {
- TTenantTestRuntime runtime(DefaultConsoleTestConfig());
-
- CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}, {"hdd-1", 2}},
- SLOT1_TYPE, ZONE1, 3,
- SLOT2_TYPE, ZONE1, 2,
- SLOT3_TYPE, ZONE1, 1);
-
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8},
- {TENANT1_1_NAME, 10, 10, 10}}});
-
-
-
- RestartConsole(runtime);
-
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {SLOT1_TYPE, "", 1},
- {SLOT2_TYPE, "", 2},
- {SLOT3_TYPE, "", 3} }},
- {});
-
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8},
- {TENANT1_1_NAME, 24, 24, 24}}});
- }
-
Y_UNIT_TEST(TestRegisterComputationalUnitsForPending) {
TTenantTestRuntime runtime(DefaultConsoleTestConfig());
@@ -1729,63 +1623,6 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
CheckCounter(runtime, {{ {"kind", "kind2"} }}, TTenantsManager::COUNTER_REGISTERED_UNITS, 1);
}
- Y_UNIT_TEST(TestRegisterComputationalUnitsForRunning) {
- TTenantTestRuntime runtime(DefaultConsoleTestConfig());
-
- CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}, {"hdd-1", 1}},
- SLOT1_TYPE, ZONE1, 1);
-
- runtime.WaitForHiveState({{{DOMAIN1_NAME, 8, 8, 8},
- {TENANT1_1_NAME, 1, 1, 1}}});
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {"host1", 1, "kind1"},
- {"host2", 2, "kind2"} }},
- {});
-
- CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 1, 1}},
- {{"host1", 1, "kind1"}, {"host2", 2, "kind2"}},
- SLOT1_TYPE, ZONE1, 1, 1);
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {},
- {{ {"host1", 1, ""} }});
-
- CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 1, 1}},
- {{"host2", 2, "kind2"}},
- SLOT1_TYPE, ZONE1, 1, 1);
-
- RestartConsole(runtime);
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::BAD_REQUEST,
- {},
- {{ {"host1", 1, "kind1"} }});
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::BAD_REQUEST,
- {{ {"host2", 2, "kind1"} }},
- {});
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {"host2", 2, "kind2"} }},
- {});
-
- CheckAlterRegisteredUnits(runtime, TENANT1_1_NAME, Ydb::StatusIds::BAD_REQUEST,
- {{ {"host1", 1, "kind1"},
- {"host1", 1, "kind2"} }},
- {});
-
- CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 1, 1}},
- {{"host2", 2, "kind2"}},
- SLOT1_TYPE, ZONE1, 1, 1);
- }
-
void RunTestNotifyOperationCompletion(TTenantTestRuntime& runtime) {
TAutoPtr<IEventHandle> handle;
@@ -1852,10 +1689,11 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
// with no TEvNotifyOperationCompletionResponse.
CheckNotificationRequest(runtime, id, Ydb::StatusIds::GENERIC_ERROR);
+ RestartTenantPool(runtime);
+
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT1_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}}, {});
// Send tenant removal command and store operation id.
runtime.SetObserverFunc(CatchPoolEvent(captured));
@@ -2016,14 +1854,13 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
CheckCreateTenant(runtime, TENANT1_1_NAME,
Ydb::StatusIds::SUCCESS,
{{"hdd", 1}, {"hdd-1", 3}},
- TVector<std::pair<TString, TString>>({{"name1", "value1"}, {"name2", "value2"}}),
- SLOT1_TYPE, ZONE1, 1);
+ TVector<std::pair<TString, TString>>({{"name1", "value1"}, {"name2", "value2"}}));
+
+ RestartTenantPool(runtime);
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {},
- SLOT1_TYPE, ZONE1, 1, 1);
-
+ {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {});
UNIT_ASSERT(CheckAttrsPresent(runtime, TENANT1_1_NAME, THashMap<TString, TString> {{"name1", "value1"}, {"name2", "value2"}}));
@@ -2063,268 +1900,6 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
RunTestRemoveAttributes(runtime);
}
- Y_UNIT_TEST(TestTenantsQuota) {
- TTenantTestRuntime runtime(DefaultConsoleTestConfig());
-
- // Set tenants quota to 2.
- NKikimrConsole::TConfig config = GetCurrentConfig(runtime);
- auto &quota = *config.MutableTenantsConfig()->MutableClusterQuota();
- quota.SetTenantsQuota(2);
- CheckSetConfig(runtime, config, Ydb::StatusIds::SUCCESS);
-
- // Create first tenant.
- CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1);
- // Wrong request shouldn't eat quota.
- CheckCreateTenant(runtime, Ydb::StatusIds::BAD_REQUEST, TCreateTenantRequest(""));
- // This one should fail on subdomain creation and then release quota.
- CheckCreateTenant(runtime, Ydb::StatusIds::GENERIC_ERROR,
- TCreateTenantRequest(TENANT1_1_NAME + "/sub").WithPools({{"hdd", 1}}));
- // Here status is received before tenant is completely removed.
- // Wait for complete removal.
- WaitForTenantStatus(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::NOT_FOUND);
- // Create second tenant.
- CheckCreateTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1);
- // Quota is exceeded.
- CheckCreateTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1);
- // Remove tenant to get some free quota.
- WaitTenantRunning(runtime, TENANT1_2_NAME); // workaround for scheme cache race
- CheckRemoveTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS);
- // Create second tenant.
- CheckCreateTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1);
- // Quota is exceeded again.
- CheckCreateTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1);
- // Increase quota.
- quota.SetTenantsQuota(3);
- CheckSetConfig(runtime, config, Ydb::StatusIds::SUCCESS);
- // Now we can create third tenant.
- CheckCreateTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT1_TYPE, ZONE1, 1);
-
- CheckCounter(runtime, {}, TTenantsManager::COUNTER_TENANTS_QUOTA_EXCEEDED, 2);
- }
-
- Y_UNIT_TEST(TestComputationalUnitsQuota) {
- TTenantTestRuntime runtime(DefaultConsoleTestConfig());
-
- // Set tenants quota to 2.
- NKikimrConsole::TConfig config = GetCurrentConfig(runtime);
- auto &quota = *config.MutableTenantsConfig()->MutableClusterQuota();
- quota.SetComputationalUnitsQuota(10);
- CheckSetConfig(runtime, config, Ydb::StatusIds::SUCCESS);
-
- // OK.
- CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT3_TYPE, ZONE_ANY, 5);
- CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT3_TYPE, ZONE_ANY, 5, 5);
- // Wrong request shouldn't eat quota.
- CheckCreateTenant(runtime, "", Ydb::StatusIds::BAD_REQUEST,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE_ANY, 5);
- // This one should fail on subdomain creation and then release quota.
- CheckCreateTenant(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::GENERIC_ERROR,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE_ANY, 5);
- // Wait for complete tenant removal.
- WaitForTenantStatus(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::NOT_FOUND);
- CheckTenantStatus(runtime, TENANT1_1_NAME + "/sub", Ydb::StatusIds::NOT_FOUND,
- Ydb::Cms::GetDatabaseStatusResult::STATE_UNSPECIFIED, {}, {});
- // OK.
- CheckCreateTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE_ANY, 5);
- CheckTenantStatus(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT2_TYPE, ZONE_ANY, 5, 5);
- // Out of quota.
- CheckCreateTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{"hdd", 1}},
- SLOT3_TYPE, ZONE_ANY, 5);
- // Out of quota.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT3_TYPE, ZONE_ANY, 1} }},
- {});
- // OK to add if some slots are removed.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {SLOT2_TYPE, ZONE_ANY, 2} }},
- {{ {SLOT3_TYPE, ZONE_ANY, 3} }});
- // Out of quota.
- CheckAlterTenantSlots(runtime, TENANT1_2_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT3_TYPE, ZONE_ANY, 2} }},
- {});
- // OK.
- CheckAlterTenantSlots(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- {{ {SLOT3_TYPE, ZONE_ANY, 1} }},
- {});
- CheckTenantStatus(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT2_TYPE, ZONE_ANY, 5, 5,
- SLOT3_TYPE, ZONE_ANY, 1, 1);
- // Remove tenant to release some resources.
- CheckRemoveTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS);
- CheckTenantStatus(runtime, TENANT1_2_NAME, Ydb::StatusIds::NOT_FOUND,
- Ydb::Cms::GetDatabaseStatusResult::STATE_UNSPECIFIED, {}, {});
- // OK.
- CheckCreateTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE_ANY, 6);
- CheckTenantStatus(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT2_TYPE, ZONE_ANY, 6, 6);
- // Out of quota.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT3_TYPE, ZONE_ANY, 1} }},
- {});
-
- CheckCounter(runtime, {}, TTenantsManager::COUNTER_COMPUTATIONAL_QUOTA_EXCEEDED, 4);
-
- // Check quota is correctly computed after Console restart.
- RestartConsole(runtime);
-
- // Out of quota.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT3_TYPE, ZONE_ANY, 1} }},
- {});
- // OK to change slot type.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {SLOT2_TYPE, ZONE_ANY, 1} }},
- {{ {SLOT3_TYPE, ZONE_ANY, 1} }});
- }
-
- Y_UNIT_TEST(TestComputationalUnitsLoadQuota) {
- TTenantTestRuntime runtime(ConsoleTestConfig3DC());
-
- // Set tenants quota to 2.
- NKikimrConsole::TConfig config = GetCurrentConfig(runtime);
- auto &quota = *config.MutableTenantsConfig()->MutableClusterQuota();
- quota.SetComputationalUnitsLoadQuota(67);
- auto anyUnit = config.MutableTenantsConfig()->AddComputationalUnitKinds();
- anyUnit->SetKind("any");
- anyUnit->SetTenantSlotType("");
- anyUnit->SetAvailabilityZoneSet("all");
- CheckSetConfig(runtime, config, Ydb::StatusIds::SUCCESS);
-
- // OK.
- CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE_ANY, 5);
- CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT2_TYPE, ZONE_ANY, 5, 5);
- // Out of quota for SLOT2_TYPE.
- CheckCreateTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE1, 2);
- // OK.
- CheckCreateTenant(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- SLOT2_TYPE, ZONE1, 1);
- CheckTenantStatus(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- SLOT2_TYPE, ZONE1, 1, 1);
- // Out of total quota.
- CheckCreateTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{"hdd", 1}},
- "any", ZONE_ANY, 13);
- // OK.
- CheckCreateTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- {{"hdd", 1}},
- "any", ZONE_ANY, 12);
- CheckTenantStatus(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- "any", ZONE_ANY, 12, 12);
-
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 5);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
- CheckCounter(runtime, {{ {"kind", "any"}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 12);
-
- // Out of total quota.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {"any", ZONE_ANY, 1} }},
- {});
- // OK to change TYPE2_SLOT to another type.
- CheckAlterTenantSlots(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
- {{ {"any", ZONE_ANY, 1} }},
- {{ {SLOT2_TYPE, ZONE_ANY, 1} }});
- // Out of SLOT2_TYPE quota.
- CheckAlterTenantSlots(runtime, TENANT1_3_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT2_TYPE, ZONE_ANY, 2} }},
- {{ {"any", ZONE_ANY, 2} }});
- // OK.
- CheckAlterTenantSlots(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- {{ {SLOT2_TYPE, ZONE_ANY, 1} }},
- {{ {"any", ZONE_ANY, 1} }});
- CheckTenantStatus(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS,
- Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}}, {},
- "any", ZONE_ANY, 11, 11,
- SLOT2_TYPE, ZONE_ANY, 1, 1);
-
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 5);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
- CheckCounter(runtime, {{ {"kind", "any"}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 12);
-
- // Remove tenant to release some resources.
- CheckRemoveTenant(runtime, TENANT1_3_NAME, Ydb::StatusIds::SUCCESS);
- CheckTenantStatus(runtime, TENANT1_3_NAME, Ydb::StatusIds::NOT_FOUND,
- Ydb::Cms::GetDatabaseStatusResult::STATE_UNSPECIFIED, {}, {});
-
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 4);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
- CheckCounter(runtime, {{ {"kind", "any"}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
-
- // Out of SLOT2_TYPE quota.
- CheckAlterTenantSlots(runtime, TENANT1_2_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT2_TYPE, ZONE_ANY, 2} }},
- {});
- // Out of total quota.
- CheckAlterTenantSlots(runtime, TENANT1_2_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {SLOT2_TYPE, ZONE_ANY, 1},
- {"any", ZONE_ANY, 12} }},
- {});
- // OK
- CheckAlterTenantSlots(runtime, TENANT1_2_NAME, Ydb::StatusIds::SUCCESS,
- {{ {SLOT2_TYPE, ZONE_ANY, 1},
- {"any", ZONE_ANY, 11} }},
- {});
-
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 5);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
- CheckCounter(runtime, {{ {"kind", "any"}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 12);
-
- // Check quota is correctly computed after Console restart.
- RestartConsole(runtime);
-
- // Out of quota.
- CheckAlterTenantSlots(runtime, TENANT1_2_NAME, Ydb::StatusIds::UNAVAILABLE,
- {{ {"any", ZONE_ANY, 1} }},
- {});
-
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 5);
- CheckCounter(runtime, {{ {"kind", SLOT2_TYPE}, {"zone", ZONE1 } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 1);
- CheckCounter(runtime, {{ {"kind", "any"}, {"zone", ZONE_ANY } }}, TTenantsManager::COUNTER_COMPUTATIONAL_UNITS, 12);
- }
-
void RunTestTenantGeneration(TTenantTestRuntime& runtime) {
CheckCreateTenant(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
{{"hdd", 1}},
@@ -2413,37 +1988,34 @@ Y_UNIT_TEST_SUITE(TConsoleTests) {
CheckCreateTenant(runtime, Ydb::StatusIds::SUCCESS,
TCreateTenantRequest(TENANT1_1_NAME, EType::Common)
.WithPools({{"hdd", 1}, {"hdd-1", 3}})
- .WithSlots(SLOT1_TYPE, ZONE1, 1)
.WithPlanResolution(500));
+ RestartTenantPool(runtime);
+
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {},
- SLOT1_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {});
CheckAlterTenantPools(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
{{"hdd-1", 1000}}, {});
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {},
- SLOT1_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {});
CheckAlterTenantPools(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
{}, false);
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {},
- SLOT1_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}, {"hdd-1", 3, 3}}, {});
CheckAlterTenantPools(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
{{"hdd-2", 1000}});
CheckTenantStatus(runtime, TENANT1_1_NAME, Ydb::StatusIds::SUCCESS,
Ydb::Cms::GetDatabaseStatusResult::RUNNING,
- {{"hdd", 1, 1}, {"hdd-1", 3, 3}, {"hdd-2", 0, 0}}, {},
- SLOT1_TYPE, ZONE1, 1, 1);
+ {{"hdd", 1, 1}, {"hdd-1", 3, 3}, {"hdd-2", 0, 0}}, {});
}
Y_UNIT_TEST(TestAlterTenantTooManyStorageResourcesForRunning) {
diff --git a/ydb/core/cms/console/grpc_library_helper.cpp b/ydb/core/cms/console/grpc_library_helper.cpp
new file mode 100644
index 0000000000..56b2a3eb8d
--- /dev/null
+++ b/ydb/core/cms/console/grpc_library_helper.cpp
@@ -0,0 +1,45 @@
+#include "grpc_library_helper.h"
+
+namespace NKikimr::NConsole {
+
+void SetGRpcLibraryFunction() {
+ auto logFn = [](gpr_log_func_args* args) {
+ auto severity = args->severity;
+ if (severity == GPR_LOG_SEVERITY_DEBUG) {
+ fprintf(stderr, ":GRPC_LIBRARY DEBUG: %s\n", args->message);
+ } else if (severity == GPR_LOG_SEVERITY_INFO) {
+ fprintf(stderr, ":GRPC_LIBRARY INFO: %s\n", args->message);
+ } else {
+ fprintf(stderr, ":GRPC_LIBRARY ERROR: %s\n", args->message);
+ }
+ };
+ gpr_set_log_function(logFn);
+}
+
+void EnableGRpcTracersEnable() {
+ grpc_tracer_set_enabled("cares_resolver", true);
+ grpc_tracer_set_enabled("channel", true);
+ grpc_tracer_set_enabled("connectivity_state", true);
+ grpc_tracer_set_enabled("sdk_authz", true);
+ grpc_tracer_set_enabled("http", true);
+ grpc_tracer_set_enabled("http1", true);
+ grpc_tracer_set_enabled("tcp", true);
+}
+
+void SetGRpcLibraryLogVerbosity(NActors::NLog::EPriority prio) {
+ if (prio >= NActors::NLog::EPriority::PRI_DEBUG) {
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG);
+ EnableGRpcTracersEnable();
+ } else if (prio >= NActors::NLog::EPriority::PRI_INFO) {
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_INFO);
+ EnableGRpcTracersEnable();
+ } else if (prio >= NActors::NLog::EPriority::PRI_ERROR) {
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_ERROR);
+ EnableGRpcTracersEnable();
+ } else {
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_ERROR);
+ grpc_tracer_set_enabled("all", false);
+ }
+}
+
+} // namespace NKikimr::NGRpcService
diff --git a/ydb/core/cms/console/grpc_library_helper.h b/ydb/core/cms/console/grpc_library_helper.h
new file mode 100644
index 0000000000..3fd2083dd0
--- /dev/null
+++ b/ydb/core/cms/console/grpc_library_helper.h
@@ -0,0 +1,12 @@
+#pragma once
+
+#include <library/cpp/grpc/server/grpc_server.h>
+#include <library/cpp/actors/core/log_iface.h>
+
+namespace NKikimr::NConsole {
+
+void SetGRpcLibraryFunction();
+void EnableGRpcTracersEnable();
+void SetGRpcLibraryLogVerbosity(NActors::NLog::EPriority prio);
+
+} // namespace NKikimr::NGRpcService
diff --git a/ydb/core/cms/console/http.cpp b/ydb/core/cms/console/http.cpp
index 97b3dcb071..ec7cd26209 100644
--- a/ydb/core/cms/console/http.cpp
+++ b/ydb/core/cms/console/http.cpp
@@ -68,10 +68,26 @@ void OutputConfigHTML(IOutputStream &os, const NKikimrConfig::TAppConfig &config
os << reflection->GetEnum(config, field)->name();
break;
case ::google::protobuf::FieldDescriptor::CPPTYPE_STRING:
- os << reflection->GetString(config, field);
+ if (field->is_repeated()) {
+ int count = reflection->FieldSize(config, field);
+ for (int index = 0; index < count; ++index) {
+ os << "[" << index << "]: "
+ << reflection->GetRepeatedString(config, field, index) << '\n';
+ }
+ } else {
+ os << reflection->GetString(config, field);
+ }
break;
case ::google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE:
- os << reflection->GetMessage(config, field).DebugString();
+ if (field->is_repeated()) {
+ int count = reflection->FieldSize(config, field);
+ for (int index = 0; index < count; ++index) {
+ os << "[" << index << "]:" << '\n'
+ << reflection->GetRepeatedMessage(config, field, index).DebugString();
+ }
+ } else {
+ os << reflection->GetMessage(config, field).DebugString();
+ }
break;
default:
os << "<unsupported value type>";
diff --git a/ydb/core/cms/console/log_settings_configurator.cpp b/ydb/core/cms/console/log_settings_configurator.cpp
index aa5c5cae76..042f05ee64 100644
--- a/ydb/core/cms/console/log_settings_configurator.cpp
+++ b/ydb/core/cms/console/log_settings_configurator.cpp
@@ -7,6 +7,7 @@
#include <util/system/fs.h>
#include <util/stream/file.h>
#include <google/protobuf/text_format.h>
+#include <ydb/core/cms/console/grpc_library_helper.h>
namespace NKikimr::NConsole {
@@ -189,6 +190,10 @@ void TLogSettingsConfigurator::ApplyComponentSettings(const TVector<NLog::TCompo
? NLog::PRI_ERROR : NLog::PRI_NOTICE;
LOG_LOG_S(ctx, logPrio, NKikimrServices::CMS_CONFIGS,
"TLogSettingsConfigurator: " << msg);
+
+ if (i == NKikimrServices::GRPC_LIBRARY) {
+ NConsole::SetGRpcLibraryLogVerbosity(prio);
+ }
}
if (curSettings.Raw.X.SamplingLevel != settings[i].Raw.X.SamplingLevel) {
NLog::EPriority prio = static_cast<NLog::EPriority>(settings[i].Raw.X.SamplingLevel);
diff --git a/ydb/core/cms/console/logger.cpp b/ydb/core/cms/console/logger.cpp
index ee1bc32893..b74931476f 100644
--- a/ydb/core/cms/console/logger.cpp
+++ b/ydb/core/cms/console/logger.cpp
@@ -27,7 +27,7 @@ bool TLogger::DbCleanupLog(ui32 remainEntries,
LOG_DEBUG_S(ctx, NKikimrServices::CMS_CONFIGS,
"Removing " << (fromId - MinLogItemId + 1) << " log records");
- for (ui64 id = fromId; id >= MinLogItemId; --id)
+ for (ui64 id = MinLogItemId; id <= fromId; ++id)
db.Table<Schema::LogRecords>().Key(id).Delete();
MinLogItemId = fromId + 1;
diff --git a/ydb/core/cms/console/shared_cache_configurator.cpp b/ydb/core/cms/console/shared_cache_configurator.cpp
index 7228b4d422..60f40191c2 100644
--- a/ydb/core/cms/console/shared_cache_configurator.cpp
+++ b/ydb/core/cms/console/shared_cache_configurator.cpp
@@ -2,6 +2,7 @@
#include "configs_dispatcher.h"
#include "console.h"
+#include <ydb/core/base/appdata.h>
#include <ydb/core/tablet_flat/shared_sausagecache.h>
#include <library/cpp/actors/core/actor_bootstrapped.h>
@@ -32,12 +33,20 @@ public:
LOG_INFO_S(ctx, NKikimrServices::CMS_CONFIGS,
"TSharedCacheConfigurator: got new config: " << record.GetConfig().ShortDebugString());
+ auto* appData = AppData(ctx);
+
NKikimrSharedCache::TSharedCacheConfig cfg;
- if (record.GetConfig().HasBootstrapConfig() && record.GetConfig().GetBootstrapConfig().HasSharedCacheConfig()) {
- cfg.MergeFrom(record.GetConfig().GetBootstrapConfig().GetSharedCacheConfig());
+ if (record.GetConfig().HasBootstrapConfig()) {
+ if (record.GetConfig().GetBootstrapConfig().HasSharedCacheConfig()) {
+ cfg.MergeFrom(record.GetConfig().GetBootstrapConfig().GetSharedCacheConfig());
+ }
+ } else if (appData->BootstrapConfig.HasSharedCacheConfig()) {
+ cfg.MergeFrom(appData->BootstrapConfig.GetSharedCacheConfig());
}
if (record.GetConfig().HasSharedCacheConfig()) {
cfg.MergeFrom(record.GetConfig().GetSharedCacheConfig());
+ } else if (appData->SharedCacheConfig) {
+ cfg.MergeFrom(*appData->SharedCacheConfig);
}
ApplyConfig(std::move(cfg), ctx);
diff --git a/ydb/core/cms/erasure_checkers.cpp b/ydb/core/cms/erasure_checkers.cpp
index 253cdfc0f2..e3ad883620 100644
--- a/ydb/core/cms/erasure_checkers.cpp
+++ b/ydb/core/cms/erasure_checkers.cpp
@@ -45,23 +45,26 @@ bool TErasureCounterBase::IsLocked(const TVDiskInfo& vdisk,
|| vdisk.IsLocked(error, retryTime, TActivationContext::Now(), duration);
}
-bool TErasureCounterBase::GroupAlreadyHasLockedDisks(TErrorInfo& error) const
+bool TErasureCounterBase::GroupAlreadyHasLockedDisks() const
{
- if (Locked && error.Code == TStatus::DISALLOW) {
- error.Reason = "Group already has locked disks";
- return true;
- }
- return false;
+ return HasAlreadyLockedDisks;
}
bool TErasureCounterBase::CheckForMaxAvailability(TErrorInfo& error,
- TInstant& defaultDeadline) const
+ TInstant& defaultDeadline,
+ bool allowPartial) const
{
if (Locked + Down > 1) {
+ if (HasAlreadyLockedDisks && !allowPartial) {
+ error.Code = TStatus::DISALLOW;
+ error.Reason = "The request is incorrect: too many disks from the one group. "
+ "Fix the request or set PartialPermissionAllowed to true";
+ return false;
+ }
+
error.Code = TStatus::DISALLOW_TEMP;
error.Reason = TStringBuilder() << "Issue in affected group " << GroupId
<< ". " << "Too many locked and down vdisks: " << Locked + Down;
-
error.Deadline = defaultDeadline;
return false;
}
@@ -99,10 +102,27 @@ void TDefaultErasureCounter::CountVDisk(const TVDiskInfo& vdisk,
bool TDefaultErasureCounter::CheckForKeepAvailability(TClusterInfoPtr info,
TErrorInfo& error,
- TInstant& defaultDeadline) const
+ TInstant& defaultDeadline,
+ bool allowPartial) const
{
+ if (HasAlreadyLockedDisks && allowPartial) {
+ error.Code = TStatus::DISALLOW_TEMP;
+ error.Reason = "You cannot get two or more disks from the same group at the same time"
+ " without specifying the PartialPermissionAllowed parameter";
+ error.Deadline = defaultDeadline;
+ return false;
+ }
+
if (Down + Locked > info->BSGroup(GroupId).Erasure.ParityParts()) {
+ if (HasAlreadyLockedDisks && !allowPartial) {
+ error.Code = TStatus::DISALLOW;
+ error.Reason = "The request is incorrect: too many disks from the one group. "
+ "Fix the request or set PartialPermissionAllowed to true";
+ return false;
+ }
error.Code = TStatus::DISALLOW_TEMP;
+ error.Reason = TStringBuilder() << "Cannot lock disk " << VDisk.PrettyItemName()
+ << ". Too many locked nodes for group " << GroupId;
error.Deadline = defaultDeadline;
return false;
}
@@ -111,10 +131,19 @@ bool TDefaultErasureCounter::CheckForKeepAvailability(TClusterInfoPtr info,
bool TMirror3dcCounter::CheckForKeepAvailability(TClusterInfoPtr info,
TErrorInfo& error,
- TInstant& defaultDeadline) const
+ TInstant& defaultDeadline,
+ bool allowPartial) const
{
Y_UNUSED(info);
+ if (HasAlreadyLockedDisks && allowPartial) {
+ error.Code = TStatus::DISALLOW_TEMP;
+ error.Reason = "You cannot get two or more disks from the same group at the same time"
+ " without specifying the PartialPermissionAllowed parameter";
+ error.Deadline = defaultDeadline;
+ return false;
+ }
+
if (DataCenterDisabledNodes.size() <= 1)
return true;
@@ -125,6 +154,13 @@ bool TMirror3dcCounter::CheckForKeepAvailability(TClusterInfoPtr info,
return true;
}
+ if (HasAlreadyLockedDisks && !allowPartial) {
+ error.Code = TStatus::DISALLOW;
+ error.Reason = "The request is incorrect: too many disks from the one group. "
+ "Fix the request or set PartialPermissionAllowed to true";
+ return false;
+ }
+
if (DataCenterDisabledNodes.size() > 2) {
error.Code = TStatus::DISALLOW_TEMP;
error.Reason = TStringBuilder() << "Issue in affected group " << GroupId
@@ -174,6 +210,10 @@ void TMirror3dcCounter::CountGroupState(TClusterInfoPtr info,
}
++Locked;
++DataCenterDisabledNodes[VDisk.VDiskId.FailRealm];
+
+ if (Locked && error.Code == TStatus::DISALLOW) {
+ HasAlreadyLockedDisks = true;
+ }
}
void TDefaultErasureCounter::CountGroupState(TClusterInfoPtr info,
@@ -185,6 +225,9 @@ void TDefaultErasureCounter::CountGroupState(TClusterInfoPtr info,
if (vdId != VDisk.VDiskId)
CountVDisk(info->VDisk(vdId), info, retryTime, duration, error);
}
+ if (Locked && error.Code == TStatus::DISALLOW) {
+ HasAlreadyLockedDisks = true;
+ }
++Locked;
}
diff --git a/ydb/core/cms/erasure_checkers.h b/ydb/core/cms/erasure_checkers.h
index 51d9ca9553..a496ae59ff 100644
--- a/ydb/core/cms/erasure_checkers.h
+++ b/ydb/core/cms/erasure_checkers.h
@@ -15,9 +15,9 @@ class IErasureCounter {
public:
virtual ~IErasureCounter() = default;
- virtual bool GroupAlreadyHasLockedDisks(TErrorInfo& error) const = 0;
- virtual bool CheckForMaxAvailability(TErrorInfo& error, TInstant& defaultDeadline) const = 0;
- virtual bool CheckForKeepAvailability(TClusterInfoPtr info, TErrorInfo& error, TInstant& defaultDeadline) const = 0;
+ virtual bool GroupAlreadyHasLockedDisks() const = 0;
+ virtual bool CheckForMaxAvailability(TErrorInfo& error, TInstant& defaultDeadline, bool allowPartial) const = 0;
+ virtual bool CheckForKeepAvailability(TClusterInfoPtr info, TErrorInfo& error, TInstant& defaultDeadline, bool allowPartial) const = 0;
virtual void CountGroupState(TClusterInfoPtr info,
TDuration retryTime,
TDuration duration,
@@ -35,6 +35,7 @@ protected:
ui32 Locked;
const TVDiskInfo& VDisk;
const ui32 GroupId;
+ bool HasAlreadyLockedDisks;
protected:
bool IsDown(const TVDiskInfo& vdisk,
@@ -53,11 +54,12 @@ public:
, Locked(0)
, VDisk(vdisk)
, GroupId(groupId)
+ , HasAlreadyLockedDisks(false)
{
}
- bool GroupAlreadyHasLockedDisks(TErrorInfo& error) const final;
- bool CheckForMaxAvailability(TErrorInfo& error, TInstant& defaultDeadline) const final;
+ bool GroupAlreadyHasLockedDisks() const final;
+ bool CheckForMaxAvailability(TErrorInfo& error, TInstant& defaultDeadline, bool allowPartial) const final;
};
class TDefaultErasureCounter: public TErasureCounterBase {
@@ -71,7 +73,8 @@ public:
TDuration duration, TErrorInfo &error) override;
bool CheckForKeepAvailability(TClusterInfoPtr info,
TErrorInfo& error,
- TInstant& defaultDeadline) const override;
+ TInstant& defaultDeadline,
+ bool allowPartial) const override;
void CountVDisk(const TVDiskInfo& vdisk,
TClusterInfoPtr info,
TDuration retryTime,
@@ -93,7 +96,8 @@ public:
TDuration duration, TErrorInfo &error) override;
bool CheckForKeepAvailability(TClusterInfoPtr info,
TErrorInfo& error,
- TInstant& defaultDeadline) const override;
+ TInstant& defaultDeadline,
+ bool allowPartial) const override;
void CountVDisk(const TVDiskInfo& vdisk,
TClusterInfoPtr info,
TDuration retryTime,
diff --git a/ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp b/ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp
index 34c1e50544..1757d453cd 100644
--- a/ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp
+++ b/ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp
@@ -254,6 +254,12 @@ protected:
config.Opts->AddLongOption("hierarchic-cfg", "Use hierarchical approach for configuration parts overriding")
.NoArgument().SetFlag(&HierarchicalCfg);
+ config.Opts->AddLongOption("label", "labels for this node")
+ .Optional().RequiredArgument("KEY=VALUE")
+ .KVHandler([&](TString key, TString val) {
+ RunConfig.Labels[key] = val;
+ });
+
config.SetFreeArgsMin(0);
config.Opts->SetFreeArgDefaultTitle("PATH", "path to protobuf file; files are merged in order in which they are enlisted");
}
@@ -681,6 +687,13 @@ protected:
messageBusConfig->SetStartTracingBusProxy(!!TracePath);
messageBusConfig->SetTracePath(TracePath);
}
+
+ RunConfig.Labels["node_id"] = ToString(NodeId);
+ RunConfig.Labels["node_host"] = FQDNHostName();
+ RunConfig.Labels["tenant"] = RunConfig.TenantName;
+ // will be replaced with proper version info
+ RunConfig.Labels["branch"] = GetBranch();
+ RunConfig.Labels["rev"] = ToString(GetProgramSvnRevision());
}
inline bool LoadConfigFromCMS() {
diff --git a/ydb/core/driver_lib/run/CMakeLists.darwin.txt b/ydb/core/driver_lib/run/CMakeLists.darwin.txt
index b0651ad7c3..f4e3998c37 100644
--- a/ydb/core/driver_lib/run/CMakeLists.darwin.txt
+++ b/ydb/core/driver_lib/run/CMakeLists.darwin.txt
@@ -65,6 +65,7 @@ target_link_libraries(run PUBLIC
ydb-core-kqp
core-kqp-rm_service
ydb-core-load_test
+ ydb-core-log_backend
ydb-core-metering
ydb-core-mind
core-mind-address_classification
@@ -141,7 +142,6 @@ target_sources(run PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/dummy.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/factories.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/log_backend.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/main.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/run.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/service_initializer.cpp
diff --git a/ydb/core/driver_lib/run/CMakeLists.linux-aarch64.txt b/ydb/core/driver_lib/run/CMakeLists.linux-aarch64.txt
index abdf352dbb..e1743e47d3 100644
--- a/ydb/core/driver_lib/run/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/driver_lib/run/CMakeLists.linux-aarch64.txt
@@ -66,6 +66,7 @@ target_link_libraries(run PUBLIC
ydb-core-kqp
core-kqp-rm_service
ydb-core-load_test
+ ydb-core-log_backend
ydb-core-metering
ydb-core-mind
core-mind-address_classification
@@ -142,7 +143,6 @@ target_sources(run PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/dummy.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/factories.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/log_backend.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/main.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/run.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/service_initializer.cpp
diff --git a/ydb/core/driver_lib/run/CMakeLists.linux.txt b/ydb/core/driver_lib/run/CMakeLists.linux.txt
index abdf352dbb..e1743e47d3 100644
--- a/ydb/core/driver_lib/run/CMakeLists.linux.txt
+++ b/ydb/core/driver_lib/run/CMakeLists.linux.txt
@@ -66,6 +66,7 @@ target_link_libraries(run PUBLIC
ydb-core-kqp
core-kqp-rm_service
ydb-core-load_test
+ ydb-core-log_backend
ydb-core-metering
ydb-core-mind
core-mind-address_classification
@@ -142,7 +143,6 @@ target_sources(run PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/dummy.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/factories.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/log_backend.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/main.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/run.cpp
${CMAKE_SOURCE_DIR}/ydb/core/driver_lib/run/service_initializer.cpp
diff --git a/ydb/core/driver_lib/run/config.h b/ydb/core/driver_lib/run/config.h
index 72d7141c92..c6886b3208 100644
--- a/ydb/core/driver_lib/run/config.h
+++ b/ydb/core/driver_lib/run/config.h
@@ -112,6 +112,8 @@ struct TKikimrRunConfig {
TString TenantName;
TBasicKikimrServicesMask ServicesMask;
+ TMap<TString, TString> Labels;
+
TKikimrRunConfig(NKikimrConfig::TAppConfig& appConfig,
ui32 nodeId = 0, const TKikimrScopeId& scopeId = {});
};
diff --git a/ydb/core/driver_lib/run/config_parser.cpp b/ydb/core/driver_lib/run/config_parser.cpp
index f00f7d5760..7b4a44387b 100644
--- a/ydb/core/driver_lib/run/config_parser.cpp
+++ b/ydb/core/driver_lib/run/config_parser.cpp
@@ -223,6 +223,7 @@ void TRunCommandConfigParser::ParseConfigFiles(const NLastGetopt::TOptsParseResu
}
void TRunCommandConfigParser::SetupGlobalOpts(NLastGetopt::TOpts& opts) {
+
opts.AddLongOption("cluster-name", "which cluster this node belongs to")
.DefaultValue("unknown").OptionalArgument("STR").StoreResult(&GlobalOpts.ClusterName);
opts.AddLongOption("log-level", "default logging level").OptionalArgument("1-7")
diff --git a/ydb/core/driver_lib/run/factories.h b/ydb/core/driver_lib/run/factories.h
index f905621ce3..22e6b5f45b 100644
--- a/ydb/core/driver_lib/run/factories.h
+++ b/ydb/core/driver_lib/run/factories.h
@@ -1,5 +1,4 @@
#pragma once
-#include "log_backend.h"
#include <ydb/core/blobstorage/pdisk/blobstorage_pdisk_util_devicemode.h>
#include <ydb/core/kqp/common/kqp.h>
#include <ydb/core/tx/datashard/export_iface.h>
@@ -31,10 +30,6 @@ namespace NKikimr {
// A way to parameterize YDB binary, we do it via a set of factories
struct TModuleFactories {
- // A way to parameterize log backend
- std::shared_ptr<ILogBackendFactory> LogBackendFactory;
- //
- std::shared_ptr<ILogBackendFactory> AuditLogBackendFactory;
// A backend factory for Query Replay
std::shared_ptr<NKqp::IQueryReplayBackendFactory> QueryReplayBackendFactory;
//
diff --git a/ydb/core/driver_lib/run/kikimr_services_initializers.cpp b/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
index 9cf6e472ce..afda50b181 100644
--- a/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
+++ b/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
@@ -48,6 +48,8 @@
#include <ydb/core/grpc_services/grpc_mon.h>
#include <ydb/core/grpc_services/grpc_request_proxy.h>
+#include <ydb/core/log_backend/log_backend.h>
+
#include <ydb/core/kesus/proxy/proxy.h>
#include <ydb/core/kesus/tablet/tablet.h>
@@ -181,7 +183,6 @@
#include <library/cpp/actors/interconnect/interconnect_tcp_proxy.h>
#include <library/cpp/actors/interconnect/interconnect_proxy_wrapper.h>
#include <library/cpp/actors/interconnect/interconnect_tcp_server.h>
-#include <library/cpp/actors/interconnect/handshake_broker.h>
#include <library/cpp/actors/interconnect/load.h>
#include <library/cpp/actors/interconnect/poller_actor.h>
#include <library/cpp/actors/interconnect/poller_tcp.h>
@@ -203,6 +204,8 @@
#include <util/system/hostname.h>
+#include <thread>
+
namespace NKikimr {
namespace NKikimrServicesInitializers {
@@ -559,20 +562,272 @@ static TInterconnectSettings GetInterconnectSettings(const NKikimrConfig::TInter
return result;
}
+namespace {
+
+ enum class EPoolType : i8 {
+ System = 0,
+ User = 1,
+ Batch = 2,
+ IC = 3,
+ };
+
+ struct TShortPoolCfg {
+ i16 ThreadCount;
+ i16 MaxThreadCount;
+ };
+
+ constexpr i16 MaxPreparedCpuCount = 31;
+ constexpr i16 GRpcWorkerCountInMaxPreparedCpuCase = 4;
+ constexpr i16 GrpcProxyCountInMaxPreparedCpuCase = 4;
+ constexpr i16 CpuCountForEachGRpcWorker = MaxPreparedCpuCount / GRpcWorkerCountInMaxPreparedCpuCase;
+ constexpr i16 CpuCountForEachGRpcProxy = MaxPreparedCpuCount / GrpcProxyCountInMaxPreparedCpuCase;
+ constexpr i16 GRpcHandlersPerCompletionQueueInMaxPreparedCpuCase = 1000;
+ constexpr i16 GRpcHandlersPerCompletionQueuePerCpu = GRpcHandlersPerCompletionQueueInMaxPreparedCpuCase / MaxPreparedCpuCount;
+
+ TShortPoolCfg ComputeCpuTable[MaxPreparedCpuCount + 1][4] {
+ { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, // 0
+ { {1, 1}, {0, 1}, {0, 1}, {0, 0} }, // 1
+ { {1, 1}, {1, 2}, {0, 1}, {0, 1} }, // 2
+ { {1, 2}, {1, 3}, {1, 1}, {0, 1} }, // 3
+ { {1, 2}, {1, 4}, {1, 1}, {1, 2} }, // 4
+ { {1, 3}, {2, 5}, {1, 1}, {1, 2} }, // 5
+ { {1, 3}, {3, 6}, {1, 1}, {1, 2} }, // 6
+ { {2, 4}, {3, 7}, {1, 2}, {1, 3} }, // 7
+ { {2, 4}, {4, 8}, {1, 2}, {1, 3} }, // 8
+ { {2, 5}, {4, 9}, {2, 3}, {1, 3} }, // 9
+ { {2, 5}, {5, 10}, {2, 3}, {1, 3} }, // 10
+ { {2, 6}, {6, 11}, {2, 3}, {2, 4} }, // 11
+ { {2, 6}, {7, 12}, {2, 3}, {2, 5} }, // 12
+ { {3, 7}, {7, 13}, {2, 3}, {2, 5} }, // 13
+ { {3, 7}, {7, 14}, {2, 3}, {3, 6} }, // 14
+ { {3, 8}, {8, 15}, {2, 4}, {3, 6} }, // 15
+ { {3, 8}, {9, 16}, {2, 4}, {3, 6} }, // 16
+ { {3, 9}, {10, 17}, {2, 4}, {3, 7} }, // 17
+ { {3, 9}, {10, 18}, {3, 5}, {3, 7} }, // 18
+ { {4, 10}, {10, 19}, {3, 5}, {4, 8} }, // 19
+ { {4, 10}, {10, 20}, {3, 5}, {4, 8} }, // 20
+ { {4, 11}, {11, 21}, {3, 5}, {4, 8} }, // 21
+ { {4, 11}, {12, 22}, {3, 5}, {4, 9} }, // 22
+ { {4, 12}, {13, 23}, {3, 6}, {4, 9} }, // 23
+ { {4, 12}, {13, 24}, {3, 6}, {5, 10} }, // 24
+ { {5, 13}, {13, 25}, {3, 6}, {5, 10} }, // 25
+ { {5, 13}, {13, 26}, {4, 7}, {5, 10} }, // 26
+ { {5, 14}, {14, 27}, {4, 7}, {5, 11} }, // 27
+ { {5, 14}, {14, 28}, {4, 7}, {5, 11} }, // 28
+ { {5, 15}, {15, 29}, {4, 8}, {6, 12} }, // 29
+ { {5, 15}, {16, 30}, {4, 8}, {6, 12} }, // 30
+ { {6, 18}, {16, 31}, {4, 8}, {6, 12} }, // 31
+ };
+
+ TShortPoolCfg HybridCpuTable[MaxPreparedCpuCount + 1][4] {
+ { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, // 0
+ { {1, 1}, {0, 1}, {0, 1}, {0, 0} }, // 1
+ { {1, 1}, {1, 2}, {0, 1}, {0, 1} }, // 2
+ { {1, 2}, {1, 3}, {1, 1}, {0, 1} }, // 3
+ { {1, 2}, {1, 4}, {1, 1}, {1, 2} }, // 4
+ { {1, 2}, {2, 5}, {1, 1}, {1, 2} }, // 5
+ { {1, 2}, {2, 6}, {1, 1}, {2, 2} }, // 6
+ { {2, 3}, {2, 7}, {1, 2}, {2, 3} }, // 7
+ { {2, 3}, {3, 8}, {1, 2}, {2, 3} }, // 8
+ { {2, 4}, {3, 9}, {1, 2}, {3, 4} }, // 9
+ { {3, 4}, {3, 10}, {1, 2}, {3, 4} }, // 10
+ { {3, 5}, {4, 11}, {1, 2}, {3, 5} }, // 11
+ { {3, 5}, {4, 12}, {1, 3}, {4, 5} }, // 12
+ { {4, 6}, {4, 13}, {1, 3}, {4, 6} }, // 13
+ { {4, 6}, {5, 14}, {1, 3}, {4, 6} }, // 14
+ { {4, 7}, {5, 15}, {1, 3}, {5, 7} }, // 15
+ { {5, 7}, {5, 16}, {1, 3}, {5, 7} }, // 16
+ { {5, 8}, {6, 17}, {1, 4}, {5, 8} }, // 17
+ { {5, 8}, {6, 18}, {1, 4}, {6, 8} }, // 18
+ { {6, 9}, {6, 19}, {1, 4}, {6, 9} }, // 19
+ { {6, 9}, {7, 20}, {1, 4}, {6, 9} }, // 20
+ { {6, 10}, {7, 21}, {1, 4}, {7, 10} }, // 21
+ { {7, 10}, {7, 22}, {1, 5}, {7, 10} }, // 22
+ { {7, 11}, {8, 23}, {1, 5}, {7, 11} }, // 23
+ { {7, 11}, {8, 24}, {1, 5}, {8, 11} }, // 24
+ { {8, 12}, {8, 25}, {1, 5}, {8, 12} }, // 25
+ { {8, 12}, {9, 26}, {1, 5}, {8, 12} }, // 26
+ { {8, 13}, {9, 27}, {1, 6}, {9, 13} }, // 27
+ { {9, 13}, {9, 28}, {1, 6}, {9, 13} }, // 28
+ { {9, 14}, {10, 29}, {1, 6}, {9, 14} }, // 29
+ { {9, 14}, {10, 30}, {1, 6}, {10, 14} }, // 30
+ { {10, 15}, {10, 31}, {1, 6}, {10, 15} }, // 31
+ };
+
+ TShortPoolCfg StorageCpuTable[MaxPreparedCpuCount + 1][4] {
+ { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, // 0
+ { {1, 1}, {0, 1}, {0, 1}, {0, 0} }, // 1
+ { {2, 2}, {0, 2}, {0, 1}, {0, 1} }, // 2
+ { {1, 3}, {1, 3}, {1, 1}, {0, 1} }, // 3
+ { {1, 4}, {1, 4}, {1, 1}, {1, 2} }, // 4
+ { {2, 5}, {1, 5}, {1, 1}, {1, 2} }, // 5
+ { {3, 6}, {1, 6}, {1, 1}, {1, 2} }, // 6
+ { {4, 7}, {1, 7}, {1, 2}, {1, 3} }, // 7
+ { {5, 8}, {1, 8}, {1, 2}, {1, 3} }, // 8
+ { {5, 9}, {1, 9}, {1, 2}, {2, 4} }, // 9
+ { {6, 10}, {1, 10}, {1, 2}, {2, 4} }, // 10
+ { {6, 11}, {1, 11}, {2, 3}, {2, 4} }, // 11
+ { {7, 12}, {1, 12}, {2, 3}, {2, 5} }, // 12
+ { {8, 13}, {1, 13}, {2, 3}, {2, 5} }, // 13
+ { {8, 14}, {1, 14}, {2, 3}, {3, 6} }, // 14
+ { {9, 15}, {1, 15}, {2, 4}, {3, 6} }, // 15
+ { {10, 16}, {1, 16}, {2, 4}, {3, 6} }, // 16
+ { {11, 17}, {1, 17}, {2, 4}, {3, 7} }, // 17
+ { {11, 18}, {1, 18}, {3, 5}, {3, 7} }, // 18
+ { {11, 19}, {1, 19}, {3, 5}, {4, 8} }, // 19
+ { {12, 20}, {1, 20}, {3, 5}, {4, 8} }, // 20
+ { {13, 21}, {1, 21}, {3, 5}, {4, 8} }, // 21
+ { {14, 22}, {1, 22}, {3, 6}, {4, 9} }, // 22
+ { {15, 23}, {1, 23}, {3, 6}, {4, 9} }, // 23
+ { {15, 24}, {1, 24}, {3, 6}, {5, 10} }, // 24
+ { {16, 25}, {1, 25}, {3, 6}, {5, 10} }, // 25
+ { {16, 26}, {1, 26}, {4, 7}, {5, 10} }, // 26
+ { {17, 27}, {1, 27}, {4, 7}, {5, 11} }, // 27
+ { {18, 28}, {1, 28}, {4, 7}, {5, 11} }, // 28
+ { {18, 29}, {1, 29}, {4, 7}, {6, 12} }, // 29
+ { {19, 30}, {1, 30}, {4, 8}, {6, 12} }, // 30
+ { {20, 31}, {1, 31}, {4, 8}, {6, 12} }, // 31
+ };
+
+ i16 GetIOThreadCount(i16 cpuCount) {
+ return (cpuCount - 1) / (MaxPreparedCpuCount * 2) + 1;
+ }
+
+ TShortPoolCfg GetShortPoolChg(EPoolType pool, i16 cpuCount, TShortPoolCfg cpuTable[][4]) {
+ i16 k = cpuCount / MaxPreparedCpuCount;
+ i16 mod = cpuCount % MaxPreparedCpuCount;
+ ui8 poolIdx = static_cast<i8>(pool);
+ if (!k) {
+ return cpuTable[cpuCount][poolIdx];
+ }
+
+ TShortPoolCfg result = cpuTable[MaxPreparedCpuCount][poolIdx];
+ result.ThreadCount *= k;
+ result.MaxThreadCount *= k;
+ TShortPoolCfg additional = cpuTable[mod][poolIdx];
+ result.ThreadCount += additional.ThreadCount;
+ result.MaxThreadCount += additional.MaxThreadCount;
+ return result;
+ }
+
+ i16 GetCpuCount() {
+ TAffinity affinity;
+ affinity.Current();
+ TCpuMask cpuMask = static_cast<TCpuMask>(affinity);
+ if (cpuMask.Size()) {
+ ui32 cpuCount = cpuMask.CpuCount();
+ return cpuCount ? cpuCount : std::thread::hardware_concurrency();
+ }
+ return std::thread::hardware_concurrency();
+ }
+}
+
+
void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* setup,
const NKikimr::TAppData* appData) {
- Y_VERIFY(Config.HasActorSystemConfig());
-
auto& systemConfig = Config.GetActorSystemConfig();
+ bool hasASCfg = Config.HasActorSystemConfig();
+ if (!hasASCfg || (systemConfig.HasUseAutoConfig() && systemConfig.GetUseAutoConfig())) {
+ auto *mutableSystemConfig = Config.MutableActorSystemConfig();
+ mutableSystemConfig->SetUseAutoConfig(true);
+ mutableSystemConfig->ClearExecutor();
+
+ i16 cpuCount = mutableSystemConfig->HasCpuCount() ? mutableSystemConfig->GetCpuCount() : GetCpuCount();
+ Y_VERIFY(cpuCount);
+ mutableSystemConfig->SetCpuCount(cpuCount);
+
+ if (!mutableSystemConfig->HasScheduler()) {
+ auto *scheduler = mutableSystemConfig->MutableScheduler();
+ scheduler->SetResolution(64);
+ scheduler->SetSpinThreshold(0);
+ scheduler->SetProgressThreshold(10'000);
+ }
+
+ NKikimrConfig::TActorSystemConfig::TExecutor *executors[] = {
+ mutableSystemConfig->AddExecutor(),
+ mutableSystemConfig->AddExecutor(),
+ mutableSystemConfig->AddExecutor(),
+ mutableSystemConfig->AddExecutor(),
+ mutableSystemConfig->AddExecutor()
+ };
+ mutableSystemConfig->SetIoExecutor(0);
+ auto *ioExecutor = executors[3];
+ ioExecutor->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::IO);
+ ioExecutor->SetThreads(GetIOThreadCount(cpuCount));
+ ioExecutor->SetName("IO");
+
+ ui16 poolCount = Min(5, cpuCount + 1);
+ ui32 executorIds[4] = {0, 1, 2, 4};
+ TVector<TString> names = {"System", "User", "Batch", "IC"};
+ TVector<ui32> priorities = {30, 20, 10, 40};
+ switch (cpuCount) {
+ case 1:
+ mutableSystemConfig->SetUserExecutor(1);
+ mutableSystemConfig->SetSysExecutor(1);
+ mutableSystemConfig->SetBatchExecutor(1);
+ names = {"Common"};
+ priorities = {40,};
+ break;
+ case 2:
+ mutableSystemConfig->SetUserExecutor(1);
+ mutableSystemConfig->SetSysExecutor(1);
+ mutableSystemConfig->SetBatchExecutor(1);
+ names = {"Common"};
+ priorities = {40,};
+ poolCount = 2;
+ break;
+ case 3:
+ mutableSystemConfig->SetUserExecutor(1);
+ mutableSystemConfig->SetSysExecutor(1);
+ mutableSystemConfig->SetBatchExecutor(2);
+ names = {"Common", "Batch", "IC"};
+ priorities = {30, 10, 40,};
+ break;
+ default:
+ mutableSystemConfig->SetUserExecutor(1);
+ mutableSystemConfig->SetSysExecutor(2);
+ mutableSystemConfig->SetBatchExecutor(3);
+ break;
+ }
+ auto *serviceExecutor = mutableSystemConfig->AddServiceExecutor();
+ serviceExecutor->SetServiceName("Interconnect");
+ serviceExecutor->SetExecutorId(poolCount - 1);
+
+ auto &cpuTable = (mutableSystemConfig->GetNodeType() == NKikimrConfig::TActorSystemConfig::STORAGE ? StorageCpuTable :
+ mutableSystemConfig->GetNodeType() == NKikimrConfig::TActorSystemConfig::COMPUTE ? ComputeCpuTable :
+ HybridCpuTable );
+
+ for (ui32 poolType = 0; poolType < poolCount - 1; ++poolType) {
+ TShortPoolCfg cfg = GetShortPoolChg(static_cast<EPoolType>(poolType), cpuCount, cpuTable);
+ auto *executor = executors[executorIds[poolType]];
+ executor->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::BASIC);
+ executor->SetThreads(cpuCount == 2 ? 2 : cfg.ThreadCount);
+ executor->SetMaxThreads(cpuCount == 2 ? 2 : cfg.MaxThreadCount);
+ executor->SetPriority(priorities[poolType]);
+ executor->SetName(names[poolType]);
+ if (cpuCount == 1 || cpuCount == 2) {
+ executor->SetSpinThreshold(0);
+ executor->SetTimePerMailboxMicroSecs(100);
+ } else if (poolType == poolCount - 2) { // IC pool
+ executor->SetSpinThreshold(10);
+ executor->SetTimePerMailboxMicroSecs(100);
+ executor->SetMaxAvgPingDeviation(500);
+ } else {
+ executor->SetSpinThreshold(1);
+ }
+ }
+ }
+
+ Y_VERIFY(Config.HasActorSystemConfig());
Y_VERIFY(systemConfig.HasScheduler());
Y_VERIFY(systemConfig.ExecutorSize());
-
const ui32 systemPoolId = appData->SystemPoolId;
const TIntrusivePtr<::NMonitoring::TDynamicCounters>& counters = appData->Counters;
setup->NodeId = NodeId;
setup->MaxActivityType = GetActivityTypeCount();
setup->CpuManager = CreateCpuManagerConfig(systemConfig, setup->MaxActivityType, appData);
+
for (ui32 poolId = 0; poolId != setup->GetExecutorsCount(); ++poolId) {
const auto &execConfig = systemConfig.GetExecutor(poolId);
if (execConfig.HasInjectMadSquirrels()) {
@@ -680,13 +935,6 @@ void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* s
// create poller actor (whether platform supports it)
setup->LocalServices.emplace_back(MakePollerActorId(), TActorSetupCmd(CreatePollerActor(), TMailboxType::ReadAsFilled, systemPoolId));
- // create handshake broker actor
- setup->LocalServices.emplace_back(MakeHandshakeBrokerOutId(), TActorSetupCmd(CreateHandshakeBroker(),
- TMailboxType::ReadAsFilled, systemPoolId));
-
- setup->LocalServices.emplace_back(MakeHandshakeBrokerInId(), TActorSetupCmd(CreateHandshakeBroker(),
- TMailboxType::ReadAsFilled, systemPoolId));
-
auto destructorQueueSize = std::make_shared<std::atomic<TAtomicBase>>(0);
TIntrusivePtr<TInterconnectProxyCommon> icCommon;
@@ -1574,6 +1822,25 @@ TGRpcServicesInitializer::TGRpcServicesInitializer(
void TGRpcServicesInitializer::InitializeServices(NActors::TActorSystemSetup* setup,
const NKikimr::TAppData* appData)
{
+ auto& systemConfig = Config.GetActorSystemConfig();
+ bool hasASCfg = Config.HasActorSystemConfig();
+
+ if (!hasASCfg || (systemConfig.HasUseAutoConfig() && systemConfig.GetUseAutoConfig())) {
+ auto *mutableSystemConfig = Config.MutableActorSystemConfig();
+ i16 cpuCount = mutableSystemConfig->HasCpuCount() ? mutableSystemConfig->GetCpuCount() : GetCpuCount();
+
+ auto *grpcConfig = Config.MutableGRpcConfig();
+ if (!grpcConfig->HasWorkerThreads()) {
+ grpcConfig->SetWorkerThreads(Max(2, cpuCount / CpuCountForEachGRpcWorker));
+ }
+ if (!grpcConfig->HasHandlersPerCompletionQueue()) {
+ grpcConfig->SetHandlersPerCompletionQueue(GRpcHandlersPerCompletionQueuePerCpu * cpuCount);
+ }
+ if (!grpcConfig->HasGRpcProxyCount()) {
+ grpcConfig->SetGRpcProxyCount(Max(2, cpuCount / CpuCountForEachGRpcProxy));
+ }
+ }
+
if (!IsServiceInitialized(setup, NMsgBusProxy::CreateMsgBusProxyId())
&& Config.HasGRpcConfig() && Config.GetGRpcConfig().GetStartGRpcProxy()) {
IActor * proxy = NMsgBusProxy::CreateMessageBusServerProxy(nullptr);
@@ -1595,14 +1862,17 @@ void TGRpcServicesInitializer::InitializeServices(NActors::TActorSystemSetup* se
}
}
- if (!IsServiceInitialized(setup, NGRpcService::CreateGRpcRequestProxyId())) {
- auto grpcReqProxy = Config.HasGRpcConfig() && Config.GetGRpcConfig().GetSkipSchemeCheck()
- ? NGRpcService::CreateGRpcRequestProxySimple(Config)
- : NGRpcService::CreateGRpcRequestProxy(Config);
- setup->LocalServices.push_back(std::pair<TActorId,
- TActorSetupCmd>(NGRpcService::CreateGRpcRequestProxyId(),
- TActorSetupCmd(grpcReqProxy, TMailboxType::ReadAsFilled,
- appData->UserPoolId)));
+ if (!IsServiceInitialized(setup, NGRpcService::CreateGRpcRequestProxyId(0))) {
+ const size_t proxyCount = Config.HasGRpcConfig() ? Config.GetGRpcConfig().GetGRpcProxyCount() : 1UL;
+ for (size_t i = 0; i < proxyCount; ++i) {
+ auto grpcReqProxy = Config.HasGRpcConfig() && Config.GetGRpcConfig().GetSkipSchemeCheck()
+ ? NGRpcService::CreateGRpcRequestProxySimple(Config)
+ : NGRpcService::CreateGRpcRequestProxy(Config);
+ setup->LocalServices.push_back(std::pair<TActorId,
+ TActorSetupCmd>(NGRpcService::CreateGRpcRequestProxyId(i),
+ TActorSetupCmd(grpcReqProxy, TMailboxType::ReadAsFilled,
+ appData->UserPoolId)));
+ }
}
if (!IsServiceInitialized(setup, NKesus::MakeKesusProxyServiceId())) {
@@ -2227,11 +2497,12 @@ void THttpProxyServiceInitializer::InitializeServices(NActors::TActorSystemSetup
TConfigsDispatcherInitializer::TConfigsDispatcherInitializer(const TKikimrRunConfig& runConfig)
: IKikimrServicesInitializer(runConfig)
+ , Labels(runConfig.Labels)
{
}
void TConfigsDispatcherInitializer::InitializeServices(NActors::TActorSystemSetup* setup, const NKikimr::TAppData* appData) {
- IActor* actor = NConsole::CreateConfigsDispatcher(Config);
+ IActor* actor = NConsole::CreateConfigsDispatcher(Config, Labels);
setup->LocalServices.push_back(std::pair<TActorId, TActorSetupCmd>(
NConsole::MakeConfigsDispatcherID(NodeId),
TActorSetupCmd(actor, TMailboxType::HTSwap, appData->UserPoolId)));
@@ -2301,24 +2572,15 @@ void TSysViewServiceInitializer::InitializeServices(NActors::TActorSystemSetup*
TMeteringWriterInitializer::TMeteringWriterInitializer(const TKikimrRunConfig &runConfig)
: IKikimrServicesInitializer(runConfig)
+ , KikimrRunConfig(runConfig)
{
}
void TMeteringWriterInitializer::InitializeServices(TActorSystemSetup* setup, const TAppData* appData)
{
- if (!Config.HasMeteringConfig() || !Config.GetMeteringConfig().HasMeteringFilePath()) {
- return;
- }
-
- const auto& filePath = Config.GetMeteringConfig().GetMeteringFilePath();
-
- THolder<TFileLogBackend> fileBackend;
- try {
- fileBackend = MakeHolder<TFileLogBackend>(filePath);
- } catch (const TFileError& ex) {
- Cerr << "TMeteringWriterInitializer: failed to open file '" << filePath << "': " << ex.what() << Endl;
- exit(1);
- }
+ auto fileBackend = CreateMeteringLogBackendWithUnifiedAgent(KikimrRunConfig, appData->Counters);
+ if (!fileBackend)
+ return;
auto actor = NMetering::CreateMeteringWriter(std::move(fileBackend));
@@ -2327,24 +2589,20 @@ void TMeteringWriterInitializer::InitializeServices(TActorSystemSetup* setup, co
TActorSetupCmd(actor.Release(), TMailboxType::HTSwap, appData->IOPoolId)));
}
-TAuditWriterInitializer::TAuditWriterInitializer(const TKikimrRunConfig &runConfig, std::shared_ptr<TModuleFactories> factories)
+TAuditWriterInitializer::TAuditWriterInitializer(const TKikimrRunConfig &runConfig)
: IKikimrServicesInitializer(runConfig)
- , Factories(factories)
, KikimrRunConfig(runConfig)
{
}
void TAuditWriterInitializer::InitializeServices(TActorSystemSetup* setup, const TAppData* appData)
{
- TAutoPtr<TLogBackend> fileBackend;
- if (Factories && Factories->AuditLogBackendFactory) {
- fileBackend = Factories->AuditLogBackendFactory->CreateLogBackend(KikimrRunConfig, appData->Counters);
- }
- if (!fileBackend)
+ auto logBackends = CreateAuditLogBackends(KikimrRunConfig, appData->Counters);
+
+ if (logBackends.size() == 0)
return;
- const auto format = Config.GetAuditConfig().GetFormat();
- auto actor = NAudit::CreateAuditWriter(std::move(fileBackend), format);
+ auto actor = NAudit::CreateAuditWriter(std::move(logBackends));
setup->LocalServices.push_back(std::pair<TActorId, TActorSetupCmd>(
NAudit::MakeAuditServiceID(),
diff --git a/ydb/core/driver_lib/run/kikimr_services_initializers.h b/ydb/core/driver_lib/run/kikimr_services_initializers.h
index 3e81498d02..a9c6ba93ce 100644
--- a/ydb/core/driver_lib/run/kikimr_services_initializers.h
+++ b/ydb/core/driver_lib/run/kikimr_services_initializers.h
@@ -32,7 +32,7 @@ namespace NKikimrServicesInitializers {
class IKikimrServicesInitializer : public IServiceInitializer {
protected:
- const NKikimrConfig::TAppConfig& Config;
+ NKikimrConfig::TAppConfig& Config;
const ui32 NodeId;
const TKikimrScopeId ScopeId;
@@ -444,6 +444,9 @@ public:
TConfigsDispatcherInitializer(const TKikimrRunConfig& runConfig);
void InitializeServices(NActors::TActorSystemSetup* setup, const NKikimr::TAppData* appData) override;
+
+private:
+ TMap<TString, TString> Labels;
};
class TConfigsCacheInitializer : public IKikimrServicesInitializer {
@@ -481,15 +484,16 @@ public:
TMeteringWriterInitializer(const TKikimrRunConfig& runConfig);
void InitializeServices(NActors::TActorSystemSetup* setup, const NKikimr::TAppData* appData) override;
+private:
+ const TKikimrRunConfig& KikimrRunConfig;
};
class TAuditWriterInitializer : public IKikimrServicesInitializer {
public:
- TAuditWriterInitializer(const TKikimrRunConfig& runConfig, std::shared_ptr<TModuleFactories> factories);
+ TAuditWriterInitializer(const TKikimrRunConfig& runConfig);
void InitializeServices(NActors::TActorSystemSetup* setup, const NKikimr::TAppData* appData) override;
private:
- std::shared_ptr<TModuleFactories> Factories;
const TKikimrRunConfig& KikimrRunConfig;
};
diff --git a/ydb/core/driver_lib/run/log_backend.cpp b/ydb/core/driver_lib/run/log_backend.cpp
deleted file mode 100644
index 3a33ab6cac..0000000000
--- a/ydb/core/driver_lib/run/log_backend.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "log_backend.h"
-
-namespace NKikimr {
-
-TAutoPtr<TLogBackend> TLogBackendFactory::CreateLogBackendFromLogConfig(const TKikimrRunConfig& runConfig) {
- TAutoPtr<TLogBackend> logBackend;
- if (runConfig.AppConfig.HasLogConfig()) {
- const auto& logConfig = runConfig.AppConfig.GetLogConfig();
- if (logConfig.HasSysLog() && logConfig.GetSysLog()) {
- const TString& service = logConfig.GetSysLogService();
- logBackend = NActors::CreateSysLogBackend(service ? service : "KIKIMR", false, true);
- } else if (logConfig.HasBackendFileName()) {
- logBackend = NActors::CreateFileBackend(logConfig.GetBackendFileName());
- }
- }
- return logBackend;
-}
-
-TAutoPtr<TLogBackend> TLogBackendFactory::CreateLogBackend(
- const TKikimrRunConfig& runConfig,
- ::NMonitoring::TDynamicCounterPtr counters) {
- Y_UNUSED(counters);
- TAutoPtr<TLogBackend> logBackend = CreateLogBackendFromLogConfig(runConfig);
- if (logBackend) {
- return logBackend;
- } else {
- return NActors::CreateStderrBackend();
- }
-}
-
-} // NKikimr
-
diff --git a/ydb/core/driver_lib/run/log_backend.h b/ydb/core/driver_lib/run/log_backend.h
deleted file mode 100644
index d641a0fd9d..0000000000
--- a/ydb/core/driver_lib/run/log_backend.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#pragma once
-
-#include "config.h"
-#include <library/cpp/logger/backend.h>
-
-namespace NKikimr {
-
-// Interface for LogBackend creation
-class ILogBackendFactory {
-public:
- virtual TAutoPtr<TLogBackend> CreateLogBackend(
- const TKikimrRunConfig& runConfig,
- ::NMonitoring::TDynamicCounterPtr counters) = 0;
-
- virtual ~ILogBackendFactory() {}
-};
-
-// Default implementation if ILogBackendFactory
-class TLogBackendFactory : public ILogBackendFactory {
-protected:
- TAutoPtr<TLogBackend> CreateLogBackendFromLogConfig(const TKikimrRunConfig& runConfig);
-
-public:
- virtual TAutoPtr<TLogBackend> CreateLogBackend(
- const TKikimrRunConfig& runConfig,
- ::NMonitoring::TDynamicCounterPtr counters) override;
-};
-
-} // NKikimr
diff --git a/ydb/core/driver_lib/run/run.cpp b/ydb/core/driver_lib/run/run.cpp
index bf343a76a1..a79d577d0e 100644
--- a/ydb/core/driver_lib/run/run.cpp
+++ b/ydb/core/driver_lib/run/run.cpp
@@ -28,10 +28,12 @@
#include <ydb/core/control/immediate_control_board_actor.h>
#include <library/cpp/actors/protos/services_common.pb.h>
+#include <ydb/core/cms/console/grpc_library_helper.h>
#include <ydb/core/keyvalue/keyvalue.h>
#include <ydb/core/formats/clickhouse_block.h>
#include <ydb/core/grpc_services/grpc_request_proxy.h>
#include <ydb/core/grpc_services/grpc_mon.h>
+#include <ydb/core/log_backend/log_backend.h>
#include <ydb/core/mon/sync_http_mon.h>
#include <ydb/core/mon/async_http_mon.h>
#include <ydb/core/mon/crossref.h>
@@ -669,7 +671,14 @@ void TKikimrRunner::InitializeGRpc(const TKikimrRunConfig& runConfig) {
}
}
- const auto grpcRequestProxyId = NGRpcService::CreateGRpcRequestProxyId();
+
+ // TODO: for now we pass multiple proxies only to the table service
+ const size_t proxyCount = Max(ui32{1}, grpcConfig.GetGRpcProxyCount());
+ TVector<TActorId> grpcRequestProxies;
+ grpcRequestProxies.reserve(proxyCount);
+ for (size_t i = 0; i < proxyCount; ++i) {
+ grpcRequestProxies.push_back(NGRpcService::CreateGRpcRequestProxyId(i));
+ }
if (hasLegacy) {
// start legacy service
@@ -697,60 +706,60 @@ void TKikimrRunner::InitializeGRpc(const TKikimrRunConfig& runConfig) {
}
if (hasTableService) {
- server.AddService(new NGRpcService::TGRpcYdbTableService(ActorSystem.Get(), Counters, grpcRequestProxyId,
- hasTableService.IsRlAllowed()));
+ server.AddService(new NGRpcService::TGRpcYdbTableService(ActorSystem.Get(), Counters, grpcRequestProxies,
+ hasTableService.IsRlAllowed(), grpcConfig.GetHandlersPerCompletionQueue()));
}
if (hasClickhouseInternal) {
server.AddService(new NGRpcService::TGRpcYdbClickhouseInternalService(ActorSystem.Get(), Counters,
- AppData->InFlightLimiterRegistry, grpcRequestProxyId, hasClickhouseInternal.IsRlAllowed()));
+ AppData->InFlightLimiterRegistry, grpcRequestProxies[0], hasClickhouseInternal.IsRlAllowed()));
}
if (hasScripting) {
server.AddService(new NGRpcService::TGRpcYdbScriptingService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasScripting.IsRlAllowed()));
+ grpcRequestProxies[0], hasScripting.IsRlAllowed()));
}
if (hasLongTx) {
server.AddService(new NGRpcService::TGRpcYdbLongTxService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasLongTx.IsRlAllowed()));
+ grpcRequestProxies[0], hasLongTx.IsRlAllowed()));
}
if (hasSchemeService) {
// RPC RL enabled
// We have no way to disable or enable this service explicitly
server.AddService(new NGRpcService::TGRpcYdbSchemeService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, true /*hasSchemeService.IsRlAllowed()*/));
+ grpcRequestProxies[0], true /*hasSchemeService.IsRlAllowed()*/));
}
if (hasOperationService) {
server.AddService(new NGRpcService::TGRpcOperationService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasOperationService.IsRlAllowed()));
+ grpcRequestProxies[0], hasOperationService.IsRlAllowed()));
}
if (hasExport) {
server.AddService(new NGRpcService::TGRpcYdbExportService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasExport.IsRlAllowed()));
+ grpcRequestProxies[0], hasExport.IsRlAllowed()));
}
if (hasImport) {
server.AddService(new NGRpcService::TGRpcYdbImportService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasImport.IsRlAllowed()));
+ grpcRequestProxies[0], hasImport.IsRlAllowed()));
}
if (hasKesus) {
server.AddService(new NKesus::TKesusGRpcService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasKesus.IsRlAllowed()));
+ grpcRequestProxies[0], hasKesus.IsRlAllowed()));
}
if (hasPQv1) {
server.AddService(new NGRpcService::V1::TGRpcPersQueueService(ActorSystem.Get(), Counters, NMsgBusProxy::CreatePersQueueMetaCacheV2Id(),
- grpcRequestProxyId, hasPQv1.IsRlAllowed()));
+ grpcRequestProxies[0], hasPQv1.IsRlAllowed()));
}
if (hasPQv1 || hasTopic) {
server.AddService(new NGRpcService::V1::TGRpcTopicService(ActorSystem.Get(), Counters, NMsgBusProxy::CreatePersQueueMetaCacheV2Id(),
- grpcRequestProxyId, hasTopic.IsRlAllowed() || hasPQv1.IsRlAllowed()));
+ grpcRequestProxies[0], hasTopic.IsRlAllowed() || hasPQv1.IsRlAllowed()));
}
if (hasPQCD) {
@@ -761,64 +770,64 @@ void TKikimrRunner::InitializeGRpc(const TKikimrRunConfig& runConfig) {
inflightLimit = pqcdConfig.GetRequestInflightLimit();
}
server.AddService(new NGRpcService::TGRpcPQClusterDiscoveryService(
- ActorSystem.Get(), Counters, grpcRequestProxyId, inflightLimit
+ ActorSystem.Get(), Counters, grpcRequestProxies[0], inflightLimit
));
}
if (hasCms) {
server.AddService(new NGRpcService::TGRpcCmsService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasCms.IsRlAllowed()));
+ grpcRequestProxies[0], hasCms.IsRlAllowed()));
}
if (hasDiscovery) {
server.AddService(new NGRpcService::TGRpcDiscoveryService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasDiscovery.IsRlAllowed()));
+ grpcRequestProxies[0], hasDiscovery.IsRlAllowed()));
}
if (hasLocalDiscovery) {
server.AddService(new NGRpcService::TGRpcLocalDiscoveryService(grpcConfig, ActorSystem.Get(), Counters,
- grpcRequestProxyId));
+ grpcRequestProxies[0]));
}
if (hasRateLimiter) {
- server.AddService(new NQuoter::TRateLimiterGRpcService(ActorSystem.Get(), Counters, grpcRequestProxyId));
+ server.AddService(new NQuoter::TRateLimiterGRpcService(ActorSystem.Get(), Counters, grpcRequestProxies[0]));
}
if (hasMonitoring) {
server.AddService(new NGRpcService::TGRpcMonitoringService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasMonitoring.IsRlAllowed()));
+ grpcRequestProxies[0], hasMonitoring.IsRlAllowed()));
}
if (hasAuth) {
server.AddService(new NGRpcService::TGRpcAuthService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasAuth.IsRlAllowed()));
+ grpcRequestProxies[0], hasAuth.IsRlAllowed()));
}
if (hasDataStreams) {
server.AddService(new NGRpcService::TGRpcDataStreamsService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasDataStreams.IsRlAllowed()));
+ grpcRequestProxies[0], hasDataStreams.IsRlAllowed()));
}
if (hasYandexQuery) {
- server.AddService(new NGRpcService::TGRpcYandexQueryService(ActorSystem.Get(), Counters, grpcRequestProxyId));
- server.AddService(new NGRpcService::TGRpcFederatedQueryService(ActorSystem.Get(), Counters, grpcRequestProxyId));
- server.AddService(new NGRpcService::TGRpcFqPrivateTaskService(ActorSystem.Get(), Counters, grpcRequestProxyId));
+ server.AddService(new NGRpcService::TGRpcYandexQueryService(ActorSystem.Get(), Counters, grpcRequestProxies[0]));
+ server.AddService(new NGRpcService::TGRpcFederatedQueryService(ActorSystem.Get(), Counters, grpcRequestProxies[0]));
+ server.AddService(new NGRpcService::TGRpcFqPrivateTaskService(ActorSystem.Get(), Counters, grpcRequestProxies[0]));
} /* REMOVE */ else /* THIS else as well and separate ifs */ if (hasYandexQueryPrivate) {
- server.AddService(new NGRpcService::TGRpcFqPrivateTaskService(ActorSystem.Get(), Counters, grpcRequestProxyId));
+ server.AddService(new NGRpcService::TGRpcFqPrivateTaskService(ActorSystem.Get(), Counters, grpcRequestProxies[0]));
}
if (hasQueryService) {
server.AddService(new NGRpcService::TGRpcYdbQueryService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasDataStreams.IsRlAllowed()));
+ grpcRequestProxies[0], hasDataStreams.IsRlAllowed()));
}
if (hasLogStore) {
server.AddService(new NGRpcService::TGRpcYdbLogStoreService(ActorSystem.Get(), Counters,
- grpcRequestProxyId, hasLogStore.IsRlAllowed()));
+ grpcRequestProxies[0], hasLogStore.IsRlAllowed()));
}
if (ModuleFactories) {
- for (const auto& service : ModuleFactories->GrpcServiceFactory.Create(enabled, disabled, ActorSystem.Get(), Counters, grpcRequestProxyId)) {
+ for (const auto& service : ModuleFactories->GrpcServiceFactory.Create(enabled, disabled, ActorSystem.Get(), Counters, grpcRequestProxies[0])) {
server.AddService(service);
}
}
@@ -832,6 +841,7 @@ void TKikimrRunner::InitializeGRpc(const TKikimrRunConfig& runConfig) {
opts.SetHost(grpcConfig.GetHost());
opts.SetPort(grpcConfig.GetPort());
opts.SetWorkerThreads(grpcConfig.GetWorkerThreads());
+ opts.SetWorkersPerCompletionQueue(grpcConfig.GetWorkersPerCompletionQueue());
opts.SetGRpcMemoryQuotaBytes(grpcConfig.GetGRpcMemoryQuotaBytes());
opts.SetMaxMessageSize(grpcConfig.HasMaxMessageSize() ? grpcConfig.GetMaxMessageSize() : DEFAULT_GRPC_MESSAGE_SIZE_LIMIT);
opts.SetMaxGlobalRequestInFlight(grpcConfig.GetMaxInFlight());
@@ -857,6 +867,8 @@ void TKikimrRunner::InitializeGRpc(const TKikimrRunConfig& runConfig) {
opts.SetKeepAliveEnable(false);
}
}
+
+ NConsole::SetGRpcLibraryFunction();
#define GET_PATH_TO_FILE(GRPC_CONFIG, PRIMARY_FIELD, SECONDARY_FIELD) \
(GRPC_CONFIG.Has##PRIMARY_FIELD() ? GRPC_CONFIG.Get##PRIMARY_FIELD() : GRPC_CONFIG.Get##SECONDARY_FIELD())
@@ -1052,6 +1064,10 @@ void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig)
AppData->BootstrapConfig = runConfig.AppConfig.GetBootstrapConfig();
}
+ if (runConfig.AppConfig.HasSharedCacheConfig()) {
+ AppData->SharedCacheConfig = runConfig.AppConfig.GetSharedCacheConfig();
+ }
+
// setup resource profiles
AppData->ResourceProfiles = new TResourceProfiles;
if (runConfig.AppConfig.GetBootstrapConfig().ResourceProfilesSize())
@@ -1077,13 +1093,8 @@ void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig)
void TKikimrRunner::InitializeLogSettings(const TKikimrRunConfig& runConfig)
{
- if (ModuleFactories && ModuleFactories->LogBackendFactory) {
- auto logBackend = ModuleFactories->LogBackendFactory->CreateLogBackend(runConfig, Counters);
- LogBackend.reset(logBackend.Release());
- } else {
- auto logBackend = TLogBackendFactory().CreateLogBackend(runConfig, Counters);
- LogBackend.reset(logBackend.Release());
- }
+ auto logBackend = CreateLogBackendWithUnifiedAgent(runConfig, Counters);
+ LogBackend.reset(logBackend.Release());
if (!runConfig.AppConfig.HasLogConfig())
return;
@@ -1161,7 +1172,12 @@ void TKikimrRunner::ApplyLogSettings(const TKikimrRunConfig& runConfig)
TString explanation;
if (entry.HasLevel()) {
- Y_VERIFY(LogSettings->SetLevel((NLog::EPriority)entry.GetLevel(), component, explanation) == 0);
+ auto prio = (NLog::EPriority)entry.GetLevel();
+ Y_VERIFY(LogSettings->SetLevel(prio, component, explanation) == 0);
+
+ if (component == NKikimrServices::GRPC_LIBRARY) {
+ NConsole::SetGRpcLibraryLogVerbosity(prio);
+ }
}
if (entry.HasSamplingLevel()) {
Y_VERIFY(LogSettings->SetSamplingLevel((NLog::EPriority)entry.GetSamplingLevel(), component, explanation) == 0);
@@ -1471,7 +1487,7 @@ TIntrusivePtr<TServiceInitializersList> TKikimrRunner::CreateServiceInitializers
}
if (serviceMask.EnableAuditWriter) {
- sil->AddServiceInitializer(new TAuditWriterInitializer(runConfig, ModuleFactories));
+ sil->AddServiceInitializer(new TAuditWriterInitializer(runConfig));
}
if (serviceMask.EnableLongTxService) {
diff --git a/ydb/core/driver_lib/run/version.cpp b/ydb/core/driver_lib/run/version.cpp
index a8dc6f825b..7cd90a34a8 100644
--- a/ydb/core/driver_lib/run/version.cpp
+++ b/ydb/core/driver_lib/run/version.cpp
@@ -3,12 +3,13 @@
TMaybe<NActors::TInterconnectProxyCommon::TVersionInfo> VERSION = NActors::TInterconnectProxyCommon::TVersionInfo{
// version of this binary
- "trunk",
+ "stable-23-1",
// compatible versions; must include all compatible old ones, including this one; version verification occurs on both
// peers and connection is accepted if at least one of peers accepts the version of the other peer
{
- "trunk"
+ "stable-23-1",
+ "stable-22-5"
}
};
diff --git a/ydb/core/engine/minikql/change_collector_iface.h b/ydb/core/engine/minikql/change_collector_iface.h
index 10d167bc97..ca81ec7694 100644
--- a/ydb/core/engine/minikql/change_collector_iface.h
+++ b/ydb/core/engine/minikql/change_collector_iface.h
@@ -8,45 +8,16 @@ namespace NMiniKQL {
class IChangeCollector {
public:
- // basic change record's info
- struct TChange {
- ui64 Order;
- ui64 Group;
- ui64 Step;
- ui64 TxId;
- TPathId PathId;
- ui64 BodySize;
- TPathId TableId;
- ui64 SchemaVersion;
- ui64 LockId = 0;
- ui64 LockOffset = 0;
- };
-
-public:
virtual ~IChangeCollector() = default;
- virtual bool NeedToReadKeys() const = 0;
- virtual void SetReadVersion(const TRowVersion& readVersion) = 0;
- virtual void SetWriteVersion(const TRowVersion& writeVersion) = 0;
- virtual void SetWriteTxId(ui64 txId) = 0;
+ virtual bool OnUpdate(const TTableId& tableId, ui32 localTid, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates,
+ const TRowVersion& writeVersion) = 0;
- virtual bool Collect(const TTableId& tableId, NTable::ERowOp rop,
- TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates) = 0;
-
- virtual const TVector<TChange>& GetCollected() const = 0;
- virtual TVector<TChange>&& GetCollected() = 0;
- virtual void Reset() = 0;
+ virtual bool OnUpdateTx(const TTableId& tableId, ui32 localTid, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates,
+ ui64 writeTxId) = 0;
};
} // NMiniKQL
} // NKikimr
-
-Y_DECLARE_OUT_SPEC(inline, NKikimr::NMiniKQL::IChangeCollector::TChange, o, x) {
- o << "{"
- << " Order: " << x.Order
- << " PathId: " << x.PathId
- << " BodySize: " << x.BodySize
- << " TableId: " << x.TableId
- << " SchemaVersion: " << x.SchemaVersion
- << " }";
-}
diff --git a/ydb/core/engine/minikql/minikql_engine_host.cpp b/ydb/core/engine/minikql/minikql_engine_host.cpp
index b8326dc363..13568b6c42 100644
--- a/ydb/core/engine/minikql/minikql_engine_host.cpp
+++ b/ydb/core/engine/minikql/minikql_engine_host.cpp
@@ -215,8 +215,7 @@ void TEngineHost::PinPages(const TVector<THolder<TKeyDesc>>& keys, ui64 pageFaul
break;
case TKeyDesc::ERowOperation::Update:
case TKeyDesc::ERowOperation::Erase: {
- const auto collector = GetChangeCollector(key.TableId);
- if (collector && collector->NeedToReadKeys()) {
+ if (NeedToReadBeforeWrite(key.TableId)) {
columnOpFilter.insert(TKeyDesc::EColumnOperation::Set);
columnOpFilter.insert(TKeyDesc::EColumnOperation::InplaceUpdate);
}
@@ -309,9 +308,6 @@ NUdf::TUnboxedValue TEngineHost::SelectRow(const TTableId& tableId, const TArray
Counters.InvisibleRowSkips += stats.InvisibleRowSkips;
if (NTable::EReady::Page == ready) {
- if (auto collector = GetChangeCollector(tableId)) {
- collector->Reset();
- }
throw TNotReadyTabletException();
}
@@ -589,9 +585,6 @@ public:
List.EngineHost.GetCounters().InvisibleRowSkips += std::exchange(Iter->Stats.InvisibleRowSkips, 0);
if (Iter->Last() == NTable::EReady::Page) {
- if (auto collector = List.EngineHost.GetChangeCollector(List.TableId)) {
- collector->Reset();
- }
throw TNotReadyTabletException();
}
@@ -898,27 +891,19 @@ void TEngineHost::UpdateRow(const TTableId& tableId, const TArrayRef<const TCell
valueBytes += upd.Value.IsNull() ? 1 : upd.Value.Size();
}
- const ui64 writeTxId = GetWriteTxId(tableId);
-
- if (auto collector = GetChangeCollector(tableId)) {
- if (writeTxId == 0) {
- collector->SetWriteVersion(GetWriteVersion(tableId));
- } else {
- collector->SetWriteTxId(writeTxId);
- }
- if (collector->NeedToReadKeys()) {
- collector->SetReadVersion(GetReadVersion(tableId));
- }
+ auto* collector = GetChangeCollector(tableId);
- if (!collector->Collect(tableId, NTable::ERowOp::Upsert, key, ops)) {
- collector->Reset();
+ const ui64 writeTxId = GetWriteTxId(tableId);
+ if (writeTxId == 0) {
+ auto writeVersion = GetWriteVersion(tableId);
+ if (collector && !collector->OnUpdate(tableId, localTid, NTable::ERowOp::Upsert, key, ops, writeVersion)) {
throw TNotReadyTabletException();
}
- }
-
- if (writeTxId == 0) {
- Db.Update(localTid, NTable::ERowOp::Upsert, key, ops, GetWriteVersion(tableId));
+ Db.Update(localTid, NTable::ERowOp::Upsert, key, ops, writeVersion);
} else {
+ if (collector && !collector->OnUpdateTx(tableId, localTid, NTable::ERowOp::Upsert, key, ops, writeTxId)) {
+ throw TNotReadyTabletException();
+ }
Db.UpdateTx(localTid, NTable::ERowOp::Upsert, key, ops, writeTxId);
}
@@ -936,27 +921,19 @@ void TEngineHost::EraseRow(const TTableId& tableId, const TArrayRef<const TCell>
ui64 keyBytes = 0;
ConvertTableKeys(Scheme, tableInfo, row, key, &keyBytes);
- const ui64 writeTxId = GetWriteTxId(tableId);
+ auto* collector = GetChangeCollector(tableId);
- if (auto collector = GetChangeCollector(tableId)) {
- if (writeTxId == 0) {
- collector->SetWriteVersion(GetWriteVersion(tableId));
- } else {
- collector->SetWriteTxId(writeTxId);
- }
- if (collector->NeedToReadKeys()) {
- collector->SetReadVersion(GetReadVersion(tableId));
- }
-
- if (!collector->Collect(tableId, NTable::ERowOp::Erase, key, {})) {
- collector->Reset();
+ const ui64 writeTxId = GetWriteTxId(tableId);
+ if (writeTxId == 0) {
+ auto writeVersion = GetWriteVersion(tableId);
+ if (collector && !collector->OnUpdate(tableId, localTid, NTable::ERowOp::Erase, key, { }, writeVersion)) {
throw TNotReadyTabletException();
}
- }
-
- if (writeTxId == 0) {
- Db.Update(localTid, NTable::ERowOp::Erase, key, { }, GetWriteVersion(tableId));
+ Db.Update(localTid, NTable::ERowOp::Erase, key, { }, writeVersion);
} else {
+ if (collector && !collector->OnUpdateTx(tableId, localTid, NTable::ERowOp::Erase, key, { }, writeTxId)) {
+ throw TNotReadyTabletException();
+ }
Db.UpdateTx(localTid, NTable::ERowOp::Erase, key, { }, writeTxId);
}
diff --git a/ydb/core/engine/minikql/minikql_engine_host.h b/ydb/core/engine/minikql/minikql_engine_host.h
index 7f8434eb88..ab769e703c 100644
--- a/ydb/core/engine/minikql/minikql_engine_host.h
+++ b/ydb/core/engine/minikql/minikql_engine_host.h
@@ -128,6 +128,7 @@ public:
virtual TRowVersion GetWriteVersion(const TTableId& tableId) const = 0;
virtual TRowVersion GetReadVersion(const TTableId& tableId) const = 0;
+
virtual IChangeCollector* GetChangeCollector(const TTableId& tableId) const = 0;
// Non-zero WriteTxId will force engine to work using a given persistent tx
@@ -136,6 +137,12 @@ public:
// Commits a given persistent tx
virtual void CommitWriteTxId(const TTableId& tableId, ui64 writeTxId);
+ // Used to check if the engine reads before writing to keys
+ virtual bool NeedToReadBeforeWrite(const TTableId& tableId) const {
+ Y_UNUSED(tableId);
+ return false;
+ }
+
// Used to control reads in the presense of uncommitted transactions
virtual NTable::ITransactionMapPtr GetReadTxMap(const TTableId& tableId) const = 0;
virtual NTable::ITransactionObserverPtr GetReadTxObserver(const TTableId& tableId) const = 0;
diff --git a/ydb/core/engine/mkql_proto.cpp b/ydb/core/engine/mkql_proto.cpp
index 6fcb2de9fb..1db52c6e37 100644
--- a/ydb/core/engine/mkql_proto.cpp
+++ b/ydb/core/engine/mkql_proto.cpp
@@ -9,161 +9,7 @@
#include <ydb/core/scheme_types/scheme_types_defs.h>
-namespace NKikimr {
-
-namespace NMiniKQL {
-
-namespace {
-
- Y_FORCE_INLINE NUdf::TUnboxedValue HandleKindDataImport(TType* type, const Ydb::Value& value) {
- auto dataType = static_cast<TDataType*>(type);
- switch (dataType->GetSchemeType()) {
- case NUdf::TDataType<bool>::Id:
- return NUdf::TUnboxedValuePod(value.bool_value());
- case NUdf::TDataType<ui8>::Id:
- return NUdf::TUnboxedValuePod(ui8(value.uint32_value()));
- case NUdf::TDataType<i8>::Id:
- return NUdf::TUnboxedValuePod(i8(value.int32_value()));
- case NUdf::TDataType<ui16>::Id:
- return NUdf::TUnboxedValuePod(ui16(value.uint32_value()));
- case NUdf::TDataType<i16>::Id:
- return NUdf::TUnboxedValuePod(i16(value.int32_value()));
- case NUdf::TDataType<i32>::Id:
- return NUdf::TUnboxedValuePod(value.int32_value());
- case NUdf::TDataType<ui32>::Id:
- return NUdf::TUnboxedValuePod(value.uint32_value());
- case NUdf::TDataType<i64>::Id:
- return NUdf::TUnboxedValuePod(value.int64_value());
- case NUdf::TDataType<ui64>::Id:
- return NUdf::TUnboxedValuePod(value.uint64_value());
- case NUdf::TDataType<float>::Id:
- return NUdf::TUnboxedValuePod(value.float_value());
- case NUdf::TDataType<double>::Id:
- return NUdf::TUnboxedValuePod(value.double_value());
- case NUdf::TDataType<NUdf::TJson>::Id:
- case NUdf::TDataType<NUdf::TUtf8>::Id:
- return MakeString(value.text_value());
- case NUdf::TDataType<NUdf::TDate>::Id:
- return NUdf::TUnboxedValuePod(ui16(value.uint32_value()));
- case NUdf::TDataType<NUdf::TDatetime>::Id:
- return NUdf::TUnboxedValuePod(value.uint32_value());
- case NUdf::TDataType<NUdf::TTimestamp>::Id:
- return NUdf::TUnboxedValuePod(value.uint64_value());
- case NUdf::TDataType<NUdf::TInterval>::Id:
- return NUdf::TUnboxedValuePod(value.int64_value());
- case NUdf::TDataType<NUdf::TJsonDocument>::Id:
- return ValueFromString(NUdf::EDataSlot::JsonDocument, value.text_value());
- case NUdf::TDataType<NUdf::TDyNumber>::Id:
- return ValueFromString(NUdf::EDataSlot::DyNumber, value.text_value());
- case NUdf::TDataType<NUdf::TDecimal>::Id:
- return NUdf::TUnboxedValuePod(NYql::NDecimal::FromHalfs(value.low_128(), value.high_128()));
- default:
- return MakeString(value.bytes_value());
- }
- }
-
-}
-
-NUdf::TUnboxedValue ImportValueFromProto(TType* type, const Ydb::Value& value, const THolderFactory& factory) {
- switch (type->GetKind()) {
- case TType::EKind::Void:
- return NUdf::TUnboxedValuePod::Void();
-
- case TType::EKind::Null:
- case TType::EKind::EmptyList:
- case TType::EKind::EmptyDict:
- return NUdf::TUnboxedValue();
-
- case TType::EKind::Data:
- return HandleKindDataImport(type, value);
-
- case TType::EKind::Optional: {
- auto optionalType = static_cast<TOptionalType*>(type);
- switch (value.value_case()) {
- case Ydb::Value::kNestedValue:
- return ImportValueFromProto(optionalType->GetItemType(), value.nested_value(), factory).MakeOptional();
- case Ydb::Value::kNullFlagValue:
- return NUdf::TUnboxedValue();
- default:
- return ImportValueFromProto(optionalType->GetItemType(), value, factory).MakeOptional();
- }
- }
-
- case TType::EKind::List: {
- auto listType = static_cast<TListType*>(type);
- auto itemType = listType->GetItemType();
- const auto& list = value.items();
- NUdf::TUnboxedValue *items = nullptr;
- auto array = factory.CreateDirectArrayHolder(list.size(), items);
- for (const auto& x : list) {
- *items++ = ImportValueFromProto(itemType, x, factory);
- }
-
- return std::move(array);
- }
-
- case TType::EKind::Struct: {
- auto structType = static_cast<TStructType*>(type);
- NUdf::TUnboxedValue* itemsPtr = nullptr;
- auto res = factory.CreateDirectArrayHolder(structType->GetMembersCount(), itemsPtr);
- for (ui32 index = 0; index < structType->GetMembersCount(); ++index) {
- auto memberType = structType->GetMemberType(index);
- itemsPtr[index] = ImportValueFromProto(memberType, value.items(index), factory);
- }
-
- return std::move(res);
- }
-
- case TType::EKind::Tuple: {
- auto tupleType = static_cast<TTupleType*>(type);
- NUdf::TUnboxedValue* itemsPtr = nullptr;
- auto res = factory.CreateDirectArrayHolder(tupleType->GetElementsCount(), itemsPtr);
- for (ui32 index = 0; index < tupleType->GetElementsCount(); ++index) {
- auto elementType = tupleType->GetElementType(index);
- itemsPtr[index] = ImportValueFromProto(elementType, value.items(index), factory);
- }
-
- return std::move(res);
- }
-
- case TType::EKind::Dict: {
- auto dictType = static_cast<TDictType*>(type);
- auto keyType = dictType->GetKeyType();
- auto payloadType = dictType->GetPayloadType();
- auto dictBuilder = factory.NewDict(dictType, NUdf::TDictFlags::EDictKind::Hashed);
-
- for (const auto& x : value.pairs()) {
- dictBuilder->Add(
- ImportValueFromProto(keyType, x.key(), factory),
- ImportValueFromProto(payloadType, x.payload(), factory)
- );
- }
-
- return dictBuilder->Build();
- }
-
- case TType::EKind::Variant: {
- auto variantType = static_cast<TVariantType*>(type);
- auto index = value.variant_index();
- auto unboxedValue = ImportValueFromProto(variantType->GetAlternativeType(index), value, factory);
- auto res = factory.CreateVariantHolder(std::move(unboxedValue.Release()), index);
- return std::move(res);
- }
-
- case TType::EKind::Tagged: {
- auto taggedType = static_cast<TTaggedType*>(type);
- auto unboxedValue = ImportValueFromProto(taggedType->GetBaseType(), value, factory);
- return std::move(unboxedValue);
- }
-
- case TType::EKind::Pg:
- // TODO: support pg types
- MKQL_ENSURE(false, "pg types are not supported");
-
- default:
- MKQL_ENSURE(false, TStringBuilder() << "Unknown kind: " << type->GetKindAsStr());
- }
-}
+namespace NKikimr::NMiniKQL {
// NOTE: TCell's can reference memomry from tupleValue
bool CellsFromTuple(const NKikimrMiniKQL::TType* tupleType,
@@ -424,5 +270,4 @@ bool CellToValue(NScheme::TTypeInfo type, const TCell& c, NKikimrMiniKQL::TValue
}
-} // namspace NMiniKQL
-} // namspace NKikimr
+} // namspace NKikimr::NMiniKQL
diff --git a/ydb/core/engine/mkql_proto.h b/ydb/core/engine/mkql_proto.h
index 06d1bbce15..1c316119c5 100644
--- a/ydb/core/engine/mkql_proto.h
+++ b/ydb/core/engine/mkql_proto.h
@@ -12,8 +12,6 @@ namespace NMiniKQL {
class THolderFactory;
-NUdf::TUnboxedValue ImportValueFromProto(TType* type, const Ydb::Value& value, const THolderFactory& factory);
-
// NOTE: TCell's can reference memomry from tupleValue
bool CellsFromTuple(const NKikimrMiniKQL::TType* tupleType,
const NKikimrMiniKQL::TValue& tupleValue,
diff --git a/ydb/core/formats/arrow_helpers.cpp b/ydb/core/formats/arrow_helpers.cpp
index 89b9a1af91..7ff35617a5 100644
--- a/ydb/core/formats/arrow_helpers.cpp
+++ b/ydb/core/formats/arrow_helpers.cpp
@@ -1141,6 +1141,43 @@ std::shared_ptr<arrow::RecordBatch> ConvertColumns(const std::shared_ptr<arrow::
return arrow::RecordBatch::Make(batch->schema(), batch->num_rows(), columns);
}
+static std::shared_ptr<arrow::Array> InplaceConvertColumn(const std::shared_ptr<arrow::Array>& column,
+ NScheme::TTypeInfo colType) {
+ switch (colType.GetTypeId()) {
+ case NScheme::NTypeIds::Timestamp: {
+ Y_VERIFY(arrow::is_primitive(column->type()->id()));
+ Y_VERIFY(arrow::bit_width(column->type()->id()) == 64);
+ return std::make_shared<arrow::TimestampArray>(column->data());
+ }
+ case NScheme::NTypeIds::Date: {
+ Y_VERIFY(arrow::is_primitive(column->type()->id()));
+ Y_VERIFY(arrow::bit_width(column->type()->id()) == 32);
+ return std::make_shared<arrow::Date32Array>(column->data());
+ }
+ default:
+ return {};
+ }
+}
+
+std::shared_ptr<arrow::RecordBatch> InplaceConvertColumns(const std::shared_ptr<arrow::RecordBatch>& batch,
+ const THashMap<TString, NScheme::TTypeInfo>& columnsToConvert) {
+ std::vector<std::shared_ptr<arrow::Array>> columns = batch->columns();
+ std::vector<std::shared_ptr<arrow::Field>> fields;
+ fields.reserve(batch->num_columns());
+ for (i32 i = 0; i < batch->num_columns(); ++i) {
+ auto& colName = batch->column_name(i);
+ auto it = columnsToConvert.find(TString(colName.data(), colName.size()));
+ if (it != columnsToConvert.end()) {
+ columns[i] = InplaceConvertColumn(columns[i], it->second);
+ }
+ fields.push_back(std::make_shared<arrow::Field>(colName, columns[i]->type()));
+ }
+ auto resultSchemaFixed = std::make_shared<arrow::Schema>(fields);
+ auto convertedBatch = arrow::RecordBatch::Make(resultSchemaFixed, batch->num_rows(), columns);
+ Y_VERIFY(convertedBatch->ValidateFull() == arrow::Status::OK());
+ return convertedBatch;
+}
+
bool TArrowToYdbConverter::Process(const arrow::RecordBatch& batch, TString& errorMessage) {
std::vector<std::shared_ptr<arrow::Array>> allColumns;
allColumns.reserve(YdbSchema.size());
diff --git a/ydb/core/formats/arrow_helpers.h b/ydb/core/formats/arrow_helpers.h
index 1736b93851..cfd6c8c4a1 100644
--- a/ydb/core/formats/arrow_helpers.h
+++ b/ydb/core/formats/arrow_helpers.h
@@ -188,6 +188,18 @@ public:
return false;
}
+ static bool NeedInplaceConversion(const NScheme::TTypeInfo& typeInRequest, const NScheme::TTypeInfo& expectedType) {
+ switch (expectedType.GetTypeId()) {
+ case NScheme::NTypeIds::Timestamp:
+ return typeInRequest.GetTypeId() == NScheme::NTypeIds::Int64;
+ case NScheme::NTypeIds::Date:
+ return typeInRequest.GetTypeId() == NScheme::NTypeIds::Uint16;
+ default:
+ break;
+ }
+ return false;
+ }
+
TArrowToYdbConverter(const TVector<std::pair<TString, NScheme::TTypeInfo>>& ydbSchema, IRowWriter& rowWriter)
: YdbSchema(ydbSchema)
, RowWriter(rowWriter)
@@ -207,6 +219,8 @@ public:
std::shared_ptr<arrow::RecordBatch> ConvertColumns(const std::shared_ptr<arrow::RecordBatch>& batch,
const THashMap<TString, NScheme::TTypeInfo>& columnsToConvert);
+std::shared_ptr<arrow::RecordBatch> InplaceConvertColumns(const std::shared_ptr<arrow::RecordBatch>& batch,
+ const THashMap<TString, NScheme::TTypeInfo>& columnsToConvert);
inline bool HasNulls(const std::shared_ptr<arrow::Array>& column) {
return column->null_bitmap_data();
diff --git a/ydb/core/formats/program.cpp b/ydb/core/formats/program.cpp
index b4cadbd9a1..420955a610 100644
--- a/ydb/core/formats/program.cpp
+++ b/ydb/core/formats/program.cpp
@@ -123,6 +123,12 @@ const char * GetFunctionName(EOperation op) {
return "binary_length";
case EOperation::MatchSubstring:
return "match_substring";
+ case EOperation::MatchLike:
+ return "match_like";
+ case EOperation::StartsWith:
+ return "starts_with";
+ case EOperation::EndsWith:
+ return "ends_with";
case EOperation::Acosh:
return "acosh";
@@ -186,7 +192,6 @@ EOperation ValidateOperation(EOperation op, ui32 argsSize) {
case EOperation::LessEqual:
case EOperation::Greater:
case EOperation::GreaterEqual:
- case EOperation::MatchSubstring:
case EOperation::And:
case EOperation::Or:
case EOperation::Xor:
@@ -228,6 +233,10 @@ EOperation ValidateOperation(EOperation op, ui32 argsSize) {
case EOperation::Invert:
case EOperation::Abs:
case EOperation::Negate:
+ case EOperation::StartsWith:
+ case EOperation::EndsWith:
+ case EOperation::MatchSubstring:
+ case EOperation::MatchLike:
if (argsSize == 1) {
return op;
}
diff --git a/ydb/core/formats/ssa_runtime_version.h b/ydb/core/formats/ssa_runtime_version.h
index 1b6f4d9611..7580e2fcf4 100644
--- a/ydb/core/formats/ssa_runtime_version.h
+++ b/ydb/core/formats/ssa_runtime_version.h
@@ -19,12 +19,12 @@ namespace NKikimr::NSsa {
// Bump this version every time incompatible runtime functions are introduced.
#ifndef SSA_RUNTIME_VERSION
-#define SSA_RUNTIME_VERSION 2U
+#define SSA_RUNTIME_VERSION 1U
#endif
// History:
-// v1 supports filter and cast(timestamp to uint64) pushdowns.
-// v2 supports COUNT(col), COUNT(*), SUM(), MIN(), MAX(), SOME() aggregations.
+// v1 is the version supported by kikimr-22-4. Supports filter and cast(timestamp to uint64) pushdowns.
+// v2 is the version supported by kikimr-23-1. Supports COUNT(col), COUNT(*), SUM(), MIN(), MAX(), AVG(), SOME() aggregations.
constexpr ui32 RuntimeVersion = SSA_RUNTIME_VERSION;
}
diff --git a/ydb/core/formats/ut_program_step.cpp b/ydb/core/formats/ut_program_step.cpp
index a043779ef3..30314eb642 100644
--- a/ydb/core/formats/ut_program_step.cpp
+++ b/ydb/core/formats/ut_program_step.cpp
@@ -56,68 +56,221 @@ size_t FilterTestUnary(std::vector<std::shared_ptr<arrow::Array>> args, EOperati
return batch->num_rows();
}
-void SumGroupBy(bool nullable, ui32 numKeys = 1, bool emptySrc = false) {
- std::optional<double> null;
- if (nullable) {
- null = 0;
+std::vector<bool> LikeTest(const std::vector<std::string>& data,
+ EOperation op, const std::string& pattern, bool ignoreCase = false)
+{
+ auto schema = std::make_shared<arrow::Schema>(std::vector{
+ std::make_shared<arrow::Field>("x", arrow::utf8())});
+ arrow::StringBuilder sb;
+ sb.AppendValues(data).ok();
+ auto batch = arrow::RecordBatch::Make(schema, data.size(), {*sb.Finish()});
+ UNIT_ASSERT(batch->ValidateFull().ok());
+
+ auto step = std::make_shared<TProgramStep>();
+ step->Assignes = {
+ TAssign("res", op, {"x"}, std::make_shared<arrow::compute::MatchSubstringOptions>(pattern, ignoreCase))
+ };
+ step->Projection = {"res"};
+ auto status = ApplyProgram(batch, TProgram({step}), GetCustomExecContext());
+ if (!status.ok()) {
+ Cerr << status.ToString() << "\n";
+ }
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT(batch->ValidateFull().ok());
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_columns(), 1);
+
+ auto& resColumn = static_cast<const arrow::BooleanArray&>(*batch->GetColumnByName("res"));
+ std::vector<bool> vec;
+ for (int i = 0; i < resColumn.length(); ++i) {
+ UNIT_ASSERT(!resColumn.IsNull(i)); // TODO
+ vec.push_back(resColumn.Value(i));
+ }
+ return vec;
+}
+
+enum class ETest {
+ DEFAULT,
+ EMPTY,
+ ONE_VALUE
+};
+
+struct TSumData {
+ static std::shared_ptr<arrow::RecordBatch> Data(ETest test,
+ std::shared_ptr<arrow::Schema>& schema,
+ bool nullable)
+ {
+ std::optional<double> null;
+ if (nullable) {
+ null = 0;
+ }
+
+ if (test == ETest::DEFAULT) {
+ return arrow::RecordBatch::Make(schema, 4, std::vector{NumVecToArray(arrow::int16(), {-1, 0, 0, -1}, null),
+ NumVecToArray(arrow::uint32(), {1, 0, 0, 1}, null)});
+ } else if (test == ETest::EMPTY) {
+ return arrow::RecordBatch::Make(schema, 0, std::vector{NumVecToArray(arrow::int16(), {}),
+ NumVecToArray(arrow::uint32(), {})});
+ } else if (test == ETest::ONE_VALUE) {
+ return arrow::RecordBatch::Make(schema, 1, std::vector{NumVecToArray(arrow::int16(), {1}),
+ NumVecToArray(arrow::uint32(), {0}, null)});
+ }
+ return {};
+ }
+
+ static void CheckResult(ETest test, const std::shared_ptr<arrow::RecordBatch>& batch, ui32 numKeys, bool nullable) {
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_columns(), numKeys + 2);
+ UNIT_ASSERT_EQUAL(batch->column(0)->type_id(), arrow::Type::INT64);
+ UNIT_ASSERT_EQUAL(batch->column(1)->type_id(), arrow::Type::UINT64);
+ UNIT_ASSERT_EQUAL(batch->column(2)->type_id(), arrow::Type::INT16);
+ if (numKeys == 2) {
+ UNIT_ASSERT_EQUAL(batch->column(3)->type_id(), arrow::Type::UINT32);
+ }
+
+ if (test == ETest::EMPTY) {
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), 0);
+ return;
+ }
+
+ auto& aggX = static_cast<arrow::Int64Array&>(*batch->column(0));
+ auto& aggY = static_cast<arrow::UInt64Array&>(*batch->column(1));
+ auto& colX = static_cast<arrow::Int16Array&>(*batch->column(2));
+
+ if (test == ETest::ONE_VALUE) {
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), 1);
+
+ UNIT_ASSERT_VALUES_EQUAL(aggX.Value(0), 1);
+ if (nullable) {
+ UNIT_ASSERT(aggY.IsNull(0));
+ } else {
+ UNIT_ASSERT(!aggY.IsNull(0));
+ UNIT_ASSERT_VALUES_EQUAL(aggY.Value(0), 0);
+ }
+ return;
+ }
+
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), 2);
+
+ for (ui32 row = 0; row < 2; ++row) {
+ if (colX.IsNull(row)) {
+ UNIT_ASSERT(aggX.IsNull(row));
+ UNIT_ASSERT(aggY.IsNull(row));
+ } else {
+ UNIT_ASSERT(!aggX.IsNull(row));
+ UNIT_ASSERT(!aggY.IsNull(row));
+ if (colX.Value(row) == 0) {
+ UNIT_ASSERT_VALUES_EQUAL(aggX.Value(row), 0);
+ UNIT_ASSERT_VALUES_EQUAL(aggY.Value(row), 0);
+ } else if (colX.Value(row) == -1) {
+ UNIT_ASSERT_VALUES_EQUAL(aggX.Value(row), -2);
+ UNIT_ASSERT_VALUES_EQUAL(aggY.Value(row), 2);
+ } else {
+ UNIT_ASSERT(false);
+ }
+ }
+ }
+ }
+};
+
+struct TMinMaxSomeData {
+ static std::shared_ptr<arrow::RecordBatch> Data(ETest /*test*/,
+ std::shared_ptr<arrow::Schema>& schema,
+ bool nullable)
+ {
+ std::optional<double> null;
+ if (nullable) {
+ null = 0;
+ }
+
+ return arrow::RecordBatch::Make(schema, 1, std::vector{NumVecToArray(arrow::int16(), {1}),
+ NumVecToArray(arrow::uint32(), {0}, null)});
+ }
+
+ static void CheckResult(ETest /*test*/, const std::shared_ptr<arrow::RecordBatch>& batch, ui32 numKeys,
+ bool nullable) {
+ UNIT_ASSERT_VALUES_EQUAL(numKeys, 1);
+
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_columns(), numKeys + 2);
+ UNIT_ASSERT_EQUAL(batch->column(0)->type_id(), arrow::Type::INT16);
+ UNIT_ASSERT_EQUAL(batch->column(1)->type_id(), arrow::Type::UINT32);
+ UNIT_ASSERT_EQUAL(batch->column(2)->type_id(), arrow::Type::INT16);
+
+ auto& aggX = static_cast<arrow::Int16Array&>(*batch->column(0));
+ auto& aggY = static_cast<arrow::UInt32Array&>(*batch->column(1));
+ auto& colX = static_cast<arrow::Int16Array&>(*batch->column(2));
+
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), 1);
+
+ UNIT_ASSERT_VALUES_EQUAL(colX.Value(0), 1);
+ UNIT_ASSERT_VALUES_EQUAL(aggX.Value(0), 1);
+ if (nullable) {
+ UNIT_ASSERT(aggY.IsNull(0));
+ } else {
+ UNIT_ASSERT(!aggY.IsNull(0));
+ UNIT_ASSERT_VALUES_EQUAL(aggY.Value(0), 0);
+ }
+ return;
}
+};
+void GroupByXY(bool nullable, ui32 numKeys, ETest test = ETest::DEFAULT,
+ EAggregate aggFunc = EAggregate::Sum) {
auto schema = std::make_shared<arrow::Schema>(std::vector{
std::make_shared<arrow::Field>("x", arrow::int16()),
std::make_shared<arrow::Field>("y", arrow::uint32())});
+
std::shared_ptr<arrow::RecordBatch> batch;
- if (emptySrc) {
- batch = arrow::RecordBatch::Make(schema, 0, std::vector{NumVecToArray(arrow::int16(), {}),
- NumVecToArray(arrow::uint32(), {})});
- } else {
- batch = arrow::RecordBatch::Make(schema, 4, std::vector{NumVecToArray(arrow::int16(), {-1, 0, 0, -1}, null),
- NumVecToArray(arrow::uint32(), {1, 0, 0, 1}, null)});
+ switch (aggFunc) {
+ case EAggregate::Sum:
+ batch = TSumData::Data(test, schema, nullable);
+ break;
+ case EAggregate::Min:
+ case EAggregate::Max:
+ case EAggregate::Some:
+ batch = TMinMaxSomeData::Data(test, schema, nullable);
+ break;
+ default:
+ break;
}
- UNIT_ASSERT(batch->ValidateFull().ok());
+ UNIT_ASSERT(batch);
+ auto status = batch->ValidateFull();
+ if (!status.ok()) {
+ Cerr << status.ToString() << "\n";
+ }
+ UNIT_ASSERT(status.ok());
auto step = std::make_shared<TProgramStep>();
step->GroupBy = {
- TAggregateAssign("sum_x", EAggregate::Sum, {"x"}),
- TAggregateAssign("sum_y", EAggregate::Sum, {"y"})
+ TAggregateAssign("agg_x", aggFunc, {"x"}),
+ TAggregateAssign("agg_y", aggFunc, {"y"})
};
step->GroupByKeys.push_back("x");
if (numKeys == 2) {
step->GroupByKeys.push_back("y");
}
- auto status = ApplyProgram(batch, TProgram({step}), GetCustomExecContext());
+ status = ApplyProgram(batch, TProgram({step}), GetCustomExecContext());
if (!status.ok()) {
Cerr << status.ToString() << "\n";
}
UNIT_ASSERT(status.ok());
- UNIT_ASSERT(batch->ValidateFull().ok());
- UNIT_ASSERT_VALUES_EQUAL(batch->num_columns(), numKeys + 2);
- UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), (emptySrc ? 0 : 2));
- UNIT_ASSERT_EQUAL(batch->column(0)->type_id(), arrow::Type::INT64);
- UNIT_ASSERT_EQUAL(batch->column(1)->type_id(), arrow::Type::UINT64);
- UNIT_ASSERT_EQUAL(batch->column(2)->type_id(), arrow::Type::INT16);
- if (numKeys == 2) {
- UNIT_ASSERT_EQUAL(batch->column(3)->type_id(), arrow::Type::UINT32);
- }
- if (emptySrc) {
- return;
+ status = batch->ValidateFull();
+ if (!status.ok()) {
+ Cerr << status.ToString() << "\n";
}
+ UNIT_ASSERT(status.ok());
- auto& sumX = static_cast<arrow::Int64Array&>(*batch->column(0));
- auto& sumY = static_cast<arrow::UInt64Array&>(*batch->column(1));
- auto& colX = static_cast<arrow::Int16Array&>(*batch->column(2));
-
- for (ui32 row = 0; row < 2; ++row) {
- if (colX.IsNull(row) || colX.Value(row) == 0) {
- UNIT_ASSERT_VALUES_EQUAL(sumX.Value(row), 0);
- UNIT_ASSERT_VALUES_EQUAL(sumY.Value(row), 0);
- } else if (colX.Value(row) == -1) {
- UNIT_ASSERT_VALUES_EQUAL(sumX.Value(row), -2);
- UNIT_ASSERT_VALUES_EQUAL(sumY.Value(row), 2);
- } else {
- UNIT_ASSERT(false);
- }
+ switch (aggFunc) {
+ case EAggregate::Sum:
+ TSumData::CheckResult(test, batch, numKeys, nullable);
+ break;
+ case EAggregate::Min:
+ case EAggregate::Max:
+ case EAggregate::Some:
+ TMinMaxSomeData::CheckResult(test, batch, numKeys, nullable);
+ break;
+ default:
+ break;
}
}
@@ -240,6 +393,60 @@ Y_UNIT_TEST_SUITE(ProgramStep) {
UNIT_ASSERT(FilterTestUnary({x, z->make_array()}, EOperation::Invert, EOperation::Equal) == 3);
}
+ Y_UNIT_TEST(StartsWith) {
+ std::vector<bool> res = LikeTest({"aa", "abaaba", "baa", ""}, EOperation::StartsWith, "aa");
+ UNIT_ASSERT_VALUES_EQUAL(res.size(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(res[0], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[1], false);
+ UNIT_ASSERT_VALUES_EQUAL(res[2], false);
+ UNIT_ASSERT_VALUES_EQUAL(res[3], false);
+ }
+
+ Y_UNIT_TEST(EndsWith) {
+ std::vector<bool> res = LikeTest({"aa", "abaaba", "baa", ""}, EOperation::EndsWith, "aa");
+ UNIT_ASSERT_VALUES_EQUAL(res.size(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(res[0], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[1], false);
+ UNIT_ASSERT_VALUES_EQUAL(res[2], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[3], false);
+ }
+
+ Y_UNIT_TEST(MatchSubstring) {
+ std::vector<bool> res = LikeTest({"aa", "abaaba", "baa", ""}, EOperation::MatchSubstring, "aa");
+ UNIT_ASSERT_VALUES_EQUAL(res.size(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(res[0], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[1], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[2], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[3], false);
+ }
+
+ Y_UNIT_TEST(StartsWithIgnoreCase) {
+ std::vector<bool> res = LikeTest({"Aa", "abAaba", "baA", ""}, EOperation::StartsWith, "aA", true);
+ UNIT_ASSERT_VALUES_EQUAL(res.size(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(res[0], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[1], false);
+ UNIT_ASSERT_VALUES_EQUAL(res[2], false);
+ UNIT_ASSERT_VALUES_EQUAL(res[3], false);
+ }
+
+ Y_UNIT_TEST(EndsWithIgnoreCase) {
+ std::vector<bool> res = LikeTest({"Aa", "abAaba", "baA", ""}, EOperation::EndsWith, "aA", true);
+ UNIT_ASSERT_VALUES_EQUAL(res.size(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(res[0], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[1], false);
+ UNIT_ASSERT_VALUES_EQUAL(res[2], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[3], false);
+ }
+
+ Y_UNIT_TEST(MatchSubstringIgnoreCase) {
+ std::vector<bool> res = LikeTest({"Aa", "abAaba", "baA", ""}, EOperation::MatchSubstring, "aA", true);
+ UNIT_ASSERT_VALUES_EQUAL(res.size(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(res[0], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[1], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[2], true);
+ UNIT_ASSERT_VALUES_EQUAL(res[3], false);
+ }
+
Y_UNIT_TEST(ScalarTest) {
auto schema = std::make_shared<arrow::Schema>(std::vector{
std::make_shared<arrow::Field>("x", arrow::int64()),
@@ -326,18 +533,34 @@ Y_UNIT_TEST_SUITE(ProgramStep) {
}
Y_UNIT_TEST(SumGroupBy) {
- SumGroupBy(true);
- SumGroupBy(true, 2);
+ GroupByXY(true, 1);
+ GroupByXY(true, 2);
+
+ GroupByXY(true, 1, ETest::EMPTY);
+ GroupByXY(true, 2, ETest::EMPTY);
- SumGroupBy(true, 1, true);
- SumGroupBy(true, 2, true);
+ GroupByXY(true, 1, ETest::ONE_VALUE);
}
Y_UNIT_TEST(SumGroupByNotNull) {
- SumGroupBy(false);
- SumGroupBy(false, 2);
+ GroupByXY(false, 1);
+ GroupByXY(false, 2);
+
+ GroupByXY(false, 1, ETest::EMPTY);
+ GroupByXY(false, 2, ETest::EMPTY);
+
+ GroupByXY(false, 1, ETest::ONE_VALUE);
+ }
+
+ Y_UNIT_TEST(MinMaxSomeGroupBy) {
+ GroupByXY(true, 1, ETest::ONE_VALUE, EAggregate::Min);
+ GroupByXY(true, 1, ETest::ONE_VALUE, EAggregate::Max);
+ GroupByXY(true, 1, ETest::ONE_VALUE, EAggregate::Some);
+ }
- SumGroupBy(false, 1, true);
- SumGroupBy(false, 2, true);
+ Y_UNIT_TEST(MinMaxSomeGroupByNotNull) {
+ GroupByXY(false, 1, ETest::ONE_VALUE, EAggregate::Min);
+ GroupByXY(false, 1, ETest::ONE_VALUE, EAggregate::Max);
+ GroupByXY(false, 1, ETest::ONE_VALUE, EAggregate::Some);
}
}
diff --git a/ydb/core/grpc_services/base/base.h b/ydb/core/grpc_services/base/base.h
index 197368c7a0..c710c003a3 100644
--- a/ydb/core/grpc_services/base/base.h
+++ b/ydb/core/grpc_services/base/base.h
@@ -16,6 +16,7 @@
#include <ydb/library/yql/public/issue/yql_issue.h>
#include <ydb/library/yql/public/issue/yql_issue_message.h>
#include <ydb/library/yql/public/issue/yql_issue_manager.h>
+#include <ydb/library/aclib/aclib.h>
#include <ydb/core/grpc_services/counters/proxy_counters.h>
#include <ydb/core/grpc_streaming/grpc_streaming.h>
@@ -105,6 +106,7 @@ struct TRpcServices {
EvStreamTopicWrite,
EvStreamTopicRead,
EvPQReadInfo,
+ EvTopicCommitOffset,
EvListOperations,
EvExportToYt,
EvDiscoverPQClusters,
@@ -251,7 +253,10 @@ public:
// Returns client provided database name
virtual const TMaybe<TString> GetDatabaseName() const = 0;
// Returns "internal" token (result of ticket parser authentication)
- virtual const TString& GetInternalToken() const = 0;
+ virtual const TIntrusiveConstPtr<NACLib::TUserToken>& GetInternalToken() const = 0;
+ // Returns internal token as a serialized message.
+ virtual const TString& GetSerializedToken() const = 0;
+ virtual bool IsClientLost() const = 0;
};
class IRequestCtxBase : public virtual IRequestCtxBaseMtSafe {
@@ -350,7 +355,7 @@ public:
// auth
virtual const TMaybe<TString> GetYdbToken() const = 0;
virtual void UpdateAuthState(NGrpc::TAuthState::EAuthState state) = 0;
- virtual void SetInternalToken(const TString& token) = 0;
+ virtual void SetInternalToken(const TIntrusiveConstPtr<NACLib::TUserToken>& token) = 0;
virtual const NGrpc::TAuthState& GetAuthState() const = 0;
virtual void ReplyUnauthenticated(const TString& msg = "") = 0;
virtual void ReplyUnavaliable() = 0;
@@ -477,7 +482,7 @@ public:
State_.State = state;
}
- void SetInternalToken(const TString& token) override {
+ void SetInternalToken(const TIntrusiveConstPtr<NACLib::TUserToken>& token) override {
InternalToken_ = token;
}
@@ -493,10 +498,18 @@ public:
return State_;
}
- const TString& GetInternalToken() const override {
+ const TIntrusiveConstPtr<NACLib::TUserToken>& GetInternalToken() const override {
return InternalToken_;
}
+ const TString& GetSerializedToken() const override {
+ if (InternalToken_) {
+ return InternalToken_->GetSerializedToken();
+ }
+
+ return EmptySerializedTokenMessage_;
+ }
+
TString GetPeerName() const override {
return {};
}
@@ -504,6 +517,10 @@ public:
void SetRlPath(TMaybe<NRpcService::TRlPath>&&) override {
}
+ bool IsClientLost() const override {
+ return false;
+ }
+
TMaybe<NRpcService::TRlPath> GetRlPath() const override {
return Nothing();
}
@@ -602,7 +619,8 @@ private:
const TString Database_;
const TActorId From_;
NGrpc::TAuthState State_;
- TString InternalToken_;
+ TIntrusiveConstPtr<NACLib::TUserToken> InternalToken_;
+ const TString EmptySerializedTokenMessage_;
NYql::TIssueManager IssueManager_;
};
@@ -656,6 +674,11 @@ public:
, RlAllowed_(rlAllowed)
{ }
+ bool IsClientLost() const override {
+ // TODO: Implement for BiDirectional streaming
+ return false;
+ }
+
TRateLimiterMode GetRlMode() const override {
return RlAllowed_ ? RateLimitMode : TRateLimiterMode::Off;
}
@@ -715,7 +738,7 @@ public:
IssueManager_.RaiseIssues(issues);
}
- void SetInternalToken(const TString& token) override {
+ void SetInternalToken(const TIntrusiveConstPtr<NACLib::TUserToken>& token) override {
InternalToken_ = token;
}
@@ -727,10 +750,18 @@ public:
return RlPath_;
}
- const TString& GetInternalToken() const override {
+ const TIntrusiveConstPtr<NACLib::TUserToken>& GetInternalToken() const override {
return InternalToken_;
}
+ const TString& GetSerializedToken() const override {
+ if (InternalToken_) {
+ return InternalToken_->GetSerializedToken();
+ }
+
+ return EmptySerializedTokenMessage_;
+ }
+
TString GetPeerName() const override {
return Ctx_->GetPeerName();
}
@@ -810,7 +841,8 @@ public:
private:
TIntrusivePtr<IStreamCtx> Ctx_;
- TString InternalToken_;
+ TIntrusiveConstPtr<NACLib::TUserToken> InternalToken_;
+ const TString EmptySerializedTokenMessage_;
NYql::TIssueManager IssueManager_;
TMaybe<NRpcService::TRlPath> RlPath_;
bool RlAllowed_;
@@ -959,7 +991,7 @@ public:
Ctx_->ReplyUnauthenticated(MakeAuthError(in, IssueManager));
}
- void SetInternalToken(const TString& token) override {
+ void SetInternalToken(const TIntrusiveConstPtr<NACLib::TUserToken>& token) override {
InternalToken_ = token;
}
@@ -972,10 +1004,18 @@ public:
Ctx_->AddTrailingMetadata(NYdb::YDB_CONSUMED_UNITS_HEADER, IntToString<10>(ru));
}
- const TString& GetInternalToken() const override {
+ const TIntrusiveConstPtr<NACLib::TUserToken>& GetInternalToken() const override {
return InternalToken_;
}
+ const TString& GetSerializedToken() const override {
+ if (InternalToken_) {
+ return InternalToken_->GetSerializedToken();
+ }
+
+ return EmptySerializedTokenMessage_;
+ }
+
const TMaybe<TString> GetPeerMetaValues(const TString& key) const override {
return ToMaybe(Ctx_->GetPeerMetaValues(key));
}
@@ -1119,6 +1159,10 @@ public:
Ctx_->GetFinishFuture().Subscribe(std::move(shutdown));
}
+ bool IsClientLost() const override {
+ return Ctx_->IsClientLost();
+ }
+
void FinishStream() override {
Ctx_->FinishStreamingOk();
}
@@ -1174,7 +1218,8 @@ private:
private:
TIntrusivePtr<NGrpc::IRequestContextBase> Ctx_;
- TString InternalToken_;
+ TIntrusiveConstPtr<NACLib::TUserToken> InternalToken_;
+ const TString EmptySerializedTokenMessage_;
NYql::TIssueManager IssueManager;
Ydb::CostInfo* CostInfo = nullptr;
Ydb::QuotaExceeded* QuotaExceeded = nullptr;
diff --git a/ydb/core/grpc_services/base/base_service.h b/ydb/core/grpc_services/base/base_service.h
index 1c6f6f6432..d94ab49242 100644
--- a/ydb/core/grpc_services/base/base_service.h
+++ b/ydb/core/grpc_services/base/base_service.h
@@ -27,15 +27,49 @@ class TGrpcServiceBase
, public TGrpcServiceCfg
{
public:
- TGrpcServiceBase(NActors::TActorSystem *system, TIntrusivePtr<::NMonitoring::TDynamicCounters> counters, NActors::TActorId id, bool rlAllowed)
- : TGrpcServiceCfg(rlAllowed)
- , ActorSystem_(system)
- , Counters_(counters)
- , GRpcRequestProxyId_(id)
-{ }
+ TGrpcServiceBase(NActors::TActorSystem *system,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters,
+ const NActors::TActorId& proxyId,
+ bool rlAllowed)
+ : TGrpcServiceCfg(rlAllowed)
+ , ActorSystem_(system)
+ , Counters_(counters)
+ , GRpcRequestProxyId_(proxyId)
+ , GRpcProxies_{proxyId}
+ {
+ }
+
+ TGrpcServiceBase(NActors::TActorSystem *system,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters,
+ const TVector<NActors::TActorId>& proxies,
+ bool rlAllowed)
+ : TGrpcServiceCfg(rlAllowed)
+ , ActorSystem_(system)
+ , Counters_(counters)
+ , GRpcRequestProxyId_(proxies[0])
+ , GRpcProxies_(proxies)
+ {
+ Y_VERIFY(proxies.size());
+ }
+
+ void InitService(
+ const std::vector<std::unique_ptr<grpc::ServerCompletionQueue>>& cqs,
+ NGrpc::TLoggerPtr logger,
+ size_t index) override
+ {
+ CQS.reserve(cqs.size());
+ for (auto& cq: cqs) {
+ CQS.push_back(cq.get());
+ }
+
+ CQ_ = CQS[index % cqs.size()];
+
+ // note that we might call an overloaded InitService(), and not the one from this class
+ InitService(CQ_, logger);
+ }
void InitService(grpc::ServerCompletionQueue* cq, NGrpc::TLoggerPtr logger) override {
- CQ_ = cq;
+ CQ_ = cq; // might be self assignment, but it's OK
SetupIncomingRequests(std::move(logger));
}
@@ -58,8 +92,11 @@ protected:
NActors::TActorSystem* ActorSystem_;
grpc::ServerCompletionQueue* CQ_ = nullptr;
+ std::vector<grpc::ServerCompletionQueue*> CQS;
+
TIntrusivePtr<::NMonitoring::TDynamicCounters> Counters_;
const NActors::TActorId GRpcRequestProxyId_;
+ const TVector<NActors::TActorId> GRpcProxies_;
NGrpc::TGlobalLimiter* Limiter_ = nullptr;
};
diff --git a/ydb/core/grpc_services/cancelation/cancelation.cpp b/ydb/core/grpc_services/cancelation/cancelation.cpp
index 4b12dc9b53..3713607859 100644
--- a/ydb/core/grpc_services/cancelation/cancelation.cpp
+++ b/ydb/core/grpc_services/cancelation/cancelation.cpp
@@ -13,16 +13,15 @@ void PassSubscription(const TEvSubscribeGrpcCancel* ev, IRequestCtxMtSafe* reque
NActors::TActorSystem* as)
{
auto subscriber = ActorIdFromProto(ev->Record.GetSubscriber());
- auto tag = ev->Record.GetWakeupTag();
- requestCtx->SetClientLostAction([subscriber, tag, as]() {
- as->Send(subscriber, new TEvents::TEvWakeup(tag));
+ requestCtx->SetClientLostAction([subscriber, as]() {
+ as->Send(subscriber, new TEvClientLost);
});
}
void SubscribeRemoteCancel(const NActors::TActorId& service, const NActors::TActorId& subscriber,
- ui64 wakeupTag, NActors::TActorSystem* as)
+ NActors::TActorSystem* as)
{
- as->Send(service, new TEvSubscribeGrpcCancel(subscriber, wakeupTag));
+ as->Send(service, new TEvSubscribeGrpcCancel(subscriber));
}
}
diff --git a/ydb/core/grpc_services/cancelation/cancelation.h b/ydb/core/grpc_services/cancelation/cancelation.h
index ffe13eaaf4..fe4fe253ef 100644
--- a/ydb/core/grpc_services/cancelation/cancelation.h
+++ b/ydb/core/grpc_services/cancelation/cancelation.h
@@ -12,7 +12,7 @@ void PassSubscription(const TEvSubscribeGrpcCancel* ev, IRequestCtxMtSafe* reque
NActors::TActorSystem* as);
void SubscribeRemoteCancel(const NActors::TActorId& service, const NActors::TActorId& subscriber,
- ui64 wakeupTag, NActors::TActorSystem* as);
+ NActors::TActorSystem* as);
}
}
diff --git a/ydb/core/grpc_services/cancelation/cancelation_event.h b/ydb/core/grpc_services/cancelation/cancelation_event.h
index 6fa8800861..c814373f61 100644
--- a/ydb/core/grpc_services/cancelation/cancelation_event.h
+++ b/ydb/core/grpc_services/cancelation/cancelation_event.h
@@ -8,16 +8,20 @@ namespace NGRpcService {
enum EServiceId {
EvSubscribeGrpcCancel = EventSpaceBegin(TKikimrEvents::ES_GRPC_CANCELATION),
+ EvClientLost
};
struct TEvSubscribeGrpcCancel : public TEventPB<TEvSubscribeGrpcCancel, NKikimrGRpcService::TEvSubscribeGrpcCancel, EvSubscribeGrpcCancel> {
TEvSubscribeGrpcCancel() = default;
- TEvSubscribeGrpcCancel(const NActors::TActorId& subscriber, ui64 wakeupTag) {
+ TEvSubscribeGrpcCancel(const NActors::TActorId& subscriber) {
ActorIdToProto(subscriber, Record.MutableSubscriber());
- Record.SetWakeupTag(wakeupTag);
}
};
+struct TEvClientLost : public TEventPB<TEvClientLost, NKikimrGRpcService::TEvClientLost, EvClientLost> {
+ TEvClientLost() = default;
+};
+
}
}
diff --git a/ydb/core/grpc_services/cancelation/protos/event.proto b/ydb/core/grpc_services/cancelation/protos/event.proto
index 00eae69fd9..4153722919 100644
--- a/ydb/core/grpc_services/cancelation/protos/event.proto
+++ b/ydb/core/grpc_services/cancelation/protos/event.proto
@@ -4,6 +4,7 @@ package NKikimrGRpcService;
message TEvSubscribeGrpcCancel {
optional NActorsProto.TActorId Subscriber = 1;
- optional uint64 WakeupTag = 2;
};
+message TEvClientLost {
+};
diff --git a/ydb/core/grpc_services/grpc_request_check_actor.h b/ydb/core/grpc_services/grpc_request_check_actor.h
index e1cd950744..ad9458b285 100644
--- a/ydb/core/grpc_services/grpc_request_check_actor.h
+++ b/ydb/core/grpc_services/grpc_request_check_actor.h
@@ -29,7 +29,7 @@ class TGrpcRequestCheckActor
using TBase = TActorBootstrappedSecureRequest<TGrpcRequestCheckActor>;
public:
void OnAccessDenied(const TEvTicketParser::TError& error, const TActorContext& ctx) {
- LOG_ERROR(ctx, NKikimrServices::GRPC_SERVER, error.ToString());
+ LOG_INFO(ctx, NKikimrServices::GRPC_SERVER, error.ToString());
if (error.Retryable) {
GrpcRequestBaseCtx_->UpdateAuthState(NGrpc::TAuthState::AS_UNAVAILABLE);
} else {
@@ -197,9 +197,16 @@ public:
}
void SetTokenAndDie() {
- GrpcRequestBaseCtx_->UpdateAuthState(NGrpc::TAuthState::AS_OK);
- GrpcRequestBaseCtx_->SetInternalToken(TBase::GetSerializedToken());
- ReplyBackAndDie();
+ if (GrpcRequestBaseCtx_->IsClientLost()) {
+ LOG_DEBUG(*TlsActivationContext, NKikimrServices::GRPC_SERVER,
+ "Client was disconnected before processing request (check actor)");
+ const NYql::TIssues issues;
+ ReplyUnavailableAndDie(issues);
+ } else {
+ GrpcRequestBaseCtx_->UpdateAuthState(NGrpc::TAuthState::AS_OK);
+ GrpcRequestBaseCtx_->SetInternalToken(TBase::GetParsedToken());
+ ReplyBackAndDie();
+ }
}
STATEFN(DbAccessStateFunc) {
@@ -236,7 +243,7 @@ private:
break;
case Ydb::StatusIds::TIMEOUT:
Counters_->IncDatabaseRateLimitedCounter();
- LOG_ERROR(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "Throughput limit exceeded");
+ LOG_INFO(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "Throughput limit exceeded");
ReplyOverloadedAndDie(MakeIssue(NKikimrIssues::TIssuesIds::YDB_RESOURCE_USAGE_LIMITED, "Throughput limit exceeded"));
break;
default:
@@ -401,7 +408,8 @@ private:
}
const ui32 access = NACLib::ConnectDatabase;
- if (SecurityObject_->CheckAccess(access, TBase::GetSerializedToken())) {
+ const auto& parsedToken = TBase::GetParsedToken();
+ if (parsedToken && SecurityObject_->CheckAccess(access, *parsedToken)) {
return {false, std::nullopt};
}
@@ -418,7 +426,7 @@ private:
return {false, std::nullopt};
}
- LOG_ERROR(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", error.c_str());
+ LOG_INFO(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", error.c_str());
return {true, MakeIssue(NKikimrIssues::TIssuesIds::ACCESS_DENIED, error)};
}
diff --git a/ydb/core/grpc_services/grpc_request_proxy.cpp b/ydb/core/grpc_services/grpc_request_proxy.cpp
index 1188eb13d9..c52bf5fc46 100644
--- a/ydb/core/grpc_services/grpc_request_proxy.cpp
+++ b/ydb/core/grpc_services/grpc_request_proxy.cpp
@@ -236,6 +236,14 @@ private:
return;
}
+ if (requestBaseCtx->IsClientLost()) {
+ // Any status here
+ LOG_DEBUG(*TlsActivationContext, NKikimrServices::GRPC_SERVER,
+ "Client was disconnected before processing request (grpc request proxy)");
+ requestBaseCtx->ReplyWithYdbStatus(Ydb::StatusIds::UNAVAILABLE);
+ return;
+ }
+
Register(CreateGrpcRequestCheckActor<TEvent>(SelfId(),
database->SchemeBoardResult->DescribeSchemeResult,
database->SecurityObject, event.Release(), Counters, skipCheckConnectRigths));
@@ -491,7 +499,7 @@ void LogRequest(const TEvent& event) {
};
if constexpr (std::is_same_v<TEvListEndpointsRequest::TPtr, TEvent>) {
- LOG_NOTICE(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", getDebugString().c_str());
+ LOG_INFO(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", getDebugString().c_str());
}
else {
LOG_DEBUG(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", getDebugString().c_str());
@@ -528,6 +536,7 @@ void TGRpcRequestProxyImpl::StateFunc(TAutoPtr<IEventHandle>& ev, const TActorCo
HFunc(TEvStreamPQMigrationReadRequest, PreHandle);
HFunc(TEvStreamTopicWriteRequest, PreHandle);
HFunc(TEvStreamTopicReadRequest, PreHandle);
+ HFunc(TEvCommitOffsetRequest, PreHandle);
HFunc(TEvPQReadInfoRequest, PreHandle);
HFunc(TEvPQDropTopicRequest, PreHandle);
HFunc(TEvPQCreateTopicRequest, PreHandle);
diff --git a/ydb/core/grpc_services/grpc_request_proxy.h b/ydb/core/grpc_services/grpc_request_proxy.h
index d1390c47b8..c57a52e69a 100644
--- a/ydb/core/grpc_services/grpc_request_proxy.h
+++ b/ydb/core/grpc_services/grpc_request_proxy.h
@@ -35,11 +35,11 @@ public:
struct TEvRefreshTokenResponse : public TEventLocal<TEvRefreshTokenResponse, EvRefreshTokenResponse> {
bool Authenticated;
- TString InternalToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> InternalToken;
bool Retryable;
NYql::TIssues Issues;
- TEvRefreshTokenResponse(bool ok, const TString& token, bool retryable, const NYql::TIssues& issues)
+ TEvRefreshTokenResponse(bool ok, const TIntrusiveConstPtr<NACLib::TUserToken>& token, bool retryable, const NYql::TIssues& issues)
: Authenticated(ok)
, InternalToken(token)
, Retryable(retryable)
@@ -55,6 +55,7 @@ protected:
void Handle(TEvStreamPQMigrationReadRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvStreamTopicWriteRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvStreamTopicReadRequest::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvCommitOffsetRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPQReadInfoRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPQDropTopicRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPQCreateTopicRequest::TPtr& ev, const TActorContext& ctx);
@@ -75,8 +76,13 @@ protected:
TActorId DiscoveryCacheActorID;
};
-inline TActorId CreateGRpcRequestProxyId() {
- const auto actorId = TActorId(0, "GRpcReqProxy");
+inline TActorId CreateGRpcRequestProxyId(int n = 0) {
+ if (n == 0) {
+ const auto actorId = TActorId(0, "GRpcReqProxy");
+ return actorId;
+ }
+
+ const auto actorId = TActorId(0, TStringBuilder() << "GRpcReqPro" << n);
return actorId;
}
diff --git a/ydb/core/grpc_services/grpc_request_proxy_simple.cpp b/ydb/core/grpc_services/grpc_request_proxy_simple.cpp
index 0fe48eff99..dc21ded655 100644
--- a/ydb/core/grpc_services/grpc_request_proxy_simple.cpp
+++ b/ydb/core/grpc_services/grpc_request_proxy_simple.cpp
@@ -189,7 +189,7 @@ void LogRequest(const TEvent& event) {
};
if constexpr (std::is_same_v<TEvListEndpointsRequest::TPtr, TEvent>) {
- LOG_NOTICE(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", getDebugString().c_str());
+ LOG_INFO(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", getDebugString().c_str());
}
else {
LOG_DEBUG(*TlsActivationContext, NKikimrServices::GRPC_SERVER, "%s", getDebugString().c_str());
diff --git a/ydb/core/grpc_services/local_rate_limiter.cpp b/ydb/core/grpc_services/local_rate_limiter.cpp
index 5f4a9c7d1e..fffcbf6bcc 100644
--- a/ydb/core/grpc_services/local_rate_limiter.cpp
+++ b/ydb/core/grpc_services/local_rate_limiter.cpp
@@ -89,7 +89,7 @@ TActorId RateLimiterAcquireUseSameMailbox(
return RateLimiterAcquireUseSameMailbox(
std::move(request),
reqCtx.GetDatabaseName().GetOrElse(""),
- reqCtx.GetInternalToken(),
+ reqCtx.GetSerializedToken(),
std::move(cb),
ctx);
}
diff --git a/ydb/core/grpc_services/local_rpc/local_rpc.h b/ydb/core/grpc_services/local_rpc/local_rpc.h
index e6a87677c6..8bee988b85 100644
--- a/ydb/core/grpc_services/local_rpc/local_rpc.h
+++ b/ydb/core/grpc_services/local_rpc/local_rpc.h
@@ -34,8 +34,9 @@ public:
: Request(std::forward<TProto>(req))
, CbWrapper(std::forward<TCb>(cb))
, DatabaseName(databaseName)
- , InternalToken(token)
- {}
+ {
+ InternalToken = new NACLib::TUserToken(token);
+ }
bool HasClientCapability(const TString&) const override {
return false;
@@ -47,10 +48,17 @@ public:
return DatabaseName;
}
- const TString& GetInternalToken() const override {
+ const TIntrusiveConstPtr<NACLib::TUserToken>& GetInternalToken() const override {
return InternalToken;
}
+ const TString& GetSerializedToken() const override {
+ if (InternalToken) {
+ return InternalToken->GetSerializedToken();
+ }
+ return EmptySerializedTokenMessage_;
+ }
+
const TMaybe<TString> GetPeerMetaValues(const TString&) const override {
Y_FAIL("Unimplemented");
return TMaybe<TString>{};
@@ -148,6 +156,8 @@ public:
void SetClientLostAction(std::function<void()>&&) override {}
+ bool IsClientLost() const override { return false; }
+
void AddServerHint(const TString&) override {}
void SetRuHeader(ui64) override {}
@@ -212,7 +222,8 @@ private:
typename TRpc::TRequest Request;
TCbWrapper CbWrapper;
const TString DatabaseName;
- const TString InternalToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> InternalToken;
+ const TString EmptySerializedTokenMessage_;
NYql::TIssueManager IssueManager;
google::protobuf::Arena Arena;
diff --git a/ydb/core/grpc_services/query/rpc_execute_query.cpp b/ydb/core/grpc_services/query/rpc_execute_query.cpp
index 27fbc44d33..e34e7f53ef 100644
--- a/ydb/core/grpc_services/query/rpc_execute_query.cpp
+++ b/ydb/core/grpc_services/query/rpc_execute_query.cpp
@@ -37,6 +37,10 @@ std::tuple<Ydb::StatusIds::StatusCode, NYql::TIssues> FillKqpRequest(
kqpRequest.MutableRequest()->SetType(NKikimrKqp::QUERY_TYPE_SQL_QUERY);
kqpRequest.MutableRequest()->SetKeepSession(false);
+ // TODO: Use tx control from request.
+ kqpRequest.MutableRequest()->MutableTxControl()->mutable_begin_tx()->mutable_serializable_read_write();
+ kqpRequest.MutableRequest()->MutableTxControl()->set_commit_tx(true);
+
switch (req.query_case()) {
case Ydb::Query::ExecuteQueryRequest::kQueryContent: {
NYql::TIssues issues;
diff --git a/ydb/core/grpc_services/rpc_alter_table.cpp b/ydb/core/grpc_services/rpc_alter_table.cpp
index e11ea224d3..212ea5694c 100644
--- a/ydb/core/grpc_services/rpc_alter_table.cpp
+++ b/ydb/core/grpc_services/rpc_alter_table.cpp
@@ -149,8 +149,8 @@ public:
TBase::Bootstrap(ctx);
const auto& req = GetProtoRequest();
- if (!Request_->GetInternalToken().empty()) {
- UserToken = MakeHolder<NACLib::TUserToken>(Request_->GetInternalToken());
+ if (!Request_->GetSerializedToken().empty()) {
+ UserToken = MakeHolder<NACLib::TUserToken>(Request_->GetSerializedToken());
}
auto ops = GetOps();
diff --git a/ydb/core/grpc_services/rpc_calls.cpp b/ydb/core/grpc_services/rpc_calls.cpp
index 0dae748213..0bb41f28b6 100644
--- a/ydb/core/grpc_services/rpc_calls.cpp
+++ b/ydb/core/grpc_services/rpc_calls.cpp
@@ -76,14 +76,14 @@ void RefreshToken(const TString& token, const TString& database, const TActorCon
void TRefreshTokenImpl::ReplyUnauthenticated(const TString&) {
TActivationContext::Send(new IEventHandle(From_, TActorId(),
new TGRpcRequestProxy::TEvRefreshTokenResponse
- { false, "", false, IssueManager_.GetIssues()}));
+ { false, nullptr, false, IssueManager_.GetIssues()}));
}
void TRefreshTokenImpl::ReplyUnavaliable() {
const TActorContext& ctx = TActivationContext::AsActorContext();
ctx.Send(From_,
new TGRpcRequestProxy::TEvRefreshTokenResponse
- { false, "", true, IssueManager_.GetIssues()});
+ { false, nullptr, true, IssueManager_.GetIssues()});
}
} // namespace NGRpcService
diff --git a/ydb/core/grpc_services/rpc_calls.h b/ydb/core/grpc_services/rpc_calls.h
index 332e21ff47..5a666d68ed 100644
--- a/ydb/core/grpc_services/rpc_calls.h
+++ b/ydb/core/grpc_services/rpc_calls.h
@@ -53,6 +53,7 @@ using TEvStreamPQWriteRequest = TGRpcRequestBiStreamWrapper<TRpcServices::EvStre
using TEvStreamPQMigrationReadRequest = TGRpcRequestBiStreamWrapper<TRpcServices::EvStreamPQMigrationRead, Ydb::PersQueue::V1::MigrationStreamingReadClientMessage, Ydb::PersQueue::V1::MigrationStreamingReadServerMessage>;
using TEvStreamTopicWriteRequest = TGRpcRequestBiStreamWrapper<TRpcServices::EvStreamTopicWrite, Ydb::Topic::StreamWriteMessage::FromClient, Ydb::Topic::StreamWriteMessage::FromServer, TRateLimiterMode::RuManual>;
using TEvStreamTopicReadRequest = TGRpcRequestBiStreamWrapper<TRpcServices::EvStreamTopicRead, Ydb::Topic::StreamReadMessage::FromClient, Ydb::Topic::StreamReadMessage::FromServer, TRateLimiterMode::RuManual>;
+using TEvCommitOffsetRequest = TGRpcRequestWrapper<TRpcServices::EvTopicCommitOffset, Ydb::Topic::CommitOffsetRequest, Ydb::Topic::CommitOffsetResponse, true>;
using TEvPQReadInfoRequest = TGRpcRequestWrapper<TRpcServices::EvPQReadInfo, Ydb::PersQueue::V1::ReadInfoRequest, Ydb::PersQueue::V1::ReadInfoResponse, true>;
using TEvPQDropTopicRequest = TGRpcRequestValidationWrapper<TRpcServices::EvPQDropTopic, Ydb::PersQueue::V1::DropTopicRequest, Ydb::PersQueue::V1::DropTopicResponse, true>;
using TEvPQCreateTopicRequest = TGRpcRequestValidationWrapper<TRpcServices::EvPQCreateTopic, Ydb::PersQueue::V1::CreateTopicRequest, Ydb::PersQueue::V1::CreateTopicResponse, true>;
diff --git a/ydb/core/grpc_services/rpc_cms.cpp b/ydb/core/grpc_services/rpc_cms.cpp
index aa1aacf089..f3b614e34c 100644
--- a/ydb/core/grpc_services/rpc_cms.cpp
+++ b/ydb/core/grpc_services/rpc_cms.cpp
@@ -73,7 +73,7 @@ private:
&& this->GetProtoRequest()->operation_params().operation_mode() == Ydb::Operations::OperationParams::SYNC) {
auto request = MakeHolder<TEvConsole::TEvNotifyOperationCompletionRequest>();
request->Record.MutableRequest()->set_id(response.operation().id());
- request->Record.SetUserToken(this->Request_->GetInternalToken());
+ request->Record.SetUserToken(this->Request_->GetSerializedToken());
NTabletPipe::SendData(ctx, CmsPipe, request.Release());
} else {
@@ -139,7 +139,7 @@ private:
{
auto request = MakeHolder<TCmsRequest>();
request->Record.MutableRequest()->CopyFrom(*this->GetProtoRequest());
- request->Record.SetUserToken(this->Request_->GetInternalToken());
+ request->Record.SetUserToken(this->Request_->GetSerializedToken());
NTabletPipe::SendData(ctx, CmsPipe, request.Release());
}
};
diff --git a/ydb/core/grpc_services/rpc_common.h b/ydb/core/grpc_services/rpc_common.h
index dbcd5f9e1b..3044bc5a1d 100644
--- a/ydb/core/grpc_services/rpc_common.h
+++ b/ydb/core/grpc_services/rpc_common.h
@@ -21,8 +21,8 @@ inline void SetRlPath(TEv& ev, const IRequestCtx& ctx) {
template<typename TEv>
inline void SetAuthToken(TEv& ev, const IRequestCtx& ctx) {
- if (ctx.GetInternalToken()) {
- ev->Record.SetUserToken(ctx.GetInternalToken());
+ if (ctx.GetSerializedToken()) {
+ ev->Record.SetUserToken(ctx.GetSerializedToken());
}
}
@@ -46,5 +46,9 @@ inline void SetRequestType(TEvTxUserProxy::TEvProposeTransaction* ev, const IReq
ev->Record.SetRequestType(ctx.GetRequestType().GetOrElse(""));
}
+inline void SetPeerName(TEvTxUserProxy::TEvProposeTransaction* ev, const IRequestCtx& ctx) {
+ ev->Record.SetPeerName(ctx.GetPeerName());
+}
+
} // namespace NGRpcService
} // namespace NKikimr
diff --git a/ydb/core/grpc_services/rpc_create_session.cpp b/ydb/core/grpc_services/rpc_create_session.cpp
index 7f52771a3d..10eb646037 100644
--- a/ydb/core/grpc_services/rpc_create_session.cpp
+++ b/ydb/core/grpc_services/rpc_create_session.cpp
@@ -112,7 +112,7 @@ private:
Ydb::Table::DeleteSessionResponse>;
auto actorId = NRpcService::DoLocalRpcSameMailbox<TEvDeleteSessionRequest>(
- std::move(request), std::move(cb), database, Request_->GetInternalToken(), ctx);
+ std::move(request), std::move(cb), database, Request_->GetSerializedToken(), ctx);
LOG_NOTICE_S(*TlsActivationContext, NKikimrServices::GRPC_PROXY,
SelfId() << " Client lost, session " << sessionId << " will be closed by " << actorId);
diff --git a/ydb/core/grpc_services/rpc_execute_data_query.cpp b/ydb/core/grpc_services/rpc_execute_data_query.cpp
index a71133cb64..4594e84515 100644
--- a/ydb/core/grpc_services/rpc_execute_data_query.cpp
+++ b/ydb/core/grpc_services/rpc_execute_data_query.cpp
@@ -25,77 +25,6 @@ using namespace NKqp;
using TEvExecuteDataQueryRequest = TGrpcRequestOperationCall<Ydb::Table::ExecuteDataQueryRequest,
Ydb::Table::ExecuteDataQueryResponse>;
-void SerializeQueryRequest(std::shared_ptr<NGRpcService::IRequestCtxMtSafe>& in, NKikimrKqp::TEvQueryRequest* dst) noexcept {
- auto req = TEvExecuteDataQueryRequest::GetProtoRequest(in);
-
- SetAuthToken(*dst, *in.get());
- SetDatabase(*dst, *in.get());
-
- dst->MutableRequest()->SetSessionId(req->session_id());
- dst->MutableRequest()->SetUsePublicResponseDataFormat(true);
-
- if (auto traceId = in->GetTraceId()) {
- dst->SetTraceId(traceId.GetRef());
- }
-
- if (auto requestType = in->GetRequestType()) {
- dst->SetRequestType(requestType.GetRef());
- }
-
- const auto& operationParams = req->operation_params();
- const auto& operationTimeout = GetDuration(operationParams.operation_timeout());
- const auto& cancelAfter = GetDuration(operationParams.cancel_after());
-
- dst->MutableRequest()->SetCancelAfterMs(cancelAfter.MilliSeconds());
- dst->MutableRequest()->SetTimeoutMs(operationTimeout.MilliSeconds());
-
- dst->MutableRequest()->MutableTxControl()->CopyFrom(req->tx_control());
- dst->MutableRequest()->MutableQueryCachePolicy()->CopyFrom(req->query_cache_policy());
- dst->MutableRequest()->SetStatsMode(GetKqpStatsMode(req->collect_stats()));
- dst->MutableRequest()->SetCollectStats(req->collect_stats());
-
- const auto& query = req->query();
-
- switch (query.query_case()) {
- case Query::kYqlText: {
- dst->MutableRequest()->SetAction(NKikimrKqp::QUERY_ACTION_EXECUTE);
- dst->MutableRequest()->SetType(NKikimrKqp::QUERY_TYPE_SQL_DML);
- dst->MutableRequest()->SetQuery(query.yql_text());
- break;
- }
-
- case Query::kId: {
- dst->MutableRequest()->SetAction(NKikimrKqp::QUERY_ACTION_EXECUTE_PREPARED);
- dst->MutableRequest()->SetType(NKikimrKqp::QUERY_TYPE_PREPARED_DML);
-
- TString preparedQueryId;
- try {
- preparedQueryId = DecodePreparedQueryId(query.id());
- } catch (const std::exception& ex) {
- NYql::TIssues issues;
- issues.AddIssue(NYql::ExceptionToIssue(ex));
-
- dst->SetYdbStatus(Ydb::StatusIds::BAD_REQUEST);
- NYql::IssuesToMessage(issues, dst->MutableQueryIssues());
- return;
- }
-
- dst->MutableRequest()->SetPreparedQuery(preparedQueryId);
- break;
- }
-
- default: {
- NYql::TIssues issues;
- issues.AddIssue(MakeIssue(NKikimrIssues::TIssuesIds::DEFAULT_ERROR, "Unexpected query option"));
- dst->SetYdbStatus(Ydb::StatusIds::BAD_REQUEST);
- NYql::IssuesToMessage(issues, dst->MutableQueryIssues());
- return;
- }
- }
-
- dst->MutableRequest()->MutableYdbParameters()->insert(req->parameters().begin(), req->parameters().end());
-}
-
class TExecuteDataQueryRPC : public TRpcKqpRequestActor<TExecuteDataQueryRPC, TEvExecuteDataQueryRequest> {
using TBase = TRpcKqpRequestActor<TExecuteDataQueryRPC, TEvExecuteDataQueryRequest>;
@@ -153,6 +82,10 @@ public:
}
auto& query = req->query();
+ TString yqlText;
+ TString queryId;
+ NKikimrKqp::EQueryAction queryAction;
+ NKikimrKqp::EQueryType queryType;
switch (query.query_case()) {
case Query::kYqlText: {
@@ -160,6 +93,9 @@ public:
if (!CheckQuery(query.yql_text(), issues)) {
return Reply(Ydb::StatusIds::BAD_REQUEST, issues, ctx);
}
+ queryAction = NKikimrKqp::QUERY_ACTION_EXECUTE;
+ queryType = NKikimrKqp::QUERY_TYPE_SQL_DML;
+ yqlText = query.yql_text();
break;
}
@@ -169,6 +105,18 @@ public:
issues.AddIssue(MakeIssue(NKikimrIssues::TIssuesIds::DEFAULT_ERROR, "Empty query id"));
return Reply(Ydb::StatusIds::BAD_REQUEST, issues, ctx);
}
+
+ try {
+ queryId = DecodePreparedQueryId(query.id());
+ } catch (const std::exception& ex) {
+ NYql::TIssues issues;
+ issues.AddIssue(NYql::ExceptionToIssue(ex));
+ return Reply(Ydb::StatusIds::BAD_REQUEST, issues, ctx);
+ return;
+ }
+
+ queryAction = NKikimrKqp::QUERY_ACTION_EXECUTE_PREPARED;
+ queryType = NKikimrKqp::QUERY_TYPE_PREPARED_DML;
break;
}
@@ -179,8 +127,19 @@ public:
}
}
- auto ev = MakeHolder<NKqp::TEvKqp::TEvQueryRequest>(Request_, SerializeQueryRequest, SelfId());
- ev->PrepareRemote();
+ auto ev = MakeHolder<NKqp::TEvKqp::TEvQueryRequest>(
+ Request_,
+ req->session_id(),
+ SelfId(),
+ std::move(yqlText),
+ std::move(queryId),
+ queryAction,
+ queryType,
+ &req->tx_control(),
+ &req->parameters(),
+ req->collect_stats(),
+ req->has_query_cache_policy() ? &req->query_cache_policy() : nullptr,
+ req->has_operation_params() ? &req->operation_params() : nullptr);
ReportCostInfo_ = req->operation_params().report_cost_info() == Ydb::FeatureFlag::ENABLED;
diff --git a/ydb/core/grpc_services/rpc_fq.cpp b/ydb/core/grpc_services/rpc_fq.cpp
index 32fff6eecc..566682ee9c 100644
--- a/ydb/core/grpc_services/rpc_fq.cpp
+++ b/ydb/core/grpc_services/rpc_fq.cpp
@@ -91,7 +91,7 @@ public:
return;
}
- const TString& internalToken = proxyCtx->GetInternalToken();
+ const TString& internalToken = proxyCtx->GetSerializedToken();
TVector<TString> permissions;
if (internalToken) {
NACLib::TUserToken userToken(internalToken);
diff --git a/ydb/core/grpc_services/rpc_fq_internal.cpp b/ydb/core/grpc_services/rpc_fq_internal.cpp
index 79e9269ce7..61b0df0c45 100644
--- a/ydb/core/grpc_services/rpc_fq_internal.cpp
+++ b/ydb/core/grpc_services/rpc_fq_internal.cpp
@@ -46,7 +46,7 @@ public:
auto proxyCtx = dynamic_cast<IRequestProxyCtx*>(request);
Y_VERIFY(proxyCtx);
TString user;
- const TString& internalToken = proxyCtx->GetInternalToken();
+ const TString& internalToken = proxyCtx->GetSerializedToken();
if (internalToken) {
NACLib::TUserToken userToken(internalToken);
user = userToken.GetUserSID();
diff --git a/ydb/core/grpc_services/rpc_get_operation.cpp b/ydb/core/grpc_services/rpc_get_operation.cpp
index b585d797db..d8d169ef60 100644
--- a/ydb/core/grpc_services/rpc_get_operation.cpp
+++ b/ydb/core/grpc_services/rpc_get_operation.cpp
@@ -159,7 +159,7 @@ private:
auto request = MakeHolder<NConsole::TEvConsole::TEvGetOperationRequest>();
request->Record.MutableRequest()->set_id(GetProtoRequest()->id());
- request->Record.SetUserToken(Request->GetInternalToken());
+ request->Record.SetUserToken(Request->GetSerializedToken());
NTabletPipe::SendData(ctx, PipeActorId_, request.Release());
}
diff --git a/ydb/core/grpc_services/rpc_get_shard_locations.cpp b/ydb/core/grpc_services/rpc_get_shard_locations.cpp
index 95bddc5fe7..d62bc0763c 100644
--- a/ydb/core/grpc_services/rpc_get_shard_locations.cpp
+++ b/ydb/core/grpc_services/rpc_get_shard_locations.cpp
@@ -118,10 +118,10 @@ private:
}
bool CheckAccess(TString& errorMessage) {
- if (Request->GetInternalToken().empty())
+ if (Request->GetSerializedToken().empty())
return true;
- NACLib::TUserToken userToken(Request->GetInternalToken());
+ NACLib::TUserToken userToken(Request->GetSerializedToken());
// TODO: check describe rights for root?
Y_UNUSED(errorMessage);
diff --git a/ydb/core/grpc_services/rpc_kh_describe.cpp b/ydb/core/grpc_services/rpc_kh_describe.cpp
index 1ceb70b9e1..339c283c86 100644
--- a/ydb/core/grpc_services/rpc_kh_describe.cpp
+++ b/ydb/core/grpc_services/rpc_kh_describe.cpp
@@ -92,7 +92,7 @@ private:
auto path = ::NKikimr::SplitPath(table);
TMaybe<ui64> tabletId = TryParseLocalDbPath(path);
if (tabletId) {
- if (Request->GetInternalToken().empty() || !IsSuperUser(NACLib::TUserToken(Request->GetInternalToken()), *AppData(ctx))) {
+ if (Request->GetSerializedToken().empty() || !IsSuperUser(NACLib::TUserToken(Request->GetSerializedToken()), *AppData(ctx))) {
return ReplyWithError(Ydb::StatusIds::NOT_FOUND, "Invalid table path specified", ctx);
}
@@ -205,10 +205,10 @@ private:
}
bool CheckAccess(TString& errorMessage) {
- if (Request->GetInternalToken().empty())
+ if (Request->GetSerializedToken().empty())
return true;
- NACLib::TUserToken userToken(Request->GetInternalToken());
+ NACLib::TUserToken userToken(Request->GetSerializedToken());
const ui32 access = NACLib::EAccessRights::DescribeSchema;
for (const NSchemeCache::TSchemeCacheNavigate::TEntry& entry : ResolveNamesResult->ResultSet) {
diff --git a/ydb/core/grpc_services/rpc_kh_snapshots.cpp b/ydb/core/grpc_services/rpc_kh_snapshots.cpp
index 0f45f2d583..d564576da0 100644
--- a/ydb/core/grpc_services/rpc_kh_snapshots.cpp
+++ b/ydb/core/grpc_services/rpc_kh_snapshots.cpp
@@ -105,7 +105,7 @@ public:
auto req = MakeHolder<TEvTxUserProxy::TEvProposeTransaction>();
req->Record.SetExecTimeoutPeriod(reqTimeout.MilliSeconds());
- auto token = Request_->GetInternalToken();
+ auto token = Request_->GetSerializedToken();
if (!token.empty()) {
req->Record.SetUserToken(token);
}
@@ -241,7 +241,7 @@ public:
auto req = MakeHolder<TEvTxUserProxy::TEvProposeTransaction>();
req->Record.SetExecTimeoutPeriod(reqTimeout.MilliSeconds());
- auto token = Request_->GetInternalToken();
+ auto token = Request_->GetSerializedToken();
if (!token.empty()) {
req->Record.SetUserToken(token);
}
@@ -382,7 +382,7 @@ public:
auto req = MakeHolder<TEvTxUserProxy::TEvProposeTransaction>();
req->Record.SetExecTimeoutPeriod(reqTimeout.MilliSeconds());
- auto token = Request_->GetInternalToken();
+ auto token = Request_->GetSerializedToken();
if (!token.empty()) {
req->Record.SetUserToken(token);
}
diff --git a/ydb/core/grpc_services/rpc_kqp_base.h b/ydb/core/grpc_services/rpc_kqp_base.h
index 5af715dc68..fd3503ea8d 100644
--- a/ydb/core/grpc_services/rpc_kqp_base.h
+++ b/ydb/core/grpc_services/rpc_kqp_base.h
@@ -14,8 +14,8 @@ namespace NKikimr {
namespace NGRpcService {
inline void SetAuthToken(NKikimrKqp::TEvQueryRequest& req, const IRequestCtxMtSafe& ctx) {
- if (ctx.GetInternalToken()) {
- req.SetUserToken(ctx.GetInternalToken());
+ if (ctx.GetSerializedToken()) {
+ req.SetUserToken(ctx.GetSerializedToken());
}
}
diff --git a/ydb/core/grpc_services/rpc_load_rows.cpp b/ydb/core/grpc_services/rpc_load_rows.cpp
index 7e6467d550..d591701cf2 100644
--- a/ydb/core/grpc_services/rpc_load_rows.cpp
+++ b/ydb/core/grpc_services/rpc_load_rows.cpp
@@ -344,10 +344,10 @@ private:
}
bool CheckAccess(TString& errorMessage) override {
- if (Request->GetInternalToken().empty())
+ if (Request->GetSerializedToken().empty())
return true;
- NACLib::TUserToken userToken(Request->GetInternalToken());
+ NACLib::TUserToken userToken(Request->GetSerializedToken());
const ui32 access = NACLib::EAccessRights::UpdateRow;
auto resolveResult = GetResolveNameResult();
if (!resolveResult) {
@@ -519,10 +519,10 @@ private:
}
bool CheckAccess(TString& errorMessage) override {
- if (Request->GetInternalToken().empty())
+ if (Request->GetSerializedToken().empty())
return true;
- NACLib::TUserToken userToken(Request->GetInternalToken());
+ NACLib::TUserToken userToken(Request->GetSerializedToken());
const ui32 access = NACLib::EAccessRights::UpdateRow;
auto resolveResult = GetResolveNameResult();
if (!resolveResult) {
diff --git a/ydb/core/grpc_services/rpc_long_tx.cpp b/ydb/core/grpc_services/rpc_long_tx.cpp
index fe034e2257..0a9b7965d8 100644
--- a/ydb/core/grpc_services/rpc_long_tx.cpp
+++ b/ydb/core/grpc_services/rpc_long_tx.cpp
@@ -397,7 +397,22 @@ class TLongTxWriteBase : public TActorBootstrapped<TLongTxWriteImpl> {
using TBase = TActorBootstrapped<TLongTxWriteImpl>;
protected:
using TThis = typename TBase::TThis;
+
public:
+ struct TRetryData {
+ static const constexpr ui32 MaxRetriesPerShard = 10;
+ static const constexpr ui32 OverloadedDelayMs = 200;
+
+ ui64 TableId;
+ TString DedupId;
+ TString Data;
+ ui32 NumRetries;
+
+ static TDuration OverloadTimeout() {
+ return TDuration::MilliSeconds(OverloadedDelayMs);
+ }
+ };
+
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
return NKikimrServices::TActivity::GRPC_REQ;
}
@@ -423,10 +438,6 @@ public:
}
protected:
- void SetLongTxId(const TLongTxId& longTxId) {
- LongTxId = longTxId;
- }
-
void ProceedWithSchema(const NSchemeCache::TSchemeCacheNavigate& resp) {
NWilson::TProfileSpan pSpan = ActorSpan.BuildChildrenSpan("ProceedWithSchema");
if (resp.ErrorCount > 0) {
@@ -502,46 +513,45 @@ protected:
private:
void SendWriteRequest(ui64 shardId, ui64 tableId, const TString& dedupId, const TString& data) {
- WaitShards.insert(shardId);
+ TRetryData retry{
+ .TableId = tableId,
+ .DedupId = dedupId,
+ .Data = data,
+ .NumRetries = 0
+ };
+ WaitShards.emplace(shardId, std::move(retry));
SendToTablet(shardId, MakeHolder<TEvColumnShard::TEvWrite>(this->SelfId(), LongTxId, tableId, dedupId, data));
}
+ bool RetryWriteRequest(ui64 shardId, bool delayed = true) {
+ if (!WaitShards.count(shardId)) {
+ return false;
+ }
+
+ auto& retry = WaitShards[shardId];
+ if (retry.NumRetries < TRetryData::MaxRetriesPerShard) {
+ if (delayed) {
+ if (ShardsToRetry.empty()) {
+ TimeoutTimerActorId = CreateLongTimer(TRetryData::OverloadTimeout(),
+ new IEventHandle(this->SelfId(), this->SelfId(), new TEvents::TEvWakeup()));
+ }
+ ShardsToRetry.insert(shardId);
+ } else {
+ ++retry.NumRetries;
+ SendToTablet(shardId, MakeHolder<TEvColumnShard::TEvWrite>(this->SelfId(), LongTxId,
+ retry.TableId, retry.DedupId, retry.Data));
+ }
+ return true;
+ }
+ return false;
+ }
+
STFUNC(StateWrite) {
Y_UNUSED(ctx);
switch (ev->GetTypeRewrite()) {
hFunc(TEvColumnShard::TEvWriteResult, Handle);
hFunc(TEvPipeCache::TEvDeliveryProblem, Handle);
- }
- }
-
- // Expects NKikimrTxColumnShard::EResultStatus
- static Ydb::StatusIds::StatusCode ConvertToYdbStatus(ui32 columnShardStatus) {
- switch (columnShardStatus) {
- case NKikimrTxColumnShard::UNSPECIFIED:
- return Ydb::StatusIds::STATUS_CODE_UNSPECIFIED;
-
- case NKikimrTxColumnShard::PREPARED:
- case NKikimrTxColumnShard::SUCCESS:
- return Ydb::StatusIds::SUCCESS;
-
- case NKikimrTxColumnShard::ABORTED:
- return Ydb::StatusIds::ABORTED;
-
- case NKikimrTxColumnShard::ERROR:
- return Ydb::StatusIds::GENERIC_ERROR;
-
- case NKikimrTxColumnShard::TIMEOUT:
- return Ydb::StatusIds::TIMEOUT;
-
- case NKikimrTxColumnShard::SCHEMA_ERROR:
- case NKikimrTxColumnShard::SCHEMA_CHANGED:
- return Ydb::StatusIds::SCHEME_ERROR;
-
- case NKikimrTxColumnShard::OVERLOADED:
- return Ydb::StatusIds::OVERLOADED;
-
- default:
- return Ydb::StatusIds::GENERIC_ERROR;
+ CFunc(TEvents::TSystem::Wakeup, HandleTimeout);
}
}
@@ -551,10 +561,16 @@ private:
ui64 shardId = msg->Record.GetOrigin();
Y_VERIFY(WaitShards.count(shardId) || ShardsWrites.count(shardId));
- auto status = msg->Record.GetStatus();
+ const auto status = (NKikimrTxColumnShard::EResultStatus)msg->Record.GetStatus();
+ if (status == NKikimrTxColumnShard::OVERLOADED) {
+ if (RetryWriteRequest(shardId)) {
+ return;
+ }
+ }
if (status != NKikimrTxColumnShard::SUCCESS) {
- auto ydbStatus = ConvertToYdbStatus(status);
- return ReplyError(ydbStatus, "Write error");
+ auto ydbStatus = NColumnShard::ConvertToYdbStatus(status);
+ return ReplyError(ydbStatus,
+ TStringBuilder() << "Cannot write data into shard " << shardId << " in longTx " << LongTxId.ToString());
}
if (!WaitShards.count(shardId)) {
@@ -571,12 +587,31 @@ private:
void Handle(TEvPipeCache::TEvDeliveryProblem::TPtr& ev) {
NWilson::TProfileSpan pSpan(0, ActorSpan.GetTraceId(), "DeliveryProblem");
const auto* msg = ev->Get();
+ ui64 shardId = msg->TabletId;
+
+ if (!WaitShards.count(shardId)) {
+ return;
+ }
+ if (RetryWriteRequest(shardId)) {
+ return;
+ }
+
+ TString errMsg = TStringBuilder() << "Shard " << shardId << " is not available after "
+ << WaitShards[shardId].NumRetries << " retries";
if (msg->NotDelivered) {
- return ReplyError(Ydb::StatusIds::UNAVAILABLE, "Shard unavailable");
+ return ReplyError(Ydb::StatusIds::UNAVAILABLE, errMsg);
} else {
- return ReplyError(Ydb::StatusIds::UNDETERMINED, "Shard unavailable");
+ return ReplyError(Ydb::StatusIds::UNDETERMINED, errMsg);
+ }
+ }
+
+ void HandleTimeout(const TActorContext& /*ctx*/) {
+ TimeoutTimerActorId = {};
+ for (ui64 shardId : ShardsToRetry) {
+ RetryWriteRequest(shardId, false);
}
+ ShardsToRetry.clear();
}
private:
@@ -636,13 +671,15 @@ protected:
const TString DatabaseName;
const TString Path;
const TString DedupId;
-private:
TLongTxId LongTxId;
+private:
const TActorId LeaderPipeCache;
std::optional<NACLib::TUserToken> UserToken;
- THashSet<ui64> WaitShards;
+ THashMap<ui64, TRetryData> WaitShards;
THashMap<ui64, ui64> ShardsWrites;
+ THashSet<ui64> ShardsToRetry;
NWilson::TProfileSpan ActorSpan;
+ TActorId TimeoutTimerActorId;
};
@@ -657,7 +694,7 @@ public:
explicit TLongTxWriteRPC(std::unique_ptr<IRequestOpCtx> request)
: TBase(request->GetDatabaseName().GetOrElse(DatabaseFromDomain(AppData())),
TEvLongTxWriteRequest::GetProtoRequest(request)->path(),
- request->GetInternalToken(),
+ request->GetSerializedToken(),
TLongTxId(),
TEvLongTxWriteRequest::GetProtoRequest(request)->dedup_id())
, Request(std::move(request))
@@ -669,11 +706,9 @@ public:
const auto* req = GetProtoRequest();
TString errMsg;
- TLongTxId longTxId;
- if (!longTxId.ParseString(req->tx_id(), &errMsg)) {
+ if (!LongTxId.ParseString(req->tx_id(), &errMsg)) {
return ReplyError(Ydb::StatusIds::BAD_REQUEST, errMsg);
}
- SetLongTxId(longTxId);
if (GetProtoRequest()->data().format() != Ydb::LongTx::Data::APACHE_ARROW) {
return ReplyError(Ydb::StatusIds::BAD_REQUEST, "Only APACHE_ARROW data format is supported");
@@ -829,7 +864,7 @@ class TLongTxReadRPC : public TActorBootstrapped<TLongTxReadRPC> {
using TBase = TActorBootstrapped<TLongTxReadRPC>;
private:
- static const constexpr ui64 MaxRetriesPerShard = 10;
+ static const constexpr ui32 MaxRetriesPerShard = 10;
public:
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
@@ -850,7 +885,7 @@ public:
void Bootstrap() {
const auto* req = TEvLongTxReadRequest::GetProtoRequest(Request);
- if (const TString& internalToken = Request->GetInternalToken()) {
+ if (const TString& internalToken = Request->GetSerializedToken()) {
UserToken.emplace(internalToken);
}
@@ -970,7 +1005,7 @@ private:
ShardRetries[shard] = 0;
}
- ui64 retries = ++ShardRetries[shard];
+ ui32 retries = ++ShardRetries[shard];
if (retries > MaxRetriesPerShard) {
return ReplyError(Ydb::StatusIds::UNAVAILABLE, Sprintf("Failed to connect to shard %lu", shard));
}
diff --git a/ydb/core/grpc_services/rpc_read_columns.cpp b/ydb/core/grpc_services/rpc_read_columns.cpp
index 892fe13424..f773348dda 100644
--- a/ydb/core/grpc_services/rpc_read_columns.cpp
+++ b/ydb/core/grpc_services/rpc_read_columns.cpp
@@ -141,7 +141,7 @@ private:
auto path = ::NKikimr::SplitPath(table);
TMaybe<ui64> tabletId = TryParseLocalDbPath(path);
if (tabletId) {
- if (Request->GetInternalToken().empty() || !IsSuperUser(Request->GetInternalToken(), *AppData(ctx))) {
+ if (Request->GetSerializedToken().empty() || !IsSuperUser(NACLib::TUserToken(Request->GetSerializedToken()), *AppData(ctx))) {
return ReplyWithError(Ydb::StatusIds::NOT_FOUND, "Invalid table path specified", ctx);
}
@@ -459,10 +459,10 @@ private:
}
bool CheckAccess(TString& errorMessage) {
- if (Request->GetInternalToken().empty())
+ if (Request->GetSerializedToken().empty())
return true;
- NACLib::TUserToken userToken(Request->GetInternalToken());
+ NACLib::TUserToken userToken(Request->GetSerializedToken());
const ui32 access = NACLib::EAccessRights::SelectRow;
for (const NSchemeCache::TSchemeCacheNavigate::TEntry& entry : ResolveNamesResult->ResultSet) {
diff --git a/ydb/core/grpc_services/rpc_read_table.cpp b/ydb/core/grpc_services/rpc_read_table.cpp
index 010b5e7cf3..fb4ec14783 100644
--- a/ydb/core/grpc_services/rpc_read_table.cpp
+++ b/ydb/core/grpc_services/rpc_read_table.cpp
@@ -110,9 +110,10 @@ static void ConvertKeyRange(const Ydb::Table::KeyRange& keyRange, const TGetOutp
class TReadTableRPC : public TActorBootstrapped<TReadTableRPC> {
enum EWakeupTag : ui64 {
- TimeoutTimer = 0,
RlSendAllowed = 1,
- RlNoResource = 2
+ RlNoResource = 2,
+ ClientInactivity = 3,
+ ServerInactivity = 4,
};
public:
@@ -136,16 +137,13 @@ public:
LastStatusTimestamp_ = ctx.Now();
LastDataStreamTimestamp_ = ctx.Now();
- InactiveClientTimeout_ = TDuration::FromValue(cfg.GetInactiveClientTimeout());
- InactiveServerTimeout_ = TDuration::FromValue(cfg.GetInactiveServerTimeout());
+ InactiveClientTimeout_ = TDuration::MicroSeconds(cfg.GetInactiveClientTimeout());
+ InactiveServerTimeout_ = TDuration::MicroSeconds(cfg.GetInactiveServerTimeout());
- TDuration timeout;
- if (InactiveClientTimeout_)
- timeout = InactiveClientTimeout_;
- if (InactiveServerTimeout_)
- timeout = timeout ? Min(timeout, InactiveServerTimeout_) : InactiveServerTimeout_;
- if (timeout)
- SetTimeoutTimer(timeout, ctx);
+ if (InactiveServerTimeout_) {
+ StartInactivityTimer(InactiveServerTimer_, InactiveServerTimeout_, EWakeupTag::ServerInactivity, ctx);
+ InactiveServerTimerPending_ = true;
+ }
SendProposeRequest(ctx);
@@ -156,7 +154,6 @@ public:
as->Send(actorId, new TEvents::TEvPoisonPill());
};
Request_->SetClientLostAction(std::move(clientLostCb));
-
}
void PassAway() override {
@@ -164,6 +161,14 @@ public:
Send(ReadTableActor, new TEvents::TEvPoison);
ReadTableActor = { };
}
+ if (InactiveClientTimer_) {
+ Send(InactiveClientTimer_, new TEvents::TEvPoison);
+ InactiveClientTimer_ = { };
+ }
+ if (InactiveServerTimer_) {
+ Send(InactiveServerTimer_, new TEvents::TEvPoison);
+ InactiveServerTimer_ = { };
+ }
TActorBootstrapped::PassAway();
}
@@ -335,12 +340,18 @@ private:
void Handle(TEvents::TEvWakeup::TPtr &ev, const TActorContext &ctx) {
switch ((EWakeupTag) ev->Get()->Tag) {
- case EWakeupTag::TimeoutTimer:
- return ProcessTimeoutTimer(ctx);
case EWakeupTag::RlSendAllowed:
return ProcessRlSendAllowed(ctx);
case EWakeupTag::RlNoResource:
return ProcessRlNoResource(ctx);
+ case EWakeupTag::ClientInactivity:
+ InactiveClientTimer_ = { };
+ InactiveClientTimerPending_ = false;
+ return ProcessClientInactivity(ctx);
+ case EWakeupTag::ServerInactivity:
+ InactiveServerTimer_ = { };
+ InactiveServerTimerPending_ = false;
+ return ProcessServerInactivity(ctx);
}
}
@@ -376,49 +387,53 @@ private:
return ReplyFinishStream(Ydb::StatusIds::OVERLOADED, message, ctx);
}
- void ProcessTimeoutTimer(const TActorContext &ctx) {
+ void ProcessClientInactivity(const TActorContext &ctx) {
+ // We don't consider client inactive when there's nothing for the client to read
+ if (!LeftInGRpcAdaptorQueue_) {
+ return;
+ }
+
TInstant now = ctx.Now();
- TDuration timeout;
-
- if (InactiveClientTimeout_ && LeftInGRpcAdaptorQueue_) {
- TDuration processTime = now - LastDataStreamTimestamp_;
- if (processTime >= InactiveClientTimeout_) {
- TStringStream ss;
- ss << SelfId() << " Client cannot process data in " << processTime
- << " which exceeds client timeout " << InactiveClientTimeout_;
- LOG_NOTICE_S(ctx, NKikimrServices::READ_TABLE_API, ss.Str());
- return HandleStreamTimeout(ctx, ss.Str());
- } else {
- TDuration remain = InactiveClientTimeout_ - processTime;
- timeout = timeout ? Min(timeout, remain) : remain;
- }
+ TDuration processTime = now - LastDataStreamTimestamp_;
+
+ if (processTime >= InactiveClientTimeout_) {
+ TStringStream ss;
+ ss << SelfId() << " Client cannot process data in " << processTime
+ << " which exceeds client timeout " << InactiveClientTimeout_;
+ LOG_NOTICE_S(ctx, NKikimrServices::READ_TABLE_API, ss.Str());
+ return HandleStreamTimeout(ctx, ss.Str());
}
- if (InactiveServerTimeout_) {
- TDuration processTime = now - LastStatusTimestamp_;
- // Ignore server timeout if response buffer is full.
- if (LeftInGRpcAdaptorQueue_ == QuotaLimit_) {
- timeout = timeout ? Min(timeout, InactiveServerTimeout_) : InactiveServerTimeout_;
- } else if (processTime >= InactiveServerTimeout_) {
- TStringStream ss;
- ss << SelfId()
- << " Server doesn't provide data for " << processTime
- << " which exceeds server timeout " << InactiveServerTimeout_
- << " (QuotaRequestQueue: " << QuotaRequestQueue_.size()
- << " ResponseQueue: " << LeftInGRpcAdaptorQueue_
- << " QuotaLimit: " << QuotaLimit_
- << " QuotaReserved: " << QuotaReserved_
- << " QuotaByShard: " << QuotaByShard_.size() << ")";
- LOG_NOTICE_S(ctx, NKikimrServices::READ_TABLE_API, ss.Str());
- return HandleStreamTimeout(ctx, ss.Str());
- } else {
- TDuration remain = InactiveServerTimeout_ - processTime;
- timeout = timeout ? Min(timeout, remain) : remain;
- }
+ TDuration timeout = InactiveClientTimeout_ - processTime;
+ StartInactivityTimer(InactiveClientTimer_, timeout, EWakeupTag::ClientInactivity, ctx);
+ InactiveClientTimerPending_ = true;
+ }
+
+ void ProcessServerInactivity(const TActorContext &ctx) {
+ TInstant now = ctx.Now();
+ TDuration timeout = InactiveServerTimeout_;
+ TDuration processTime = now - LastStatusTimestamp_;
+ // Ignore server timeout if response buffer is full.
+ if (LeftInGRpcAdaptorQueue_ == QuotaLimit_) {
+ // nothing
+ } else if (processTime >= InactiveServerTimeout_) {
+ TStringStream ss;
+ ss << SelfId()
+ << " Server doesn't provide data for " << processTime
+ << " which exceeds server timeout " << InactiveServerTimeout_
+ << " (QuotaRequestQueue: " << QuotaRequestQueue_.size()
+ << " ResponseQueue: " << LeftInGRpcAdaptorQueue_
+ << " QuotaLimit: " << QuotaLimit_
+ << " QuotaReserved: " << QuotaReserved_
+ << " QuotaByShard: " << QuotaByShard_.size() << ")";
+ LOG_NOTICE_S(ctx, NKikimrServices::READ_TABLE_API, ss.Str());
+ return HandleStreamTimeout(ctx, ss.Str());
+ } else {
+ timeout = InactiveServerTimeout_ - processTime;
}
- if (timeout)
- SetTimeoutTimer(timeout, ctx);
+ StartInactivityTimer(InactiveServerTimer_, timeout, EWakeupTag::ServerInactivity, ctx);
+ InactiveServerTimerPending_ = true;
}
void Handle(TEvDataShard::TEvGetReadTableStreamStateRequest::TPtr &ev, const TActorContext &ctx)
@@ -466,19 +481,10 @@ private:
return ReplyFinishStream(StatusIds::BAD_REQUEST, message, ctx);
}
- const auto& featureFlags = AppData(ctx)->FeatureFlags;
-
- bool useSnapshot = featureFlags.GetReadTableWithSnapshot();
+ // Snapshots are always enabled and cannot be disabled
switch (req->use_snapshot()) {
case Ydb::FeatureFlag::STATUS_UNSPECIFIED:
- break;
-
case Ydb::FeatureFlag::ENABLED:
- useSnapshot = true;
- break;
-
- case Ydb::FeatureFlag::DISABLED:
- useSnapshot = false;
break;
default: {
@@ -492,68 +498,36 @@ private:
}
}
- if (useSnapshot) {
- NKikimr::NTxProxy::TReadTableSettings settings;
-
- if (Request_->GetInternalToken()) {
- settings.UserToken = Request_->GetInternalToken();
- }
- settings.DatabaseName = CanonizePath(Request_->GetDatabaseName().GetOrElse(""));
-
- settings.Owner = SelfId();
- settings.TablePath = req->path();
- settings.Ordered = req->ordered();
- settings.RequireResultSet = true;
- if (req->row_limit()) {
- settings.MaxRows = req->row_limit();
- }
-
- for (auto &col : req->columns()) {
- settings.Columns.push_back(col);
- }
-
- try {
- ConvertKeyRange(req->key_range(), [&]{ return &settings.KeyRange; });
- } catch (const std::exception& ex) {
- const NYql::TIssue& issue = NYql::ExceptionToIssue(ex);
- google::protobuf::RepeatedPtrField<TYdbIssueMessageType> message;
- auto item = message.Add();
- NYql::IssueToMessage(issue, item);
- return ReplyFinishStream(StatusIds::BAD_REQUEST, message, ctx);
- }
-
- ReadTableActor = ctx.RegisterWithSameMailbox(NKikimr::NTxProxy::CreateReadTableSnapshotWorker(settings));
- } else {
- auto proposeRequest = std::make_unique<TEvTxUserProxy::TEvProposeTransaction>();
+ NKikimr::NTxProxy::TReadTableSettings settings;
- SetAuthToken(proposeRequest, *Request_);
- SetDatabase(proposeRequest.get(), *Request_);
- NKikimrTxUserProxy::TEvProposeTransaction& record = proposeRequest->Record;
- record.SetExecTimeoutPeriod(TDuration::Minutes(60).MilliSeconds());
- auto readTransaction = record.MutableTransaction()->MutableReadTableTransaction();
-
- record.SetStreamResponse(true);
- readTransaction->SetPath(req->path());
- readTransaction->SetOrdered(req->ordered());
- readTransaction->SetRowLimit(req->row_limit());
-
- readTransaction->SetApiVersion(NKikimrTxUserProxy::TReadTableTransaction::YDB_V1);
+ if (Request_->GetSerializedToken()) {
+ settings.UserToken = Request_->GetSerializedToken();
+ }
+ settings.DatabaseName = CanonizePath(Request_->GetDatabaseName().GetOrElse(""));
+
+ settings.Owner = SelfId();
+ settings.TablePath = req->path();
+ settings.Ordered = req->ordered();
+ settings.RequireResultSet = true;
+ if (req->row_limit()) {
+ settings.MaxRows = req->row_limit();
+ }
- try {
- ConvertKeyRange(req->key_range(), [&]{ return readTransaction->MutableKeyRange(); });
- } catch (const std::exception& ex) {
- const NYql::TIssue& issue = NYql::ExceptionToIssue(ex);
- google::protobuf::RepeatedPtrField<TYdbIssueMessageType> message;
- auto item = message.Add();
- NYql::IssueToMessage(issue, item);
- return ReplyFinishStream(StatusIds::BAD_REQUEST, message, ctx);
- }
+ for (auto &col : req->columns()) {
+ settings.Columns.push_back(col);
+ }
- for (auto &col : req->columns()) {
- readTransaction->AddColumns(col);
- }
- ctx.Send(MakeTxProxyID(), proposeRequest.release());
+ try {
+ ConvertKeyRange(req->key_range(), [&]{ return &settings.KeyRange; });
+ } catch (const std::exception& ex) {
+ const NYql::TIssue& issue = NYql::ExceptionToIssue(ex);
+ google::protobuf::RepeatedPtrField<TYdbIssueMessageType> message;
+ auto item = message.Add();
+ NYql::IssueToMessage(issue, item);
+ return ReplyFinishStream(StatusIds::BAD_REQUEST, message, ctx);
}
+
+ ReadTableActor = ctx.RegisterWithSameMailbox(NKikimr::NTxProxy::CreateReadTableSnapshotWorker(settings));
}
void ReplyFinishStream(Ydb::StatusIds::StatusCode status,
@@ -598,13 +572,17 @@ private:
Die(ctx);
}
- void SetTimeoutTimer(TDuration timeout, const TActorContext &ctx) {
+ void StartInactivityTimer(TActorId& timer, TDuration timeout, EWakeupTag tag, const TActorContext &ctx) {
LOG_DEBUG_S(ctx, NKikimrServices::READ_TABLE_API,
- SelfId() << " Set stream timeout timer for " << timeout);
+ SelfId() << " Starting inactivity timer for " << timeout << " with tag " << int(tag));
+
+ if (timer) {
+ ctx.Send(timer, new TEvents::TEvPoison);
+ timer = {};
+ }
- auto *ev = new IEventHandle(SelfId(), SelfId(), new TEvents::TEvWakeup(EWakeupTag::TimeoutTimer));
- StreamTimerCookieHolder_.Reset(ISchedulerCookie::Make2Way());
- CreateLongTimer(ctx, timeout, ev, 0, StreamTimerCookieHolder_.Get());
+ auto *ev = new IEventHandle(SelfId(), SelfId(), new TEvents::TEvWakeup(tag));
+ timer = CreateLongTimer(timeout, ev);
}
void HandleStreamTimeout(const TActorContext &ctx, const TString& msg) {
@@ -731,6 +709,14 @@ private:
Request_->SendSerializedResult(std::move(out), StatusIds::SUCCESS);
+ if (LeftInGRpcAdaptorQueue_ == 0) {
+ LastDataStreamTimestamp_ = ctx.Now();
+ if (!InactiveClientTimerPending_ && InactiveClientTimeout_) {
+ StartInactivityTimer(InactiveClientTimer_, InactiveClientTimeout_, EWakeupTag::ClientInactivity, ctx);
+ InactiveClientTimerPending_ = true;
+ }
+ }
+
LeftInGRpcAdaptorQueue_++;
if (LeftInGRpcAdaptorQueue_ > QuotaLimit_) {
LOG_ERROR_S(*TlsActivationContext, NKikimrServices::READ_TABLE_API,
@@ -763,7 +749,10 @@ private:
TInstant LastDataStreamTimestamp_;
TInstant LastStatusTimestamp_;
- TSchedulerCookieHolder StreamTimerCookieHolder_;
+ TActorId InactiveClientTimer_;
+ TActorId InactiveServerTimer_;
+ bool InactiveClientTimerPending_ = false;
+ bool InactiveServerTimerPending_ = false;
struct TBuffEntry
{
diff --git a/ydb/core/grpc_services/rpc_request_base.h b/ydb/core/grpc_services/rpc_request_base.h
index 71a4bc1cd7..cae948e947 100644
--- a/ydb/core/grpc_services/rpc_request_base.h
+++ b/ydb/core/grpc_services/rpc_request_base.h
@@ -130,7 +130,7 @@ public:
: Request(ev)
, DatabaseName(Request->GetDatabaseName().GetOrElse(DatabaseFromDomain(AppData())))
{
- if (const auto& userToken = Request->GetInternalToken()) {
+ if (const auto& userToken = Request->GetSerializedToken()) {
UserToken = MakeHolder<NACLib::TUserToken>(userToken);
}
}
diff --git a/ydb/core/grpc_services/rpc_scheme_base.h b/ydb/core/grpc_services/rpc_scheme_base.h
index 6d18d77886..ef3044d82e 100644
--- a/ydb/core/grpc_services/rpc_scheme_base.h
+++ b/ydb/core/grpc_services/rpc_scheme_base.h
@@ -33,6 +33,7 @@ protected:
std::unique_ptr<TEvTxUserProxy::TEvProposeTransaction> proposeRequest(new TEvTxUserProxy::TEvProposeTransaction());
SetAuthToken(proposeRequest, *this->Request_);
SetDatabase(proposeRequest.get(), *this->Request_);
+ SetPeerName(proposeRequest.get(), *this->Request_);
SetRequestType(proposeRequest.get(), *this->Request_);
return proposeRequest;
}
@@ -101,6 +102,7 @@ protected:
}
case NKikimrScheme::EStatus::StatusSchemeError:
case NKikimrScheme::EStatus::StatusNameConflict:
+
case NKikimrScheme::EStatus::StatusPathDoesNotExist: {
return this->ReplyWithResult(Ydb::StatusIds::SCHEME_ERROR, issueMessage, ctx);
}
diff --git a/ydb/core/grpc_services/rpc_yq.cpp b/ydb/core/grpc_services/rpc_yq.cpp
index a5a06e26ea..5e931abcf6 100644
--- a/ydb/core/grpc_services/rpc_yq.cpp
+++ b/ydb/core/grpc_services/rpc_yq.cpp
@@ -96,7 +96,7 @@ public:
return;
}
- const TString& internalToken = proxyCtx->GetInternalToken();
+ const TString& internalToken = proxyCtx->GetSerializedToken();
TVector<TString> permissions;
if (internalToken) {
NACLib::TUserToken userToken(internalToken);
diff --git a/ydb/core/health_check/health_check.cpp b/ydb/core/health_check/health_check.cpp
index 49d5577e4e..409b3594db 100644
--- a/ydb/core/health_check/health_check.cpp
+++ b/ydb/core/health_check/health_check.cpp
@@ -202,7 +202,7 @@ public:
TVector<TString> StoragePoolNames;
THashMap<std::pair<TTabletId, NNodeWhiteboard::TFollowerId>, const NKikimrHive::TTabletInfo*> MergedTabletState;
THashMap<TNodeId, TNodeTabletState> MergedNodeTabletState;
- ui64 StorageLimit;
+ ui64 StorageQuota;
ui64 StorageUsage;
};
@@ -900,10 +900,10 @@ public:
void Handle(NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult::TPtr& ev) {
TabletRequests.CompleteRequest(ev->Cookie);
- if (ev->Get()->GetRecord().GetStatus() == NKikimrScheme::StatusSuccess) {
- TString path = ev->Get()->GetRecord().GetPath();
+ if (ev->Get()->GetRecord().status() == NKikimrScheme::StatusSuccess) {
+ TString path = ev->Get()->GetRecord().path();
TDatabaseState& state(DatabaseState[path]);
- for (const auto& storagePool : ev->Get()->GetRecord().GetPathDescription().GetDomainDescription().GetStoragePools()) {
+ for (const auto& storagePool : ev->Get()->GetRecord().pathdescription().domaindescription().storagepools()) {
TString storagePoolName = storagePool.name();
state.StoragePoolNames.emplace_back(storagePoolName);
StoragePoolState[storagePoolName].Kind = storagePool.kind();
@@ -912,8 +912,8 @@ public:
if (path == DomainPath) {
state.StoragePoolNames.emplace_back(STATIC_STORAGE_POOL_NAME);
}
- state.StorageUsage = ev->Get()->GetRecord().GetPathDescription().GetDomainDescription().GetDiskSpaceUsage().GetTables().GetTotalSize();
- state.StorageLimit = ev->Get()->GetRecord().GetPathDescription().GetDomainDescription().GetDatabaseQuotas().Getdata_stream_reserved_storage_quota();
+ state.StorageUsage = ev->Get()->GetRecord().pathdescription().domaindescription().diskspaceusage().tables().totalsize();
+ state.StorageQuota = ev->Get()->GetRecord().pathdescription().domaindescription().databasequotas().data_size_hard_quota();
DescribeByPath[path] = ev->Release();
}
@@ -2172,13 +2172,15 @@ public:
break;
}
}
- auto usage = (float)databaseState.StorageUsage / databaseState.StorageLimit;
- if (usage > 0.9) {
- context.ReportStatus(Ydb::Monitoring::StatusFlag::RED, "Storage usage over 90%", ETags::StorageState);
- } else if (usage > 0.85) {
- context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Storage usage over 85%", ETags::StorageState);
- } else if (usage > 0.75) {
- context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Storage usage over 75%", ETags::StorageState);
+ if (databaseState.StorageQuota > 0) {
+ auto usage = (float)databaseState.StorageUsage / databaseState.StorageQuota;
+ if (usage > 0.9) {
+ context.ReportStatus(Ydb::Monitoring::StatusFlag::RED, "Storage usage over 90%", ETags::StorageState);
+ } else if (usage > 0.85) {
+ context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Storage usage over 85%", ETags::StorageState);
+ } else if (usage > 0.75) {
+ context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Storage usage over 75%", ETags::StorageState);
+ }
}
storageStatus.set_overall(context.GetOverallStatus());
}
diff --git a/ydb/core/health_check/health_check_ut.cpp b/ydb/core/health_check/health_check_ut.cpp
index 6b299c2540..b402d39f2d 100644
--- a/ydb/core/health_check/health_check_ut.cpp
+++ b/ydb/core/health_check/health_check_ut.cpp
@@ -57,7 +57,11 @@ Y_UNIT_TEST_SUITE(THealthCheckTest) {
auto domain = record->mutable_pathdescription()->mutable_domaindescription();
domain->mutable_diskspaceusage()->mutable_tables()->set_totalsize(size);
- domain->mutable_databasequotas()->set_data_stream_reserved_storage_quota(quota);
+ if (quota == 0) {
+ domain->clear_databasequotas();
+ } else {
+ domain->mutable_databasequotas()->set_data_size_hard_quota(quota);
+ }
}
void AddGroupsInControllerSelectGroupsResult(TEvBlobStorage::TEvControllerSelectGroupsResult::TPtr* ev, int groupCount) {
@@ -265,7 +269,7 @@ Y_UNIT_TEST_SUITE(THealthCheckTest) {
domain->mutable_databasequotas()->set_data_stream_reserved_storage_quota(quota);
}
- void StorageTest(ui64 usage, ui64 storageIssuesNumber, Ydb::Monitoring::StatusFlag::Status status = Ydb::Monitoring::StatusFlag::GREEN) {
+ void StorageTest(ui64 usage, ui64 quota, ui64 storageIssuesNumber, Ydb::Monitoring::StatusFlag::Status status = Ydb::Monitoring::StatusFlag::GREEN) {
TPortManager tp;
ui16 port = tp.GetPort(2134);
ui16 grpcPort = tp.GetPort(2135);
@@ -285,7 +289,7 @@ Y_UNIT_TEST_SUITE(THealthCheckTest) {
switch (ev->GetTypeRewrite()) {
case TEvSchemeShard::EvDescribeSchemeResult: {
auto *x = reinterpret_cast<NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult::TPtr*>(&ev);
- ChangeDescribeSchemeResult(x, usage, 100);
+ ChangeDescribeSchemeResult(x, usage, quota);
break;
}
}
@@ -309,19 +313,23 @@ Y_UNIT_TEST_SUITE(THealthCheckTest) {
}
Y_UNIT_TEST(StorageLimit95) {
- StorageTest(95, 1, Ydb::Monitoring::StatusFlag::RED);
+ StorageTest(95, 100, 1, Ydb::Monitoring::StatusFlag::RED);
}
Y_UNIT_TEST(StorageLimit87) {
- StorageTest(87, 1, Ydb::Monitoring::StatusFlag::ORANGE);
+ StorageTest(87, 100, 1, Ydb::Monitoring::StatusFlag::ORANGE);
}
Y_UNIT_TEST(StorageLimit80) {
- StorageTest(80, 1, Ydb::Monitoring::StatusFlag::YELLOW);
+ StorageTest(80, 100, 1, Ydb::Monitoring::StatusFlag::YELLOW);
}
Y_UNIT_TEST(StorageLimit50) {
- StorageTest(50, 0, Ydb::Monitoring::StatusFlag::GREEN);
+ StorageTest(50, 100, 0, Ydb::Monitoring::StatusFlag::GREEN);
+ }
+
+ Y_UNIT_TEST(StorageNoQuota) {
+ StorageTest(100, 0, 0, Ydb::Monitoring::StatusFlag::GREEN);
}
}
diff --git a/ydb/core/http_proxy/CMakeLists.darwin.txt b/ydb/core/http_proxy/CMakeLists.darwin.txt
index 01d1e50a36..c06ca33fe9 100644
--- a/ydb/core/http_proxy/CMakeLists.darwin.txt
+++ b/ydb/core/http_proxy/CMakeLists.darwin.txt
@@ -33,10 +33,12 @@ target_link_libraries(ydb-core-http_proxy PUBLIC
cpp-client-iam_private
ydb-services-datastreams
services-persqueue_v1-actors
+ api-protos
)
target_sources(ydb-core-http_proxy PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/auth_factory.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/discovery_actor.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/exceptions_mapping.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/grpc_service.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/http_req.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/http_service.cpp
diff --git a/ydb/core/http_proxy/CMakeLists.linux-aarch64.txt b/ydb/core/http_proxy/CMakeLists.linux-aarch64.txt
index 15de640511..2502ee316a 100644
--- a/ydb/core/http_proxy/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/http_proxy/CMakeLists.linux-aarch64.txt
@@ -34,10 +34,12 @@ target_link_libraries(ydb-core-http_proxy PUBLIC
cpp-client-iam_private
ydb-services-datastreams
services-persqueue_v1-actors
+ api-protos
)
target_sources(ydb-core-http_proxy PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/auth_factory.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/discovery_actor.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/exceptions_mapping.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/grpc_service.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/http_req.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/http_service.cpp
diff --git a/ydb/core/http_proxy/CMakeLists.linux.txt b/ydb/core/http_proxy/CMakeLists.linux.txt
index 15de640511..2502ee316a 100644
--- a/ydb/core/http_proxy/CMakeLists.linux.txt
+++ b/ydb/core/http_proxy/CMakeLists.linux.txt
@@ -34,10 +34,12 @@ target_link_libraries(ydb-core-http_proxy PUBLIC
cpp-client-iam_private
ydb-services-datastreams
services-persqueue_v1-actors
+ api-protos
)
target_sources(ydb-core-http_proxy PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/auth_factory.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/discovery_actor.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/exceptions_mapping.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/grpc_service.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/http_req.cpp
${CMAKE_SOURCE_DIR}/ydb/core/http_proxy/http_service.cpp
diff --git a/ydb/core/http_proxy/custom_metrics.h b/ydb/core/http_proxy/custom_metrics.h
index 318f790be9..089e9190ac 100644
--- a/ydb/core/http_proxy/custom_metrics.h
+++ b/ydb/core/http_proxy/custom_metrics.h
@@ -157,7 +157,7 @@ void FillOutputCustomMetrics<GetRecordsResult>(const GetRecordsResult& result, c
return sum + r.data().size() +
r.partition_key().size() +
r.sequence_number().size() +
- sizeof(r.timestamp()) +
+ sizeof(r.approximate_arrival_timestamp()) +
sizeof(r.encryption())
;
});
diff --git a/ydb/core/http_proxy/events.h b/ydb/core/http_proxy/events.h
index c859597ebe..4acb6376ed 100644
--- a/ydb/core/http_proxy/events.h
+++ b/ydb/core/http_proxy/events.h
@@ -42,6 +42,7 @@ namespace NKikimr::NHttpProxy {
EvListEndpointsRequest,
EvListEndpointsResponse,
EvError,
+ EvErrorWithIssue,
EvCounter,
EvHistCounter,
EvToken,
@@ -139,6 +140,18 @@ namespace NKikimr::NHttpProxy {
, Response(response)
{}
};
+
+ struct TEvErrorWithIssue : public TEventLocal<TEvErrorWithIssue, EvErrorWithIssue> {
+ NYdb::EStatus Status;
+ size_t IssueCode;
+ TString Response;
+
+ TEvErrorWithIssue(const NYdb::EStatus status, const TString& response, size_t issueCode=0)
+ : Status(status)
+ , IssueCode(issueCode)
+ , Response(response)
+ {}
+ };
};
diff --git a/ydb/core/http_proxy/exceptions_mapping.cpp b/ydb/core/http_proxy/exceptions_mapping.cpp
new file mode 100644
index 0000000000..5fcbc1d8d6
--- /dev/null
+++ b/ydb/core/http_proxy/exceptions_mapping.cpp
@@ -0,0 +1,175 @@
+#include "exceptions_mapping.h"
+
+#include <unordered_map>
+
+
+namespace NKikimr::NHttpProxy {
+
+enum class EMethodId : ui8 {
+ CREATE_STREAM = 100,
+ DELETE_STREAM = 101,
+ UPDATE_SHARD_COUNT = 102,
+ UPDATE_STREAM_MODE = 103,
+ UPDATE_STREAM = 104,
+ SET_WRITE_QUOTA = 105,
+ SET_STREAM_RETENTION_PERIOD = 106,
+ DESCRIBE_STREAM = 107,
+ LIST_STREAMS = 108,
+ LIST_STREAM_CONSUMERS = 109,
+ REGISTER_STREAM_CONSUMER = 110,
+ DEREGISTER_STREAM_CONSUMER = 111,
+ GET_SHARD_ITERATOR = 112,
+ GET_RECORDS = 113,
+ LIST_SHARDS = 114,
+ DESCRIBE_STREAM_SUMMARY = 115
+};
+
+static std::unordered_map<TString, EMethodId> getEMethodId = {
+ {"CreateStream", EMethodId::CREATE_STREAM},
+ {"DeleteStream", EMethodId::DELETE_STREAM},
+ {"UpdateShardCount", EMethodId::UPDATE_SHARD_COUNT},
+ {"UpdateStreamMode", EMethodId::UPDATE_STREAM_MODE},
+ {"UpdateStream", EMethodId::UPDATE_STREAM},
+ {"SetWriteQuota", EMethodId::SET_WRITE_QUOTA},
+ {"SetStreamRetentionPeriod", EMethodId::SET_STREAM_RETENTION_PERIOD},
+ {"DescribeStream", EMethodId::DESCRIBE_STREAM},
+ {"ListStreams", EMethodId::LIST_STREAMS},
+ {"ListStreamConsumers", EMethodId::LIST_STREAM_CONSUMERS},
+ {"RegisterStreamConsumer", EMethodId::REGISTER_STREAM_CONSUMER},
+ {"DeregisterStreamConsumer", EMethodId::DEREGISTER_STREAM_CONSUMER},
+ {"GetShardIterator", EMethodId::GET_SHARD_ITERATOR},
+ {"GetRecords", EMethodId::GET_RECORDS},
+ {"ListShards", EMethodId::LIST_SHARDS},
+ {"DescribeStreamSummary", EMethodId::DESCRIBE_STREAM_SUMMARY}
+};
+
+
+TException AlreadyExistsExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ Y_UNUSED(issueCode);
+ return TException("ResourceInUseException", HTTP_BAD_REQUEST);
+}
+
+TException BadRequestExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ EMethodId Method = getEMethodId[method];
+
+ switch (issueCode) {
+ case NYds::EErrorCodes::ACCESS_DENIED:
+ return TException("AccessDeniedException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::INVALID_ARGUMENT:
+ return TException("InvalidArgumentException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::VALIDATION_ERROR:
+ return TException("ValidationException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::MISSING_PARAMETER:
+ return TException("MissingParameter", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::IN_USE:
+ return TException("ResourceInUseException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::GENERIC_ERROR:
+ switch (Method) {
+ case EMethodId::LIST_STREAMS:
+ return TException("ValidationException", HTTP_BAD_REQUEST);
+ case EMethodId::DESCRIBE_STREAM:
+ return TException("ResourceNotFoundException", HTTP_BAD_REQUEST);
+ case EMethodId::CREATE_STREAM:
+ return TException("LimitExceededException", HTTP_BAD_REQUEST);
+ default:
+ return TException("ValidationException", HTTP_BAD_REQUEST);
+ }
+ case NYds::EErrorCodes::EXPIRED_TOKEN:
+ return TException("ExpiredNextTokenException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::EXPIRED_ITERATOR:
+ return TException("ExpiredIteratorException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::NOT_FOUND:
+ return TException("ResourceNotFoundException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::BAD_REQUEST:
+ return TException("ValidationException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::INCOMPLETE_SIGNATURE:
+ return TException("IncompleteSignature", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::INVALID_PARAMETER_COMBINATION:
+ return TException("InvalidParameterCombination", HTTP_BAD_REQUEST);
+ default:
+ return TException("UnknownError", HTTP_BAD_REQUEST);
+ }
+}
+
+TException GenericErrorExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(issueCode);
+ EMethodId Method = getEMethodId[method];
+ switch (Method) {
+ case EMethodId::CREATE_STREAM:
+ return TException("LimitExceededException", HTTP_BAD_REQUEST);
+ default:
+ return TException("GenericError", HTTP_BAD_REQUEST);
+ }
+}
+
+TException InternalErrorExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ Y_UNUSED(issueCode);
+ return TException("InternalError", HTTP_INTERNAL_SERVER_ERROR);
+}
+
+TException NotFoundExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ switch (issueCode) {
+ case NYds::EErrorCodes::INVALID_ARGUMENT:
+ return TException("InvalidArgumentException", HTTP_BAD_REQUEST);
+ default:
+ return TException("ResourceNotFoundException", HTTP_BAD_REQUEST);
+ }
+}
+
+TException OverloadedExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ switch (issueCode) {
+ case NYds::EErrorCodes::ERROR:
+ return TException("ResourceInUseException", HTTP_BAD_REQUEST);
+ default:
+ return TException("ThrottlingException", HTTP_BAD_REQUEST);
+ }
+}
+
+TException PreconditionFailedExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ Y_UNUSED(issueCode);
+ return TException("ValidationException", HTTP_BAD_REQUEST);
+}
+
+TException SchemeErrorExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ switch (issueCode) {
+ case NYds::EErrorCodes::INVALID_ARGUMENT:
+ return TException("InvalidArgumentException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::VALIDATION_ERROR:
+ return TException("ValidationException", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::NOT_FOUND:
+ case NYds::EErrorCodes::ACCESS_DENIED:
+ return TException("ResourceNotFoundException", HTTP_BAD_REQUEST);
+ default:
+ return TException("InvalidArgumentException", HTTP_BAD_REQUEST);
+ }
+}
+
+TException UnauthorizedExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ switch (issueCode) {
+ case NYds::EErrorCodes::INCOMPLETE_SIGNATURE:
+ return TException("IncompleteSignature", HTTP_BAD_REQUEST);
+ case NYds::EErrorCodes::MISSING_AUTHENTICATION_TOKEN:
+ return TException("MissingAuthenticationToken", HTTP_BAD_REQUEST);
+ default:
+ return TException("AccessDeniedException", HTTP_BAD_REQUEST);
+ }
+}
+
+TException UnsupportedExceptions(const TString& method, NYds::EErrorCodes issueCode) {
+ Y_UNUSED(method);
+ switch (issueCode) {
+ case NYds::EErrorCodes::MISSING_ACTION:
+ return TException("MissingAction", HTTP_BAD_REQUEST);
+ default:
+ return TException("InvalidAction", HTTP_BAD_REQUEST);
+ }
+}
+
+}
diff --git a/ydb/core/http_proxy/exceptions_mapping.h b/ydb/core/http_proxy/exceptions_mapping.h
new file mode 100644
index 0000000000..93c3f38953
--- /dev/null
+++ b/ydb/core/http_proxy/exceptions_mapping.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <ydb/services/datastreams/datastreams_codes.h>
+
+#include <library/cpp/http/misc/httpcodes.h>
+
+
+using TException = std::pair<TString, HttpCodes>;
+
+
+namespace NKikimr::NHttpProxy {
+
+ TException AlreadyExistsExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException BadRequestExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException GenericErrorExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException InternalErrorExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException NotFoundExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException OverloadedExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException PreconditionFailedExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException SchemeErrorExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException UnauthorizedExceptions(const TString& method, NYds::EErrorCodes issueCode);
+ TException UnsupportedExceptions(const TString& method, NYds::EErrorCodes issueCode);
+
+} \ No newline at end of file
diff --git a/ydb/core/http_proxy/http_req.cpp b/ydb/core/http_proxy/http_req.cpp
index 08dbb6571e..2ca59fbb56 100644
--- a/ydb/core/http_proxy/http_req.cpp
+++ b/ydb/core/http_proxy/http_req.cpp
@@ -3,6 +3,7 @@
#include "http_req.h"
#include "json_proto_conversion.h"
#include "custom_metrics.h"
+#include "exceptions_mapping.h"
#include <library/cpp/actors/http/http_proxy.h>
#include <library/cpp/cgiparam/cgiparam.h>
@@ -60,85 +61,50 @@ namespace NKikimr::NHttpProxy {
using namespace Ydb::DataStreams::V1;
using namespace NYdb::NDataStreams::V1;
- TString StatusToErrorType(NYdb::EStatus status) {
+ TException MapToException(NYdb::EStatus status, const TString& method, size_t issueCode = ISSUE_CODE_ERROR) {
+ auto IssueCode = static_cast<NYds::EErrorCodes>(issueCode);
+
switch(status) {
case NYdb::EStatus::SUCCESS:
- return "OK";
+ return TException("", HTTP_OK);
case NYdb::EStatus::BAD_REQUEST:
- return "InvalidParameterValueException"; //TODO: bring here issues and parse from them
- case NYdb::EStatus::CLIENT_UNAUTHENTICATED:
+ return BadRequestExceptions(method, IssueCode);
case NYdb::EStatus::UNAUTHORIZED:
- return "AccessDeniedException";
+ return UnauthorizedExceptions(method, IssueCode);
case NYdb::EStatus::INTERNAL_ERROR:
- return "InternalFailureException";
- case NYdb::EStatus::ABORTED:
- return "RequestExpiredException"; //TODO: find better code
- case NYdb::EStatus::UNAVAILABLE:
- return "ServiceUnavailableException";
+ return InternalErrorExceptions(method, IssueCode);
case NYdb::EStatus::OVERLOADED:
- return "ThrottlingException";
- case NYdb::EStatus::SCHEME_ERROR:
- return "ResourceNotFoundException";
+ return OverloadedExceptions(method, IssueCode);
case NYdb::EStatus::GENERIC_ERROR:
- return "InternalFailureException"; //TODO: find better code
- case NYdb::EStatus::TIMEOUT:
- return "RequestTimeoutException";
- case NYdb::EStatus::BAD_SESSION:
- return "AccessDeniedException";
+ return GenericErrorExceptions(method, IssueCode);
case NYdb::EStatus::PRECONDITION_FAILED:
+ return PreconditionFailedExceptions(method, IssueCode);
case NYdb::EStatus::ALREADY_EXISTS:
- return "ValidationErrorException"; //TODO: find better code
+ return AlreadyExistsExceptions(method, IssueCode);
+ case NYdb::EStatus::SCHEME_ERROR:
+ return SchemeErrorExceptions(method, IssueCode);
case NYdb::EStatus::NOT_FOUND:
- return "ResourceNotFoundException";
- case NYdb::EStatus::SESSION_EXPIRED:
- return "AccessDeniedException";
+ return NotFoundExceptions(method, IssueCode);
case NYdb::EStatus::UNSUPPORTED:
- return "InvalidActionException";
- default:
- return "InternalFailureException";
- }
-
- }
-
- HttpCodes StatusToHttpCode(NYdb::EStatus status) {
- switch(status) {
- case NYdb::EStatus::SUCCESS:
- return HTTP_OK;
- case NYdb::EStatus::UNSUPPORTED:
- case NYdb::EStatus::BAD_REQUEST:
- return HTTP_BAD_REQUEST;
+ return UnsupportedExceptions(method, IssueCode);
case NYdb::EStatus::CLIENT_UNAUTHENTICATED:
- case NYdb::EStatus::UNAUTHORIZED:
- return HTTP_FORBIDDEN;
- case NYdb::EStatus::INTERNAL_ERROR:
- return HTTP_INTERNAL_SERVER_ERROR;
+ return TException("Unauthenticated", HTTP_BAD_REQUEST);
case NYdb::EStatus::ABORTED:
- return HTTP_CONFLICT;
+ return TException("Aborted", HTTP_BAD_REQUEST);
case NYdb::EStatus::UNAVAILABLE:
- return HTTP_SERVICE_UNAVAILABLE;
- case NYdb::EStatus::OVERLOADED:
- return HTTP_BAD_REQUEST;
- case NYdb::EStatus::SCHEME_ERROR:
- return HTTP_NOT_FOUND;
- case NYdb::EStatus::GENERIC_ERROR:
- return HTTP_BAD_REQUEST;
+ return TException("Unavailable", HTTP_BAD_REQUEST);
case NYdb::EStatus::TIMEOUT:
- return HTTP_GATEWAY_TIME_OUT;
+ return TException("RequestExpired", HTTP_BAD_REQUEST);
case NYdb::EStatus::BAD_SESSION:
- return HTTP_UNAUTHORIZED;
- case NYdb::EStatus::PRECONDITION_FAILED:
- return HTTP_PRECONDITION_FAILED;
- case NYdb::EStatus::ALREADY_EXISTS:
- return HTTP_CONFLICT;
- case NYdb::EStatus::NOT_FOUND:
- return HTTP_NOT_FOUND;
+ return TException("BadSession", HTTP_BAD_REQUEST);
case NYdb::EStatus::SESSION_EXPIRED:
- return HTTP_UNAUTHORIZED;
+ return TException("SessionExpired", HTTP_BAD_REQUEST);
default:
- return HTTP_INTERNAL_SERVER_ERROR;
+ return TException("InternalException", HTTP_INTERNAL_SERVER_ERROR);
}
}
+
template<class TProto>
TString ExtractStreamNameWithoutProtoField(const TProto& req)
{
@@ -266,6 +232,7 @@ namespace NKikimr::NHttpProxy {
HFunc(TEvServerlessProxy::TEvClientReady, HandleClientReady);
HFunc(TEvServerlessProxy::TEvDiscoverDatabaseEndpointResult, Handle);
HFunc(TEvServerlessProxy::TEvError, HandleError);
+ HFunc(TEvServerlessProxy::TEvErrorWithIssue, HandleErrorWithIssue);
HFunc(TEvServerlessProxy::TEvGrpcRequestResult, HandleGrpcResponse);
HFunc(TEvServerlessProxy::TEvToken, HandleToken);
default:
@@ -367,6 +334,7 @@ namespace NKikimr::NHttpProxy {
auto result = MakeHolder<TEvServerlessProxy::TEvGrpcRequestResult>();
if (response.IsSuccess()) {
result->Message = MakeHolder<TProtoResult>(response.GetResult());
+
}
result->Status = MakeHolder<NYdb::TStatus>(response);
actorSystem->Send(actorId, result.Release());
@@ -393,7 +361,11 @@ namespace NKikimr::NHttpProxy {
ReplyWithError(ctx, ev->Get()->Status, ev->Get()->Response);
}
- void ReplyWithError(const TActorContext& ctx, NYdb::EStatus status, const TString& errorText) {
+ void HandleErrorWithIssue(TEvServerlessProxy::TEvErrorWithIssue::TPtr& ev, const TActorContext& ctx) {
+ ReplyWithError(ctx, ev->Get()->Status, ev->Get()->Response, ev->Get()->IssueCode);
+ }
+
+ void ReplyWithError(const TActorContext& ctx, NYdb::EStatus status, const TString& errorText, size_t issueCode = ISSUE_CODE_GENERIC) {
/* deprecated metric: */ ctx.Send(MakeMetricsServiceID(),
new TEvServerlessProxy::TEvCounter{
1, true, true,
@@ -402,26 +374,12 @@ namespace NKikimr::NHttpProxy {
{"folder", HttpContext.FolderId},
{"database", HttpContext.DatabaseId},
{"stream", HttpContext.StreamName},
- {"code", TStringBuilder() << (int)StatusToHttpCode(status)},
+ {"code", TStringBuilder() << (int)MapToException(status, Method, issueCode).second},
{"name", "api.http.errors_per_second"}}
});
-
- ctx.Send(MakeMetricsServiceID(),
- new TEvServerlessProxy::TEvCounter{
- 1, true, true,
- {{"database", HttpContext.DatabaseName},
- {"method", Method},
- {"cloud_id", HttpContext.CloudId},
- {"folder_id", HttpContext.FolderId},
- {"database_id", HttpContext.DatabaseId},
- {"topic", HttpContext.StreamName},
- {"code", TStringBuilder() << (int)StatusToHttpCode(status)},
- {"name", "api.http.data_streams.response.count"}}
- });
- //TODO: add api.http.response.count
HttpContext.ResponseData.Status = status;
HttpContext.ResponseData.ErrorText = errorText;
- HttpContext.DoReply(ctx);
+ HttpContext.DoReply(ctx, issueCode);
ctx.Send(AuthActor, new TEvents::TEvPoisonPill());
@@ -459,7 +417,7 @@ namespace NKikimr::NHttpProxy {
return;
}
- return ReplyWithError(ctx, ev->Get()->Status, ev->Get()->Message);
+ ReplyWithError(ctx, ev->Get()->Status, ev->Get()->Message);
}
void ReportLatencyCounters(const TActorContext& ctx) {
@@ -490,7 +448,7 @@ namespace NKikimr::NHttpProxy {
ctx.Send(MakeMetricsServiceID(),
new TEvServerlessProxy::TEvCounter{
1, true, true,
- {{"database", HttpContext.DatabaseName},
+ {{"database", HttpContext.DatabaseName},
{"method", Method},
{"cloud_id", HttpContext.CloudId},
{"folder_id", HttpContext.FolderId},
@@ -516,7 +474,11 @@ namespace NKikimr::NHttpProxy {
TStringOutput stringOutput(errorText);
ev->Get()->Status->GetIssues().PrintTo(stringOutput);
RetryCounter.Void();
- return ReplyWithError(ctx, ev->Get()->Status->GetStatus(), errorText);
+ auto issues = ev->Get()->Status->GetIssues();
+ size_t issueCode = (
+ issues && issues.begin()->IssueCode != ISSUE_CODE_OK
+ ) ? issues.begin()->IssueCode : ISSUE_CODE_GENERIC;
+ return ReplyWithError(ctx, ev->Get()->Status->GetStatus(), errorText, issueCode);
}
}
}
@@ -533,12 +495,18 @@ namespace NKikimr::NHttpProxy {
StartTime = ctx.Now();
try {
HttpContext.RequestBodyToProto(&Request);
- } catch (std::exception& e) {
+ } catch (const NKikimr::NSQS::TSQSException& e) {
+ NYds::EErrorCodes issueCode = NYds::EErrorCodes::OK;
+ if (e.ErrorClass.ErrorCode == "MissingParameter")
+ issueCode = NYds::EErrorCodes::MISSING_PARAMETER;
+ else if (e.ErrorClass.ErrorCode == "InvalidQueryParameter" || e.ErrorClass.ErrorCode == "MalformedQueryString")
+ issueCode = NYds::EErrorCodes::INVALID_ARGUMENT;
+ return ReplyWithError(ctx, NYdb::EStatus::BAD_REQUEST, e.what(), static_cast<size_t>(issueCode));
+ } catch (const std::exception& e) {
LOG_SP_WARN_S(ctx, NKikimrServices::HTTP_PROXY,
"got new request with incorrect json from [" << HttpContext.SourceAddress << "] " <<
"database '" << HttpContext.DatabaseName << "'");
-
- return ReplyWithError(ctx, NYdb::EStatus::BAD_REQUEST, e.what());
+ return ReplyWithError(ctx, NYdb::EStatus::BAD_REQUEST, e.what(), static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT));
}
if (HttpContext.DatabaseName.empty()) {
@@ -644,9 +612,16 @@ namespace NKikimr::NHttpProxy {
proc->second->Execute(std::move(context), std::move(signature), ctx);
return true;
}
- context.ResponseData.Status = NYdb::EStatus::BAD_REQUEST;
- context.ResponseData.ErrorText = TStringBuilder() << "Unknown method name " << name;
- context.DoReply(ctx);
+ else if (name.empty()) {
+ context.ResponseData.Status = NYdb::EStatus::UNSUPPORTED;
+ context.ResponseData.ErrorText = TStringBuilder() << "Unknown method name " << name;
+ context.DoReply(ctx, static_cast<size_t>(NYds::EErrorCodes::MISSING_ACTION));
+ }
+ else {
+ context.ResponseData.Status = NYdb::EStatus::UNSUPPORTED;
+ context.ResponseData.ErrorText = TStringBuilder() << "Missing method name " << name;
+ context.DoReply(ctx);
+ }
return false;
}
@@ -699,7 +674,7 @@ namespace NKikimr::NHttpProxy {
return signature;
}
- void THttpRequestContext::DoReply(const TActorContext& ctx) {
+ void THttpRequestContext::DoReply(const TActorContext& ctx, size_t issueCode) {
auto createResponse = [this](const auto& request,
TStringBuf status,
TStringBuf message,
@@ -750,13 +725,14 @@ namespace NKikimr::NHttpProxy {
ResponseData.Body.SetType(NJson::JSON_MAP);
ResponseData.Body["message"] = ResponseData.ErrorText;
- ResponseData.Body["__type"] = StatusToErrorType(ResponseData.Status);
+ ResponseData.Body["__type"] = MapToException(ResponseData.Status, MethodName, issueCode).first;
}
+ auto [errorName, httpCode] = MapToException(ResponseData.Status, MethodName, issueCode);
auto response = createResponse(
Request,
- TStringBuilder() << (ui32)StatusToHttpCode(ResponseData.Status),
- StatusToErrorType(ResponseData.Status),
+ TStringBuilder() << (ui32)httpCode,
+ errorName,
strByMimeAws(ContentType),
ResponseData.DumpBody(ContentType)
);
@@ -781,8 +757,8 @@ namespace NKikimr::NHttpProxy {
} else if (AsciiEqualsIgnoreCase(header.first, REQUEST_TARGET_HEADER)) {
TString requestTarget = TString(header.second);
TVector<TString> parts = SplitString(requestTarget, ".");
- ApiVersion = parts[0];
- MethodName = parts[1];
+ ApiVersion = parts.size() > 0 ? parts[0] : "";
+ MethodName = parts.size() > 1 ? parts[1] : "";
} else if (AsciiEqualsIgnoreCase(header.first, REQUEST_CONTENT_TYPE_HEADER)) {
ContentType = mimeByStr(header.second);
} else if (AsciiEqualsIgnoreCase(header.first, REQUEST_DATE_HEADER)) {
@@ -898,7 +874,10 @@ namespace NKikimr::NHttpProxy {
void HandleCacheNavigateResponse(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr& ev, const TActorContext& ctx) {
const NSchemeCache::TSchemeCacheNavigate* navigate = ev->Get()->Request.Get();
if (navigate->ErrorCount) {
- return ReplyWithError(ctx, NYdb::EStatus::SCHEME_ERROR, TStringBuilder() << "Database with path '" << Database << "' doesn't exists");
+ return ReplyWithError(
+ ctx, NYdb::EStatus::SCHEME_ERROR, TStringBuilder() << "Database with path '" << Database << "' doesn't exists",
+ NYds::EErrorCodes::NOT_FOUND
+ );
}
Y_VERIFY(navigate->ResultSet.size() == 1);
if (navigate->ResultSet.front().PQGroupInfo) {
@@ -935,7 +914,9 @@ namespace NKikimr::NHttpProxy {
TInstant signedAt;
if (!Signature.Get() && IamToken.empty()) {
return ReplyWithError(ctx, NYdb::EStatus::UNAUTHORIZED,
- "Neither Credentials nor IAM token was provided");
+ "Neither Credentials nor IAM token was provided",
+ NYds::EErrorCodes::INCOMPLETE_SIGNATURE
+ );
}
if (Signature) {
bool found = false;
@@ -948,12 +929,23 @@ namespace NKikimr::NHttpProxy {
if (!found) {
return ReplyWithError(ctx, NYdb::EStatus::UNAUTHORIZED,
TStringBuilder() << "Wrong service region: got " << Signature->GetRegion() <<
- " expected " << ServiceConfig.GetHttpConfig().GetYandexCloudServiceRegion(0));
+ " expected " << ServiceConfig.GetHttpConfig().GetYandexCloudServiceRegion(0),
+ NYds::EErrorCodes::INCOMPLETE_SIGNATURE
+ );
}
if (!TInstant::TryParseIso8601(Signature->GetSigningTimestamp(), signedAt)) {
return ReplyWithError(ctx, NYdb::EStatus::BAD_REQUEST,
- "Failed to parse Signature timestamp");
+ "Failed to parse Signature timestamp",
+ NYds::EErrorCodes::INCOMPLETE_SIGNATURE
+ );
+ }
+
+ if (Signature->GetAccessKeyId().empty()) {
+ return ReplyWithError(ctx, NYdb::EStatus::UNAUTHORIZED,
+ "Access key id should be provided",
+ NYds::EErrorCodes::MISSING_AUTHENTICATION_TOKEN
+ );
}
}
@@ -1041,8 +1033,9 @@ namespace NKikimr::NHttpProxy {
ctx.Send(MakeIamTokenServiceID(), std::move(request));
}
- void ReplyWithError(const TActorContext& ctx, NYdb::EStatus status, const TString& errorText) {
- ctx.Send(Sender, new TEvServerlessProxy::TEvError(status, errorText));
+ void ReplyWithError(const TActorContext& ctx, NYdb::EStatus status, const TString& errorText,
+ NYds::EErrorCodes issueCode = NYds::EErrorCodes::GENERIC_ERROR) {
+ ctx.Send(Sender, new TEvServerlessProxy::TEvErrorWithIssue(status, errorText, static_cast<size_t>(issueCode)));
TBase::Die(ctx);
}
@@ -1137,3 +1130,10 @@ namespace NKikimr::NHttpProxy {
} // namespace NKikimr::NHttpProxy
+
+template <>
+void Out<NKikimr::NHttpProxy::THttpResponseData>(IOutputStream& o, const NKikimr::NHttpProxy::THttpResponseData& p) {
+ TString s = TStringBuilder() << "NYdb status: " << std::to_string(static_cast<size_t>(p.Status)) <<
+ ". Body: " << NJson::WriteJson(p.Body) << ". Error text: " << p.ErrorText;
+ o.Write(s.data(), s.length());
+}
diff --git a/ydb/core/http_proxy/http_req.h b/ydb/core/http_proxy/http_req.h
index 8973107348..60437ff3b2 100644
--- a/ydb/core/http_proxy/http_req.h
+++ b/ydb/core/http_proxy/http_req.h
@@ -2,6 +2,8 @@
#include "events.h"
+#include <ydb/services/datastreams/datastreams_codes.h>
+
#include <ydb/core/protos/serverless_proxy_config.pb.h>
#include <ydb/core/protos/serverless_proxy_config.pb.h>
@@ -15,14 +17,16 @@
#include <library/cpp/json/json_value.h>
#include <library/cpp/json/json_reader.h>
+#include <util/stream/output.h>
#include <util/string/builder.h>
+#define ISSUE_CODE_OK 0
+#define ISSUE_CODE_GENERIC 500030
+#define ISSUE_CODE_ERROR 500100
-namespace NKikimr::NHttpProxy {
-HttpCodes StatusToHttpCode(NYdb::EStatus status);
-TString StatusToErrorType(NYdb::EStatus status);
+namespace NKikimr::NHttpProxy {
class TRetryCounter {
public:
@@ -88,7 +92,7 @@ struct THttpRequestContext {
}
THolder<NKikimr::NSQS::TAwsRequestSignV4> GetSignature();
- void DoReply(const TActorContext& ctx);
+ void DoReply(const TActorContext& ctx, size_t issueCode = ISSUE_CODE_GENERIC);
void ParseHeaders(TStringBuf headers);
void RequestBodyToProto(NProtoBuf::Message* request);
};
@@ -125,3 +129,6 @@ NActors::IActor* CreateIamAuthActor(const TActorId sender, THttpRequestContext&
} // namespace NKinesis::NHttpProxy
+
+template <>
+void Out<NKikimr::NHttpProxy::THttpResponseData>(IOutputStream& o, const NKikimr::NHttpProxy::THttpResponseData& p);
diff --git a/ydb/core/http_proxy/http_service.cpp b/ydb/core/http_proxy/http_service.cpp
index 026c9c7324..a08d764bc5 100644
--- a/ydb/core/http_proxy/http_service.cpp
+++ b/ydb/core/http_proxy/http_service.cpp
@@ -100,10 +100,10 @@ namespace NKikimr::NHttpProxy {
try {
auto signature = context.GetSignature();
Processors->Execute(context.MethodName, std::move(context), std::move(signature), ctx);
- } catch (NKikimr::NSQS::TSQSException& e) {
+ } catch (const NKikimr::NSQS::TSQSException& e) {
context.ResponseData.Status = NYdb::EStatus::BAD_REQUEST;
context.ResponseData.ErrorText = e.what();
- context.DoReply(ctx);
+ context.DoReply(ctx, static_cast<size_t>(NYds::EErrorCodes::ACCESS_DENIED));
return;
}
}
diff --git a/ydb/core/http_proxy/json_proto_conversion.h b/ydb/core/http_proxy/json_proto_conversion.h
index 0cc5f0915c..e93eba8327 100644
--- a/ydb/core/http_proxy/json_proto_conversion.h
+++ b/ydb/core/http_proxy/json_proto_conversion.h
@@ -8,6 +8,7 @@
#include <library/cpp/string_utils/base64/base64.h>
#include <ydb/library/naming_conventions/naming_conventions.h>
#include <ydb/public/sdk/cpp/client/ydb_datastreams/datastreams.h>
+#include <ydb/library/http_proxy/error/error.h>
#include <nlohmann/json.hpp>
@@ -128,11 +129,20 @@ inline void ProtoToJson(const NProtoBuf::Message& resp, NJson::TJsonValue& value
void JsonToProto(const NJson::TJsonValue& jsonValue, NProtoBuf::Message* message, ui32 depth = 0) {
Y_ENSURE(depth < 101, "Json depth is > 100");
- Y_ENSURE(jsonValue.IsMap(), "Top level of json value is not a map");
+ Y_ENSURE_EX(
+ !jsonValue.IsNull(),
+ NKikimr::NSQS::TSQSException(NKikimr::NSQS::NErrors::MISSING_PARAMETER) <<
+ "Top level of json value is not a map"
+ );
auto* desc = message->GetDescriptor();
auto* reflection = message->GetReflection();
for (const auto& [key, value] : jsonValue.GetMap()) {
auto* fieldDescriptor = desc->FindFieldByName(NNaming::CamelToSnakeCase(key));
+ Y_ENSURE_EX(
+ fieldDescriptor,
+ NKikimr::NSQS::TSQSException(NKikimr::NSQS::NErrors::INVALID_QUERY_PARAMETER) <<
+ "Unexpected json key: " << key
+ );
Y_ENSURE(fieldDescriptor, "Unexpected json key: " + key);
auto transformer = Ydb::DataStreams::V1::TRANSFORM_NONE;
if (fieldDescriptor->options().HasExtension(Ydb::DataStreams::V1::FieldTransformer)) {
@@ -282,7 +292,11 @@ void JsonToProto(const NJson::TJsonValue& jsonValue, NProtoBuf::Message* message
inline void NlohmannJsonToProto(const nlohmann::json& jsonValue, NProtoBuf::Message* message, ui32 depth = 0) {
Y_ENSURE(depth < 101, "Json depth is > 100");
- Y_ENSURE(jsonValue.is_object(), "Top level of json value is not a map");
+ Y_ENSURE_EX(
+ !jsonValue.is_null(),
+ NKikimr::NSQS::TSQSException(NKikimr::NSQS::NErrors::MISSING_PARAMETER) <<
+ "Top level of json value is not a map"
+ );
auto* desc = message->GetDescriptor();
auto* reflection = message->GetReflection();
for (const auto& [key, value] : jsonValue.get<std::unordered_map<std::string, nlohmann::json>>()) {
diff --git a/ydb/core/io_formats/csv_arrow.cpp b/ydb/core/io_formats/csv_arrow.cpp
index 7028c62b00..480456a6f1 100644
--- a/ydb/core/io_formats/csv_arrow.cpp
+++ b/ydb/core/io_formats/csv_arrow.cpp
@@ -99,6 +99,7 @@ std::shared_ptr<arrow::RecordBatch> TArrowCSV::ConvertColumnTypes(std::shared_pt
std::vector<std::shared_ptr<arrow::Array>> resultColumns;
std::set<std::string> columnsFilter(ResultColumns.begin(), ResultColumns.end());
+ arrow::SchemaBuilder sBuilderFixed;
for (auto&& f : schema->fields()) {
auto fArr = parsedBatch->GetColumnByName(f->name());
std::shared_ptr<arrow::DataType> originalType;
@@ -106,8 +107,9 @@ std::shared_ptr<arrow::RecordBatch> TArrowCSV::ConvertColumnTypes(std::shared_pt
auto it = OriginalColumnTypes.find(f->name());
Y_VERIFY(it != OriginalColumnTypes.end());
originalType = it->second;
+ Y_VERIFY(sBuilderFixed.AddField(std::make_shared<arrow::Field>(f->name(), originalType)).ok());
} else {
- originalType = f->type();
+ continue;
}
if (fArr->type()->Equals(originalType)) {
resultColumns.emplace_back(fArr);
@@ -148,7 +150,9 @@ std::shared_ptr<arrow::RecordBatch> TArrowCSV::ConvertColumnTypes(std::shared_pt
}
}
- return arrow::RecordBatch::Make(schema, parsedBatch->num_rows(), resultColumns);
+ auto resultSchemaFixed = sBuilderFixed.Finish();
+ Y_VERIFY(resultSchemaFixed.ok());
+ return arrow::RecordBatch::Make(*resultSchemaFixed, parsedBatch->num_rows(), resultColumns);
}
std::shared_ptr<arrow::RecordBatch> TArrowCSV::ReadNext(const TString& csv, TString& errString) {
diff --git a/ydb/core/kqp/common/CMakeLists.darwin.txt b/ydb/core/kqp/common/CMakeLists.darwin.txt
index ad02149145..17c27334f3 100644
--- a/ydb/core/kqp/common/CMakeLists.darwin.txt
+++ b/ydb/core/kqp/common/CMakeLists.darwin.txt
@@ -29,6 +29,7 @@ target_link_libraries(core-kqp-common PUBLIC
tools-enum_parser-enum_serialization_runtime
)
target_sources(core-kqp-common PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_event_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_resolve.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_ru_calc.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_yql.cpp
diff --git a/ydb/core/kqp/common/CMakeLists.linux-aarch64.txt b/ydb/core/kqp/common/CMakeLists.linux-aarch64.txt
index 2532d5453d..f2a11f958e 100644
--- a/ydb/core/kqp/common/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/kqp/common/CMakeLists.linux-aarch64.txt
@@ -30,6 +30,7 @@ target_link_libraries(core-kqp-common PUBLIC
tools-enum_parser-enum_serialization_runtime
)
target_sources(core-kqp-common PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_event_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_resolve.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_ru_calc.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_yql.cpp
diff --git a/ydb/core/kqp/common/CMakeLists.linux.txt b/ydb/core/kqp/common/CMakeLists.linux.txt
index 2532d5453d..f2a11f958e 100644
--- a/ydb/core/kqp/common/CMakeLists.linux.txt
+++ b/ydb/core/kqp/common/CMakeLists.linux.txt
@@ -30,6 +30,7 @@ target_link_libraries(core-kqp-common PUBLIC
tools-enum_parser-enum_serialization_runtime
)
target_sources(core-kqp-common PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_event_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_resolve.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_ru_calc.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/common/kqp_yql.cpp
diff --git a/ydb/core/kqp/common/kqp.h b/ydb/core/kqp/common/kqp.h
index a3bb419c4e..4a231cc250 100644
--- a/ydb/core/kqp/common/kqp.h
+++ b/ydb/core/kqp/common/kqp.h
@@ -4,14 +4,15 @@
#include "kqp_prepared_query.h"
#include <library/cpp/lwtrace/shuttle.h>
-#include <ydb/core/kqp/counters/kqp_counters.h>
-#include <ydb/public/api/protos/ydb_status_codes.pb.h>
#include <ydb/core/grpc_services/base/base.h>
#include <ydb/core/grpc_services/cancelation/cancelation.h>
-
+#include <ydb/core/grpc_services/cancelation/cancelation_event.h>
+#include <ydb/core/kqp/counters/kqp_counters.h>
+#include <ydb/library/aclib/aclib.h>
#include <ydb/library/yql/dq/actors/dq.h>
#include <ydb/library/yql/public/issue/yql_issue.h>
+#include <ydb/public/api/protos/ydb_status_codes.pb.h>
#include <util/generic/guid.h>
#include <util/generic/ptr.h>
@@ -253,14 +254,20 @@ struct TEvKqp {
struct TEvQueryRequest : public NActors::TEventLocal<TEvQueryRequest, TKqpEvents::EvQueryRequest> {
public:
- using TSerializerCb = void (*)(std::shared_ptr<NGRpcService::IRequestCtxMtSafe>&, NKikimrKqp::TEvQueryRequest*) noexcept;
- TEvQueryRequest(std::shared_ptr<NGRpcService::IRequestCtxMtSafe> ctx, TSerializerCb cb, TActorId actorId)
- : RequestCtx(ctx)
- , SerializerCb(cb)
- {
- ActorIdToProto(actorId, Record.MutableCancelationActor());
- }
-
+ TEvQueryRequest(
+ const std::shared_ptr<NGRpcService::IRequestCtxMtSafe>& ctx,
+ const TString& sessionId,
+ TActorId actorId,
+ TString&& yqlText,
+ TString&& queryId,
+ NKikimrKqp::EQueryAction queryAction,
+ NKikimrKqp::EQueryType queryType,
+ const ::Ydb::Table::TransactionControl* txControl,
+ const ::google::protobuf::Map<TProtoStringType, ::Ydb::TypedValue>* ydbParameters,
+ const ::Ydb::Table::QueryStatsCollection::Mode collectStats,
+ const ::Ydb::Table::QueryCachePolicy* queryCachePolicy,
+ const ::Ydb::Operations::OperationParams* operationParams,
+ bool keepSession = false);
TEvQueryRequest() = default;
@@ -273,6 +280,185 @@ struct TEvKqp {
return false;
}
+ const TString& GetDatabase() const {
+ return RequestCtx ? Database : Record.GetRequest().GetDatabase();
+ }
+
+ bool HasYdbStatus() const {
+ return RequestCtx ? false : Record.HasYdbStatus();
+ }
+
+ const ::NKikimrKqp::TTopicOperations& GetTopicOperations() const {
+ return Record.GetRequest().GetTopicOperations();
+ }
+
+ bool HasTopicOperations() const {
+ return Record.GetRequest().HasTopicOperations();
+ }
+
+ bool GetKeepSession() const {
+ return RequestCtx ? KeepSession : Record.GetRequest().GetKeepSession();
+ }
+
+ TDuration GetCancelAfter() const {
+ return RequestCtx ? CancelAfter : TDuration::MilliSeconds(Record.GetRequest().GetCancelAfterMs());
+ }
+
+ TDuration GetOperationTimeout() const {
+ return RequestCtx ? OperationTimeout : TDuration::MilliSeconds(Record.GetRequest().GetTimeoutMs());
+ }
+
+ bool HasAction() const {
+ return RequestCtx ? true : Record.GetRequest().HasAction();
+ }
+
+ void SetSessionId(const TString& sessionId) {
+ if (RequestCtx) {
+ SessionId = sessionId;
+ } else {
+ Record.MutableRequest()->SetSessionId(sessionId);
+ }
+ }
+
+ const TString& GetSessionId() const {
+ return RequestCtx ? SessionId : Record.GetRequest().GetSessionId();
+ }
+
+ NKikimrKqp::EQueryAction GetAction() const {
+ return RequestCtx ? QueryAction : Record.GetRequest().GetAction();
+ }
+
+ NKikimrKqp::EQueryType GetType() const {
+ return RequestCtx ? QueryType : Record.GetRequest().GetType();
+ }
+
+ bool HasPreparedQuery() const {
+ return RequestCtx ? QueryId.size() > 0 : Record.GetRequest().HasPreparedQuery();
+ }
+
+ const TString& GetPreparedQuery() const {
+ return RequestCtx ? QueryId : Record.GetRequest().GetPreparedQuery();
+ }
+
+ const TString& GetQuery() const {
+ return RequestCtx ? YqlText : Record.GetRequest().GetQuery();
+ }
+
+ const ::NKikimrMiniKQL::TParams& GetParameters() const {
+ return Record.GetRequest().GetParameters();
+ }
+
+ const ::Ydb::Table::TransactionControl& GetTxControl() const {
+ return RequestCtx ? *TxControl : Record.GetRequest().GetTxControl();
+ }
+
+ bool GetUsePublicResponseDataFormat() const {
+ return RequestCtx ? true : Record.GetRequest().GetUsePublicResponseDataFormat();
+ }
+
+ bool GetQueryKeepInCache() const {
+ if (RequestCtx) {
+ if (QueryCachePolicy != nullptr) {
+ return QueryCachePolicy->keep_in_cache();
+ }
+ return false;
+ }
+ return Record.GetRequest().GetQueryCachePolicy().keep_in_cache();
+ }
+
+ bool HasTxControl() const {
+ return RequestCtx ? TxControl != nullptr : Record.GetRequest().HasTxControl();
+ }
+
+ bool HasCollectStats() const {
+ return RequestCtx ? true : Record.GetRequest().HasCollectStats();
+ }
+
+ TActorId GetRequestActorId() const {
+ return ActorIdFromProto(Record.GetRequestActorId());
+ }
+
+ const TString& GetTraceId() const {
+ if (RequestCtx) {
+ if (!TraceId) {
+ TraceId = RequestCtx->GetTraceId().GetOrElse("");
+ }
+ return TraceId;
+ }
+
+ return Record.GetTraceId();
+ }
+
+ const TString& GetRequestType() const {
+ if (RequestCtx) {
+ if (!RequestType) {
+ RequestType = RequestCtx->GetRequestType().GetOrElse("");
+ }
+ return RequestType;
+ }
+
+ return Record.GetRequestType();
+ }
+
+ const TIntrusiveConstPtr<NACLib::TUserToken>& GetUserToken() const {
+ if (RequestCtx && RequestCtx->GetInternalToken()) {
+ return RequestCtx->GetInternalToken();
+ }
+
+ if (Token_) {
+ return Token_;
+ }
+
+ Token_ = new NACLib::TUserToken(Record.GetUserToken());
+ return Token_;
+ }
+
+ const ::google::protobuf::Map<TProtoStringType, ::Ydb::TypedValue>& GetYdbParameters() const {
+ if (YdbParameters) {
+ return *YdbParameters;
+ }
+
+ return Record.GetRequest().GetYdbParameters();
+ }
+
+ Ydb::StatusIds::StatusCode GetYdbStatus() const {
+ return Record.GetYdbStatus();
+ }
+
+ ::Ydb::Table::QueryStatsCollection::Mode GetCollectStats() const {
+ if (RequestCtx) {
+ return CollectStats;
+ }
+
+ return Record.GetRequest().GetCollectStats();
+ }
+
+ const ::google::protobuf::RepeatedPtrField<::Ydb::Issue::IssueMessage>& GetQueryIssues() const {
+ return Record.GetQueryIssues();
+ }
+
+ ui64 GetRequestSize() const {
+ return Record.GetRequest().ByteSizeLong();
+ }
+
+ ui64 GetQuerySize() const {
+ return RequestCtx ? YqlText.size() : Record.GetRequest().GetQuery().size();
+ }
+
+ ui64 GetParametersSize() const {
+ if (ParametersSize > 0) {
+ return ParametersSize;
+ }
+
+ ParametersSize += Record.GetRequest().GetParameters().ByteSizeLong();
+ for(const auto& [name, param]: GetYdbParameters()) {
+ ParametersSize += name.size();
+ ParametersSize += param.ByteSizeLong();
+ }
+
+ return ParametersSize;
+ }
+
ui32 CalculateSerializedSize() const override {
PrepareRemote();
return Record.ByteSize();
@@ -290,28 +476,41 @@ struct TEvKqp {
return req;
}
- void SetClientLostAction(TActorId actorId, ui64 wakeupTag, NActors::TActorSystem* as) {
+ void SetClientLostAction(TActorId actorId, NActors::TActorSystem* as) {
if (RequestCtx) {
- RequestCtx->SetClientLostAction([actorId, wakeupTag, as]() {
- as->Send(actorId, new TEvents::TEvWakeup(wakeupTag));
+ RequestCtx->SetClientLostAction([actorId, as]() {
+ as->Send(actorId, new NGRpcService::TEvClientLost());
});
} else if (Record.HasCancelationActor()) {
auto cancelationActor = ActorIdFromProto(Record.GetCancelationActor());
- NGRpcService::SubscribeRemoteCancel(cancelationActor, actorId, wakeupTag, as);
+ NGRpcService::SubscribeRemoteCancel(cancelationActor, actorId, as);
}
}
- void PrepareRemote() const {
- if (RequestCtx) {
- Y_VERIFY(SerializerCb);
- SerializerCb(RequestCtx, &Record);
- RequestCtx.reset();
- }
- }
+ void PrepareRemote() const;
+
mutable NKikimrKqp::TEvQueryRequest Record;
+
private:
+ mutable ui64 ParametersSize = 0;
mutable std::shared_ptr<NGRpcService::IRequestCtxMtSafe> RequestCtx;
- TSerializerCb SerializerCb;
+ mutable TString TraceId;
+ mutable TString RequestType;
+ mutable TIntrusiveConstPtr<NACLib::TUserToken> Token_;
+ TString Database;
+ TString SessionId;
+ TString YqlText;
+ TString QueryId;
+ NKikimrKqp::EQueryAction QueryAction;
+ NKikimrKqp::EQueryType QueryType;
+ const ::Ydb::Table::TransactionControl* TxControl = nullptr;
+ const ::google::protobuf::Map<TProtoStringType, ::Ydb::TypedValue>* YdbParameters = nullptr;
+ const ::Ydb::Table::QueryStatsCollection::Mode CollectStats = Ydb::Table::QueryStatsCollection::STATS_COLLECTION_NONE;
+ const ::Ydb::Table::QueryCachePolicy* QueryCachePolicy = nullptr;
+ const ::Ydb::Operations::OperationParams* OperationParams = nullptr;
+ bool KeepSession = false;
+ TDuration OperationTimeout;
+ TDuration CancelAfter;
};
struct TEvCloseSessionRequest : public TEventPB<TEvCloseSessionRequest,
@@ -469,7 +668,7 @@ struct TEvKqp {
NKikimrKqp::TEvPingSessionResponse, TKqpEvents::EvPingSessionResponse> {};
struct TEvCompileRequest : public TEventLocal<TEvCompileRequest, TKqpEvents::EvCompileRequest> {
- TEvCompileRequest(const TString& userToken, const TMaybe<TString>& uid, TMaybe<TKqpQueryId>&& query,
+ TEvCompileRequest(const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TMaybe<TString>& uid, TMaybe<TKqpQueryId>&& query,
bool keepInCache, TInstant deadline, TKqpDbCountersPtr dbCounters, NLWTrace::TOrbit orbit = {})
: UserToken(userToken)
, Uid(uid)
@@ -482,7 +681,7 @@ struct TEvKqp {
Y_ENSURE(Uid.Defined() != Query.Defined());
}
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TMaybe<TString> Uid;
TMaybe<TKqpQueryId> Query;
bool KeepInCache = false;
@@ -495,7 +694,7 @@ struct TEvKqp {
};
struct TEvRecompileRequest : public TEventLocal<TEvRecompileRequest, TKqpEvents::EvRecompileRequest> {
- TEvRecompileRequest(const TString& userToken, const TString& uid, const TMaybe<TKqpQueryId>& query,
+ TEvRecompileRequest(const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TString& uid, const TMaybe<TKqpQueryId>& query,
TInstant deadline, TKqpDbCountersPtr dbCounters, NLWTrace::TOrbit orbit = {})
: UserToken(userToken)
, Uid(uid)
@@ -504,7 +703,7 @@ struct TEvKqp {
, DbCounters(dbCounters)
, Orbit(std::move(orbit)) {}
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TString Uid;
TMaybe<TKqpQueryId> Query;
diff --git a/ydb/core/kqp/common/kqp_event_impl.cpp b/ydb/core/kqp/common/kqp_event_impl.cpp
new file mode 100644
index 0000000000..6a2dd868cc
--- /dev/null
+++ b/ydb/core/kqp/common/kqp_event_impl.cpp
@@ -0,0 +1,95 @@
+#include "kqp.h"
+
+#include <ydb/core/base/path.h>
+#include <ydb/core/util/proto_duration.h>
+
+namespace NKikimr::NKqp {
+
+TEvKqp::TEvQueryRequest::TEvQueryRequest(
+ const std::shared_ptr<NGRpcService::IRequestCtxMtSafe>& ctx,
+ const TString& sessionId,
+ TActorId actorId,
+ TString&& yqlText,
+ TString&& queryId,
+ NKikimrKqp::EQueryAction queryAction,
+ NKikimrKqp::EQueryType queryType,
+ const ::Ydb::Table::TransactionControl* txControl,
+ const ::google::protobuf::Map<TProtoStringType, ::Ydb::TypedValue>* ydbParameters,
+ const ::Ydb::Table::QueryStatsCollection::Mode collectStats,
+ const ::Ydb::Table::QueryCachePolicy* queryCachePolicy,
+ const ::Ydb::Operations::OperationParams* operationParams,
+ bool keepSession)
+ : RequestCtx(ctx)
+ , Database(CanonizePath(ctx->GetDatabaseName().GetOrElse("")))
+ , SessionId(sessionId)
+ , YqlText(std::move(yqlText))
+ , QueryId(std::move(queryId))
+ , QueryAction(queryAction)
+ , QueryType(queryType)
+ , TxControl(txControl)
+ , YdbParameters(ydbParameters)
+ , CollectStats(collectStats)
+ , QueryCachePolicy(queryCachePolicy)
+ , OperationParams(operationParams)
+ , KeepSession(keepSession)
+{
+ if (OperationParams) {
+ OperationTimeout = GetDuration(OperationParams->operation_timeout());
+ CancelAfter = GetDuration(OperationParams->cancel_after());
+ }
+ ActorIdToProto(actorId, Record.MutableCancelationActor());
+}
+
+void TEvKqp::TEvQueryRequest::PrepareRemote() const {
+ if (RequestCtx) {
+ if (RequestCtx->GetSerializedToken()) {
+ Record.SetUserToken(RequestCtx->GetSerializedToken());
+ }
+
+ Record.MutableRequest()->SetDatabase(Database);
+
+ if (auto traceId = RequestCtx->GetTraceId()) {
+ Record.SetTraceId(traceId.GetRef());
+ }
+
+ if (auto requestType = RequestCtx->GetRequestType()) {
+ Record.SetRequestType(requestType.GetRef());
+ }
+
+ if (TxControl) {
+ Record.MutableRequest()->MutableTxControl()->CopyFrom(*TxControl);
+ }
+
+ if (YdbParameters) {
+ Record.MutableRequest()->MutableYdbParameters()->insert(YdbParameters->begin(), YdbParameters->end());
+ }
+
+ if (QueryCachePolicy) {
+ Record.MutableRequest()->MutableQueryCachePolicy()->CopyFrom(*QueryCachePolicy);
+ }
+
+ if (CollectStats) {
+ Record.MutableRequest()->SetCollectStats(CollectStats);
+ }
+
+ if (!YqlText.empty()) {
+ Record.MutableRequest()->SetQuery(YqlText);
+ }
+
+ if (!QueryId.empty()) {
+ Record.MutableRequest()->SetPreparedQuery(QueryId);
+ }
+
+ Record.MutableRequest()->SetSessionId(SessionId);
+ Record.MutableRequest()->SetAction(QueryAction);
+ Record.MutableRequest()->SetType(QueryType);
+ if (OperationParams) {
+ Record.MutableRequest()->SetCancelAfterMs(CancelAfter.MilliSeconds());
+ Record.MutableRequest()->SetTimeoutMs(OperationTimeout.MilliSeconds());
+ }
+
+ RequestCtx.reset();
+ }
+}
+
+}
diff --git a/ydb/core/kqp/common/kqp_prepared_query.cpp b/ydb/core/kqp/common/kqp_prepared_query.cpp
index 62cd68f2a0..594179454b 100644
--- a/ydb/core/kqp/common/kqp_prepared_query.cpp
+++ b/ydb/core/kqp/common/kqp_prepared_query.cpp
@@ -103,6 +103,11 @@ TPreparedQueryHolder::TPreparedQueryHolder(NKikimrKqp::TPreparedQuery* proto,
tablesSet.insert(input.GetStreamLookup().GetTable().GetPath());
}
}
+ for (const auto& source : stage.GetSources()) {
+ if (source.GetTypeCase() == NKqpProto::TKqpSource::kReadRangesSource) {
+ tablesSet.insert(source.GetReadRangesSource().GetTable().GetPath());
+ }
+ }
}
}
diff --git a/ydb/core/kqp/common/kqp_prepared_query.h b/ydb/core/kqp/common/kqp_prepared_query.h
index 9de89807e7..2d1475c58a 100644
--- a/ydb/core/kqp/common/kqp_prepared_query.h
+++ b/ydb/core/kqp/common/kqp_prepared_query.h
@@ -141,6 +141,14 @@ public:
const NKqpProto::TKqpPhyQuery& GetPhysicalQuery() const {
return Proto->GetPhysicalQuery();
}
+
+ std::optional<bool> GetEnableLlvm() const {
+ if (Proto->HasEnableLlvm()) {
+ return Proto->GetEnableLlvm();
+ } else {
+ return std::nullopt;
+ }
+ }
};
diff --git a/ydb/core/kqp/common/kqp_yql.h b/ydb/core/kqp/common/kqp_yql.h
index eb2d22948e..0f5236461d 100644
--- a/ydb/core/kqp/common/kqp_yql.h
+++ b/ydb/core/kqp/common/kqp_yql.h
@@ -59,6 +59,8 @@ struct TKqpReadTableSettings {
void SetReverse() { Reverse = true; }
void SetSorted() { Sorted = true; }
+ bool operator == (const TKqpReadTableSettings&) const = default;
+
static TKqpReadTableSettings Parse(const NNodes::TKqlReadTableBase& node);
static TKqpReadTableSettings Parse(const NNodes::TKqlReadTableRangesBase& node);
static TKqpReadTableSettings Parse(const NNodes::TCoNameValueTupleList& node);
diff --git a/ydb/core/kqp/compile_service/kqp_compile_actor.cpp b/ydb/core/kqp/compile_service/kqp_compile_actor.cpp
index 02ac972c0a..baba609122 100644
--- a/ydb/core/kqp/compile_service/kqp_compile_actor.cpp
+++ b/ydb/core/kqp/compile_service/kqp_compile_actor.cpp
@@ -42,7 +42,8 @@ public:
TKqpCompileActor(const TActorId& owner, const TKqpSettings::TConstPtr& kqpSettings,
const TTableServiceConfig& serviceConfig, TIntrusivePtr<TModuleResolverState> moduleResolverState,
- TIntrusivePtr<TKqpCounters> counters, const TString& uid, const TKqpQueryId& query, const TString& userToken,
+ TIntrusivePtr<TKqpCounters> counters, const TString& uid, const TKqpQueryId& query,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
TKqpDbCountersPtr dbCounters, NWilson::TTraceId traceId)
: Owner(owner)
, ModuleResolverState(moduleResolverState)
@@ -186,6 +187,7 @@ private:
replayMessage.InsertValue("query_database", Query.Database);
replayMessage.InsertValue("query_cluster", Query.Cluster);
replayMessage.InsertValue("query_plan", queryPlan);
+ replayMessage.InsertValue("query_type", ToString(Query.QueryType));
TString message(NJson::WriteJson(replayMessage, /*formatOutput*/ false));
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::KQP_COMPILE_ACTOR, "[" << SelfId() << "]: "
<< "Built the replay message " << message);
@@ -270,6 +272,9 @@ private:
if (status == Ydb::StatusIds::SUCCESS) {
YQL_ENSURE(kqpResult.PreparingQuery);
+ if (Config->EnableLlvm.Get()) {
+ kqpResult.PreparingQuery->SetEnableLlvm(*Config->EnableLlvm.Get());
+ }
KqpCompileResult->PreparedQuery = std::make_shared<const TPreparedQueryHolder>(
kqpResult.PreparingQuery.release(), AppData()->FunctionRegistry);
@@ -309,7 +314,7 @@ private:
TIntrusivePtr<TKqpCounters> Counters;
TString Uid;
TKqpQueryId Query;
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TKqpDbCountersPtr DbCounters;
TKikimrConfiguration::TPtr Config;
TDuration CompilationTimeout;
@@ -336,11 +341,16 @@ void ApplyServiceConfig(TKikimrConfiguration& kqpConfig, const TTableServiceConf
kqpConfig.EnableKqpDataQuerySourceRead = serviceConfig.GetEnableKqpDataQuerySourceRead();
kqpConfig.EnableKqpScanQuerySourceRead = serviceConfig.GetEnableKqpScanQuerySourceRead();
+ kqpConfig.EnableKqpDataQueryStreamLookup = serviceConfig.GetEnableKqpDataQueryStreamLookup();
+ kqpConfig.EnableKqpScanQueryStreamLookup = serviceConfig.GetEnableKqpScanQueryStreamLookup();
+ kqpConfig.EnableKqpScanQueryStreamIdxLookupJoin = serviceConfig.GetEnableKqpScanQueryStreamIdxLookupJoin();
+ kqpConfig.EnablePredicateExtractForDataQuery = serviceConfig.GetEnablePredicateExtractForDataQueries();
+ kqpConfig.EnablePredicateExtractForScanQuery = serviceConfig.GetEnablePredicateExtractForScanQueries();
}
IActor* CreateKqpCompileActor(const TActorId& owner, const TKqpSettings::TConstPtr& kqpSettings,
const TTableServiceConfig& serviceConfig, TIntrusivePtr<TModuleResolverState> moduleResolverState,
- TIntrusivePtr<TKqpCounters> counters, const TString& uid, const TKqpQueryId& query, const TString& userToken,
+ TIntrusivePtr<TKqpCounters> counters, const TString& uid, const TKqpQueryId& query, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
TKqpDbCountersPtr dbCounters, NWilson::TTraceId traceId)
{
return new TKqpCompileActor(owner, kqpSettings, serviceConfig, moduleResolverState, counters, uid,
diff --git a/ydb/core/kqp/compile_service/kqp_compile_request.cpp b/ydb/core/kqp/compile_service/kqp_compile_request.cpp
index 4af14f68fe..b8ef523e93 100644
--- a/ydb/core/kqp/compile_service/kqp_compile_request.cpp
+++ b/ydb/core/kqp/compile_service/kqp_compile_request.cpp
@@ -29,7 +29,7 @@ public:
return NKikimrServices::TActivity::KQP_COMPILE_REQUEST;
}
- TKqpCompileRequestActor(const TActorId& owner, const TString& userToken, const TMaybe<TString>& uid,
+ TKqpCompileRequestActor(const TActorId& owner, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TMaybe<TString>& uid,
TMaybe<TKqpQueryId>&& query, bool keepInCache, const TInstant& deadline, TKqpDbCountersPtr dbCounters, NLWTrace::TOrbit orbit,
NWilson::TTraceId traceId)
: Owner(owner)
@@ -153,13 +153,27 @@ private:
private:
void FillTables(const NKqpProto::TKqpPhyTx& phyTx) {
for (const auto& stage : phyTx.GetStages()) {
- for (const auto& tableOp : stage.GetTableOps()) {
- TTableId tableId(tableOp.GetTable().GetOwnerId(), tableOp.GetTable().GetTableId());
+ auto addTable = [&](const NKqpProto::TKqpPhyTableId& table) {
+ TTableId tableId(table.GetOwnerId(), table.GetTableId());
auto it = TableVersions.find(tableId);
if (it != TableVersions.end()) {
- Y_ENSURE(it->second == tableOp.GetTable().GetVersion());
+ Y_ENSURE(it->second == table.GetVersion());
} else {
- TableVersions.emplace(tableId, tableOp.GetTable().GetVersion());
+ TableVersions.emplace(tableId, table.GetVersion());
+ }
+ };
+ for (const auto& tableOp : stage.GetTableOps()) {
+ addTable(tableOp.GetTable());
+ }
+ for (const auto& input : stage.GetInputs()) {
+ if (input.GetTypeCase() == NKqpProto::TKqpPhyConnection::kStreamLookup) {
+ addTable(input.GetStreamLookup().GetTable());
+ }
+ }
+
+ for (const auto& source : stage.GetSources()) {
+ if (source.GetTypeCase() == NKqpProto::TKqpSource::kReadRangesSource) {
+ addTable(source.GetReadRangesSource().GetTable());
}
}
}
@@ -189,8 +203,8 @@ private:
auto navigate = MakeHolder<TSchemeCacheNavigate>();
navigate->DatabaseName = database;
- if (!UserToken.empty()) {
- navigate->UserToken = new NACLib::TUserToken(UserToken);
+ if (UserToken && !UserToken->GetSerializedToken().empty()) {
+ navigate->UserToken = UserToken;
}
for (const auto& [tableId, _] : TableVersions) {
@@ -307,7 +321,7 @@ private:
private:
TActorId Owner;
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TMaybe<TString> Uid;
TMaybe<TKqpQueryId> Query;
bool KeepInCache = false;
@@ -316,13 +330,12 @@ private:
TActorId TimeoutTimerId;
THashMap<TTableId, ui64> TableVersions;
THolder<TEvKqp::TEvCompileResponse> DeferredResponse;
-
NLWTrace::TOrbit Orbit;
NWilson::TSpan CompileRequestSpan;
};
-IActor* CreateKqpCompileRequestActor(const TActorId& owner, const TString& userToken, const TMaybe<TString>& uid,
+IActor* CreateKqpCompileRequestActor(const TActorId& owner, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TMaybe<TString>& uid,
TMaybe<TKqpQueryId>&& query, bool keepInCache, const TInstant& deadline, TKqpDbCountersPtr dbCounters, NLWTrace::TOrbit orbit,
NWilson::TTraceId traceId)
{
diff --git a/ydb/core/kqp/compile_service/kqp_compile_service.cpp b/ydb/core/kqp/compile_service/kqp_compile_service.cpp
index fba1e9b840..dc9b0eedd3 100644
--- a/ydb/core/kqp/compile_service/kqp_compile_service.cpp
+++ b/ydb/core/kqp/compile_service/kqp_compile_service.cpp
@@ -177,7 +177,7 @@ private:
struct TKqpCompileRequest {
TKqpCompileRequest(const TActorId& sender, const TString& uid, TKqpQueryId query, bool keepInCache,
- const TString& userToken, const TInstant& deadline, TKqpDbCountersPtr dbCounters,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TInstant& deadline, TKqpDbCountersPtr dbCounters,
NLWTrace::TOrbit orbit = {}, NWilson::TSpan span = {})
: Sender(sender)
, Query(std::move(query))
@@ -193,7 +193,7 @@ struct TKqpCompileRequest {
TKqpQueryId Query;
TString Uid;
bool KeepInCache = false;
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TInstant Deadline;
TKqpDbCountersPtr DbCounters;
TActorId CompileActor;
@@ -356,11 +356,40 @@ private:
void HandleConfig(NConsole::TEvConsole::TEvConfigNotificationRequest::TPtr& ev) {
auto &event = ev->Get()->Record;
+ bool enableKqpDataQueryStreamLookup = Config.GetEnableKqpDataQueryStreamLookup();
+ bool enableKqpScanQueryStreamLookup = Config.GetEnableKqpScanQueryStreamLookup();
+ bool enableKqpScanQueryStreamIdxLookupJoin = Config.GetEnableKqpScanQueryStreamIdxLookupJoin();
+
+ bool enableKqpDataQuerySourceRead = Config.GetEnableKqpDataQuerySourceRead();
+ bool enableKqpScanQuerySourceRead = Config.GetEnableKqpScanQuerySourceRead();
+
+ bool enableKqpDataQueryPredicateExtract = Config.GetEnablePredicateExtractForDataQueries();
+ bool enableKqpScanQueryPredicateExtract = Config.GetEnablePredicateExtractForScanQueries();
+
Config.Swap(event.MutableConfig()->MutableTableServiceConfig());
LOG_INFO(*TlsActivationContext, NKikimrServices::KQP_COMPILE_SERVICE, "Updated config");
auto responseEv = MakeHolder<NConsole::TEvConsole::TEvConfigNotificationResponse>(event);
Send(ev->Sender, responseEv.Release(), IEventHandle::FlagTrackDelivery, ev->Cookie);
+
+ if (Config.GetEnableKqpDataQueryStreamLookup() != enableKqpDataQueryStreamLookup ||
+ Config.GetEnableKqpScanQueryStreamLookup() != enableKqpScanQueryStreamLookup ||
+ Config.GetEnableKqpScanQueryStreamIdxLookupJoin() != enableKqpScanQueryStreamIdxLookupJoin ||
+ Config.GetEnableKqpDataQuerySourceRead() != enableKqpDataQuerySourceRead ||
+ Config.GetEnableKqpScanQuerySourceRead() != enableKqpScanQuerySourceRead ||
+ Config.GetEnablePredicateExtractForDataQueries() != enableKqpDataQueryPredicateExtract ||
+ Config.GetEnablePredicateExtractForScanQueries() != enableKqpScanQueryPredicateExtract)
+ {
+
+ LOG_NOTICE_S(*TlsActivationContext, NKikimrServices::KQP_COMPILE_SERVICE,
+ "Iterator read flags was changed. StreamLookup from " << enableKqpDataQueryStreamLookup <<
+ " to " << Config.GetEnableKqpDataQueryStreamLookup() << " for data queries, from " <<
+ enableKqpScanQueryStreamLookup << " to " << Config.GetEnableKqpScanQueryStreamLookup() << " for scan queries."
+ << " Sources for data queries from " << enableKqpDataQuerySourceRead << " to " << Config.GetEnableKqpDataQuerySourceRead()
+ << "for scan queries from " << enableKqpScanQuerySourceRead << " to " << Config.GetEnableKqpScanQuerySourceRead());
+
+ QueryCache.Clear();
+ }
}
void HandleUndelivery(TEvents::TEvUndelivered::TPtr& ev) {
@@ -411,7 +440,7 @@ private:
*Counters->CompileQueryCacheSize = QueryCache.Size();
*Counters->CompileQueryCacheBytes = QueryCache.Bytes();
- auto userSid = NACLib::TUserToken(request.UserToken).GetUserSID();
+ auto userSid = request.UserToken->GetUserSID();
auto dbCounters = request.DbCounters;
if (request.Uid) {
diff --git a/ydb/core/kqp/compile_service/kqp_compile_service.h b/ydb/core/kqp/compile_service/kqp_compile_service.h
index 2e10c4b6e5..cc5d1acb9c 100644
--- a/ydb/core/kqp/compile_service/kqp_compile_service.h
+++ b/ydb/core/kqp/compile_service/kqp_compile_service.h
@@ -12,10 +12,11 @@ IActor* CreateKqpCompileService(const NKikimrConfig::TTableServiceConfig& servic
IActor* CreateKqpCompileActor(const TActorId& owner, const TKqpSettings::TConstPtr& kqpSettings,
const NKikimrConfig::TTableServiceConfig& serviceConfig, TIntrusivePtr<TModuleResolverState> moduleResolverState,
- TIntrusivePtr<TKqpCounters> counters, const TString& uid, const TKqpQueryId& query, const TString& userToken,
+ TIntrusivePtr<TKqpCounters> counters, const TString& uid, const TKqpQueryId& query,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
TKqpDbCountersPtr dbCounters, NWilson::TTraceId traceId = {});
-IActor* CreateKqpCompileRequestActor(const TActorId& owner, const TString& userToken, const TMaybe<TString>& uid,
+IActor* CreateKqpCompileRequestActor(const TActorId& owner, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, const TMaybe<TString>& uid,
TMaybe<TKqpQueryId>&& query, bool keepInCache, const TInstant& deadline, TKqpDbCountersPtr dbCounters,
NLWTrace::TOrbit orbit = {}, NWilson::TTraceId = {});
diff --git a/ydb/core/kqp/compute_actor/kqp_compute_actor.cpp b/ydb/core/kqp/compute_actor/kqp_compute_actor.cpp
index 0ba8e1d6ea..c867769d5b 100644
--- a/ydb/core/kqp/compute_actor/kqp_compute_actor.cpp
+++ b/ydb/core/kqp/compute_actor/kqp_compute_actor.cpp
@@ -46,10 +46,10 @@ TComputationNodeFactory GetKqpActorComputeFactory(TKqpScanComputeContext* comput
namespace NKqp {
-NYql::NDq::IDqAsyncIoFactory::TPtr CreateKqpAsyncIoFactory() {
+NYql::NDq::IDqAsyncIoFactory::TPtr CreateKqpAsyncIoFactory(TIntrusivePtr<TKqpCounters> counters) {
auto factory = MakeIntrusive<NYql::NDq::TDqAsyncIoFactory>();
- RegisterStreamLookupActorFactory(*factory);
- RegisterKqpReadActor(*factory);
+ RegisterStreamLookupActorFactory(*factory, counters);
+ RegisterKqpReadActor(*factory, counters);
return factory;
}
diff --git a/ydb/core/kqp/compute_actor/kqp_compute_actor.h b/ydb/core/kqp/compute_actor/kqp_compute_actor.h
index dc68e2ab93..2e99e5bfe6 100644
--- a/ydb/core/kqp/compute_actor/kqp_compute_actor.h
+++ b/ydb/core/kqp/compute_actor/kqp_compute_actor.h
@@ -52,7 +52,7 @@ IActor* CreateKqpScanComputeActor(const NKikimrKqp::TKqpSnapshot& snapshot, cons
const NYql::NDq::TComputeRuntimeSettings& settings, const NYql::NDq::TComputeMemoryLimits& memoryLimits,
const TShardsScanningPolicy& shardsScanningPolicy, TIntrusivePtr<TKqpCounters> counters, NWilson::TTraceId traceId);
-NYql::NDq::IDqAsyncIoFactory::TPtr CreateKqpAsyncIoFactory();
+NYql::NDq::IDqAsyncIoFactory::TPtr CreateKqpAsyncIoFactory(TIntrusivePtr<TKqpCounters> counters);
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/compute_actor/kqp_compute_actor_helpers.cpp b/ydb/core/kqp/compute_actor/kqp_compute_actor_helpers.cpp
index cb2c43db43..51e854da17 100644
--- a/ydb/core/kqp/compute_actor/kqp_compute_actor_helpers.cpp
+++ b/ydb/core/kqp/compute_actor/kqp_compute_actor_helpers.cpp
@@ -25,37 +25,4 @@ bool FindSchemeErrorInIssues(const Ydb::StatusIds::StatusCode& status, const NYq
return schemeError;
}
-void FillTaskInputStats(const NYql::NDqProto::TDqTask& task, NYql::NDqProto::TDqTaskStats& taskStats) {
- THashMap<ui32, TString> inputTables;
-
- for (ui32 inputIndex = 0; inputIndex < task.InputsSize(); ++inputIndex) {
- const auto& taskInput = task.GetInputs(inputIndex);
- if (taskInput.HasTransform()) {
- const auto& transform = taskInput.GetTransform();
- YQL_ENSURE(transform.GetType() == "StreamLookupInputTransformer",
- "Unexpected input transform type: " << transform.GetType());
-
- const google::protobuf::Any &settingsAny = transform.GetSettings();
- YQL_ENSURE(settingsAny.Is<NKikimrKqp::TKqpStreamLookupSettings>(), "Expected settings type: "
- << NKikimrKqp::TKqpStreamLookupSettings::descriptor()->full_name()
- << " , but got: " << settingsAny.type_url());
-
- NKikimrKqp::TKqpStreamLookupSettings settings;
- YQL_ENSURE(settingsAny.UnpackTo(&settings), "Failed to unpack settings");
-
- inputTables.insert({inputIndex, settings.GetTable().GetPath()});
- }
- }
-
- for (const auto& transformerStats : taskStats.GetInputTransforms()) {
- auto tableIt = inputTables.find(transformerStats.GetInputIndex());
- YQL_ENSURE(tableIt != inputTables.end());
-
- auto* tableStats = taskStats.AddTables();
- tableStats->SetTablePath(tableIt->second);
- tableStats->SetReadRows(transformerStats.GetRowsOut());
- tableStats->SetReadBytes(transformerStats.GetBytes());
- }
-}
-
} // namespace NKikimr::NKqp::NComputeActor
diff --git a/ydb/core/kqp/compute_actor/kqp_compute_actor_impl.h b/ydb/core/kqp/compute_actor/kqp_compute_actor_impl.h
index cab30fb4a5..b32537d951 100644
--- a/ydb/core/kqp/compute_actor/kqp_compute_actor_impl.h
+++ b/ydb/core/kqp/compute_actor/kqp_compute_actor_impl.h
@@ -12,11 +12,6 @@ namespace NKqp {
using namespace NYql;
using namespace NYql::NDq;
-namespace NComputeActor {
-void FillTaskInputStats(const NDqProto::TDqTask& task, NDqProto::TDqTaskStats& taskStats);
-
-} // namespace NComputeActor
-
class TKqpTaskRunnerExecutionContext : public IDqTaskRunnerExecutionContext {
public:
TKqpTaskRunnerExecutionContext(ui64 txId, bool withSpilling, IDqChannelStorage::TWakeUpCallback&& wakeUp,
diff --git a/ydb/core/kqp/compute_actor/kqp_pure_compute_actor.cpp b/ydb/core/kqp/compute_actor/kqp_pure_compute_actor.cpp
index c9131f3efd..ed6caca25a 100644
--- a/ydb/core/kqp/compute_actor/kqp_pure_compute_actor.cpp
+++ b/ydb/core/kqp/compute_actor/kqp_pure_compute_actor.cpp
@@ -192,11 +192,6 @@ public:
tableStats->MutableExtra()->PackFrom(tableExtraStats);
}
}
-
- if (last && dst->TasksSize() > 0) {
- YQL_ENSURE(dst->TasksSize() == 1);
- NComputeActor::FillTaskInputStats(GetTask(), *dst->MutableTasks(0));
- }
}
private:
diff --git a/ydb/core/kqp/compute_actor/kqp_scan_compute_actor.cpp b/ydb/core/kqp/compute_actor/kqp_scan_compute_actor.cpp
index 9beb26a3fa..7e01e0c6e7 100644
--- a/ydb/core/kqp/compute_actor/kqp_scan_compute_actor.cpp
+++ b/ydb/core/kqp/compute_actor/kqp_scan_compute_actor.cpp
@@ -284,11 +284,6 @@ public:
// dst->MutableExtra()->PackFrom(extraStats);
}
-
- if (last && dst->TasksSize() > 0) {
- YQL_ENSURE(dst->TasksSize() == 1);
- NComputeActor::FillTaskInputStats(GetTask(), *dst->MutableTasks(0));
- }
}
protected:
@@ -626,6 +621,7 @@ private:
if (state->State == EShardState::PostRunning || state->State == EShardState::Running) {
state->State = EShardState::Initial;
state->ActorId = {};
+ InFlightShards.ClearAckState(state);
state->ResetRetry();
return StartReadShard(state);
}
@@ -954,6 +950,7 @@ private:
return ResolveShard(*state);
}
+ InFlightShards.ClearAckState(state);
state->RetryAttempt++;
state->TotalRetries++;
state->Generation = InFlightShards.AllocateGeneration(state);
diff --git a/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.cpp b/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.cpp
index 5a6cb6efe2..f90c45f638 100644
--- a/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.cpp
+++ b/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.cpp
@@ -139,4 +139,4 @@ TShardCostsState::TPtr TInFlightShards::GetCostsState(const ui64 shardId) const
}
}
-} \ No newline at end of file
+}
diff --git a/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.h b/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.h
index 14dd5a02a7..9b5be70293 100644
--- a/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.h
+++ b/ydb/core/kqp/compute_actor/kqp_scan_compute_manager.h
@@ -59,6 +59,13 @@ public:
return NeedAckStates;
}
+ void ClearAckState(TShardState::TPtr state) {
+ auto it = NeedAckStates.find(state->ScannerIdx);
+ if (it != NeedAckStates.end()) {
+ NeedAckStates.erase(it);
+ }
+ }
+
void AckSent(TShardState::TPtr state) {
Y_VERIFY(StatesByIndex.contains(state->ScannerIdx));
NeedAckStates.erase(state->ScannerIdx);
@@ -117,4 +124,4 @@ public:
}
};
-} \ No newline at end of file
+}
diff --git a/ydb/core/kqp/compute_actor/kqp_scan_compute_stat.h b/ydb/core/kqp/compute_actor/kqp_scan_compute_stat.h
index 3f6a09ebe9..92bf2bec92 100644
--- a/ydb/core/kqp/compute_actor/kqp_scan_compute_stat.h
+++ b/ydb/core/kqp/compute_actor/kqp_scan_compute_stat.h
@@ -64,4 +64,4 @@ public:
TString GetDurationStats() const;
};
-} \ No newline at end of file
+}
diff --git a/ydb/core/kqp/counters/kqp_counters.cpp b/ydb/core/kqp/counters/kqp_counters.cpp
index 034804a1d9..b93c6961bc 100644
--- a/ydb/core/kqp/counters/kqp_counters.cpp
+++ b/ydb/core/kqp/counters/kqp_counters.cpp
@@ -294,17 +294,11 @@ void TKqpCountersBase::ReportCloseSession(ui64 requestSize) {
*YdbRequestBytes += requestSize;
}
-void TKqpCountersBase::ReportQueryRequest(const NKikimrKqp::TQueryRequest& request) {
- ReportQueryAction(request.GetAction());
- ReportQueryType(request.GetType());
-
- auto requestBytes = request.ByteSize();
- auto parametersBytes = request.GetParameters().ByteSize();
-
+void TKqpCountersBase::ReportQueryRequest(ui64 requestBytes, ui64 parametersBytes, ui64 queryBytes) {
*RequestBytes += requestBytes;
*YdbRequestBytes += requestBytes;
- *QueryBytes += request.GetQuery().size();
+ *QueryBytes += queryBytes;
*ParametersBytes += parametersBytes;
*YdbParametersBytes += parametersBytes;
@@ -770,6 +764,19 @@ TKqpCounters::TKqpCounters(const ::NMonitoring::TDynamicCounterPtr& counters, co
ScanQueryRateLimitLatency = KqpGroup->GetHistogram(
"ScanQuery/RateLimitLatency", NMonitoring::ExponentialHistogram(20, 2, 1));
+ /* iterator reads */
+ IteratorsShardResolve = KqpGroup->GetCounter("IteratorReads/ShardResolves", true);
+ IteratorsReadSplits = KqpGroup->GetCounter("IteratorReads/ReadSplits", true);
+ SentIteratorAcks = KqpGroup->GetCounter("IteratorReads/SentAcks", true);
+ SentIteratorCancels = KqpGroup->GetCounter("IteratorReads/SentCancels", true);
+ CreatedIterators = KqpGroup->GetCounter("IteratorReads/Created", true);
+ ReadActorsCount = KqpGroup->GetCounter("IteratorReads/ReadActorCount", false);
+ StreamLookupActorsCount = KqpGroup->GetCounter("IteratorReads/StreamLookupActorCount", false);
+ ReadActorRetries = KqpGroup->GetCounter("IteratorReads/Retries", true);
+ DataShardIteratorFails = KqpGroup->GetCounter("IteratorReads/DatashardFails", true);
+ DataShardIteratorMessages = KqpGroup->GetCounter("IteratorReads/DatashardMessages", true);
+ IteratorDeliveryProblems = KqpGroup->GetCounter("IteratorReads/DeliveryProblems", true);
+
LiteralTxTotalTimeHistogram = KqpGroup->GetHistogram(
"PhyTx/LiteralTxTotalTimeMs", NMonitoring::ExponentialHistogram(10, 2, 1));
DataTxTotalTimeHistogram = KqpGroup->GetHistogram(
@@ -830,10 +837,24 @@ void TKqpCounters::ReportCloseSession(TKqpDbCountersPtr dbCounters, ui64 request
}
}
-void TKqpCounters::ReportQueryRequest(TKqpDbCountersPtr dbCounters, const NKikimrKqp::TQueryRequest& request) {
- TKqpCountersBase::ReportQueryRequest(request);
+void TKqpCounters::ReportQueryAction(TKqpDbCountersPtr dbCounters, NKikimrKqp::EQueryAction action) {
+ TKqpCountersBase::ReportQueryAction(action);
+ if (dbCounters) {
+ dbCounters->ReportQueryAction(action);
+ }
+}
+
+void TKqpCounters::ReportQueryType(TKqpDbCountersPtr dbCounters, NKikimrKqp::EQueryType type) {
+ TKqpCountersBase::ReportQueryType(type);
+ if (dbCounters) {
+ dbCounters->ReportQueryType(type);
+ }
+}
+
+void TKqpCounters::ReportQueryRequest(TKqpDbCountersPtr dbCounters, ui64 requestBytes, ui64 parametersBytes, ui64 queryBytes) {
+ TKqpCountersBase::ReportQueryRequest(requestBytes, parametersBytes, queryBytes);
if (dbCounters) {
- dbCounters->ReportQueryRequest(request);
+ dbCounters->ReportQueryRequest(requestBytes, parametersBytes, queryBytes);
}
}
diff --git a/ydb/core/kqp/counters/kqp_counters.h b/ydb/core/kqp/counters/kqp_counters.h
index b42b9d8181..bfeed50c1d 100644
--- a/ydb/core/kqp/counters/kqp_counters.h
+++ b/ydb/core/kqp/counters/kqp_counters.h
@@ -41,7 +41,7 @@ protected:
void ReportCreateSession(ui64 requestSize);
void ReportPingSession(ui64 requestSize);
void ReportCloseSession(ui64 requestSize);
- void ReportQueryRequest(const NKikimrKqp::TQueryRequest& request);
+ void ReportQueryRequest(ui64 requestBytes, ui64 parametersBytes, ui64 queryBytes);
void ReportQueryWithRangeScan();
void ReportQueryWithFullScan();
@@ -269,7 +269,9 @@ public:
void ReportCreateSession(TKqpDbCountersPtr dbCounters, ui64 requestSize);
void ReportPingSession(TKqpDbCountersPtr dbCounters, ui64 requestSize);
void ReportCloseSession(TKqpDbCountersPtr dbCounters, ui64 requestSize);
- void ReportQueryRequest(TKqpDbCountersPtr dbCounters, const NKikimrKqp::TQueryRequest& request);
+ void ReportQueryAction(TKqpDbCountersPtr dbCounters, NKikimrKqp::EQueryAction action);
+ void ReportQueryType(TKqpDbCountersPtr dbCounters, NKikimrKqp::EQueryType type);
+ void ReportQueryRequest(TKqpDbCountersPtr dbCounters, ui64 requestBytes, ui64 parametersBytes, ui64 queryBytes);
void ReportResponseStatus(TKqpDbCountersPtr dbCounters, ui64 responseSize, Ydb::StatusIds::StatusCode ydbStatus);
void ReportResultsBytes(TKqpDbCountersPtr dbCounters, ui64 resultsSize);
@@ -365,6 +367,19 @@ public:
::NMonitoring::TDynamicCounters::TCounterPtr ScanQueryShardResolve;
NMonitoring::THistogramPtr ScanQueryRateLimitLatency;
+ // Iterator reads counters
+ ::NMonitoring::TDynamicCounters::TCounterPtr IteratorsShardResolve;
+ ::NMonitoring::TDynamicCounters::TCounterPtr IteratorsReadSplits;
+ ::NMonitoring::TDynamicCounters::TCounterPtr SentIteratorAcks;
+ ::NMonitoring::TDynamicCounters::TCounterPtr SentIteratorCancels;
+ ::NMonitoring::TDynamicCounters::TCounterPtr CreatedIterators;
+ ::NMonitoring::TDynamicCounters::TCounterPtr ReadActorsCount;
+ ::NMonitoring::TDynamicCounters::TCounterPtr StreamLookupActorsCount;
+ ::NMonitoring::TDynamicCounters::TCounterPtr ReadActorRetries;
+ ::NMonitoring::TDynamicCounters::TCounterPtr DataShardIteratorFails;
+ ::NMonitoring::TDynamicCounters::TCounterPtr DataShardIteratorMessages;
+ ::NMonitoring::TDynamicCounters::TCounterPtr IteratorDeliveryProblems;
+
// Physical tx duration
NMonitoring::THistogramPtr LiteralTxTotalTimeHistogram;
NMonitoring::THistogramPtr DataTxTotalTimeHistogram;
diff --git a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp
index eff1912d7c..455ff0c9c8 100644
--- a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp
@@ -48,19 +48,6 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
using TBase = TKqpExecuterBase<TKqpDataExecuter, EExecType::Data>;
using TKqpSnapshot = IKqpGateway::TKqpSnapshot;
- struct TEvPrivate {
- enum EEv {
- EvReattachToShard = EventSpaceBegin(TEvents::ES_PRIVATE),
- };
-
- struct TEvReattachToShard : public TEventLocal<TEvReattachToShard, EvReattachToShard> {
- const ui64 TabletId;
-
- explicit TEvReattachToShard(ui64 tabletId)
- : TabletId(tabletId) {}
- };
- };
-
struct TReattachState {
TDuration Delay;
TInstant Deadline;
@@ -135,9 +122,12 @@ public:
return NKikimrServices::TActivity::KQP_DATA_EXECUTER_ACTOR;
}
- TKqpDataExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database, const TMaybe<TString>& userToken,
- TKqpRequestCounters::TPtr counters)
- : TBase(std::move(request), database, userToken, counters, TWilsonKqp::DataExecuter, "DataExecuter")
+ TKqpDataExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
+ TKqpRequestCounters::TPtr counters, bool streamResult,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
+ : TBase(std::move(request), database, userToken, counters, executerRetriesConfig, TWilsonKqp::DataExecuter, "DataExecuter")
+ , StreamResult(streamResult)
{
YQL_ENSURE(Request.IsolationLevel != NKikimrKqp::ISOLATION_LEVEL_UNDEFINED);
@@ -204,6 +194,24 @@ public:
response.SetStatus(Ydb::StatusIds::SUCCESS);
Counters->TxProxyMon->ReportStatusOK->Inc();
+ auto addLocks = [&](const NYql::NDqProto::TExtraInputData& data) {
+ if (data.GetData().Is<NKikimrTxDataShard::TEvKqpInputActorResultInfo>()) {
+ NKikimrTxDataShard::TEvKqpInputActorResultInfo info;
+ YQL_ENSURE(data.GetData().UnpackTo(&info), "Failed to unpack settings");
+ for (auto& lock : info.GetLocks()) {
+ Locks.push_back(lock);
+ }
+ }
+ };
+ for (auto& [_, data] : ExtraData) {
+ for (auto& source : data.GetSourcesExtraData()) {
+ addLocks(source);
+ }
+ for (auto& transform : data.GetInputTransformsData()) {
+ addLocks(transform);
+ }
+ }
+
if (!Locks.empty()) {
if (LockHandle) {
ResponseEv->LockHandle = std::move(LockHandle);
@@ -301,6 +309,10 @@ private:
hFunc(TEvPipeCache::TEvDeliveryProblem, HandlePrepare);
hFunc(TEvKqp::TEvAbortExecution, HandlePrepare);
hFunc(TEvents::TEvWakeup, HandlePrepare);
+ hFunc(TEvents::TEvUndelivered, HandleUndelivered);
+ hFunc(TEvInterconnect::TEvNodeDisconnected, HandleDisconnected);
+ hFunc(TEvKqpNode::TEvStartKqpTasksResponse, HandleStartKqpTasksResponse);
+ IgnoreFunc(TEvInterconnect::TEvNodeConnected);
default: {
CancelProposal(0);
UnexpectedEvent("PrepareState", ev->GetTypeRewrite());
@@ -575,6 +587,11 @@ private:
}
case NKikimrTxDataShard::TEvProposeTransactionResult::BAD_REQUEST: {
Counters->TxProxyMon->TxResultCancelled->Inc();
+ if (HasMissingSnapshotError(result)) {
+ auto issue = YqlIssue({}, TIssuesIds::KIKIMR_PRECONDITION_FAILED);
+ AddDataShardErrors(result, issue);
+ return ReplyErrorAndDie(Ydb::StatusIds::PRECONDITION_FAILED, issue);
+ }
auto issue = YqlIssue({}, TIssuesIds::KIKIMR_BAD_REQUEST);
AddDataShardErrors(result, issue);
return ReplyErrorAndDie(Ydb::StatusIds::BAD_REQUEST, issue);
@@ -730,7 +747,7 @@ private:
item.SetFlags(affectedFlags);
}
- ui64 sizeLimit = RequestControls.PerRequestDataSizeLimit;
+ ui64 sizeLimit = Request.PerRequestDataSizeLimit;
if (Request.TotalReadSizeLimitBytes > 0) {
sizeLimit = sizeLimit
? std::min(sizeLimit, Request.TotalReadSizeLimitBytes)
@@ -764,6 +781,7 @@ private:
hFunc(TEvPrivate::TEvReattachToShard, HandleExecute);
hFunc(TEvPipeCache::TEvDeliveryProblem, HandleExecute);
hFunc(TEvents::TEvUndelivered, HandleUndelivered);
+ hFunc(TEvPrivate::TEvRetry, HandleRetry);
hFunc(TEvInterconnect::TEvNodeDisconnected, HandleDisconnected);
hFunc(TEvKqpNode::TEvStartKqpTasksResponse, HandleStartKqpTasksResponse);
hFunc(TEvTxProxy::TEvProposeTransactionStatus, HandleExecute);
@@ -1289,8 +1307,9 @@ private:
break;
}
- case NKqpProto::TKqpPhyConnection::kMap:
- case NKqpProto::TKqpPhyConnection::kStreamLookup: {
+ case NKqpProto::TKqpPhyConnection::kStreamLookup:
+ HasStreamLookup = true;
+ case NKqpProto::TKqpPhyConnection::kMap: {
partitionsCount = originStageInfo.Tasks.size();
break;
}
@@ -1412,7 +1431,8 @@ private:
return false;
};
- auto computeActor = CreateKqpComputeActor(SelfId(), TxId, std::move(taskDesc), CreateKqpAsyncIoFactory(), nullptr, settings, limits);
+ auto computeActor = CreateKqpComputeActor(SelfId(), TxId, std::move(taskDesc), CreateKqpAsyncIoFactory(Counters->Counters),
+ AppData()->FunctionRegistry, settings, limits);
auto computeActorId = Register(computeActor);
task.ComputeActorId = computeActorId;
@@ -1423,10 +1443,16 @@ private:
}
void Execute() {
+ LockTxId = Request.AcquireLocksTxId;
+ if (LockTxId.Defined() && *LockTxId == 0) {
+ LockTxId = TxId;
+ }
+ Snapshot = Request.Snapshot;
+
NWilson::TSpan prepareTasksSpan(TWilsonKqp::DataExecuterPrepateTasks, ExecuterStateSpan.GetTraceId(), "PrepateTasks", NWilson::EFlags::AUTO_END);
LWTRACK(KqpDataExecuterStartExecute, ResponseEv->Orbit, TxId);
- RequestControls.Reqister(TlsActivationContext->AsActorContext());
+ size_t readActors = 0;
ReadOnlyTx = !Request.TopicOperations.HasOperations();
for (ui32 txIdx = 0; txIdx < Request.Transactions.size(); ++txIdx) {
auto& tx = Request.Transactions[txIdx];
@@ -1461,7 +1487,7 @@ private:
if (stage.SourcesSize() > 0) {
switch (stage.GetSources(0).GetTypeCase()) {
case NKqpProto::TKqpSource::kReadRangesSource:
- BuildScanTasksFromSource(stageInfo);
+ readActors += BuildScanTasksFromSource(stageInfo, Request.Snapshot, LockTxId);
break;
default:
YQL_ENSURE(false, "unknown source type");
@@ -1629,11 +1655,12 @@ private:
}
ui32 shardsLimit = Request.MaxAffectedShards;
- if (i64 msc = (i64) RequestControls.MaxShardCount; msc > 0) {
+ if (i64 msc = (i64) Request.MaxShardCount; msc > 0) {
shardsLimit = std::min(shardsLimit, (ui32) msc);
}
- if (shardsLimit > 0 && datashardTasks.size() > shardsLimit) {
- LOG_W("Too many affected shards: datashardTasks=" << datashardTasks.size() << ", limit: " << shardsLimit);
+ size_t shards = datashardTasks.size() + remoteComputeTasks.size();
+ if (shardsLimit > 0 && shards > shardsLimit) {
+ LOG_W("Too many affected shards: datashardTasks=" << shards << ", limit: " << shardsLimit);
Counters->TxProxyMon->TxResultError->Inc();
ReplyErrorAndDie(Ydb::StatusIds::PRECONDITION_FAILED,
YqlIssue({}, TIssuesIds::KIKIMR_PRECONDITION_FAILED, TStringBuilder()
@@ -1651,7 +1678,7 @@ private:
auto datashardTxs = BuildDatashardTxs(datashardTasks, topicTxs);
// Single-shard transactions are always immediate
- ImmediateTx = (datashardTxs.size() + Request.TopicOperations.GetSize()) <= 1;
+ ImmediateTx = (datashardTxs.size() + Request.TopicOperations.GetSize() + readActors) <= 1 && !HasStreamLookup;
if (ImmediateTx) {
// Transaction cannot be both immediate and volatile
@@ -1718,7 +1745,7 @@ private:
ReadOnlyTx &&
!ImmediateTx &&
!HasPersistentChannels &&
- !Database.empty() &&
+ (!Database.empty() || AppData()->EnableMvccSnapshotWithLegacyDomainRoot) &&
AppData()->FeatureFlags.GetEnableMvccSnapshotReads());
if (forceSnapshot) {
@@ -1858,7 +1885,7 @@ private:
// Transactions with topics must always use generic readsets
!topicTxs.empty());
- if (auto locksMap = ExtractLocks(Request.Locks);
+ if (auto locksMap = Request.DataShardLocks;
!locksMap.empty() ||
VolatileTx ||
Request.TopicOperations.HasReadOperations())
@@ -1963,10 +1990,12 @@ private:
}
void ExecuteTasks() {
- auto lockTxId = Request.AcquireLocksTxId;
- if (lockTxId.Defined() && *lockTxId == 0) {
- lockTxId = TxId;
- LockHandle = TLockHandle(TxId, TActivationContext::ActorSystem());
+ {
+ auto lockTxId = Request.AcquireLocksTxId;
+ if (lockTxId.Defined() && *lockTxId == 0) {
+ lockTxId = TxId;
+ LockHandle = TLockHandle(TxId, TActivationContext::ActorSystem());
+ }
}
NWilson::TSpan sendTasksSpan(TWilsonKqp::DataExecuterSendTasksAndTxs, ExecuterStateSpan.GetTraceId(), "SendTasksAndTxs", NWilson::EFlags::AUTO_END);
@@ -1976,7 +2005,7 @@ private:
TVector<ui64> computeTaskIds{Reserve(ComputeTasks.size())};
for (auto&& taskDesc : ComputeTasks) {
computeTaskIds.emplace_back(taskDesc.GetId());
- FillInputSettings(taskDesc, lockTxId);
+ FillInputSettings(taskDesc);
ExecuteDataComputeTask(std::move(taskDesc));
}
@@ -1987,41 +2016,40 @@ private:
YQL_ENSURE(it != ShardIdToNodeId.end());
for (auto& taskDesc : tasks) {
+ ui64 taskId = taskDesc.GetId();
+ auto& task = TasksGraph.GetTask(taskId);
+ for (ui64 outputIndex = 0; outputIndex < task.Outputs.size(); ++outputIndex) {
+ auto& output = task.Outputs[outputIndex];
+ auto* protoOutput = taskDesc.MutableOutputs(outputIndex);
+
+ for (ui64 outputChannelIndex = 0; outputChannelIndex < output.Channels.size(); ++outputChannelIndex) {
+ ui64 outputChannelId = output.Channels[outputChannelIndex];
+ auto* protoChannel = protoOutput->MutableChannels(outputChannelIndex);
+
+ ui64 dstTaskId = TasksGraph.GetChannel(outputChannelId).DstTask;
+ if (dstTaskId == 0) {
+ continue;
+ }
+
+ auto& dstTask = TasksGraph.GetTask(dstTaskId);
+ if (dstTask.ComputeActorId) {
+ protoChannel->MutableDstEndpoint()->Clear();
+ ActorIdToProto(dstTask.ComputeActorId, protoChannel->MutableDstEndpoint()->MutableActorId());
+ }
+ }
+ }
remoteComputeTasksCnt += 1;
- FillInputSettings(taskDesc, lockTxId);
+ FillInputSettings(taskDesc);
PendingComputeTasks.insert(taskDesc.GetId());
tasksPerNode[it->second].emplace_back(std::move(taskDesc));
}
}
- for (auto& [nodeId, tasks] : tasksPerNode) {
- auto ev = MakeHolder<TEvKqpNode::TEvStartKqpTasksRequest>();
-
- ev->Record.SetTxId(TxId);
- ActorIdToProto(SelfId(), ev->Record.MutableExecuterActorId());
-
- if (Deadline) {
- TDuration timeout = *Deadline - TAppData::TimeProvider->Now();
- ev->Record.MutableRuntimeSettings()->SetTimeoutMs(timeout.MilliSeconds());
- }
-
- ev->Record.MutableRuntimeSettings()->SetExecType(NDqProto::TComputeRuntimeSettings::DATA);
- ev->Record.MutableRuntimeSettings()->SetStatsMode(GetDqStatsMode(Request.StatsMode));
- ev->Record.MutableRuntimeSettings()->SetUseLLVM(false);
- ev->Record.SetStartAllOrFail(true);
-
- for (auto&& task : tasks) {
- ev->Record.AddTasks()->Swap(&task);
- }
-
- auto target = MakeKqpNodeServiceID(nodeId);
-
- ui32 flags = IEventHandle::FlagTrackDelivery;
- if (SubscribedNodes.emplace(nodeId).second) {
- flags |= IEventHandle::FlagSubscribeOnSession;
- }
- TlsActivationContext->Send(new IEventHandle(target, SelfId(), ev.Release(), flags));
- }
+ Planner = CreateKqpPlanner(TxId, SelfId(), {}, std::move(tasksPerNode), Request.Snapshot,
+ Database, UserToken, Deadline.GetOrElse(TInstant::Zero()), Request.StatsMode,
+ Request.DisableLlvmForUdfStages, Request.LlvmEnabled, false, Nothing(),
+ ExecuterSpan, {}, ExecuterRetriesConfig);
+ Planner->ProcessTasksForDataExecuter();
// then start data tasks with known actor ids of compute tasks
for (auto& [shardId, shardTx] : DatashardTxs) {
@@ -2069,7 +2097,7 @@ private:
LOG_D("datashard task: " << taskId << ", proto: " << protoTask.ShortDebugString());
}
- ExecuteDatashardTransaction(shardId, shardTx, lockTxId);
+ ExecuteDatashardTransaction(shardId, shardTx, LockTxId);
}
ExecuteTopicTabletTransactions(TopicTxs);
@@ -2181,8 +2209,11 @@ public:
if (channel.DstTask) {
FillEndpointDesc(*channelDesc.MutableDstEndpoint(), TasksGraph.GetTask(channel.DstTask));
+ } else if (StreamResult) {
+ auto proxy = GetOrCreateChannelProxy(channel);
+ ActorIdToProto(proxy->SelfId(), channelDesc.MutableDstEndpoint()->MutableActorId());
} else {
- // result channel
+ // For non-stream execution, collect results in executer and forward with response.
ActorIdToProto(SelfId(), channelDesc.MutableDstEndpoint()->MutableActorId());
}
@@ -2210,7 +2241,7 @@ private:
}
}
- void FillInputSettings(NYql::NDqProto::TDqTask& task, const TMaybe<ui64> lockTxId) {
+ void FillInputSettings(NYql::NDqProto::TDqTask& task) {
for (auto& input : *task.MutableInputs()) {
if (input.HasTransform()) {
auto transform = input.MutableTransform();
@@ -2230,16 +2261,43 @@ private:
settings.MutableSnapshot()->SetTxId(Snapshot.TxId);
}
- if (lockTxId.Defined()) {
- settings.SetLockTxId(*lockTxId);
+ if (LockTxId.Defined()) {
+ settings.SetLockTxId(*LockTxId);
}
settings.SetImmediateTx(ImmediateTx);
transform->MutableSettings()->PackFrom(settings);
}
+ if (input.HasSource() && Snapshot != Request.Snapshot && input.GetSource().GetType() == NYql::KqpReadRangesSourceName) {
+ auto source = input.MutableSource();
+ const google::protobuf::Any& settingsAny = source->GetSettings();
+
+ YQL_ENSURE(settingsAny.Is<NKikimrTxDataShard::TKqpReadRangesSourceSettings>(), "Expected settings type: "
+ << NKikimrTxDataShard::TKqpReadRangesSourceSettings::descriptor()->full_name()
+ << " , but got: " << settingsAny.type_url());
+
+ NKikimrTxDataShard::TKqpReadRangesSourceSettings settings;
+ YQL_ENSURE(settingsAny.UnpackTo(&settings), "Failed to unpack settings");
+
+ if (Snapshot.IsValid()) {
+ settings.MutableSnapshot()->SetStep(Snapshot.Step);
+ settings.MutableSnapshot()->SetTxId(Snapshot.TxId);
+ }
+
+ source->MutableSettings()->PackFrom(settings);
+ }
}
}
+ static bool HasMissingSnapshotError(const NKikimrTxDataShard::TEvProposeTransactionResult& result) {
+ for (const auto& err : result.GetError()) {
+ if (err.GetKind() == NKikimrTxDataShard::TError::SNAPSHOT_NOT_EXIST) {
+ return true;
+ }
+ }
+ return false;
+ }
+
static void AddDataShardErrors(const NKikimrTxDataShard::TEvProposeTransactionResult& result, TIssue& issue) {
for (const auto &err : result.GetError()) {
issue.AddSubIssue(new TIssue(TStringBuilder()
@@ -2258,7 +2316,11 @@ private:
}
private:
+ bool StreamResult = false;
+ bool HasStreamLookup = false;
+
NTxProxy::TRequestControls RequestControls;
+
ui64 TxCoordinator = 0;
THashMap<ui64, TShardState> ShardStates;
THashMap<ui64, TShardState> TopicTabletStates;
@@ -2283,10 +2345,12 @@ private:
THashSet<ui64> SubscribedNodes;
THashMap<ui64, TVector<NDqProto::TDqTask>> RemoteComputeTasks;
+
TVector<NDqProto::TDqTask> ComputeTasks;
TDatashardTxs DatashardTxs;
TTopicTabletTxs TopicTxs;
+ TMaybe<ui64> LockTxId;
// Lock handle for a newly acquired lock
TLockHandle LockHandle;
ui64 LastShard = 0;
@@ -2294,10 +2358,10 @@ private:
} // namespace
-IActor* CreateKqpDataExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database, const TMaybe<TString>& userToken,
- TKqpRequestCounters::TPtr counters)
+IActor* CreateKqpDataExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
+ TKqpRequestCounters::TPtr counters, bool streamResult, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
{
- return new TKqpDataExecuter(std::move(request), database, userToken, counters);
+ return new TKqpDataExecuter(std::move(request), database, userToken, counters, streamResult, executerRetriesConfig);
}
} // namespace NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_executer.h b/ydb/core/kqp/executer_actor/kqp_executer.h
index a83e3b6848..63e4b4a215 100644
--- a/ydb/core/kqp/executer_actor/kqp_executer.h
+++ b/ydb/core/kqp/executer_actor/kqp_executer.h
@@ -84,7 +84,8 @@ struct TEvKqpExecuter {
};
IActor* CreateKqpExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
- const TMaybe<TString>& userToken, TKqpRequestCounters::TPtr counters);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TKqpRequestCounters::TPtr counters,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig);
std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecutePure(
IKqpGateway::TExecPhysicalRequest&& request, TKqpRequestCounters::TPtr counters, TActorId owner);
diff --git a/ydb/core/kqp/executer_actor/kqp_executer_impl.cpp b/ydb/core/kqp/executer_actor/kqp_executer_impl.cpp
index 1b0fa00b10..37a56ddd64 100644
--- a/ydb/core/kqp/executer_actor/kqp_executer_impl.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_executer_impl.cpp
@@ -52,6 +52,12 @@ void TEvKqpExecuter::TEvTxResponse::TakeResult(ui32 idx, NKikimr::NMiniKQL::TUnb
auto serializer = NYql::NDq::TDqDataSerializer(
AllocState->TypeEnv, AllocState->HolderFactory, NDqProto::DATA_TRANSPORT_UV_PICKLE_1_0);
auto buffer = serializer.Serialize(rows, txResult.MkqlItemType);
+ {
+ auto g = AllocState->TypeEnv.BindAllocator();
+ NKikimr::NMiniKQL::TUnboxedValueVector emptyVector;
+ emptyVector.swap(rows);
+ }
+
serializer.Deserialize(buffer, txResult.MkqlItemType, txResult.Rows);
}
@@ -139,15 +145,15 @@ TActorId ReportToRl(ui64 ru, const TString& database, const TString& userToken,
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
IActor* CreateKqpExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
- const TMaybe<TString>& userToken, TKqpRequestCounters::TPtr counters)
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TKqpRequestCounters::TPtr counters,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
{
if (request.Transactions.empty()) {
// commit-only or rollback-only data transaction
YQL_ENSURE(request.EraseLocks);
- return CreateKqpDataExecuter(std::move(request), database, userToken, counters);
+ return CreateKqpDataExecuter(std::move(request), database, userToken, counters, false, executerRetriesConfig);
}
- bool data = true; // `false` stands for Scan
TMaybe<NKqpProto::TKqpPhyTx::EType> txsType;
for (auto& tx : request.Transactions) {
if (txsType) {
@@ -155,31 +161,23 @@ IActor* CreateKqpExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TSt
YQL_ENSURE(*txsType == NKqpProto::TKqpPhyTx::TYPE_DATA, "Cannot execute multiple non-data physical txs.");
} else {
txsType = tx.Body->GetType();
+ }
+ }
- switch (tx.Body->GetType()) {
- case NKqpProto::TKqpPhyTx::TYPE_COMPUTE:
- case NKqpProto::TKqpPhyTx::TYPE_DATA:
- data = true;
- break;
+ switch (*txsType) {
+ case NKqpProto::TKqpPhyTx::TYPE_COMPUTE:
+ case NKqpProto::TKqpPhyTx::TYPE_DATA:
+ return CreateKqpDataExecuter(std::move(request), database, userToken, counters, false, executerRetriesConfig);
- case NKqpProto::TKqpPhyTx::TYPE_SCAN:
- data = false;
- break;
+ case NKqpProto::TKqpPhyTx::TYPE_SCAN:
+ return CreateKqpScanExecuter(std::move(request), database, userToken, counters, executerRetriesConfig);
- case NKqpProto::TKqpPhyTx::TYPE_GENERIC:
- // TODO: Use separate executer.
- data = false;
- break;
+ case NKqpProto::TKqpPhyTx::TYPE_GENERIC:
+ return CreateKqpDataExecuter(std::move(request), database, userToken, counters, true, executerRetriesConfig);
- default:
- YQL_ENSURE(false, "Unsupported physical tx type: " << (ui32)tx.Body->GetType());
- }
- }
+ default:
+ YQL_ENSURE(false, "Unsupported physical tx type: " << (ui32)*txsType);
}
-
- return data
- ? CreateKqpDataExecuter(std::move(request), database, userToken, counters)
- : CreateKqpScanExecuter(std::move(request), database, userToken, counters);
}
} // namespace NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_executer_impl.h b/ydb/core/kqp/executer_actor/kqp_executer_impl.h
index 388d794d0f..9ca58d1f38 100644
--- a/ydb/core/kqp/executer_actor/kqp_executer_impl.h
+++ b/ydb/core/kqp/executer_actor/kqp_executer_impl.h
@@ -2,15 +2,18 @@
#include "kqp_executer.h"
#include "kqp_executer_stats.h"
+#include "kqp_planner.h"
#include "kqp_partition_helper.h"
#include "kqp_table_resolver.h"
#include "kqp_shards_resolver.h"
+
#include <ydb/core/kqp/common/kqp_ru_calc.h>
#include <ydb/core/kqp/common/kqp_lwtrace_probes.h>
#include <ydb/core/actorlib_impl/long_timer.h>
#include <ydb/core/base/appdata.h>
+#include <ydb/core/base/tablet_pipecache.h>
#include <ydb/core/base/wilson.h>
#include <ydb/core/base/kikimr_issue.h>
#include <ydb/core/protos/tx_datashard.pb.h>
@@ -74,14 +77,51 @@ TActorId ReportToRl(ui64 ru, const TString& database, const TString& userToken,
template <class TDerived, EExecType ExecType>
class TKqpExecuterBase : public TActorBootstrapped<TDerived> {
+protected:
+ struct TEvPrivate {
+ enum EEv {
+ EvRetry = EventSpaceBegin(TEvents::ES_PRIVATE),
+ EvResourcesSnapshot,
+ EvReattachToShard,
+ };
+
+ struct TEvRetry : public TEventLocal<TEvRetry, EEv::EvRetry> {
+ ui32 RequestId;
+ TActorId Target;
+
+ TEvRetry(ui64 requestId, const TActorId& target)
+ : RequestId(requestId)
+ , Target(target) {}
+ };
+
+ struct TEvResourcesSnapshot : public TEventLocal<TEvResourcesSnapshot, EEv::EvResourcesSnapshot> {
+ TVector<NKikimrKqp::TKqpNodeResources> Snapshot;
+
+ TEvResourcesSnapshot(TVector<NKikimrKqp::TKqpNodeResources>&& snapshot)
+ : Snapshot(std::move(snapshot)) {}
+ };
+
+ struct TEvReattachToShard : public TEventLocal<TEvReattachToShard, EvReattachToShard> {
+ const ui64 TabletId;
+
+ explicit TEvReattachToShard(ui64 tabletId)
+ : TabletId(tabletId) {}
+ };
+ };
+
public:
- TKqpExecuterBase(IKqpGateway::TExecPhysicalRequest&& request, const TString& database, const TMaybe<TString>& userToken,
- TKqpRequestCounters::TPtr counters, ui64 spanVerbosity = 0, TString spanName = "no_name")
+ TKqpExecuterBase(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
+ TKqpRequestCounters::TPtr counters,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig,
+ ui64 spanVerbosity = 0, TString spanName = "no_name")
: Request(std::move(request))
, Database(database)
, UserToken(userToken)
, Counters(counters)
, ExecuterSpan(spanVerbosity, std::move(Request.TraceId), spanName)
+ , Planner(nullptr)
+ , ExecuterRetriesConfig(executerRetriesConfig)
{
ResponseEv = std::make_unique<TEvKqpExecuter::TEvTxResponse>(Request.TxAlloc);
ResponseEv->Orbit = std::move(Request.Orbit);
@@ -230,6 +270,7 @@ protected:
if (Stats) {
Stats->AddComputeActorStats(computeActor.NodeId(), std::move(*state.MutableStats()));
}
+ ExtraData[computeActor].Swap(state.MutableExtraData());
LastTaskId = taskId;
LastComputeActorId = computeActor.ToString();
@@ -365,11 +406,24 @@ protected:
return false;
}
+ void InvalidateNode(ui64 node) {
+ for (auto tablet : ShardsOnNode[node]) {
+ auto ev = MakeHolder<TEvPipeCache::TEvForcePipeReconnect>(tablet);
+ this->Send(MakePipePeNodeCacheID(false), ev.Release());
+ }
+ }
+
void HandleUndelivered(TEvents::TEvUndelivered::TPtr& ev) {
ui32 eventType = ev->Get()->SourceType;
auto reason = ev->Get()->Reason;
switch (eventType) {
case TEvKqpNode::TEvStartKqpTasksRequest::EventType: {
+ if (reason == TEvents::TEvUndelivered::EReason::ReasonActorUnknown) {
+ LOG_D("Schedule a retry by ActorUnknown reason, nodeId:" << ev->Sender.NodeId() << " requestId: " << ev->Cookie);
+ this->Schedule(TDuration::MilliSeconds(Planner->GetCurrentRetryDelay(ev->Cookie)), new typename TEvPrivate::TEvRetry(ev->Cookie, ev->Sender));
+ return;
+ }
+ InvalidateNode(ev->Sender.NodeId());
return InternalError(TStringBuilder()
<< "TEvKqpNode::TEvStartKqpTasksRequest lost: " << reason);
}
@@ -379,6 +433,15 @@ protected:
}
}
+ void HandleRetry(typename TEvPrivate::TEvRetry::TPtr& ev) {
+ if (Planner && Planner->SendStartKqpTasksRequest(ev->Get()->RequestId, ev->Get()->Target)) {
+ return;
+ }
+ InvalidateNode(Target.NodeId());
+ return InternalError(TStringBuilder()
+ << "TEvKqpNode::TEvStartKqpTasksRequest lost: ActorUnknown");
+ }
+
void HandleDisconnected(TEvInterconnect::TEvNodeDisconnected::TPtr& ev) {
auto nodeId = ev->Get()->NodeId;
LOG_N("Disconnected node " << nodeId);
@@ -410,19 +473,19 @@ protected:
switch (reason) {
case NKikimrKqp::TEvStartKqpTasksResponse::NOT_ENOUGH_MEMORY: {
ReplyErrorAndDie(Ydb::StatusIds::OVERLOADED,
- YqlIssue({}, NYql::TIssuesIds::KIKIMR_OVERLOADED, "Not enough memory to execute query"));
+ YqlIssue({}, NYql::TIssuesIds::KIKIMR_OVERLOADED, message));
break;
}
case NKikimrKqp::TEvStartKqpTasksResponse::NOT_ENOUGH_EXECUTION_UNITS: {
ReplyErrorAndDie(Ydb::StatusIds::OVERLOADED,
- YqlIssue({}, NYql::TIssuesIds::KIKIMR_OVERLOADED, "Not enough computation units to execute query"));
+ YqlIssue({}, NYql::TIssuesIds::KIKIMR_OVERLOADED, message));
break;
}
case NKikimrKqp::TEvStartKqpTasksResponse::QUERY_MEMORY_LIMIT_EXCEEDED: {
ReplyErrorAndDie(Ydb::StatusIds::PRECONDITION_FAILED,
- YqlIssue({}, NYql::TIssuesIds::KIKIMR_PRECONDITION_FAILED, "Memory limit exceeded"));
+ YqlIssue({}, NYql::TIssuesIds::KIKIMR_PRECONDITION_FAILED, message));
break;
}
@@ -588,8 +651,7 @@ protected:
}
if (Request.RlPath) {
- auto actorId = ReportToRl(ru, Database, UserToken.GetOrElse(""),
- Request.RlPath.GetRef());
+ auto actorId = ReportToRl(ru, Database, UserToken->GetSerializedToken(), Request.RlPath.GetRef());
LOG_D("Resource usage for last stat interval: " << consumption
<< " ru: " << ru << " rl path: " << Request.RlPath.GetRef()
@@ -650,7 +712,7 @@ protected:
}
}
- void BuildScanTasksFromSource(TStageInfo& stageInfo) {
+ size_t BuildScanTasksFromSource(TStageInfo& stageInfo, IKqpGateway::TKqpSnapshot snapshot, const TMaybe<ui64> lockTxId = {}) {
THashMap<ui64, std::vector<ui64>> nodeTasks;
THashMap<ui64, ui64> assignedShardsCount;
@@ -669,15 +731,12 @@ protected:
auto columns = BuildKqpColumns(source, table);
auto partitions = PrunePartitions(TableKeys, source, stageInfo, HolderFactory(), TypeEnv());
- bool reverse = false;
ui64 itemsLimit = 0;
TString itemsLimitParamName;
NYql::NDqProto::TData itemsLimitBytes;
NKikimr::NMiniKQL::TType* itemsLimitType = nullptr;
- YQL_ENSURE(!source.GetReverse(), "reverse not supported yet");
-
for (auto& [shardId, shardInfo] : partitions) {
YQL_ENSURE(!shardInfo.KeyWriteRanges);
@@ -695,11 +754,14 @@ protected:
NKikimrTxDataShard::TKqpReadRangesSourceSettings settings;
FillTableMeta(stageInfo, settings.MutableTable());
- for (auto& key : source.GetSkipNullKeys()) {
- settings.AddSkipNullKeys(key);
- }
for (auto& keyColumn : keyTypes) {
+ auto columnType = NScheme::ProtoColumnTypeFromTypeInfo(keyColumn);
+ if (columnType.TypeInfo) {
+ *settings.AddKeyColumnTypeInfos() = *columnType.TypeInfo;
+ } else {
+ *settings.AddKeyColumnTypeInfos() = NKikimrProto::TTypeInfo();
+ }
settings.AddKeyColumnTypes(static_cast<ui32>(keyColumn.GetTypeId()));
}
@@ -720,19 +782,30 @@ protected:
settings.SetDataFormat(NKikimrTxDataShard::EScanDataFormat::CELLVEC);
}
- settings.MutableSnapshot()->SetStep(Request.Snapshot.Step);
- settings.MutableSnapshot()->SetTxId(Request.Snapshot.TxId);
+ if (snapshot.IsValid()) {
+ settings.MutableSnapshot()->SetStep(snapshot.Step);
+ settings.MutableSnapshot()->SetTxId(snapshot.TxId);
+ }
shardInfo.KeyReadRanges->SerializeTo(&settings);
- settings.SetReverse(reverse);
+ settings.SetReverse(source.GetReverse());
settings.SetSorted(source.GetSorted());
settings.SetShardIdHint(shardId);
+ if (Stats) {
+ Stats->AffectedShards.insert(shardId);
+ }
ExtractItemsLimit(stageInfo, source.GetItemsLimit(), Request.TxAlloc->HolderFactory,
Request.TxAlloc->TypeEnv, itemsLimit, itemsLimitParamName, itemsLimitBytes, itemsLimitType);
settings.SetItemsLimit(itemsLimit);
+ auto self = static_cast<TDerived*>(this)->SelfId();
+ if (lockTxId) {
+ settings.SetLockTxId(*lockTxId);
+ settings.SetLockNodeId(self.NodeId());
+ }
+
const auto& stageSource = stage.GetSources(0);
auto& input = task.Inputs[stageSource.GetInputIndex()];
auto& taskSourceSettings = input.SourceSettings;
@@ -741,6 +814,7 @@ protected:
taskSourceSettings->PackFrom(settings);
input.SourceType = NYql::KqpReadRangesSourceName;
}
+ return partitions.size();
}
protected:
@@ -983,6 +1057,35 @@ protected:
return true;
}
+ IActor* GetOrCreateChannelProxy(const NYql::NDq::TChannel& channel) {
+ IActor* proxy;
+
+ if (ResponseEv->TxResults[0].IsStream) {
+ if (!ResultChannelProxies.empty()) {
+ return ResultChannelProxies.begin()->second;
+ }
+
+ proxy = CreateResultStreamChannelProxy(TxId, channel.Id, ResponseEv->TxResults[0].MkqlItemType,
+ ResponseEv->TxResults[0].ColumnOrder, Target, Stats.get(), this->SelfId());
+ } else {
+ YQL_ENSURE(channel.DstInputIndex < ResponseEv->ResultsSize());
+
+ auto channelIt = ResultChannelProxies.find(channel.Id);
+
+ if (channelIt != ResultChannelProxies.end()) {
+ return channelIt->second;
+ }
+
+ proxy = CreateResultDataChannelProxy(TxId, channel.Id, Stats.get(), this->SelfId(),
+ channel.DstInputIndex, ResponseEv.get());
+ }
+
+ this->RegisterWithSameMailbox(proxy);
+ ResultChannelProxies.emplace(std::make_pair(channel.Id, proxy));
+
+ return proxy;
+ }
+
protected:
void PassAway() override {
LOG_D("terminate execution.");
@@ -1041,7 +1144,7 @@ protected:
protected:
IKqpGateway::TExecPhysicalRequest Request;
const TString Database;
- const TMaybe<TString> UserToken;
+ const TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TKqpRequestCounters::TPtr Counters;
std::unique_ptr<TQueryExecutionStats> Stats;
TInstant StartTime;
@@ -1058,6 +1161,9 @@ protected:
TActorId KqpTableResolverId;
TActorId KqpShardsResolverId;
THashMap<TActorId, TProgressStat> PendingComputeActors; // Running compute actors (pure and DS)
+ THashMap<TActorId, NYql::NDqProto::TComputeActorExtraData> ExtraData;
+ std::unordered_map<ui64, IActor*> ResultChannelProxies;
+
TVector<TProgressStat> LastStats;
TInstant StartResolveTime;
@@ -1074,19 +1180,23 @@ protected:
ui64 LastTaskId = 0;
TString LastComputeActorId = "";
+
+ std::unique_ptr<TKqpPlanner> Planner;
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig ExecuterRetriesConfig;
+
private:
static constexpr TDuration ResourceUsageUpdateInterval = TDuration::MilliSeconds(100);
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-IActor* CreateKqpLiteralExecuter(IKqpGateway::TExecPhysicalRequest&& request, TKqpRequestCounters::TPtr counters);
-
IActor* CreateKqpDataExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
- const TMaybe<TString>& userToken, TKqpRequestCounters::TPtr counters);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TKqpRequestCounters::TPtr counters, bool streamResult,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig);
IActor* CreateKqpScanExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
- const TMaybe<TString>& userToken, TKqpRequestCounters::TPtr counters);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TKqpRequestCounters::TPtr counters,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig);
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/executer_actor/kqp_executer_stats.cpp b/ydb/core/kqp/executer_actor/kqp_executer_stats.cpp
index c8961e499f..3a59d76574 100644
--- a/ydb/core/kqp/executer_actor/kqp_executer_stats.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_executer_stats.cpp
@@ -136,6 +136,13 @@ void TQueryExecutionStats::AddComputeActorStats(ui32 /* nodeId */, NYql::NDqProt
tableAggr->SetWriteBytes(tableAggr->GetWriteBytes() + table.GetWriteBytes());
tableAggr->SetEraseRows(tableAggr->GetEraseRows() + table.GetEraseRows());
tableAggr->SetAffectedPartitions(tableAggr->GetAffectedPartitions() + table.GetAffectedPartitions());
+
+ NKqpProto::TKqpReadActorTableAggrExtraStats tableExtraStats;
+ if (table.GetExtra().UnpackTo(&tableExtraStats)) {
+ for (const auto& shardId : tableExtraStats.GetAffectedShards()) {
+ AffectedShards.insert(shardId);
+ }
+ }
}
}
diff --git a/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp b/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp
index 430198dfb5..00730303de 100644
--- a/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp
@@ -134,11 +134,12 @@ public:
auto& alloc = Request.TxAlloc->Alloc;
auto rmConfig = GetKqpResourceManager()->GetConfig();
ui64 mkqlInitialLimit = std::min(mkqlMemoryLimit, rmConfig.GetMkqlLightProgramMemoryLimit());
+ ui64 mkqlMaxLimit = std::max(mkqlMemoryLimit, rmConfig.GetMkqlLightProgramMemoryLimit());
alloc.SetLimit(mkqlInitialLimit);
// TODO: KIKIMR-15350
- alloc.Ref().SetIncreaseMemoryLimitCallback([this, &alloc, mkqlMemoryLimit](ui64 currentLimit, ui64 required) {
- if (required < mkqlMemoryLimit) {
+ alloc.Ref().SetIncreaseMemoryLimitCallback([this, &alloc, mkqlMaxLimit](ui64 currentLimit, ui64 required) {
+ if (required < mkqlMaxLimit) {
LOG_D("Increase memory limit from " << currentLimit << " to " << required);
alloc.SetLimit(required);
}
diff --git a/ydb/core/kqp/executer_actor/kqp_locks_helper.cpp b/ydb/core/kqp/executer_actor/kqp_locks_helper.cpp
index cb1178b74f..19fbb4cd60 100644
--- a/ydb/core/kqp/executer_actor/kqp_locks_helper.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_locks_helper.cpp
@@ -37,41 +37,36 @@ void BuildLocks(NKikimrMiniKQL::TResult& result, const TVector<NKikimrTxDataShar
}
}
-TMap<ui64, TVector<NKikimrTxDataShard::TLock>> ExtractLocks(const TVector<NYql::NDq::TMkqlValueRef>& locks) {
+NKikimrTxDataShard::TLock ExtractLock(const NYql::NDq::TMkqlValueRef& lock) {
auto ensureMemberDataType = [] (const NKikimrMiniKQL::TMember& member, const TString& name, ui32 scheme) {
YQL_ENSURE(member.GetName() == name);
YQL_ENSURE(member.GetType().GetKind() == NKikimrMiniKQL::ETypeKind::Data);
YQL_ENSURE(member.GetType().GetData().GetScheme() == scheme);
};
- TMap<ui64, TVector<NKikimrTxDataShard::TLock>> locksMap;
- for (auto& lock : locks) {
- const auto& type = lock.GetType();
- const auto& value = lock.GetValue();
-
- YQL_ENSURE(type.GetKind() == NKikimrMiniKQL::ETypeKind::Struct);
- auto& structType = type.GetStruct();
+ const auto& type = lock.GetType();
+ const auto& value = lock.GetValue();
- YQL_ENSURE(structType.MemberSize() == 6);
- ensureMemberDataType(structType.GetMember(0), "Counter", NKikimr::NUdf::TDataType<ui64>::Id);
- ensureMemberDataType(structType.GetMember(1), "DataShard", NKikimr::NUdf::TDataType<ui64>::Id);
- ensureMemberDataType(structType.GetMember(2), "Generation", NKikimr::NUdf::TDataType<ui32>::Id);
- ensureMemberDataType(structType.GetMember(3), "LockId", NKikimr::NUdf::TDataType<ui64>::Id);
- ensureMemberDataType(structType.GetMember(4), "PathId", NKikimr::NUdf::TDataType<ui64>::Id);
- ensureMemberDataType(structType.GetMember(5), "SchemeShard", NKikimr::NUdf::TDataType<ui64>::Id);
+ YQL_ENSURE(type.GetKind() == NKikimrMiniKQL::ETypeKind::Struct);
+ auto& structType = type.GetStruct();
- NKikimrTxDataShard::TLock dsLock;
- dsLock.SetCounter(value.GetStruct(0).GetUint64());
- dsLock.SetDataShard(value.GetStruct(1).GetUint64());
- dsLock.SetGeneration(value.GetStruct(2).GetUint32());
- dsLock.SetLockId(value.GetStruct(3).GetUint64());
- dsLock.SetPathId(value.GetStruct(4).GetUint64());
- dsLock.SetSchemeShard(value.GetStruct(5).GetUint64());
+ YQL_ENSURE(structType.MemberSize() == 6);
+ ensureMemberDataType(structType.GetMember(0), "Counter", NKikimr::NUdf::TDataType<ui64>::Id);
+ ensureMemberDataType(structType.GetMember(1), "DataShard", NKikimr::NUdf::TDataType<ui64>::Id);
+ ensureMemberDataType(structType.GetMember(2), "Generation", NKikimr::NUdf::TDataType<ui32>::Id);
+ ensureMemberDataType(structType.GetMember(3), "LockId", NKikimr::NUdf::TDataType<ui64>::Id);
+ ensureMemberDataType(structType.GetMember(4), "PathId", NKikimr::NUdf::TDataType<ui64>::Id);
+ ensureMemberDataType(structType.GetMember(5), "SchemeShard", NKikimr::NUdf::TDataType<ui64>::Id);
- locksMap[dsLock.GetDataShard()].emplace_back(std::move(dsLock));
- }
+ NKikimrTxDataShard::TLock dsLock;
+ dsLock.SetCounter(value.GetStruct(0).GetUint64());
+ dsLock.SetDataShard(value.GetStruct(1).GetUint64());
+ dsLock.SetGeneration(value.GetStruct(2).GetUint32());
+ dsLock.SetLockId(value.GetStruct(3).GetUint64());
+ dsLock.SetPathId(value.GetStruct(4).GetUint64());
+ dsLock.SetSchemeShard(value.GetStruct(5).GetUint64());
- return locksMap;
+ return dsLock;
}
} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_locks_helper.h b/ydb/core/kqp/executer_actor/kqp_locks_helper.h
index 1e8b175219..f4ea90a0eb 100644
--- a/ydb/core/kqp/executer_actor/kqp_locks_helper.h
+++ b/ydb/core/kqp/executer_actor/kqp_locks_helper.h
@@ -10,6 +10,6 @@ namespace NKikimr::NKqp {
void BuildLocks(NKikimrMiniKQL::TResult& result, const TVector<NKikimrTxDataShard::TLock>& locks);
-TMap<ui64, TVector<NKikimrTxDataShard::TLock>> ExtractLocks(const TVector<NYql::NDq::TMkqlValueRef>& locks);
+NKikimrTxDataShard::TLock ExtractLock(const NYql::NDq::TMkqlValueRef& lock);
} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp b/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp
index 95ad33773e..53a7408059 100644
--- a/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp
@@ -228,9 +228,9 @@ TVector<TCell> FillKeyValues(const TVector<NScheme::TTypeInfo>& keyColumnTypes,
auto [type, value] = stageInfo.Meta.Tx.Params->GetParameterUnboxedValue(paramName);
if (paramIndex) {
YQL_ENSURE(type->GetKind() == NKikimr::NMiniKQL::TType::EKind::Tuple);
- auto actual = static_cast<NKikimr::NMiniKQL::TStructType*>(type);
- YQL_ENSURE(*paramIndex < actual->GetMembersCount());
- type = actual->GetMemberType(*paramIndex);
+ auto actual = static_cast<NKikimr::NMiniKQL::TTupleType*>(type);
+ YQL_ENSURE(*paramIndex < actual->GetElementsCount());
+ type = actual->GetElementType(*paramIndex);
value = value.GetElement(*paramIndex);
}
@@ -584,7 +584,14 @@ THashMap<ui64, TShardInfo> PrunePartitions(const TKqpTableKeys& tableKeys,
keyColumnTypes, source.GetRanges(), stageInfo, typeEnv
);
} else if (source.HasKeyRange()) {
- ranges.push_back(MakeKeyRange(keyColumnTypes, source.GetKeyRange(), stageInfo, holderFactory, typeEnv));
+ const auto& range = source.GetKeyRange();
+ if (range.GetFrom().SerializeAsString() == range.GetTo().SerializeAsString() &&
+ range.GetFrom().ValuesSize() == keyColumnTypes.size()) {
+ auto cells = FillKeyValues(keyColumnTypes, range.GetFrom(), stageInfo, holderFactory, typeEnv);
+ ranges.push_back(TSerializedCellVec(TSerializedCellVec::Serialize(cells)));
+ } else {
+ ranges.push_back(MakeKeyRange(keyColumnTypes, range, stageInfo, holderFactory, typeEnv));
+ }
} else {
ranges = BuildFullRange(keyColumnTypes);
}
diff --git a/ydb/core/kqp/executer_actor/kqp_planner.cpp b/ydb/core/kqp/executer_actor/kqp_planner.cpp
index 86d18fc4f0..753bc532bd 100644
--- a/ydb/core/kqp/executer_actor/kqp_planner.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_planner.cpp
@@ -3,9 +3,9 @@
#include "kqp_planner_strategy.h"
#include "kqp_shards_resolver.h"
+#include <ydb/core/kqp/common/kqp_yql.h>
#include <ydb/core/base/appdata.h>
#include <ydb/core/base/wilson.h>
-#include <ydb/core/kqp/rm_service/kqp_resource_estimation.h>
#include <util/generic/set.h>
@@ -22,15 +22,17 @@ using namespace NYql;
// So, we estimate total memory amount required for task as apriori task size multiplied by this constant.
constexpr ui32 MEMORY_ESTIMATION_OVERFLOW = 2;
-TKqpPlanner::TKqpPlanner(ui64 txId, const TActorId& executer, TVector<NDqProto::TDqTask>&& tasks,
- THashMap<ui64, TVector<NDqProto::TDqTask>>&& scanTasks, const IKqpGateway::TKqpSnapshot& snapshot,
- const TString& database, const TMaybe<TString>& userToken, TInstant deadline,
+TKqpPlanner::TKqpPlanner(ui64 txId, const TActorId& executer, TVector<NDqProto::TDqTask>&& computeTasks,
+ THashMap<ui64, TVector<NDqProto::TDqTask>>&& mainTasksPerNode, const IKqpGateway::TKqpSnapshot& snapshot,
+ const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TInstant deadline,
const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool disableLlvmForUdfStages, bool enableLlvm,
- bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TTraceId traceId)
+ bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TSpan& executerSpan,
+ TVector<NKikimrKqp::TKqpNodeResources>&& resourcesSnapshot,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
: TxId(txId)
, ExecuterId(executer)
- , Tasks(std::move(tasks))
- , ScanTasks(std::move(scanTasks))
+ , ComputeTasks(std::move(computeTasks))
+ , MainTasksPerNode(std::move(mainTasksPerNode))
, Snapshot(snapshot)
, Database(database)
, UserToken(userToken)
@@ -40,7 +42,9 @@ TKqpPlanner::TKqpPlanner(ui64 txId, const TActorId& executer, TVector<NDqProto::
, EnableLlvm(enableLlvm)
, WithSpilling(withSpilling)
, RlPath(rlPath)
- , KqpPlannerSpan(TWilsonKqp::KqpPlanner, std::move(traceId), "KqpPlanner")
+ , ResourcesSnapshot(std::move(resourcesSnapshot))
+ , ExecuterSpan(executerSpan)
+ , ExecuterRetriesConfig(executerRetriesConfig)
{
if (!Database) {
// a piece of magic for tests
@@ -51,85 +55,115 @@ TKqpPlanner::TKqpPlanner(ui64 txId, const TActorId& executer, TVector<NDqProto::
}
}
-void TKqpPlanner::Bootstrap(const TActorContext&) {
- GetKqpResourceManager()->RequestClusterResourcesInfo(
- [as = TlsActivationContext->ActorSystem(), self = SelfId()](TVector<NKikimrKqp::TKqpNodeResources>&& resources) {
- TAutoPtr<IEventHandle> eh = new IEventHandle(self, self, new TEvPrivate::TEvResourcesSnapshot(std::move(resources)));
- as->Send(eh);
- });
+bool TKqpPlanner::SendStartKqpTasksRequest(ui32 requestId, const TActorId& target) {
+ auto& requestData = Requests[requestId];
- Become(&TKqpPlanner::WaitState);
-}
+ if (requestData.RetryNumber == ExecuterRetriesConfig.GetMaxRetryNumber() + 1) {
+ return false;
+ }
-void TKqpPlanner::WaitState(TAutoPtr<IEventHandle>& ev, const TActorContext&) {
- switch (ev->GetTypeRewrite()) {
- hFunc(TEvPrivate::TEvResourcesSnapshot, HandleWait);
- hFunc(TEvKqp::TEvAbortExecution, HandleWait);
- default:
- LOG_C("Unexpected event type: " << ev->GetTypeRewrite() << " at Wait state"
- << ", event: " << (ev->HasEvent() ? ev->GetBase()->ToString().data() : "<serialized>"));
+ auto ev = MakeHolder<TEvKqpNode::TEvStartKqpTasksRequest>();
+ ev->Record = requestData.request;
+
+ if (requestData.RetryNumber == ExecuterRetriesConfig.GetMaxRetryNumber()) {
+ LOG_E("Retry failed by retries limit, requestId: " << requestId);
+ TMaybe<ui32> targetNode;
+ for (size_t i = 0; i < ResourcesSnapshot.size(); ++i) {
+ if (!TrackingNodes.contains(ResourcesSnapshot[i].nodeid())) {
+ targetNode = ResourcesSnapshot[i].nodeid();
+ break;
+ }
+ }
+ if (targetNode) {
+ LOG_D("Try to retry to another node, nodeId: " << *targetNode << ", requestId: " << requestId);
+ auto anotherTarget = MakeKqpNodeServiceID(*targetNode);
+ TlsActivationContext->Send(std::make_unique<NActors::IEventHandle>(anotherTarget, ExecuterId, ev.Release(),
+ IEventHandle::FlagTrackDelivery | IEventHandle::FlagSubscribeOnSession, requestId, nullptr, ExecuterSpan.GetTraceId()));
+ requestData.RetryNumber++;
+ return true;
+ }
+ LOG_E("Retry failed because all nodes are busy, requestId: " << requestId);
+ return false;
}
-}
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-/// Wait State
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-void TKqpPlanner::HandleWait(TEvPrivate::TEvResourcesSnapshot::TPtr& ev) {
- if (ev->Get()->Snapshot.empty()) {
- LOG_E("Can not find default state storage group for database " << Database);
- RunLocal(ev->Get()->Snapshot);
- return;
+ if (requestData.RetryNumber >= 1) {
+ LOG_D("Try to retry by ActorUnknown reason, nodeId: " << target.NodeId() << ", requestId: " << requestId);
}
- Process(ev->Get()->Snapshot);
-}
+ requestData.RetryNumber++;
-void TKqpPlanner::HandleWait(TEvKqp::TEvAbortExecution::TPtr& ev) {
- LOG_E("Terminate KqpPlanner, reason: " << ev->Get()->GetIssues().ToOneLineString());
- PassAway();
+ TlsActivationContext->Send(std::make_unique<NActors::IEventHandle>(target, ExecuterId, ev.Release(),
+ requestData.flag, requestId, nullptr, ExecuterSpan.GetTraceId()));
+ return true;
}
-void TKqpPlanner::Process(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot) {
- auto rmConfig = GetKqpResourceManager()->GetConfig();
+void TKqpPlanner::ProcessTasksForDataExecuter() {
- ui32 tasksCount = Tasks.size();
- for (auto& [shardId, tasks] : ScanTasks) {
- tasksCount += tasks.size();
- }
+ long requestsCnt = 0;
- TVector<TTaskResourceEstimation> est;
- est.resize(tasksCount);
+ for (auto& [nodeId, tasks] : MainTasksPerNode) {
- ui64 localRunMemoryEst = 0;
+ auto& requestData = Requests.emplace_back();
- ui64 i = 0;
- for (auto& task : Tasks) {
- EstimateTaskResources(task, rmConfig, est[i]);
- localRunMemoryEst += est[i].TotalMemoryLimit;
- i++;
- }
- if (auto it = ScanTasks.find(SelfId().NodeId()); it != ScanTasks.end()) {
- for (auto& task : it->second) {
- EstimateTaskResources(task, rmConfig, est[i]);
- localRunMemoryEst += est[i].TotalMemoryLimit;
- i++;
+ requestData.request.SetTxId(TxId);
+ ActorIdToProto(ExecuterId, requestData.request.MutableExecuterActorId());
+
+ if (Deadline) {
+ TDuration timeout = Deadline - TAppData::TimeProvider->Now();
+ requestData.request.MutableRuntimeSettings()->SetTimeoutMs(timeout.MilliSeconds());
}
+
+ requestData.request.MutableRuntimeSettings()->SetExecType(NDqProto::TComputeRuntimeSettings::DATA);
+ requestData.request.MutableRuntimeSettings()->SetStatsMode(GetDqStatsMode(StatsMode));
+ requestData.request.MutableRuntimeSettings()->SetUseLLVM(false);
+ requestData.request.SetStartAllOrFail(true);
+
+ for (auto&& task : tasks) {
+ requestData.request.AddTasks()->Swap(&task);
+ }
+
+ auto target = MakeKqpNodeServiceID(nodeId);
+
+ requestData.flag = CalcSendMessageFlagsForNode(nodeId);
+ requestsCnt++;
+
+ SendStartKqpTasksRequest(Requests.size() - 1, target);
+ }
+
+ if (ExecuterSpan) {
+ ExecuterSpan.Attribute("requestsCnt", requestsCnt);
+ }
+}
+
+ui32 TKqpPlanner::GetCurrentRetryDelay(ui32 requestId) {
+ auto& requestData = Requests[requestId];
+ if (requestData.CurrentDelay == 0) {
+ requestData.CurrentDelay = ExecuterRetriesConfig.GetMinDelayToRetryMs();
+ return requestData.CurrentDelay;
}
+ requestData.CurrentDelay *= 2;
+ requestData.CurrentDelay = Min(requestData.CurrentDelay, ExecuterRetriesConfig.GetMaxDelayToRetryMs());
+ requestData.CurrentDelay = requestData.CurrentDelay * AppData()->RandomProvider->Uniform(100, 120) / 100;
+ return requestData.CurrentDelay;
+}
+
+void TKqpPlanner::ProcessTasksForScanExecuter() {
+ PrepareToProcess();
auto localResources = GetKqpResourceManager()->GetLocalResources();
- if (localRunMemoryEst * MEMORY_ESTIMATION_OVERFLOW <= localResources.Memory[NRm::EKqpMemoryPool::ScanQuery] &&
- tasksCount <= localResources.ExecutionUnits)
+ if (LocalRunMemoryEst * MEMORY_ESTIMATION_OVERFLOW <= localResources.Memory[NRm::EKqpMemoryPool::ScanQuery] &&
+ ResourceEstimations.size() <= localResources.ExecutionUnits)
{
- RunLocal(snapshot);
+ RunLocal(ResourcesSnapshot);
return;
}
- if (snapshot.empty() || (snapshot.size() == 1 && snapshot[0].GetNodeId() == SelfId().NodeId())) {
+ if (ResourcesSnapshot.empty() || (ResourcesSnapshot.size() == 1 && ResourcesSnapshot[0].GetNodeId() == ExecuterId.NodeId())) {
// try to run without memory overflow settings
- if (localRunMemoryEst <= localResources.Memory[NRm::EKqpMemoryPool::ScanQuery] &&
- tasksCount <= localResources.ExecutionUnits)
+ if (LocalRunMemoryEst <= localResources.Memory[NRm::EKqpMemoryPool::ScanQuery] &&
+ ResourceEstimations.size() <= localResources.ExecutionUnits)
{
- RunLocal(snapshot);
+ RunLocal(ResourcesSnapshot);
return;
}
@@ -137,12 +171,7 @@ void TKqpPlanner::Process(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot
auto ev = MakeHolder<TEvKqp::TEvAbortExecution>(NYql::NDqProto::StatusIds::PRECONDITION_FAILED,
"Not enough resources to execute query locally and no information about other nodes");
- if (KqpPlannerSpan) {
- KqpPlannerSpan.EndError("Not enough resources to execute query locally and no information about other nodes");
- }
-
- Send(ExecuterId, ev.Release());
- PassAway();
+ TlsActivationContext->Send(std::make_unique<IEventHandle>(ExecuterId, ExecuterId, ev.Release()));
return;
}
@@ -154,59 +183,87 @@ void TKqpPlanner::Process(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot
}
THashMap<ui64, size_t> nodeIdtoIdx;
- for (size_t idx = 0; idx < snapshot.size(); ++idx) {
- nodeIdtoIdx[snapshot[idx].nodeid()] = idx;
+ for (size_t idx = 0; idx < ResourcesSnapshot.size(); ++idx) {
+ nodeIdtoIdx[ResourcesSnapshot[idx].nodeid()] = idx;
}
- auto plan = planner->Plan(snapshot, std::move(est));
+ auto plan = planner->Plan(ResourcesSnapshot, ResourceEstimations);
long requestsCnt = 0;
if (!plan.empty()) {
for (auto& group : plan) {
- auto ev = PrepareKqpNodeRequest(group.TaskIds);
- AddScansToKqpNodeRequest(ev, group.NodeId);
+ auto& requestData = Requests.emplace_back();
+ PrepareKqpNodeRequest(requestData.request, THashSet<ui64>(group.TaskIds.begin(), group.TaskIds.end()));
+ AddScansToKqpNodeRequest(requestData.request, group.NodeId);
auto target = MakeKqpNodeServiceID(group.NodeId);
- TlsActivationContext->Send(new IEventHandle(target, ExecuterId, ev.Release(),
- CalcSendMessageFlagsForNode(target.NodeId()), 0, nullptr, KqpPlannerSpan.GetTraceId()));
+ requestData.flag = CalcSendMessageFlagsForNode(group.NodeId);
+
+ SendStartKqpTasksRequest(Requests.size() - 1, target);
++requestsCnt;
}
TVector<ui64> nodes;
- nodes.reserve(ScanTasks.size());
- for (auto& [nodeId, _]: ScanTasks) {
+ nodes.reserve(MainTasksPerNode.size());
+ for (auto& [nodeId, _]: MainTasksPerNode) {
nodes.push_back(nodeId);
}
for (ui64 nodeId: nodes) {
- auto ev = PrepareKqpNodeRequest({});
- AddScansToKqpNodeRequest(ev, nodeId);
+ auto& requestData = Requests.emplace_back();
+ PrepareKqpNodeRequest(requestData.request, {});
+ AddScansToKqpNodeRequest(requestData.request, nodeId);
auto target = MakeKqpNodeServiceID(nodeId);
- LOG_D("Send request to kqpnode: " << target << ", node_id: " << SelfId().NodeId() << ", TxId: " << TxId);
- TlsActivationContext->Send(new IEventHandle(target, ExecuterId, ev.Release(),
- CalcSendMessageFlagsForNode(target.NodeId()), 0, nullptr, KqpPlannerSpan.GetTraceId()));
+ requestData.flag = CalcSendMessageFlagsForNode(nodeId);
+ LOG_D("Send request to kqpnode: " << target << ", node_id: " << ExecuterId.NodeId() << ", TxId: " << TxId);
+ SendStartKqpTasksRequest(Requests.size() - 1, target);
++requestsCnt;
}
- Y_VERIFY(ScanTasks.empty());
+ Y_VERIFY(MainTasksPerNode.empty());
} else {
auto ev = MakeHolder<TEvKqp::TEvAbortExecution>(NYql::NDqProto::StatusIds::PRECONDITION_FAILED,
"Not enough resources to execute query");
- if (KqpPlannerSpan) {
- KqpPlannerSpan.EndError("Not enough resources to execute query");
- }
+ TlsActivationContext->Send(std::make_unique<IEventHandle>(ExecuterId, ExecuterId, ev.Release()));
+ }
- Send(ExecuterId, ev.Release());
+ if (ExecuterSpan) {
+ ExecuterSpan.Attribute("requestsCnt", requestsCnt);
}
+}
- if (KqpPlannerSpan) {
- KqpPlannerSpan.Attribute("RequestsCnt", requestsCnt);
- KqpPlannerSpan.EndOk();
+void TKqpPlanner::PrepareToProcess() {
+ auto rmConfig = GetKqpResourceManager()->GetConfig();
+
+ ui32 tasksCount = ComputeTasks.size();
+ for (auto& [shardId, tasks] : MainTasksPerNode) {
+ tasksCount += tasks.size();
}
- PassAway();
+ ResourceEstimations.resize(tasksCount);
+ LocalRunMemoryEst = 0;
+
+ for (size_t i = 0; i < ComputeTasks.size(); ++i) {
+ EstimateTaskResources(ComputeTasks[i], rmConfig, ResourceEstimations[i]);
+ LocalRunMemoryEst += ResourceEstimations[i].TotalMemoryLimit;
+ }
+ if (auto it = MainTasksPerNode.find(ExecuterId.NodeId()); it != MainTasksPerNode.end()) {
+ for (size_t i = 0; i < it->second.size(); ++i) {
+ EstimateTaskResources(it->second[i], rmConfig, ResourceEstimations[i + ComputeTasks.size()]);
+ LocalRunMemoryEst += ResourceEstimations[i + ComputeTasks.size()].TotalMemoryLimit;
+ }
+ }
+ Sort(ResourceEstimations, [](const auto& l, const auto& r) { return l.TotalMemoryLimit > r.TotalMemoryLimit; });
+}
+
+ui64 TKqpPlanner::GetComputeTasksNumber() const {
+ return ComputeTasks.size();
+}
+
+ui64 TKqpPlanner::GetMainTasksNumber() const {
+ return MainTasksPerNode.size();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -215,18 +272,21 @@ void TKqpPlanner::Process(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot
void TKqpPlanner::RunLocal(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot) {
LOG_D("Execute query locally");
- auto ev = PrepareKqpNodeRequest({});
- AddScansToKqpNodeRequest(ev, SelfId().NodeId());
+ auto& requestData = Requests.emplace_back();
+ PrepareKqpNodeRequest(requestData.request, {});
+ AddScansToKqpNodeRequest(requestData.request, ExecuterId.NodeId());
+
+ auto target = MakeKqpNodeServiceID(ExecuterId.NodeId());
+ requestData.flag = CalcSendMessageFlagsForNode(ExecuterId.NodeId());
+ LOG_D("Send request to kqpnode: " << target << ", node_id: " << ExecuterId.NodeId() << ", TxId: " << TxId);
+ SendStartKqpTasksRequest(Requests.size() - 1, target);
- auto target = MakeKqpNodeServiceID(SelfId().NodeId());
- LOG_D("Send request to kqpnode: " << target << ", node_id: " << SelfId().NodeId() << ", TxId: " << TxId);
- TlsActivationContext->Send(new IEventHandle(target, ExecuterId, ev.Release(), IEventHandle::FlagTrackDelivery, 0, nullptr, KqpPlannerSpan.GetTraceId()));
long requestsCnt = 1;
TVector<ui64> nodes;
- for (const auto& pair: ScanTasks) {
+ for (const auto& pair: MainTasksPerNode) {
nodes.push_back(pair.first);
- YQL_ENSURE(pair.first != SelfId().NodeId());
+ YQL_ENSURE(pair.first != ExecuterId.NodeId());
}
THashMap<ui64, size_t> nodeIdToIdx;
@@ -236,107 +296,99 @@ void TKqpPlanner::RunLocal(const TVector<NKikimrKqp::TKqpNodeResources>& snapsho
}
for (auto nodeId: nodes) {
- auto ev = PrepareKqpNodeRequest({});
- AddScansToKqpNodeRequest(ev, nodeId);
+ auto& requestData = Requests.emplace_back();
+ PrepareKqpNodeRequest(requestData.request, {});
+ AddScansToKqpNodeRequest(requestData.request, nodeId);
+
auto target = MakeKqpNodeServiceID(nodeId);
- TlsActivationContext->Send(new IEventHandle(target, ExecuterId, ev.Release(),
- CalcSendMessageFlagsForNode(target.NodeId()), 0, nullptr, KqpPlannerSpan.GetTraceId()));
- ++requestsCnt;
- }
- Y_VERIFY(ScanTasks.size() == 0);
+ requestData.flag = CalcSendMessageFlagsForNode(target.NodeId());
+ SendStartKqpTasksRequest(Requests.size() - 1, target);
- if (KqpPlannerSpan) {
- KqpPlannerSpan.Attribute("requestsCnt", requestsCnt);
- KqpPlannerSpan.EndOk();
+ requestsCnt++;
}
+ Y_VERIFY(MainTasksPerNode.size() == 0);
- PassAway();
-}
-
-void TKqpPlanner::PassAway() {
- TBase::PassAway();
+ if (ExecuterSpan) {
+ ExecuterSpan.Attribute("requestsCnt", requestsCnt);
+ }
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-THolder<TEvKqpNode::TEvStartKqpTasksRequest> TKqpPlanner::PrepareKqpNodeRequest(const TVector<ui64>& taskIds) {
- auto ev = MakeHolder<TEvKqpNode::TEvStartKqpTasksRequest>();
-
- ev->Record.SetTxId(TxId);
- ActorIdToProto(ExecuterId, ev->Record.MutableExecuterActorId());
+void TKqpPlanner::PrepareKqpNodeRequest(NKikimrKqp::TEvStartKqpTasksRequest& request, THashSet<ui64> taskIds) {
+ request.SetTxId(TxId);
+ ActorIdToProto(ExecuterId, request.MutableExecuterActorId());
bool withLLVM = EnableLlvm;
if (taskIds.empty()) {
- for (auto& taskDesc : Tasks) {
+ for (auto& taskDesc : ComputeTasks) {
if (taskDesc.GetId()) {
if (DisableLlvmForUdfStages && taskDesc.GetProgram().GetSettings().GetHasUdf()) {
withLLVM = false;
}
AddSnapshotInfoToTaskInputs(taskDesc);
- ev->Record.AddTasks()->Swap(&taskDesc);
+ request.AddTasks()->Swap(&taskDesc);
}
}
} else {
- for (auto& taskDesc : Tasks) {
+ for (auto& taskDesc : ComputeTasks) {
if (taskDesc.GetId() && Find(taskIds, taskDesc.GetId()) != taskIds.end()) {
if (DisableLlvmForUdfStages && taskDesc.GetProgram().GetSettings().GetHasUdf()) {
withLLVM = false;
}
AddSnapshotInfoToTaskInputs(taskDesc);
- ev->Record.AddTasks()->Swap(&taskDesc);
+ request.AddTasks()->Swap(&taskDesc);
}
}
}
if (Deadline) {
TDuration timeout = Deadline - TAppData::TimeProvider->Now();
- ev->Record.MutableRuntimeSettings()->SetTimeoutMs(timeout.MilliSeconds());
+ request.MutableRuntimeSettings()->SetTimeoutMs(timeout.MilliSeconds());
}
- ev->Record.MutableRuntimeSettings()->SetExecType(NDqProto::TComputeRuntimeSettings::SCAN);
- ev->Record.MutableRuntimeSettings()->SetStatsMode(GetDqStatsMode(StatsMode));
- ev->Record.MutableRuntimeSettings()->SetUseLLVM(withLLVM);
- ev->Record.MutableRuntimeSettings()->SetUseSpilling(WithSpilling);
+ request.MutableRuntimeSettings()->SetExecType(NDqProto::TComputeRuntimeSettings::SCAN);
+ request.MutableRuntimeSettings()->SetStatsMode(GetDqStatsMode(StatsMode));
+ request.MutableRuntimeSettings()->SetUseLLVM(withLLVM);
+ request.MutableRuntimeSettings()->SetUseSpilling(WithSpilling);
if (RlPath) {
- auto rlPath = ev->Record.MutableRuntimeSettings()->MutableRlPath();
+ auto rlPath = request.MutableRuntimeSettings()->MutableRlPath();
rlPath->SetCoordinationNode(RlPath->GetCoordinationNode());
rlPath->SetResourcePath(RlPath->GetResourcePath());
rlPath->SetDatabase(Database);
if (UserToken)
- rlPath->SetToken(UserToken.GetRef());
+ rlPath->SetToken(UserToken->GetSerializedToken());
}
- ev->Record.SetStartAllOrFail(true);
-
- return ev;
+ request.SetStartAllOrFail(true);
}
-void TKqpPlanner::AddScansToKqpNodeRequest(THolder<TEvKqpNode::TEvStartKqpTasksRequest>& ev, ui64 nodeId) {
+void TKqpPlanner::AddScansToKqpNodeRequest(NKikimrKqp::TEvStartKqpTasksRequest& request, ui64 nodeId) {
if (!Snapshot.IsValid()) {
- Y_ASSERT(ScanTasks.size() == 0);
+ Y_ASSERT(MainTasksPerNode.size() == 0);
return;
}
bool withLLVM = true;
- if (auto nodeTasks = ScanTasks.FindPtr(nodeId)) {
+ if (auto nodeTasks = MainTasksPerNode.FindPtr(nodeId)) {
LOG_D("Adding " << nodeTasks->size() << " scans to KqpNode request");
- ev->Record.MutableSnapshot()->SetTxId(Snapshot.TxId);
- ev->Record.MutableSnapshot()->SetStep(Snapshot.Step);
+ request.MutableSnapshot()->SetTxId(Snapshot.TxId);
+ request.MutableSnapshot()->SetStep(Snapshot.Step);
for (auto& task: *nodeTasks) {
if (DisableLlvmForUdfStages && task.GetProgram().GetSettings().GetHasUdf()) {
withLLVM = false;
}
AddSnapshotInfoToTaskInputs(task);
- ev->Record.AddTasks()->Swap(&task);
+ request.AddTasks()->Swap(&task);
}
- ScanTasks.erase(nodeId);
+ MainTasksPerNode.erase(nodeId);
}
- if (ev->Record.GetRuntimeSettings().GetUseLLVM()) {
- ev->Record.MutableRuntimeSettings()->SetUseLLVM(withLLVM);
+ if (request.GetRuntimeSettings().GetUseLLVM()) {
+ request.MutableRuntimeSettings()->SetUseLLVM(withLLVM);
}
}
@@ -370,18 +422,38 @@ void TKqpPlanner::AddSnapshotInfoToTaskInputs(NYql::NDqProto::TDqTask& task) {
transform->MutableSettings()->PackFrom(settings);
}
+ if (input.HasSource() && input.GetSource().GetType() == NYql::KqpReadRangesSourceName) {
+ auto source = input.MutableSource();
+ const google::protobuf::Any& settingsAny = source->GetSettings();
+
+ YQL_ENSURE(settingsAny.Is<NKikimrTxDataShard::TKqpReadRangesSourceSettings>(), "Expected settings type: "
+ << NKikimrTxDataShard::TKqpReadRangesSourceSettings::descriptor()->full_name()
+ << " , but got: " << settingsAny.type_url());
+
+ NKikimrTxDataShard::TKqpReadRangesSourceSettings settings;
+ YQL_ENSURE(settingsAny.UnpackTo(&settings), "Failed to unpack settings");
+
+ if (Snapshot.IsValid()) {
+ settings.MutableSnapshot()->SetStep(Snapshot.Step);
+ settings.MutableSnapshot()->SetTxId(Snapshot.TxId);
+ }
+
+ source->MutableSettings()->PackFrom(settings);
+ }
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-IActor* CreateKqpPlanner(ui64 txId, const TActorId& executer, TVector<NDqProto::TDqTask>&& tasks,
- THashMap<ui64, TVector<NDqProto::TDqTask>>&& scanTasks, const IKqpGateway::TKqpSnapshot& snapshot,
- const TString& database, const TMaybe<TString>& token, TInstant deadline,
+std::unique_ptr<TKqpPlanner> CreateKqpPlanner(ui64 txId, const TActorId& executer, TVector<NYql::NDqProto::TDqTask>&& tasks,
+ THashMap<ui64, TVector<NYql::NDqProto::TDqTask>>&& mainTasksPerNode, const IKqpGateway::TKqpSnapshot& snapshot,
+ const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TInstant deadline,
const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool disableLlvmForUdfStages, bool enableLlvm,
- bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TTraceId traceId)
+ bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TSpan& executerSpan,
+ TVector<NKikimrKqp::TKqpNodeResources>&& resourcesSnapshot, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
{
- return new TKqpPlanner(txId, executer, std::move(tasks), std::move(scanTasks), snapshot,
- database, token, deadline, statsMode, disableLlvmForUdfStages, enableLlvm, withSpilling, rlPath, std::move(traceId));
+ return std::make_unique<TKqpPlanner>(txId, executer, std::move(tasks), std::move(mainTasksPerNode), snapshot,
+ database, userToken, deadline, statsMode, disableLlvmForUdfStages, enableLlvm, withSpilling, rlPath, executerSpan,
+ std::move(resourcesSnapshot), executerRetriesConfig);
}
} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_planner.h b/ydb/core/kqp/executer_actor/kqp_planner.h
index 9e8b310f6f..9c422c3903 100644
--- a/ydb/core/kqp/executer_actor/kqp_planner.h
+++ b/ydb/core/kqp/executer_actor/kqp_planner.h
@@ -4,6 +4,7 @@
#include <ydb/core/kqp/gateway/kqp_gateway.h>
#include <ydb/core/kqp/node_service/kqp_node_service.h>
#include <ydb/core/kqp/rm_service/kqp_rm_service.h>
+#include <ydb/core/kqp/rm_service/kqp_resource_estimation.h>
#include <library/cpp/actors/core/actor_bootstrapped.h>
#include <library/cpp/actors/wilson/wilson_span.h>
@@ -15,44 +16,38 @@
namespace NKikimr::NKqp {
-class TKqpPlanner : public TActorBootstrapped<TKqpPlanner> {
- using TBase = TActorBootstrapped<TKqpPlanner>;
+class TKqpPlanner {
- struct TEvPrivate {
- enum EEv {
- EvResourcesSnapshot = EventSpaceBegin(TEvents::ES_PRIVATE)
- };
-
- struct TEvResourcesSnapshot : public TEventLocal<TEvResourcesSnapshot, EEv::EvResourcesSnapshot> {
- TVector<NKikimrKqp::TKqpNodeResources> Snapshot;
-
- TEvResourcesSnapshot(TVector<NKikimrKqp::TKqpNodeResources>&& snapshot)
- : Snapshot(std::move(snapshot)) {}
- };
+ struct RequestData {
+ NKikimrKqp::TEvStartKqpTasksRequest request;
+ ui32 flag;
+ ui32 RetryNumber = 0;
+ ui32 CurrentDelay = 0;
};
public:
TKqpPlanner(ui64 txId, const TActorId& executer, TVector<NYql::NDqProto::TDqTask>&& tasks,
THashMap<ui64, TVector<NYql::NDqProto::TDqTask>>&& scanTasks, const IKqpGateway::TKqpSnapshot& snapshot,
- const TString& database, const TMaybe<TString>& userToken, TInstant deadline,
+ const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TInstant deadline,
const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool disableLlvmForUdfStages,
- bool enableLlvm, bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TTraceId traceId);
+ bool enableLlvm, bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TSpan& ExecuterSpan,
+ TVector<NKikimrKqp::TKqpNodeResources>&& resourcesSnapshot, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig);
+ bool SendStartKqpTasksRequest(ui32 requestId, const TActorId& target);
- void Bootstrap(const TActorContext& ctx);
+ void ProcessTasksForScanExecuter();
+ void ProcessTasksForDataExecuter();
-private:
- STATEFN(WaitState);
+ ui64 GetComputeTasksNumber() const;
+ ui64 GetMainTasksNumber() const;
- void HandleWait(TEvPrivate::TEvResourcesSnapshot::TPtr& ev);
- void HandleWait(TEvKqp::TEvAbortExecution::TPtr& ev);
+ ui32 GetCurrentRetryDelay(ui32 requestId);
+private:
+ void PrepareToProcess();
- void Process(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot);
void RunLocal(const TVector<NKikimrKqp::TKqpNodeResources>& snapshot);
- void PassAway() override;
-
- THolder<TEvKqpNode::TEvStartKqpTasksRequest> PrepareKqpNodeRequest(const TVector<ui64>& taskIds);
- void AddScansToKqpNodeRequest(THolder<TEvKqpNode::TEvStartKqpTasksRequest>& ev, ui64 nodeId);
+ void PrepareKqpNodeRequest(NKikimrKqp::TEvStartKqpTasksRequest& request, THashSet<ui64> taskIds);
+ void AddScansToKqpNodeRequest(NKikimrKqp::TEvStartKqpTasksRequest& request, ui64 nodeId);
void AddSnapshotInfoToTaskInputs(NYql::NDqProto::TDqTask& task);
ui32 CalcSendMessageFlagsForNode(ui32 nodeId);
@@ -60,11 +55,11 @@ private:
private:
const ui64 TxId;
const TActorId ExecuterId;
- TVector<NYql::NDqProto::TDqTask> Tasks;
- THashMap<ui64, TVector<NYql::NDqProto::TDqTask>> ScanTasks;
+ TVector<NYql::NDqProto::TDqTask> ComputeTasks;
+ THashMap<ui64, TVector<NYql::NDqProto::TDqTask>> MainTasksPerNode;
const IKqpGateway::TKqpSnapshot Snapshot;
TString Database;
- const TMaybe<TString> UserToken;
+ const TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
const TInstant Deadline;
const Ydb::Table::QueryStatsCollection::Mode StatsMode;
const bool DisableLlvmForUdfStages;
@@ -72,13 +67,20 @@ private:
const bool WithSpilling;
const TMaybe<NKikimrKqp::TRlPath> RlPath;
THashSet<ui32> TrackingNodes;
- NWilson::TSpan KqpPlannerSpan;
+ const TVector<NKikimrKqp::TKqpNodeResources> ResourcesSnapshot;
+ NWilson::TSpan& ExecuterSpan;
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& ExecuterRetriesConfig;
+ ui64 LocalRunMemoryEst;
+ TVector<TTaskResourceEstimation> ResourceEstimations;
+ TVector<RequestData> Requests;
};
-IActor* CreateKqpPlanner(ui64 txId, const TActorId& executer, TVector<NYql::NDqProto::TDqTask>&& tasks,
+std::unique_ptr<TKqpPlanner> CreateKqpPlanner(ui64 txId, const TActorId& executer, TVector<NYql::NDqProto::TDqTask>&& tasks,
THashMap<ui64, TVector<NYql::NDqProto::TDqTask>>&& scanTasks, const IKqpGateway::TKqpSnapshot& snapshot,
- const TString& database, const TMaybe<TString>& userToken, TInstant deadline,
+ const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TInstant deadline,
const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool disableLlvmForUdfStages, bool enableLlvm,
- bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TTraceId traceId = {});
+ bool withSpilling, const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TSpan& executerSpan,
+ TVector<NKikimrKqp::TKqpNodeResources>&& resourcesSnapshot,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& ExecuterRetriesConfig);
} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_planner_strategy.cpp b/ydb/core/kqp/executer_actor/kqp_planner_strategy.cpp
index b0f323dbc2..07c1457cde 100644
--- a/ydb/core/kqp/executer_actor/kqp_planner_strategy.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_planner_strategy.cpp
@@ -22,7 +22,7 @@ public:
~TKqpGreedyPlanner() override {}
TVector<TResult> Plan(const TVector<NKikimrKqp::TKqpNodeResources>& nodeResources,
- TVector<TTaskResourceEstimation>&& tasks) override
+ const TVector<TTaskResourceEstimation>& tasks) override
{
TVector<TResult> result;
@@ -58,15 +58,13 @@ public:
}
}
- Sort(tasks, [](const auto& l, const auto& r) { return l.TotalMemoryLimit > r.TotalMemoryLimit; });
-
if (LogFunc) {
- for (auto& task : tasks) {
+ for (const auto& task : tasks) {
LogFunc(TStringBuilder() << "[TaskResources] task: " << task.TaskId << ", memory: " << task.TotalMemoryLimit);
}
}
- for (auto& taskEstimation : tasks) {
+ for (const auto& taskEstimation : tasks) {
TNodeDesc node = nodes.top();
if (node.RemainsComputeActors > 0 &&
diff --git a/ydb/core/kqp/executer_actor/kqp_planner_strategy.h b/ydb/core/kqp/executer_actor/kqp_planner_strategy.h
index 6e61114cb0..a0733fd411 100644
--- a/ydb/core/kqp/executer_actor/kqp_planner_strategy.h
+++ b/ydb/core/kqp/executer_actor/kqp_planner_strategy.h
@@ -24,7 +24,7 @@ public:
};
virtual TVector<TResult> Plan(const TVector<NKikimrKqp::TKqpNodeResources>& nodeResources,
- TVector<TTaskResourceEstimation>&& estimatedResources) = 0;
+ const TVector<TTaskResourceEstimation>& estimatedResources) = 0;
protected:
TLogFunc LogFunc;
diff --git a/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp b/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp
index bb3a39707f..ba8c123a6f 100644
--- a/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp
@@ -1,7 +1,6 @@
#include "kqp_executer.h"
#include "kqp_executer_impl.h"
#include "kqp_partition_helper.h"
-#include "kqp_planner.h"
#include "kqp_result_channel.h"
#include "kqp_tasks_graph.h"
#include "kqp_tasks_validate.h"
@@ -45,11 +44,12 @@ public:
}
TKqpScanExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
- const TMaybe<TString>& userToken, TKqpRequestCounters::TPtr counters)
- : TBase(std::move(request), database, userToken, counters, TWilsonKqp::ScanExecuter, "ScanExecuter")
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TKqpRequestCounters::TPtr counters,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
+ : TBase(std::move(request), database, userToken, counters, executerRetriesConfig, TWilsonKqp::ScanExecuter, "ScanExecuter")
{
YQL_ENSURE(Request.Transactions.size() == 1);
- YQL_ENSURE(Request.Locks.empty());
+ YQL_ENSURE(Request.DataShardLocks.empty());
YQL_ENSURE(!Request.ValidateLocks);
YQL_ENSURE(!Request.EraseLocks);
YQL_ENSURE(Request.IsolationLevel == NKikimrKqp::ISOLATION_LEVEL_UNDEFINED);
@@ -75,6 +75,7 @@ public:
switch (ev->GetTypeRewrite()) {
hFunc(TEvKqpExecuter::TEvTableResolveStatus, HandleResolve);
hFunc(TEvKqpExecuter::TEvShardsResolveStatus, HandleResolve);
+ hFunc(TEvPrivate::TEvResourcesSnapshot, HandleResolve);
hFunc(TEvKqp::TEvAbortExecution, HandleAbortExecution);
hFunc(TEvents::TEvWakeup, HandleTimeout);
default:
@@ -96,6 +97,7 @@ private:
hFunc(TEvKqp::TEvAbortExecution, HandleAbortExecution);
hFunc(TEvents::TEvWakeup, HandleTimeout);
hFunc(TEvents::TEvUndelivered, HandleUndelivered);
+ hFunc(TEvPrivate::TEvRetry, HandleRetry);
hFunc(TEvKqpNode::TEvStartKqpTasksResponse, HandleStartKqpTasksResponse);
IgnoreFunc(TEvKqpNode::TEvCancelKqpTasksResponse);
hFunc(TEvInterconnect::TEvNodeDisconnected, HandleDisconnected);
@@ -379,6 +381,14 @@ private:
}
}
+ void GetResourcesSnapshot() {
+ GetKqpResourceManager()->RequestClusterResourcesInfo(
+ [as = TlsActivationContext->ActorSystem(), self = SelfId()](TVector<NKikimrKqp::TKqpNodeResources>&& resources) {
+ TAutoPtr<IEventHandle> eh = new IEventHandle(self, self, new TEvPrivate::TEvResourcesSnapshot(std::move(resources)));
+ as->Send(eh);
+ });
+ }
+
void HandleResolve(TEvKqpExecuter::TEvTableResolveStatus::TPtr& ev) {
if (!TBase::HandleResolve(ev)) return;
TSet<ui64> shardIds;
@@ -394,17 +404,24 @@ private:
auto kqpShardsResolver = CreateKqpShardsResolver(this->SelfId(), TxId, std::move(shardIds));
KqpShardsResolverId = this->RegisterWithSameMailbox(kqpShardsResolver);
} else {
- Execute();
+ GetResourcesSnapshot();
}
}
-
void HandleResolve(TEvKqpExecuter::TEvShardsResolveStatus::TPtr& ev) {
if (!TBase::HandleResolve(ev)) return;
- Execute();
+ GetResourcesSnapshot();
+ }
+
+ void HandleResolve(TEvPrivate::TEvResourcesSnapshot::TPtr& ev) {
+ if (ev->Get()->Snapshot.empty()) {
+ LOG_E("Can not find default state storage group for database " << Database);
+ }
+
+ Execute(std::move(ev->Get()->Snapshot));
}
- void Execute() {
+ void Execute(TVector<NKikimrKqp::TKqpNodeResources>&& snapshot) {
LWTRACK(KqpScanExecuterStartExecute, ResponseEv->Orbit, TxId);
NWilson::TSpan prepareTasksSpan(TWilsonKqp::ScanExecuterPrepareTasks, ExecuterStateSpan.GetTraceId(), "PrepareTasks", NWilson::EFlags::AUTO_END);
@@ -420,7 +437,7 @@ private:
if (stage.SourcesSize() > 0) {
switch (stage.GetSources(0).GetTypeCase()) {
case NKqpProto::TKqpSource::kReadRangesSource:
- BuildScanTasksFromSource(stageInfo);
+ BuildScanTasksFromSource(stageInfo, Request.Snapshot);
break;
default:
YQL_ENSURE(false, "unknown source type");
@@ -622,7 +639,7 @@ private:
<< ", totalShardScans: " << nShardScans << ", execType: Scan"
<< ", snapshot: {" << Request.Snapshot.TxId << ", " << Request.Snapshot.Step << "}");
- ExecuteScanTx(std::move(computeTasks), std::move(scanTasks));
+ ExecuteScanTx(std::move(computeTasks), std::move(scanTasks), std::move(snapshot));
Become(&TKqpScanExecuter::ExecuteState);
if (ExecuterStateSpan) {
@@ -662,9 +679,9 @@ public:
}
private:
- void ExecuteScanTx(TVector<NYql::NDqProto::TDqTask>&& computeTasks, THashMap<ui64, TVector<NYql::NDqProto::TDqTask>>&& scanTasks) {
+ void ExecuteScanTx(TVector<NYql::NDqProto::TDqTask>&& computeTasks, THashMap<ui64, TVector<NYql::NDqProto::TDqTask>>&& scanTasks,
+ TVector<NKikimrKqp::TKqpNodeResources>&& snapshot) {
LWTRACK(KqpScanExecuterStartTasksAndTxs, ResponseEv->Orbit, TxId, computeTasks.size(), scanTasks.size());
- LOG_D("Execute scan tx, computeTasks: " << computeTasks.size() << ", scanTasks: " << scanTasks.size());
for (const auto& [_, tasks]: scanTasks) {
for (const auto& task : tasks) {
PendingComputeTasks.insert(task.GetId());
@@ -675,11 +692,14 @@ private:
PendingComputeTasks.insert(taskDesc.GetId());
}
- auto planner = CreateKqpPlanner(TxId, SelfId(), std::move(computeTasks),
+ Planner = CreateKqpPlanner(TxId, SelfId(), std::move(computeTasks),
std::move(scanTasks), Request.Snapshot,
Database, UserToken, Deadline.GetOrElse(TInstant::Zero()), Request.StatsMode,
- Request.DisableLlvmForUdfStages, Request.LlvmEnabled, AppData()->EnableKqpSpilling, Request.RlPath, ExecuterSpan.GetTraceId());
- RegisterWithSameMailbox(planner);
+ Request.DisableLlvmForUdfStages, Request.LlvmEnabled, AppData()->EnableKqpSpilling,
+ Request.RlPath, ExecuterSpan, std::move(snapshot), ExecuterRetriesConfig);
+ LOG_D("Execute scan tx, computeTasks: " << Planner->GetComputeTasksNumber() << ", scanTasks: " << Planner->GetMainTasksNumber());
+
+ Planner->ProcessTasksForScanExecuter();
}
private:
@@ -725,34 +745,6 @@ public:
}
}
- IActor* GetOrCreateChannelProxy(const TChannel& channel) {
- IActor* proxy;
-
- if (ResponseEv->TxResults[0].IsStream) {
- if (!ResultChannelProxies.empty()) {
- return ResultChannelProxies.begin()->second;
- }
-
- proxy = CreateResultStreamChannelProxy(TxId, channel.Id, ResponseEv->TxResults[0].MkqlItemType,
- ResponseEv->TxResults[0].ColumnOrder, Target, Stats.get(), SelfId());
- } else {
- YQL_ENSURE(channel.DstInputIndex < ResponseEv->ResultsSize());
-
- auto channelIt = ResultChannelProxies.find(channel.Id);
-
- if (channelIt != ResultChannelProxies.end()) {
- return channelIt->second;
- }
-
- proxy = CreateResultDataChannelProxy(TxId, channel.Id, Stats.get(), SelfId(), channel.DstInputIndex, ResponseEv.get());
- }
-
- RegisterWithSameMailbox(proxy);
- ResultChannelProxies.emplace(std::make_pair(channel.Id, proxy));
-
- return proxy;
- }
-
void FillChannelDesc(NYql::NDqProto::TChannel& channelDesc, const TChannel& channel) {
channelDesc.SetId(channel.Id);
channelDesc.SetSrcTaskId(channel.SrcTask);
@@ -771,17 +763,15 @@ public:
channelDesc.SetIsPersistent(IsCrossShardChannel(TasksGraph, channel));
channelDesc.SetInMemory(channel.InMemory);
}
-
-private:
- std::unordered_map<ui64, IActor*> ResultChannelProxies;
};
} // namespace
IActor* CreateKqpScanExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TString& database,
- const TMaybe<TString>& userToken, TKqpRequestCounters::TPtr counters)
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TKqpRequestCounters::TPtr counters,
+ const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig)
{
- return new TKqpScanExecuter(std::move(request), database, userToken, counters);
+ return new TKqpScanExecuter(std::move(request), database, userToken, counters, executerRetriesConfig);
}
} // namespace NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_table_resolver.cpp b/ydb/core/kqp/executer_actor/kqp_table_resolver.cpp
index 6cdcf4bd38..a5d940c9c4 100644
--- a/ydb/core/kqp/executer_actor/kqp_table_resolver.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_table_resolver.cpp
@@ -25,7 +25,8 @@ public:
return NKikimrServices::TActivity::KQP_TABLE_RESOLVER;
}
- TKqpTableResolver(const TActorId& owner, ui64 txId, TMaybe<TString> userToken,
+ TKqpTableResolver(const TActorId& owner, ui64 txId,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
const TVector<IKqpGateway::TPhysicalTxData>& transactions, TKqpTableKeys& tableKeys,
TKqpTasksGraph& tasksGraph)
: Owner(owner)
@@ -233,8 +234,8 @@ private:
auto request = MakeHolder<NSchemeCache::TSchemeCacheRequest>();
request->ResultSet.reserve(TasksGraph.GetStagesInfo().size());
- if (UserToken) {
- request->UserToken = new NACLib::TUserToken(*UserToken);
+ if (UserToken && !UserToken->GetSerializedToken().empty()) {
+ request->UserToken = UserToken;
}
for (auto& pair : TasksGraph.GetStagesInfo()) {
@@ -313,7 +314,7 @@ private:
private:
const TActorId Owner;
const ui64 TxId;
- const TMaybe<TString> UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
const TVector<IKqpGateway::TPhysicalTxData>& Transactions;
TKqpTableKeys& TableKeys;
@@ -327,7 +328,8 @@ private:
} // anonymous namespace
-NActors::IActor* CreateKqpTableResolver(const TActorId& owner, ui64 txId, TMaybe<TString> userToken,
+NActors::IActor* CreateKqpTableResolver(const TActorId& owner, ui64 txId,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
const TVector<IKqpGateway::TPhysicalTxData>& transactions, TKqpTableKeys& tableKeys, TKqpTasksGraph& tasksGraph) {
return new TKqpTableResolver(owner, txId, userToken, transactions, tableKeys, tasksGraph);
}
diff --git a/ydb/core/kqp/executer_actor/kqp_table_resolver.h b/ydb/core/kqp/executer_actor/kqp_table_resolver.h
index e9618cf41d..0fbb152a5b 100644
--- a/ydb/core/kqp/executer_actor/kqp_table_resolver.h
+++ b/ydb/core/kqp/executer_actor/kqp_table_resolver.h
@@ -4,7 +4,8 @@
namespace NKikimr::NKqp {
-NActors::IActor* CreateKqpTableResolver(const TActorId& owner, ui64 txId, TMaybe<TString> userToken,
+NActors::IActor* CreateKqpTableResolver(const TActorId& owner, ui64 txId,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken,
const TVector<IKqpGateway::TPhysicalTxData>& transactions, TKqpTableKeys& tableKeys, TKqpTasksGraph& tasksGraph);
} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/executer_actor/kqp_tasks_graph.cpp b/ydb/core/kqp/executer_actor/kqp_tasks_graph.cpp
index de836d27ca..2dd09e9913 100644
--- a/ydb/core/kqp/executer_actor/kqp_tasks_graph.cpp
+++ b/ydb/core/kqp/executer_actor/kqp_tasks_graph.cpp
@@ -214,16 +214,30 @@ void BuildStreamLookupChannels(TKqpTasksGraph& graph, const TStageInfo& stageInf
settings.MutableTable()->CopyFrom(streamLookup.GetTable());
auto table = tableKeys.GetTable(MakeTableId(streamLookup.GetTable()));
+ for (const auto& keyColumn : table.KeyColumns) {
+ auto columnIt = table.Columns.find(keyColumn);
+ YQL_ENSURE(columnIt != table.Columns.end(), "Unknown column: " << keyColumn);
+
+ auto* keyColumnProto = settings.AddKeyColumns();
+ keyColumnProto->SetName(keyColumn);
+ keyColumnProto->SetId(columnIt->second.Id);
+ keyColumnProto->SetTypeId(columnIt->second.Type.GetTypeId());
+ }
+
for (const auto& keyColumn : streamLookup.GetKeyColumns()) {
auto columnIt = table.Columns.find(keyColumn);
YQL_ENSURE(columnIt != table.Columns.end(), "Unknown column: " << keyColumn);
- settings.AddKeyColumns(keyColumn);
+ settings.AddLookupKeyColumns(keyColumn);
}
for (const auto& column : streamLookup.GetColumns()) {
auto columnIt = table.Columns.find(column);
YQL_ENSURE(columnIt != table.Columns.end(), "Unknown column: " << column);
- settings.AddColumns(column);
+
+ auto* columnProto = settings.AddColumns();
+ columnProto->SetName(column);
+ columnProto->SetId(columnIt->second.Id);
+ columnProto->SetTypeId(columnIt->second.Type.GetTypeId());
}
TTransform streamLookupTransform;
@@ -619,7 +633,7 @@ void TShardKeyRanges::SerializeTo(NKikimrTxDataShard::TKqpReadRangesSourceSettin
} else {
bool usePoints = true;
for (auto& range : Ranges) {
- if (std::holds_alternative<TSerializedCellVec>(range)) {
+ if (std::holds_alternative<TSerializedTableRange>(range)) {
usePoints = false;
}
}
diff --git a/ydb/core/kqp/gateway/CMakeLists.darwin.txt b/ydb/core/kqp/gateway/CMakeLists.darwin.txt
index f68a6ad84d..2404c5fd7f 100644
--- a/ydb/core/kqp/gateway/CMakeLists.darwin.txt
+++ b/ydb/core/kqp/gateway/CMakeLists.darwin.txt
@@ -17,6 +17,7 @@ target_link_libraries(core-kqp-gateway PUBLIC
cpp-actors-core
ydb-core-actorlib_impl
ydb-core-base
+ core-kqp-common
providers-result-expr_nodes
)
target_sources(core-kqp-gateway PRIVATE
diff --git a/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt b/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt
index 126582ffde..c3a81cbf4c 100644
--- a/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/kqp/gateway/CMakeLists.linux-aarch64.txt
@@ -18,6 +18,7 @@ target_link_libraries(core-kqp-gateway PUBLIC
cpp-actors-core
ydb-core-actorlib_impl
ydb-core-base
+ core-kqp-common
providers-result-expr_nodes
)
target_sources(core-kqp-gateway PRIVATE
diff --git a/ydb/core/kqp/gateway/CMakeLists.linux.txt b/ydb/core/kqp/gateway/CMakeLists.linux.txt
index 126582ffde..c3a81cbf4c 100644
--- a/ydb/core/kqp/gateway/CMakeLists.linux.txt
+++ b/ydb/core/kqp/gateway/CMakeLists.linux.txt
@@ -18,6 +18,7 @@ target_link_libraries(core-kqp-gateway PUBLIC
cpp-actors-core
ydb-core-actorlib_impl
ydb-core-base
+ core-kqp-common
providers-result-expr_nodes
)
target_sources(core-kqp-gateway PRIVATE
diff --git a/ydb/core/kqp/gateway/kqp_gateway.h b/ydb/core/kqp/gateway/kqp_gateway.h
index a28b3c406b..53c243a84f 100644
--- a/ydb/core/kqp/gateway/kqp_gateway.h
+++ b/ydb/core/kqp/gateway/kqp_gateway.h
@@ -4,11 +4,11 @@
#include <ydb/core/protos/kqp_physical.pb.h>
#include <ydb/core/protos/tx_proxy.pb.h>
+#include <ydb/core/protos/tx_datashard.pb.h>
#include <ydb/library/yql/ast/yql_expr.h>
#include <ydb/library/yql/dq/common/dq_value.h>
#include <ydb/core/kqp/topics/kqp_topics.h>
-#include <ydb/core/kqp/common/kqp_prepared_query.h>
#include <ydb/core/kqp/counters/kqp_counters.h>
#include <ydb/core/kqp/provider/yql_kikimr_gateway.h>
#include <ydb/core/kqp/provider/yql_kikimr_settings.h>
@@ -108,8 +108,10 @@ public:
: TxAlloc(txAlloc)
{}
+ NKikimr::TControlWrapper PerRequestDataSizeLimit;
+ NKikimr::TControlWrapper MaxShardCount;
TVector<TPhysicalTxData> Transactions;
- TVector<NYql::NDq::TMkqlValueRef> Locks;
+ TMap<ui64, TVector<NKikimrTxDataShard::TLock>> DataShardLocks;
NKikimr::NKqp::TTxAllocatorState::TPtr TxAlloc;
bool ValidateLocks = false;
bool EraseLocks = false;
diff --git a/ydb/core/kqp/gateway/kqp_ic_gateway.cpp b/ydb/core/kqp/gateway/kqp_ic_gateway.cpp
index 1618da995e..b8854a15d3 100644
--- a/ydb/core/kqp/gateway/kqp_ic_gateway.cpp
+++ b/ydb/core/kqp/gateway/kqp_ic_gateway.cpp
@@ -744,14 +744,6 @@ namespace {
class TKikimrIcGateway : public IKqpGateway {
private:
- struct TUserTokenData {
- TString Serialized;
- NACLib::TUserToken Data;
-
- TUserTokenData(const TString& serialized)
- : Serialized(serialized)
- , Data(serialized) {}
- };
using TNavigate = NSchemeCache::TSchemeCacheNavigate;
public:
@@ -782,11 +774,9 @@ public:
return {};
}
- void SetToken(const TString& cluster, const TString& token) override {
+ void SetToken(const TString& cluster, const TIntrusiveConstPtr<NACLib::TUserToken>& token) override {
YQL_ENSURE(cluster == Cluster);
- if (!token.empty()) {
- UserToken = TUserTokenData(token);
- }
+ UserToken = token;
}
TVector<TString> GetCollectedSchemeData() override {
@@ -794,7 +784,7 @@ public:
}
TString GetTokenCompat() const {
- return UserToken ? UserToken->Serialized : TString();
+ return UserToken ? UserToken->GetSerializedToken() : TString();
}
TFuture<TListPathResult> ListPath(const TString& cluster, const TString &path) override {
@@ -808,7 +798,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& describePath = *ev->Record.MutableDescribePath();
describePath.SetPath(CanonizePath(path));
@@ -843,11 +833,8 @@ public:
if (!CheckCluster(cluster)) {
return InvalidCluster<TTableMetadataResult>(cluster);
}
- if (UserToken) {
- return MetadataLoader->LoadTableMetadata(cluster, table, settings, Database, UserToken->Data);
- } else {
- return MetadataLoader->LoadTableMetadata(cluster, table, settings, Database, Nothing());
- }
+
+ return MetadataLoader->LoadTableMetadata(cluster, table, settings, Database, UserToken);
} catch (yexception& e) {
return MakeFuture(ResultFromException<TTableMetadataResult>(e));
@@ -903,7 +890,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(pathPair.first);
@@ -993,7 +980,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(pathPair.first);
@@ -1050,7 +1037,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetOperationType(NKikimrSchemeOp::ESchemeOpMoveTable);
@@ -1114,7 +1101,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(pathPair.first);
@@ -1150,7 +1137,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(pathPair.first);
@@ -1191,7 +1178,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(pathPair.first);
@@ -1227,7 +1214,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(Database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(pathPair.first);
@@ -1260,7 +1247,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(database);
@@ -1303,7 +1290,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(database);
@@ -1346,7 +1333,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(database);
@@ -1386,12 +1373,8 @@ public:
ui32 GetNodeId() const {
return Owner.NodeId;
}
- TMaybe<NACLib::TUserToken> GetUserToken() const {
- if (Owner.UserToken) {
- return Owner.UserToken->Data;
- } else {
- return {};
- }
+ TIntrusiveConstPtr<NACLib::TUserToken> GetUserToken() const {
+ return Owner.UserToken;
}
public:
IObjectModifier(TKikimrIcGateway& owner)
@@ -1506,7 +1489,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(database);
@@ -1556,7 +1539,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(database);
@@ -1638,7 +1621,7 @@ public:
auto ev = MakeHolder<TRequest>();
ev->Record.SetDatabaseName(database);
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
auto& schemeTx = *ev->Record.MutableTransaction()->MutableModifyScheme();
schemeTx.SetWorkingDir(database);
@@ -1669,7 +1652,7 @@ public:
TFuture<TExecPhysicalResult> ExecutePure(TExecPhysicalRequest&& request, TQueryData::TPtr params) override {
YQL_ENSURE(!request.Transactions.empty());
- YQL_ENSURE(request.Locks.empty());
+ YQL_ENSURE(request.DataShardLocks.empty());
YQL_ENSURE(!request.NeedTxId);
auto containOnlyPureStages = [](const auto& request) {
@@ -1705,7 +1688,7 @@ public:
auto ev = MakeHolder<TRequest>();
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
ev->Record.MutableRequest()->SetDatabase(Database);
@@ -1737,7 +1720,7 @@ public:
auto ev = MakeHolder<TRequest>();
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
ev->Record.MutableRequest()->SetDatabase(Database);
@@ -1772,7 +1755,7 @@ public:
auto ev = MakeHolder<TRequest>();
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
ev->Record.MutableRequest()->SetDatabase(Database);
@@ -1802,7 +1785,7 @@ public:
auto ev = MakeHolder<TRequest>();
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
ev->Record.MutableRequest()->SetDatabase(Database);
@@ -1830,7 +1813,7 @@ public:
auto ev = MakeHolder<TRequest>();
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
ev->Record.MutableRequest()->SetDatabase(Database);
@@ -1863,7 +1846,7 @@ public:
auto ev = MakeHolder<TRequest>();
if (UserToken) {
- ev->Record.SetUserToken(UserToken->Serialized);
+ ev->Record.SetUserToken(UserToken->GetSerializedToken());
}
ev->Record.MutableRequest()->SetDatabase(Database);
@@ -2096,76 +2079,6 @@ private:
schema.SetEngine(NKikimrSchemeOp::EColumnTableEngine::COLUMN_ENGINE_REPLACING_TIMESERIES);
}
- static bool CheckLoadTableMetadataStatus(ui32 status, const TString& reason,
- IKikimrGateway::TTableMetadataResult& error)
- {
- using TResult = IKikimrGateway::TTableMetadataResult;
-
- switch (status) {
- case NKikimrScheme::EStatus::StatusSuccess:
- case NKikimrScheme::EStatus::StatusPathDoesNotExist:
- return true;
- case NKikimrScheme::EStatus::StatusSchemeError:
- error = ResultFromError<TResult>(YqlIssue({}, TIssuesIds::KIKIMR_SCHEME_ERROR, reason));
- return false;
- case NKikimrScheme::EStatus::StatusAccessDenied:
- error = ResultFromError<TResult>(YqlIssue({}, TIssuesIds::KIKIMR_ACCESS_DENIED, reason));
- return false;
- case NKikimrScheme::EStatus::StatusNotAvailable:
- error = ResultFromError<TResult>(YqlIssue({}, TIssuesIds::KIKIMR_TEMPORARILY_UNAVAILABLE, reason));
- return false;
- default:
- error = ResultFromError<TResult>(TStringBuilder() << status << ": " << reason);
- return false;
- }
- }
-
- static NYql::EYqlIssueCode KikimrProxyErrorStatus(ui32 proxyStatus) {
- NYql::EYqlIssueCode status = TIssuesIds::DEFAULT_ERROR;
-
- switch (proxyStatus) {
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ResolveError:
- status = TIssuesIds::KIKIMR_SCHEME_MISMATCH;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ProxyNotReady:
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ProxyShardNotAvailable:
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ProxyShardTryLater:
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::CoordinatorDeclined:
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::CoordinatorOutdated:
- status = TIssuesIds::KIKIMR_TEMPORARILY_UNAVAILABLE;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ProxyShardOverloaded:
- status = TIssuesIds::KIKIMR_OVERLOADED;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ExecResultUnavailable:
- status = TIssuesIds::KIKIMR_RESULT_UNAVAILABLE;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::AccessDenied:
- status = TIssuesIds::KIKIMR_ACCESS_DENIED;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ExecTimeout:
- status = TIssuesIds::KIKIMR_TIMEOUT;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ExecCancelled:
- status = TIssuesIds::KIKIMR_OPERATION_CANCELLED;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::WrongRequest:
- status = TIssuesIds::KIKIMR_BAD_REQUEST;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ProxyShardUnknown:
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::CoordinatorUnknown:
- status = TIssuesIds::KIKIMR_OPERATION_STATE_UNKNOWN;
- break;
- case TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ExecAborted:
- status = TIssuesIds::KIKIMR_OPERATION_ABORTED;
- break;
- default:
- break;
- }
-
- return status;
- }
-
static void FillParameters(TQueryData::TPtr params, NKikimrMiniKQL::TParams& output) {
if (!params) {
return;
@@ -2269,7 +2182,6 @@ private:
return true;
}
-
// Convert TKikimrTableMetadata struct to public API proto
static bool ConvertCreateTableSettingsToProto(NYql::TKikimrTableMetadataPtr metadata,
Ydb::Table::CreateTableRequest& proto, Ydb::StatusIds::StatusCode& code, TString& error)
@@ -2511,7 +2423,7 @@ private:
ui32 NodeId;
TKqpRequestCounters::TPtr Counters;
TAlignedPagePoolCounters AllocCounters;
- TMaybe<TUserTokenData> UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
std::shared_ptr<IKqpTableMetadataLoader> MetadataLoader;
};
diff --git a/ydb/core/kqp/gateway/kqp_metadata_loader.cpp b/ydb/core/kqp/gateway/kqp_metadata_loader.cpp
index ac5ae77a5c..6a38fef3c0 100644
--- a/ydb/core/kqp/gateway/kqp_metadata_loader.cpp
+++ b/ydb/core/kqp/gateway/kqp_metadata_loader.cpp
@@ -220,7 +220,8 @@ void TKqpTableMetadataLoader::OnLoadedTableMetadata(TTableMetadataResult& loadTa
NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadTableMetadata(const TString& cluster, const TString& table,
- const NYql::IKikimrGateway::TLoadTableMetadataSettings& settings, const TString& database, const TMaybe<NACLib::TUserToken>& userToken)
+ const NYql::IKikimrGateway::TLoadTableMetadataSettings& settings, const TString& database,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken)
{
using TResult = TTableMetadataResult;
@@ -258,7 +259,9 @@ NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadTableMeta
}
NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadIndexMetadata(
- TTableMetadataResult& loadTableMetadataResult, const TString& database, const TMaybe<NACLib::TUserToken>& userToken) {
+ TTableMetadataResult& loadTableMetadataResult, const TString& database,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken)
+{
auto tableMetadata = loadTableMetadataResult.Metadata;
YQL_ENSURE(tableMetadata);
@@ -333,7 +336,8 @@ NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadIndexMeta
}
NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadIndexMetadataByPathId(
- const TString& cluster, const TIndexId& indexId, const TString& tableName, const TString& database, const TMaybe<NACLib::TUserToken>& userToken)
+ const TString& cluster, const TIndexId& indexId, const TString& tableName, const TString& database,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken)
{
using TResult = TTableMetadataResult;
@@ -372,8 +376,10 @@ NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadIndexMeta
// The type is TString or std::pair<TIndexId, TString>
template<typename TPath>
-NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadTableMetadataCache(const TString& cluster, const TPath& id,
- TLoadTableMetadataSettings settings, const TString& database, const TMaybe<NACLib::TUserToken>& userToken)
+NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadTableMetadataCache(
+ const TString& cluster, const TPath& id,
+ TLoadTableMetadataSettings settings, const TString& database,
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken)
{
using TRequest = TEvTxProxySchemeCache::TEvNavigateKeySet;
using TResponse = TEvTxProxySchemeCache::TEvNavigateKeySetResult;
@@ -391,8 +397,8 @@ NThreading::TFuture<TTableMetadataResult> TKqpTableMetadataLoader::LoadTableMeta
const TString& table = entry.second;
navigate->DatabaseName = database;
- if (userToken) {
- navigate->UserToken = new NACLib::TUserToken(*userToken);
+ if (userToken && !userToken->GetSerializedToken().empty()) {
+ navigate->UserToken = userToken;
}
auto ev = MakeHolder<TRequest>(navigate.Release());
diff --git a/ydb/core/kqp/gateway/kqp_metadata_loader.h b/ydb/core/kqp/gateway/kqp_metadata_loader.h
index 25447f2825..8f6b1b4b06 100644
--- a/ydb/core/kqp/gateway/kqp_metadata_loader.h
+++ b/ydb/core/kqp/gateway/kqp_metadata_loader.h
@@ -21,7 +21,7 @@ public:
NThreading::TFuture<NYql::IKikimrGateway::TTableMetadataResult> LoadTableMetadata(
const TString& cluster, const TString& table, const NYql::IKikimrGateway::TLoadTableMetadataSettings& settings, const TString& database,
- const TMaybe<NACLib::TUserToken>& userToken);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken);
TVector<TString> GetCollectedSchemeData();
@@ -37,15 +37,15 @@ private:
template<typename TPath>
NThreading::TFuture<NYql::IKikimrGateway::TTableMetadataResult> LoadTableMetadataCache(
const TString& cluster, const TPath& id, NYql::IKikimrGateway::TLoadTableMetadataSettings settings, const TString& database,
- const TMaybe<NACLib::TUserToken>& userToken);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken);
NThreading::TFuture<NYql::IKikimrGateway::TTableMetadataResult> LoadIndexMetadataByPathId(
const TString& cluster, const NKikimr::TIndexId& indexId, const TString& tableName, const TString& database,
- const TMaybe<NACLib::TUserToken>& userToken);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken);
NThreading::TFuture<NYql::IKikimrGateway::TTableMetadataResult> LoadIndexMetadata(
NYql::IKikimrGateway::TTableMetadataResult& loadTableMetadataResult, const TString& database,
- const TMaybe<NACLib::TUserToken>& userToken);
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken);
void OnLoadedTableMetadata(NYql::IKikimrGateway::TTableMetadataResult& loadTableMetadataResult);
diff --git a/ydb/core/kqp/host/kqp_type_ann.cpp b/ydb/core/kqp/host/kqp_type_ann.cpp
index b902520297..ae4907c9b8 100644
--- a/ydb/core/kqp/host/kqp_type_ann.cpp
+++ b/ydb/core/kqp/host/kqp_type_ann.cpp
@@ -924,7 +924,7 @@ TStatus AnnotateOlapAgg(const TExprNode::TPtr& node, TExprContext& ctx) {
return TStatus::Error;
}
aggTypes.push_back(ctx.MakeType<TItemExprType>(aggName->Content(), resultType));
- } else if (opType->Content() == "min" || opType->Content() == "max") {
+ } else if (opType->Content() == "min" || opType->Content() == "max" || opType->Content() == "some") {
auto colType = structType->FindItemType(colName->Content());
aggTypes.push_back(ctx.MakeType<TItemExprType>(aggName->Content(), colType));
} else {
diff --git a/ydb/core/kqp/node_service/kqp_node_service.cpp b/ydb/core/kqp/node_service/kqp_node_service.cpp
index 3e4e92632d..dd57aadc36 100644
--- a/ydb/core/kqp/node_service/kqp_node_service.cpp
+++ b/ydb/core/kqp/node_service/kqp_node_service.cpp
@@ -138,6 +138,15 @@ private:
return ReplyError(txId, request.Executer, msg, NKikimrKqp::TEvStartKqpTasksResponse::INTERNAL_ERROR);
}
+ NRm::EKqpMemoryPool memoryPool;
+ if (msg.GetRuntimeSettings().GetExecType() == NYql::NDqProto::TComputeRuntimeSettings::SCAN) {
+ memoryPool = NRm::EKqpMemoryPool::ScanQuery;
+ } else if (msg.GetRuntimeSettings().GetExecType() == NYql::NDqProto::TComputeRuntimeSettings::DATA) {
+ memoryPool = NRm::EKqpMemoryPool::DataQuery;
+ } else {
+ memoryPool = NRm::EKqpMemoryPool::Unspecified;
+ }
+
ui32 requestChannels = 0;
for (auto& dqTask : *msg.MutableTasks()) {
auto estimation = EstimateTaskResources(dqTask, Config);
@@ -161,7 +170,7 @@ private:
LOG_D("TxId: " << txId << ", channels: " << requestChannels
<< ", computeActors: " << msg.GetTasks().size() << ", memory: " << request.TotalMemory);
- ui64 txMemory = State.GetTxMemory(txId, NRm::EKqpMemoryPool::ScanQuery) + request.TotalMemory;
+ ui64 txMemory = State.GetTxMemory(txId, memoryPool) + request.TotalMemory;
if (txMemory > Config.GetQueryMemoryLimit()) {
LOG_N("TxId: " << txId << ", requested too many memory: " << request.TotalMemory
<< "(" << txMemory << " for this Tx), limit: " << Config.GetQueryMemoryLimit());
@@ -177,7 +186,7 @@ private:
for (auto& task : request.InFlyTasks) {
NRm::TKqpResourcesRequest resourcesRequest;
resourcesRequest.ExecutionUnits = 1;
- resourcesRequest.MemoryPool = NRm::EKqpMemoryPool::ScanQuery;
+ resourcesRequest.MemoryPool = memoryPool;
// !!!!!!!!!!!!!!!!!!!!!
// we have to allocate memory instead of reserve only. currently, this memory will not be used for request processing.
@@ -189,21 +198,21 @@ private:
TStringBuilder error;
if (resourcesResponse.ExecutionUnits()) {
- error << "TxId: " << txId << ", not enough compute actors, requested " << msg.GetTasks().size();
+ error << "TxId: " << txId << ", NodeId: " << SelfId().NodeId() << ", not enough compute actors, requested " << msg.GetTasks().size();
LOG_N(error);
failReason = NKikimrKqp::TEvStartKqpTasksResponse::NOT_ENOUGH_EXECUTION_UNITS;
}
if (resourcesResponse.ScanQueryMemory()) {
- error << "TxId: " << txId << ", not enough memory, requested " << task.second.Memory;
+ error << "TxId: " << txId << ", NodeId: " << SelfId().NodeId() << ", not enough memory, requested " << task.second.Memory;
LOG_N(error);
failReason = NKikimrKqp::TEvStartKqpTasksResponse::NOT_ENOUGH_MEMORY;
}
if (resourcesResponse.QueryMemoryLimit()) {
- error << "TxId: " << txId << ", memory limit exceeded, requested " << task.second.Memory;
+ error << "TxId: " << txId << ", NodeId: " << SelfId().NodeId() << ", memory limit exceeded, requested " << task.second.Memory;
LOG_N(error);
failReason = NKikimrKqp::TEvStartKqpTasksResponse::QUERY_MEMORY_LIMIT_EXCEEDED;
@@ -228,9 +237,9 @@ private:
memoryLimits.MkqlLightProgramMemoryLimit = Config.GetMkqlLightProgramMemoryLimit();
memoryLimits.MkqlHeavyProgramMemoryLimit = Config.GetMkqlHeavyProgramMemoryLimit();
if (Config.GetEnableInstantMkqlMemoryAlloc()) {
- memoryLimits.AllocateMemoryFn = [rm = ResourceManager()](const auto& txId, ui64 taskId, ui64 memory) {
+ memoryLimits.AllocateMemoryFn = [rm = ResourceManager(), memoryPool](const auto& txId, ui64 taskId, ui64 memory) {
NRm::TKqpResourcesRequest resources;
- resources.MemoryPool = NRm::EKqpMemoryPool::ScanQuery;
+ resources.MemoryPool = memoryPool;
resources.Memory = memory;
if (rm->AllocateResources(std::get<ui64>(txId), taskId, resources)) {
@@ -249,16 +258,8 @@ private:
request.Deadline = TAppData::TimeProvider->Now() + *runtimeSettingsBase.Timeout;
}
- if (msgRtSettings.GetExecType() == NYql::NDqProto::TComputeRuntimeSettings::SCAN) {
- runtimeSettingsBase.ExtraMemoryAllocationPool = NRm::EKqpMemoryPool::ScanQuery;
- runtimeSettingsBase.FailOnUndelivery = false;
- } else if (msgRtSettings.GetExecType() == NYql::NDqProto::TComputeRuntimeSettings::DATA) {
- runtimeSettingsBase.ExtraMemoryAllocationPool = NRm::EKqpMemoryPool::DataQuery;
- runtimeSettingsBase.FailOnUndelivery = true;
- } else {
- runtimeSettingsBase.ExtraMemoryAllocationPool = NRm::EKqpMemoryPool::Unspecified;
- runtimeSettingsBase.FailOnUndelivery = true;
- }
+ runtimeSettingsBase.ExtraMemoryAllocationPool = memoryPool;
+ runtimeSettingsBase.FailOnUndelivery = msgRtSettings.GetExecType() != NYql::NDqProto::TComputeRuntimeSettings::SCAN;
runtimeSettingsBase.StatsMode = msgRtSettings.GetStatsMode();
runtimeSettingsBase.UseLLVM = msgRtSettings.GetUseLLVM();
@@ -304,12 +305,13 @@ private:
IActor* computeActor;
if (tableKind == ETableKind::Datashard || tableKind == ETableKind::Olap) {
computeActor = CreateKqpScanComputeActor(msg.GetSnapshot(), request.Executer, txId, std::move(dqTask),
- CreateKqpAsyncIoFactory(), nullptr, runtimeSettings, memoryLimits, scanPolicy, Counters, NWilson::TTraceId(ev->TraceId));
+ CreateKqpAsyncIoFactory(Counters), AppData()->FunctionRegistry, runtimeSettings, memoryLimits, scanPolicy,
+ Counters, NWilson::TTraceId(ev->TraceId));
taskCtx.ComputeActorId = Register(computeActor);
} else {
if (Y_LIKELY(!CaFactory)) {
- computeActor = CreateKqpComputeActor(request.Executer, txId, std::move(dqTask), CreateKqpAsyncIoFactory(),
- nullptr, runtimeSettings, memoryLimits, NWilson::TTraceId(ev->TraceId));
+ computeActor = CreateKqpComputeActor(request.Executer, txId, std::move(dqTask), CreateKqpAsyncIoFactory(Counters),
+ AppData()->FunctionRegistry, runtimeSettings, memoryLimits, NWilson::TTraceId(ev->TraceId));
taskCtx.ComputeActorId = Register(computeActor);
} else {
computeActor = CaFactory->CreateKqpComputeActor(request.Executer, txId, std::move(dqTask),
@@ -333,7 +335,7 @@ private:
Send(request.Executer, reply.Release(), IEventHandle::FlagTrackDelivery, txId);
- State.NewRequest(txId, requester, std::move(request), NRm::EKqpMemoryPool::ScanQuery);
+ State.NewRequest(txId, requester, std::move(request), memoryPool);
}
void HandleWork(TEvKqpNode::TEvFinishKqpTask::TPtr& ev) {
@@ -475,7 +477,7 @@ private:
}
void HandleWork(NMon::TEvHttpInfo::TPtr& ev) {
- TMap<ui64, TVector<std::pair<const TActorId, const NKqpNode::TTasksRequest*>>> byTx;
+ THashMap<ui64, TVector<std::pair<const TActorId, const NKqpNode::TTasksRequest*>>> byTx;
for (auto& [key, request] : State.Requests) {
byTx[key.first].emplace_back(key.second, &request);
}
diff --git a/ydb/core/kqp/node_service/kqp_node_state.h b/ydb/core/kqp/node_service/kqp_node_state.h
index b6dcf2a318..ec49b30d59 100644
--- a/ydb/core/kqp/node_service/kqp_node_state.h
+++ b/ydb/core/kqp/node_service/kqp_node_state.h
@@ -28,7 +28,7 @@ struct TTaskContext {
// describes single TEvStartKqpTasksRequest request
struct TTasksRequest {
// when task is finished it will be removed from this map
- TMap<ui64, TTaskContext> InFlyTasks;
+ THashMap<ui64, TTaskContext> InFlyTasks;
TInstant Deadline;
ui64 TotalMemory = 0;
TActorId Executer;
@@ -45,7 +45,8 @@ struct TTxMeta {
struct TState {
THashMap<std::pair<ui64, const TActorId>, TTasksRequest> Requests;
- TMap<ui64, TTxMeta> Meta;
+ THashMultiMap<ui64, const TActorId> SenderIdsByTxId;
+ THashMap<ui64, TTxMeta> Meta;
bool Exists(ui64 txId, const TActorId& requester) const {
return Requests.contains(std::make_pair(txId, requester));
@@ -73,17 +74,22 @@ struct TState {
YQL_ENSURE(meta.MemoryPool == memoryPool);
}
auto ret = Requests.emplace(std::make_pair(txId, requester), std::move(request));
- YQL_ENSURE(ret.second);
+ auto inserted = SenderIdsByTxId.insert(std::make_pair(txId, requester))->second;
+ YQL_ENSURE(ret.second && inserted);
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
}
std::tuple<TTaskContext*, TActorId, TTasksRequest*, TTxMeta*> GetTask(ui64 txId, ui64 taskId) {
- for (auto& [key, request] : Requests) {
- if (key.first != txId) {
- continue;
- }
- auto taskIt = request.InFlyTasks.find(taskId);
- if (taskIt != request.InFlyTasks.end()) {
- return std::make_tuple(&taskIt->second, key.second, &request, Meta.FindPtr(txId));
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
+ const auto senders = SenderIdsByTxId.equal_range(txId);
+
+ for (auto senderIt = senders.first; senderIt != senders.second; ++senderIt) {
+ auto requestIt = Requests.find(*senderIt);
+ YQL_ENSURE(requestIt != Requests.end());
+
+ auto taskIt = requestIt->second.InFlyTasks.find(taskId);
+ if (taskIt != requestIt->second.InFlyTasks.end()) {
+ return std::make_tuple(&taskIt->second, senderIt->second, &requestIt->second, Meta.FindPtr(txId));
}
}
@@ -93,14 +99,20 @@ struct TState {
TMaybe<TTaskContext> RemoveTask(ui64 txId, ui64 taskId, bool success,
std::function<void(const TActorId&, const TTasksRequest&, const TTaskContext&, bool)>&& cb)
{
- for (auto& [key, request] : Requests) {
- if (key.first == txId && request.InFlyTasks.contains(taskId)) {
- auto task = std::move(request.InFlyTasks[taskId]);
- request.InFlyTasks.erase(taskId);
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
+ const auto senders = SenderIdsByTxId.equal_range(txId);
+ for (auto senderIt = senders.first; senderIt != senders.second; ++senderIt) {
+ auto requestIt = Requests.find(*senderIt);
+ YQL_ENSURE(requestIt != Requests.end());
- Y_VERIFY_DEBUG(request.TotalMemory >= task.Memory);
- request.TotalMemory -= task.Memory;
- request.ExecutionCancelled |= !success;
+ auto taskIt = requestIt->second.InFlyTasks.find(taskId);
+ if (taskIt != requestIt->second.InFlyTasks.end()) {
+ auto task = std::move(taskIt->second);
+ requestIt->second.InFlyTasks.erase(taskIt);
+
+ Y_VERIFY_DEBUG(requestIt->second.TotalMemory >= task.Memory);
+ requestIt->second.TotalMemory -= task.Memory;
+ requestIt->second.ExecutionCancelled |= !success;
auto& meta = Meta[txId];
Y_VERIFY_DEBUG(meta.TotalMemory >= task.Memory);
@@ -108,10 +120,12 @@ struct TState {
meta.TotalMemory -= task.Memory;
meta.TotalComputeActors--;
- cb(key.second, request, task, meta.TotalComputeActors == 0);
+ cb(senderIt->second, requestIt->second, task, meta.TotalComputeActors == 0);
- if (request.InFlyTasks.empty()) {
- Requests.erase(key);
+ if (requestIt->second.InFlyTasks.empty()) {
+ Requests.erase(*senderIt);
+ SenderIdsByTxId.erase(senderIt);
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
}
if (meta.TotalComputeActors == 0) {
Meta.erase(txId);
@@ -120,6 +134,7 @@ struct TState {
return std::move(task);
}
}
+
return Nothing();
}
@@ -133,6 +148,16 @@ struct TState {
TMaybe<TTasksRequest> ret = std::move(*request);
Requests.erase(key);
+ const auto senders = SenderIdsByTxId.equal_range(txId);
+ for (auto senderIt = senders.first; senderIt != senders.second; ++senderIt) {
+ if (senderIt->second == requester) {
+ SenderIdsByTxId.erase(senderIt);
+ break;
+ }
+ }
+
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
+
auto& meta = Meta[txId];
Y_VERIFY_DEBUG(meta.TotalMemory >= ret->TotalMemory);
Y_VERIFY_DEBUG(meta.TotalComputeActors >= 1);
@@ -149,23 +174,20 @@ struct TState {
bool RemoveTx(ui64 txId, std::function<void(const TTasksRequest&)>&& cb) {
Meta.erase(txId);
- auto removeOne = [&]() {
- for (auto& [key, request] : Requests) {
- if (key.first == txId) {
- cb(request);
- Requests.erase(key);
- return true;
- }
- }
- return false;
- };
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
+ const auto senders = SenderIdsByTxId.equal_range(txId);
+ for (auto senderIt = senders.first; senderIt != senders.second; ++senderIt) {
+ auto requestIt = Requests.find(*senderIt);
+ YQL_ENSURE(requestIt != Requests.end());
- ui32 count = 0;
- while (removeOne()) {
- ++count;
+ cb(requestIt->second);
+ Requests.erase(requestIt);
}
- return count > 0;
+ auto erased = SenderIdsByTxId.erase(txId);
+ YQL_ENSURE(Requests.size() == SenderIdsByTxId.size());
+
+ return erased > 0;
}
ui64 UsedMemory(NRm::EKqpMemoryPool memoryPool) const {
diff --git a/ydb/core/kqp/opt/kqp_opt.cpp b/ydb/core/kqp/opt/kqp_opt.cpp
index 519fc65e93..8bea802beb 100644
--- a/ydb/core/kqp/opt/kqp_opt.cpp
+++ b/ydb/core/kqp/opt/kqp_opt.cpp
@@ -68,6 +68,12 @@ bool IsKqpPureInputs(const TExprList& inputs) {
return true;
}
+ if (auto source = TExprBase(node).Maybe<TDqSource>()) {
+ if (source.Cast().Settings().Maybe<TKqpReadRangesSourceSettings>()) {
+ return true;
+ }
+ }
+
return false;
});
}
diff --git a/ydb/core/kqp/opt/kqp_opt_kql.cpp b/ydb/core/kqp/opt/kqp_opt_kql.cpp
index c84cb4a4f8..1e03a8de44 100644
--- a/ydb/core/kqp/opt/kqp_opt_kql.cpp
+++ b/ydb/core/kqp/opt/kqp_opt_kql.cpp
@@ -88,11 +88,11 @@ bool UseReadTableRanges(const TKikimrTableDescription& tableData, const TIntrusi
return predicateExtractSetting == EOptionalFlag::Enabled;
}
- if (kqpCtx->IsScanQuery() && kqpCtx->Config->FeatureFlags.GetEnablePredicateExtractForScanQueries()) {
+ if (kqpCtx->IsScanQuery() && kqpCtx->Config->EnablePredicateExtractForScanQuery) {
return true;
}
- if (kqpCtx->IsDataQuery() && kqpCtx->Config->FeatureFlags.GetEnablePredicateExtractForDataQueries()) {
+ if (kqpCtx->IsDataQuery() && kqpCtx->Config->EnablePredicateExtractForDataQuery) {
return true;
}
@@ -571,7 +571,7 @@ TExprNode::TPtr HandleReadTable(const TKiReadTable& read, TExprContext& ctx, con
return nullptr;
}
- if (kqpCtx->IsScanQuery() && !kqpCtx->Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup()) {
+ if (kqpCtx->IsScanQuery() && !kqpCtx->Config->EnableKqpScanQueryStreamLookup) {
const TString err = "Secondary index is not supported for ScanQuery";
ctx.AddError(YqlIssue(ctx.GetPosition(read.Pos()), TIssuesIds::KIKIMR_BAD_REQUEST, err));
return nullptr;
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp
index 9282ca1ca3..2bbbae1e8c 100644
--- a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp
+++ b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp
@@ -51,13 +51,16 @@ public:
AddHandler(1, &TKqlLookupIndex::Match, HNDL(RewriteLookupIndex));
AddHandler(1, &TKqlStreamLookupIndex::Match, HNDL(RewriteStreamLookupIndex));
- AddHandler(2, &TKqlReadTableBase::Match, HNDL(ApplyExtractMembersToReadTable<true>));
- AddHandler(2, &TKqlReadTableRangesBase::Match, HNDL(ApplyExtractMembersToReadTableRanges<true>));
- AddHandler(2, &TKqpReadOlapTableRangesBase::Match, HNDL(ApplyExtractMembersToReadOlapTable<true>));
- AddHandler(2, &TKqlLookupTableBase::Match, HNDL(ApplyExtractMembersToLookupTable<true>));
+ AddHandler(2, &TKqlLookupTable::Match, HNDL(RewriteLookupTable));
+
+ AddHandler(3, &TKqlReadTableBase::Match, HNDL(ApplyExtractMembersToReadTable<true>));
+ AddHandler(3, &TKqlReadTableRangesBase::Match, HNDL(ApplyExtractMembersToReadTableRanges<true>));
+ AddHandler(3, &TKqpReadOlapTableRangesBase::Match, HNDL(ApplyExtractMembersToReadOlapTable<true>));
+ AddHandler(3, &TKqlLookupTableBase::Match, HNDL(ApplyExtractMembersToLookupTable<true>));
+
#undef HNDL
- SetGlobal(2u);
+ SetGlobal(3u);
}
protected:
@@ -152,6 +155,12 @@ protected:
return output;
}
+ TMaybeNode<TExprBase> RewriteLookupTable(TExprBase node, TExprContext& ctx) {
+ TExprBase output = KqpRewriteLookupTable(node, ctx, KqpCtx);
+ DumpAppliedRule("RewriteLookupTable", node.Ptr(), output.Ptr(), ctx);
+ return output;
+ }
+
TMaybeNode<TExprBase> DeleteOverLookup(TExprBase node, TExprContext& ctx) {
TExprBase output = KqpDeleteOverLookup(node, ctx, KqpCtx);
DumpAppliedRule("DeleteOverLookup", node.Ptr(), output.Ptr(), ctx);
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp
index 5a074509b2..7dcf855ce0 100644
--- a/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp
+++ b/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp
@@ -15,14 +15,14 @@ TExprBase KqpDeleteOverLookup(const TExprBase& node, TExprContext& ctx, const TK
auto deleteRows = node.Cast<TKqlDeleteRows>();
- TMaybeNode<TKqlLookupTable> lookup;
+ TMaybeNode<TKqlLookupTableBase> lookup;
TMaybeNode<TCoSkipNullMembers> skipNulMembers;
- if (deleteRows.Input().Maybe<TKqlLookupTable>()) {
- lookup = deleteRows.Input().Cast<TKqlLookupTable>();
- } else if (deleteRows.Input().Maybe<TCoSkipNullMembers>().Input().Maybe<TKqlLookupTable>()) {
+ if (deleteRows.Input().Maybe<TKqlLookupTableBase>()) {
+ lookup = deleteRows.Input().Cast<TKqlLookupTableBase>();
+ } else if (deleteRows.Input().Maybe<TCoSkipNullMembers>().Input().Maybe<TKqlLookupTableBase>()) {
skipNulMembers = deleteRows.Input().Cast<TCoSkipNullMembers>();
- lookup = skipNulMembers.Input().Cast<TKqlLookupTable>();
+ lookup = skipNulMembers.Input().Cast<TKqlLookupTableBase>();
} else {
return node;
}
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_join.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_join.cpp
index 7ea72278c3..6bc9eee0fb 100644
--- a/ydb/core/kqp/opt/logical/kqp_opt_log_join.cpp
+++ b/ydb/core/kqp/opt/logical/kqp_opt_log_join.cpp
@@ -71,12 +71,44 @@ TExprBase ConvertToTuples(const TSet<TString>& columns, const TCoArgument& struc
.Done();
}
-TExprBase DeduplicateByMembers(const TExprBase& expr, const TSet<TString>& members, TExprContext& ctx,
- TPositionHandle pos)
+TExprBase DeduplicateByMembers(const TExprBase& expr, const TMaybeNode<TCoLambda>& filter, const TSet<TString>& members,
+ TExprContext& ctx, TPositionHandle pos)
{
- auto structArg = Build<TCoArgument>(ctx, pos)
- .Name("struct")
+ TMaybeNode<TCoLambda> lambda;
+ if (filter.IsValid()) {
+ lambda = Build<TCoLambda>(ctx, pos)
+ .Args({"tuple"})
+ .Body<TCoTake>()
+ .Input<TCoFilter>()
+ .Input<TCoNth>()
+ .Tuple("tuple")
+ .Index().Value("1").Build()
+ .Build()
+ .Lambda(filter.Cast())
+ .Build()
+ .Count<TCoUint64>()
+ .Literal().Value("1").Build()
+ .Build()
+ .Build()
+ .Done();
+ } else {
+ lambda = Build<TCoLambda>(ctx, pos)
+ .Args({"tuple"})
+ .Body<TCoTake>()
+ .Input<TCoNth>()
+ .Tuple("tuple")
+ .Index().Value("1").Build()
+ .Build()
+ .Count<TCoUint64>()
+ .Literal().Value("1").Build()
+ .Build()
+ .Build()
.Done();
+ }
+
+ auto structArg = Build<TCoArgument>(ctx, pos)
+ .Name("struct")
+ .Done();
return Build<TCoPartitionByKey>(ctx, pos)
.Input(expr)
@@ -92,18 +124,7 @@ TExprBase DeduplicateByMembers(const TExprBase& expr, const TSet<TString>& membe
.Args({"stream"})
.Body<TCoFlatMap>()
.Input("stream")
- .Lambda()
- .Args({"tuple"})
- .Body<TCoTake>()
- .Input<TCoNth>()
- .Tuple("tuple")
- .Index().Value("1").Build()
- .Build()
- .Count<TCoUint64>()
- .Literal().Value("1").Build()
- .Build()
- .Build()
- .Build()
+ .Lambda(lambda.Cast())
.Build()
.Build()
.Done();
@@ -168,7 +189,7 @@ TExprBase BuildLookupIndex(TExprContext& ctx, const TPositionHandle pos, const T
const TKqpOptimizeContext& kqpCtx)
{
if (kqpCtx.IsScanQuery()) {
- YQL_ENSURE(kqpCtx.Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup(), "Stream lookup is not enabled");
+ YQL_ENSURE(kqpCtx.Config->EnableKqpScanQueryStreamIdxLookupJoin, "Stream lookup is not enabled for index lookup join");
return Build<TKqlStreamLookupIndex>(ctx, pos)
.Table(read.Table())
.LookupKeys<TCoSkipNullMembers>()
@@ -201,7 +222,7 @@ TExprBase BuildLookupTable(TExprContext& ctx, const TPositionHandle pos, const T
const TExprBase& keysToLookup, const TVector<TCoAtom>& lookupNames, const TKqpOptimizeContext& kqpCtx)
{
if (kqpCtx.IsScanQuery()) {
- YQL_ENSURE(kqpCtx.Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup(), "Stream lookup is not enabled");
+ YQL_ENSURE(kqpCtx.Config->EnableKqpScanQueryStreamIdxLookupJoin, "Stream lookup is not enabled for index lookup join");
return Build<TKqlStreamLookupTable>(ctx, pos)
.Table(read.Table())
.LookupKeys<TCoSkipNullMembers>()
@@ -214,7 +235,7 @@ TExprBase BuildLookupTable(TExprContext& ctx, const TPositionHandle pos, const T
.Done();
}
- if (kqpCtx.Config->FeatureFlags.GetEnableKqpDataQueryStreamLookup()) {
+ if (kqpCtx.Config->EnableKqpDataQueryStreamLookup) {
return Build<TKqlStreamLookupTable>(ctx, pos)
.Table(read.Table())
.LookupKeys<TCoSkipNullMembers>()
@@ -471,7 +492,6 @@ TMaybeNode<TExprBase> KqpJoinToIndexLookupImpl(const TDqJoin& join, TExprContext
}
bool needPrecomputeLeft = kqpCtx.IsDataQuery()
- && !kqpCtx.Config->FeatureFlags.GetEnableKqpDataQueryStreamLookup()
&& !join.LeftInput().Maybe<TCoParameter>()
&& !IsParameterToListOfStructsRepack(join.LeftInput());
@@ -481,7 +501,7 @@ TMaybeNode<TExprBase> KqpJoinToIndexLookupImpl(const TDqJoin& join, TExprContext
.Done()
: join.LeftInput();
- auto leftDataDeduplicated = DeduplicateByMembers(leftData, deduplicateLeftColumns, ctx, join.Pos());
+ TMaybeNode<TCoLambda> filter;
if (!equalLeftKeys.empty()) {
auto row = Build<TCoArgument>(ctx, join.Pos())
@@ -508,22 +528,20 @@ TMaybeNode<TExprBase> KqpJoinToIndexLookupImpl(const TDqJoin& join, TExprContext
}
}
- leftDataDeduplicated = Build<TCoFilter>(ctx, join.Pos())
- .Input(leftDataDeduplicated)
- .Lambda()
- .Args({row})
- .Body<TCoCoalesce>()
- .Predicate<TCoAnd>()
- .Add(conditions)
- .Build()
- .Value<TCoBool>()
- .Literal().Build("false")
- .Build()
+ filter = Build<TCoLambda>(ctx, join.Pos())
+ .Args({row})
+ .Body<TCoCoalesce>()
+ .Predicate<TCoAnd>()
+ .Add(conditions)
+ .Build()
+ .Value<TCoBool>()
+ .Literal().Build("false")
.Build()
.Build()
.Done();
}
+ auto leftDataDeduplicated = DeduplicateByMembers(leftData, filter, deduplicateLeftColumns, ctx, join.Pos());
auto keysToLookup = Build<TCoMap>(ctx, join.Pos())
.Input(leftDataDeduplicated)
.Lambda()
@@ -589,7 +607,7 @@ TMaybeNode<TExprBase> KqpJoinToIndexLookupImpl(const TDqJoin& join, TExprContext
TExprBase KqpJoinToIndexLookup(const TExprBase& node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx,
const NYql::TKikimrConfiguration::TPtr& config)
{
- if ((kqpCtx.IsScanQuery() && !kqpCtx.Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup()) || !node.Maybe<TDqJoin>()) {
+ if ((kqpCtx.IsScanQuery() && !kqpCtx.Config->EnableKqpScanQueryStreamIdxLookupJoin) || !node.Maybe<TDqJoin>()) {
return node;
}
auto join = node.Cast<TDqJoin>();
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_ranges.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_ranges.cpp
index f443c9dacc..18779463d8 100644
--- a/ydb/core/kqp/opt/logical/kqp_opt_log_ranges.cpp
+++ b/ydb/core/kqp/opt/logical/kqp_opt_log_ranges.cpp
@@ -232,7 +232,7 @@ TExprBase KqpPushPredicateToReadTable(TExprBase node, TExprContext& ctx, const T
// is available, currently it can introduce redundant compute stage.
useDataQueryLookup = kqpCtx.IsDataQuery() && isFullKey;
useScanQueryLookup = kqpCtx.IsScanQuery() && isFullKey
- && kqpCtx.Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup();
+ && kqpCtx.Config->EnableKqpScanQueryStreamLookup;
}
TMaybeNode<TExprBase> readInput;
@@ -247,22 +247,14 @@ TExprBase KqpPushPredicateToReadTable(TExprBase node, TExprContext& ctx, const T
.Index(indexName.Cast())
.Done();
} else {
- if (kqpCtx.Config->FeatureFlags.GetEnableKqpDataQueryStreamLookup()) {
- readInput = Build<TKqlStreamLookupTable>(ctx, read.Pos())
- .Table(read.Table())
- .LookupKeys(lookupKeys)
- .Columns(read.Columns())
- .Done();
- } else {
- readInput = Build<TKqlLookupTable>(ctx, read.Pos())
- .Table(read.Table())
- .LookupKeys(lookupKeys)
- .Columns(read.Columns())
- .Done();
- }
+ readInput = Build<TKqlLookupTable>(ctx, read.Pos())
+ .Table(read.Table())
+ .LookupKeys(lookupKeys)
+ .Columns(read.Columns())
+ .Done();
}
} else if (useScanQueryLookup) {
- YQL_ENSURE(kqpCtx.Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup());
+ YQL_ENSURE(kqpCtx.Config->EnableKqpScanQueryStreamLookup);
auto lookupKeys = BuildEquiRangeLookup(keyRange, tableDesc, read.Pos(), ctx);
if (indexName) {
@@ -338,6 +330,90 @@ TExprBase KqpPushPredicateToReadTable(TExprBase node, TExprContext& ctx, const T
.Done();
}
+TExprBase KqpRewriteLookupTable(const TExprBase& node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx) {
+ if (!node.Maybe<TKqlLookupTable>()) {
+ return node;
+ }
+
+ const TKqlLookupTable& lookup = node.Cast<TKqlLookupTable>();
+ if (!IsDqPureExpr(lookup.LookupKeys())) {
+ if (!kqpCtx.Config->EnableKqpDataQueryStreamLookup) {
+ return node;
+ }
+
+ return Build<TKqlStreamLookupTable>(ctx, lookup.Pos())
+ .Table(lookup.Table())
+ .LookupKeys(lookup.LookupKeys())
+ .Columns(lookup.Columns())
+ .Done();
+ } else {
+ if (!kqpCtx.Config->EnableKqpDataQuerySourceRead) {
+ return node;
+ }
+
+ TMaybeNode<TExprBase> lookupKeys = lookup.LookupKeys();
+ TMaybeNode<TCoSkipNullMembers> skipNullMembers;
+ if (lookupKeys.Maybe<TCoSkipNullMembers>()) {
+ skipNullMembers = lookupKeys.Cast<TCoSkipNullMembers>();
+ lookupKeys = skipNullMembers.Input();
+ }
+
+ auto maybeAsList = lookupKeys.Maybe<TCoAsList>();
+ if (!maybeAsList) {
+ return node;
+ }
+
+ // one point expected
+ if (maybeAsList.Cast().ArgCount() != 1) {
+ return node;
+ }
+
+ auto maybeStruct = maybeAsList.Cast().Arg(0).Maybe<TCoAsStruct>();
+ if (!maybeStruct) {
+ return node;
+ }
+
+ // full pk expected
+ const auto& table = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, lookup.Table().Path().Value());
+ if (table.Metadata->KeyColumnNames.size() != maybeStruct.Cast().ArgCount()) {
+ return node;
+ }
+
+ std::unordered_map<TString, TExprBase> keyColumnsStruct;
+ for (const auto& item : maybeStruct.Cast()) {
+ const auto& tuple = item.Cast<TCoNameValueTuple>();
+ keyColumnsStruct.insert({TString(tuple.Name().Value()), tuple.Value().Cast()});
+ }
+
+ TKqpReadTableSettings settings;
+ TVector<TExprBase> keyValues;
+ keyValues.reserve(maybeStruct.Cast().ArgCount());
+ for (const auto& name : table.Metadata->KeyColumnNames) {
+ auto it = keyColumnsStruct.find(name);
+ YQL_ENSURE(it != keyColumnsStruct.end());
+ keyValues.push_back(it->second);
+
+ if (skipNullMembers) {
+ settings.AddSkipNullKey(name);
+ }
+ }
+
+ return Build<TKqlReadTable>(ctx, lookup.Pos())
+ .Table(lookup.Table())
+ .Range<TKqlKeyRange>()
+ .From<TKqlKeyInc>()
+ .Add(keyValues)
+ .Build()
+ .To<TKqlKeyInc>()
+ .Add(keyValues)
+ .Build()
+ .Build()
+ .Columns(lookup.Columns())
+ .Settings(settings.BuildNode(ctx, lookup.Pos()))
+ .Done();
+ }
+}
+
TExprBase KqpDropTakeOverLookupTable(const TExprBase& node, TExprContext&, const TKqpOptimizeContext& kqpCtx) {
if (!node.Maybe<TCoTake>().Input().Maybe<TKqlLookupTableBase>()) {
return node;
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h b/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h
index d96b71b3ee..ecab5b3406 100644
--- a/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h
+++ b/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h
@@ -41,6 +41,9 @@ NYql::NNodes::TExprBase KqpRewriteLookupIndex(const NYql::NNodes::TExprBase& nod
NYql::NNodes::TExprBase KqpRewriteStreamLookupIndex(const NYql::NNodes::TExprBase& node, NYql::TExprContext& ctx,
const TKqpOptimizeContext& kqpCtx);
+NYql::NNodes::TExprBase KqpRewriteLookupTable(const NYql::NNodes::TExprBase& node, NYql::TExprContext& ctx,
+ const TKqpOptimizeContext& kqpCtx);
+
NYql::NNodes::TExprBase KqpRewriteTopSortOverIndexRead(const NYql::NNodes::TExprBase& node, NYql::TExprContext&,
const TKqpOptimizeContext& kqpCtx);
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_sqlin.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_sqlin.cpp
index 0155d45134..0644b7ba6a 100644
--- a/ydb/core/kqp/opt/logical/kqp_opt_log_sqlin.cpp
+++ b/ydb/core/kqp/opt/logical/kqp_opt_log_sqlin.cpp
@@ -48,7 +48,7 @@ bool CanRewriteSqlInToEquiJoin(const TTypeAnnotationNode* lookupType, const TTyp
TExprBase KqpRewriteSqlInToEquiJoin(const TExprBase& node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx,
const TKikimrConfiguration::TPtr& config)
{
- if (kqpCtx.IsScanQuery() && !kqpCtx.Config->FeatureFlags.GetEnableKqpScanQueryStreamLookup()) {
+ if (kqpCtx.IsScanQuery() && !kqpCtx.Config->EnableKqpScanQueryStreamLookup) {
return node;
}
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy.cpp
index 35b448d4ed..edaedc05ca 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy.cpp
@@ -34,6 +34,7 @@ public:
AddHandler(0, &TKqlStreamLookupTable::Match, HNDL(BuildStreamLookupTableStages));
AddHandler(0, [](const TExprNode* node) { return TCoSort::Match(node) || TCoTopSort::Match(node); },
HNDL(RemoveRedundantSortByPk));
+ AddHandler(0, &TDqStage::Match, HNDL(RemoveRedundantSortByPkOverSource));
AddHandler(0, &TCoTake::Match, HNDL(ApplyLimitToReadTable));
AddHandler(0, &TCoFlatMap::Match, HNDL(PushOlapFilter));
AddHandler(0, &TCoAggregateCombine::Match, HNDL(PushAggregateCombineToStage));
@@ -104,6 +105,8 @@ public:
AddHandler(1, &TCoAsList::Match, HNDL(PropagatePrecomuteScalarRowset<true>));
AddHandler(1, &TCoTake::Match, HNDL(PropagatePrecomuteTake<true>));
AddHandler(1, &TCoFlatMap::Match, HNDL(PropagatePrecomuteFlatmap<true>));
+
+ AddHandler(2, &TDqStage::Match, HNDL(ExpandNullMembersForReadTableSource));
#undef HNDL
SetGlobal(1u);
@@ -135,12 +138,24 @@ protected:
return output;
}
+ TMaybeNode<TExprBase> RemoveRedundantSortByPkOverSource(TExprBase node, TExprContext& ctx) {
+ TExprBase output = KqpRemoveRedundantSortByPkOverSource(node, ctx, KqpCtx);
+ DumpAppliedRule("RemoveRedundantSortByPkOverSource", node.Ptr(), output.Ptr(), ctx);
+ return output;
+ }
+
TMaybeNode<TExprBase> RemoveRedundantSortByPk(TExprBase node, TExprContext& ctx) {
TExprBase output = KqpRemoveRedundantSortByPk(node, ctx, KqpCtx);
DumpAppliedRule("RemoveRedundantSortByPk", node.Ptr(), output.Ptr(), ctx);
return output;
}
+ TMaybeNode<TExprBase> ExpandNullMembersForReadTableSource(TExprBase node, TExprContext& ctx) {
+ TExprBase output = ExpandSkipNullMembersForReadTableSource(node, ctx, KqpCtx);
+ DumpAppliedRule("ExpandSkipNullMembersForReadTableSource", node.Ptr(), output.Ptr(), ctx);
+ return output;
+ }
+
TMaybeNode<TExprBase> ApplyLimitToReadTableSource(TExprBase node, TExprContext& ctx) {
TExprBase output = KqpApplyLimitToReadTableSource(node, ctx, KqpCtx);
DumpAppliedRule("ApplyLimitToReadTableSource", node.Ptr(), output.Ptr(), ctx);
@@ -321,7 +336,7 @@ protected:
TMaybeNode<TExprBase> BuildJoin(TExprBase node, TExprContext& ctx,
IOptimizationContext& optCtx, const TGetParents& getParents)
{
- TExprBase output = DqBuildJoin(node, ctx, optCtx, *getParents(), IsGlobal, /*pushLeftStage =*/ !KqpCtx.IsDataQuery());
+ TExprBase output = DqBuildJoin(node, ctx, optCtx, *getParents(), IsGlobal, /*pushLeftStage =*/ !KqpCtx.IsDataQuery() && AllowFuseJoinInputs(node));
DumpAppliedRule("BuildJoin", node.Ptr(), output.Ptr(), ctx);
return output;
}
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp
index 918a2600bf..193ed8d04b 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp
@@ -54,6 +54,72 @@ TMaybeNode<TDqPhyPrecompute> BuildLookupKeysPrecompute(const TExprBase& input, T
.Done();
}
+// ReadRangesSource can't deal with skipnullkeys, so we should expand it to (ExtractMembers (SkipNullKeys))
+//FIXME: simplify KIKIMR-16987
+NYql::NNodes::TExprBase ExpandSkipNullMembersForReadTableSource(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx, const TKqpOptimizeContext&) {
+ auto stage = node.Cast<TDqStage>();
+ TMaybe<size_t> tableSourceIndex;
+ for (size_t i = 0; i < stage.Inputs().Size(); ++i) {
+ auto input = stage.Inputs().Item(i);
+ if (input.Maybe<TDqSource>() && input.Cast<TDqSource>().Settings().Maybe<TKqpReadRangesSourceSettings>()) {
+ tableSourceIndex = i;
+ }
+ }
+ if (!tableSourceIndex) {
+ return node;
+ }
+
+ auto source = stage.Inputs().Item(*tableSourceIndex).Cast<TDqSource>();
+ auto readRangesSource = source.Settings().Cast<TKqpReadRangesSourceSettings>();
+ auto settings = TKqpReadTableSettings::Parse(readRangesSource.Settings());
+
+ if (settings.SkipNullKeys.empty()) {
+ return node;
+ }
+
+ auto sourceArg = stage.Program().Args().Arg(*tableSourceIndex);
+
+ THashSet<TString> seenColumns;
+ TVector<TCoAtom> columns;
+ TVector<TCoAtom> skipNullColumns;
+ for (size_t i = 0; i < readRangesSource.Columns().Size(); ++i) {
+ auto atom = readRangesSource.Columns().Item(i);
+ auto column = atom.StringValue();
+ if (seenColumns.insert(column).second) {
+ columns.push_back(atom);
+ }
+ }
+ for (auto& column : settings.SkipNullKeys) {
+ TCoAtom atom(ctx.NewAtom(readRangesSource.Settings().Pos(), column));
+ skipNullColumns.push_back(atom);
+ if (seenColumns.insert(column).second) {
+ columns.push_back(atom);
+ }
+ }
+
+ settings.SkipNullKeys.clear();
+ auto newSettings = Build<TKqpReadRangesSourceSettings>(ctx, source.Pos())
+ .Table(readRangesSource.Table())
+ .Columns().Add(columns).Build()
+ .Settings(settings.BuildNode(ctx, source.Settings().Pos()))
+ .RangesExpr(readRangesSource.RangesExpr())
+ .ExplainPrompt(readRangesSource.ExplainPrompt())
+ .Done();
+ TDqStage replacedSettings = ReplaceTableSourceSettings(stage, *tableSourceIndex, newSettings, ctx);
+
+ TCoArgument replaceArg{ctx.NewArgument(sourceArg.Pos(), TStringBuilder() << "_kqp_source_arg_0")};
+ auto replaceExpr =
+ Build<TCoExtractMembers>(ctx, node.Pos())
+ .Members(readRangesSource.Columns())
+ .Input<TCoSkipNullMembers>()
+ .Input(replaceArg)
+ .Members().Add(skipNullColumns).Build()
+ .Build()
+ .Done();
+
+ return ReplaceStageArg(replacedSettings, *tableSourceIndex, replaceArg, replaceExpr, ctx);
+}
+
TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx) {
if (!node.Maybe<TKqlReadTable>()) {
return node;
@@ -63,7 +129,9 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp
bool useSource = kqpCtx.Config->EnableKqpScanQuerySourceRead && kqpCtx.IsScanQuery();
useSource = useSource || (kqpCtx.Config->EnableKqpDataQuerySourceRead && kqpCtx.IsDataQuery());
- useSource = useSource && tableDesc.Metadata->Kind != EKikimrTableKind::SysView;
+ useSource = useSource &&
+ tableDesc.Metadata->Kind != EKikimrTableKind::SysView &&
+ tableDesc.Metadata->Kind != EKikimrTableKind::Olap;
TVector<TExprBase> values;
TNodeOnNodeOwnedMap replaceMap;
@@ -215,6 +283,7 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp
.Done();
}
+
TExprBase KqpBuildReadTableRangesStage(TExprBase node, TExprContext& ctx,
const TKqpOptimizeContext& kqpCtx, const TParentsMap& parents)
{
@@ -228,7 +297,9 @@ TExprBase KqpBuildReadTableRangesStage(TExprBase node, TExprContext& ctx,
bool useSource = kqpCtx.Config->EnableKqpScanQuerySourceRead && kqpCtx.IsScanQuery();
useSource = useSource || (kqpCtx.Config->EnableKqpDataQuerySourceRead && kqpCtx.IsDataQuery());
- useSource = useSource && tableDesc.Metadata->Kind != EKikimrTableKind::SysView;
+ useSource = useSource &&
+ tableDesc.Metadata->Kind != EKikimrTableKind::SysView &&
+ tableDesc.Metadata->Kind != EKikimrTableKind::Olap;
bool fullScan = TCoVoid::Match(ranges.Raw());
@@ -257,7 +328,12 @@ TExprBase KqpBuildReadTableRangesStage(TExprBase node, TExprContext& ctx,
.Build()
.Done();
} else {
- auto connections = FindDqConnections(node);
+ TVector<TDqConnection> connections;
+ bool isPure;
+ FindDqConnections(node, connections, isPure);
+ if (!isPure) {
+ return node;
+ }
YQL_ENSURE(!connections.empty());
TVector<TDqConnection> inputs;
TVector<TExprBase> stageInputs;
@@ -270,8 +346,8 @@ TExprBase KqpBuildReadTableRangesStage(TExprBase node, TExprContext& ctx,
return node;
}
- if (!IsSingleConsumerConnection(input, parents, false)) {
- continue;
+ if (!IsSingleConsumerConnection(input, parents, true)) {
+ return node;
}
inputs.push_back(input);
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_helpers.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_helpers.cpp
index bdb7029c64..61eafa6e48 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_helpers.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_helpers.cpp
@@ -84,4 +84,87 @@ TCoAtomList BuildColumnsList(const TVector<TString>& columns, TPositionHandle po
return BuildColumnsListImpl(columns, pos, ctx);
}
+bool AllowFuseJoinInputs(TExprBase node) {
+ if (!node.Maybe<TDqJoin>()) {
+ return false;
+ }
+ auto join = node.Cast<TDqJoin>();
+ for (auto& input : {join.LeftInput(), join.RightInput()}) {
+ if (auto conn = input.Maybe<TDqConnection>()) {
+ auto stage = conn.Cast().Output().Stage();
+ for (size_t i = 0; i < stage.Inputs().Size(); ++i) {
+ auto input = stage.Inputs().Item(i);
+ if (input.Maybe<TDqSource>() && input.Cast<TDqSource>().Settings().Maybe<TKqpReadRangesSourceSettings>()) {
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+}
+
+NYql::NNodes::TDqStage ReplaceStageArg(NYql::NNodes::TDqStage stage, size_t inputIndex,
+ NYql::NNodes::TCoArgument replaceArg, NYql::NNodes::TExprBase bodyExpression, NYql::TExprContext& ctx)
+{
+ auto sourceArg = stage.Program().Args().Arg(inputIndex);
+
+ size_t index = 0;
+ TVector<TCoArgument> args;
+ NYql::TNodeOnNodeOwnedMap bodyReplaces;
+ for (auto arg : stage.Program().Args()) {
+ if (arg.Raw() == sourceArg.Raw()) {
+ args.push_back(replaceArg);
+ } else {
+ TCoArgument replaceArg{ctx.NewArgument(sourceArg.Pos(), TStringBuilder() << "_kqp_source_arg_" << index)};
+ args.push_back(replaceArg);
+ bodyReplaces[arg.Raw()] = replaceArg.Ptr();
+ }
+ index += 1;
+ }
+
+ bodyReplaces[sourceArg.Raw()] = bodyExpression.Ptr();
+
+ return Build<TDqStage>(ctx, stage.Pos())
+ .Settings(stage.Settings())
+ .Inputs(stage.Inputs())
+ .Outputs(stage.Outputs())
+ .Program<TCoLambda>()
+ .Args(args)
+ .Body(TExprBase(ctx.ReplaceNodes(stage.Program().Body().Ptr(), bodyReplaces)))
+ .Build()
+ .Done();
+}
+
+NYql::NNodes::TDqStage ReplaceTableSourceSettings(NYql::NNodes::TDqStage stage, size_t inputIndex,
+ NYql::NNodes::TKqpReadRangesSourceSettings settings, NYql::TExprContext& ctx)
+{
+ auto source = stage.Inputs().Item(inputIndex).Cast<TDqSource>();
+ auto readRangesSource = source.Settings().Cast<TKqpReadRangesSourceSettings>();
+ auto sourceArg = stage.Program().Args().Arg(inputIndex);
+
+ TVector<NYql::NNodes::TExprBase> inputs;
+ size_t index = 0;
+ for (auto input : stage.Inputs()) {
+ if (index == inputIndex) {
+ inputs.push_back(
+ Build<TDqSource>(ctx, input.Pos())
+ .DataSource<TCoDataSource>()
+ .Category<TCoAtom>().Value(KqpReadRangesSourceName).Build()
+ .Build()
+ .Settings(settings)
+ .Done());
+ } else {
+ inputs.push_back(input);
+ }
+ index += 1;
+ }
+
+ return Build<TDqStage>(ctx, stage.Pos())
+ .Settings(stage.Settings())
+ .Inputs().Add(inputs).Build()
+ .Outputs(stage.Outputs())
+ .Program(stage.Program())
+ .Done();
+}
+
} // namespace NKikimr::NKqp::NOpt
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_impl.h b/ydb/core/kqp/opt/physical/kqp_opt_phy_impl.h
index fbab107c0d..87fe737722 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_impl.h
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_impl.h
@@ -22,6 +22,12 @@ NYql::NNodes::TCoAtomList BuildColumnsList(const THashSet<TStringBuf>& columns,
NYql::NNodes::TCoAtomList BuildColumnsList(const TVector<TString>& columns, NYql::TPositionHandle pos,
NYql::TExprContext& ctx);
+NYql::NNodes::TDqStage ReplaceStageArg(NYql::NNodes::TDqStage stage, size_t inputIndex,
+ NYql::NNodes::TCoArgument replaceArg, NYql::NNodes::TExprBase bodyExpression, NYql::TExprContext& ctx);
+
+NYql::NNodes::TDqStage ReplaceTableSourceSettings(NYql::NNodes::TDqStage stage, size_t inputIndex,
+ NYql::NNodes::TKqpReadRangesSourceSettings settings, NYql::TExprContext& ctx);
+
} // NKikimr::NKqp::NOpt
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp
index 27c523117d..a32ef61a33 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp
@@ -8,7 +8,30 @@ namespace NKikimr::NKqp::NOpt {
using namespace NYql;
using namespace NYql::NNodes;
-TExprBase KqpApplyLimitToReadTableSource(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx) {
+THashSet<const TExprNode*> CollectConnections(TDqStage stage, TExprBase node) {
+ THashSet<const TExprNode*> args;
+ for (auto&& arg : stage.Program().Args()) {
+ args.insert(arg.Raw());
+ }
+
+ THashSet<const TExprNode*> result;
+ TNodeOnNodeOwnedMap replaceMap;
+ VisitExpr(node.Ptr(),
+ [&](const TExprNode::TPtr& exprPtr) -> bool {
+ TExprBase expr(exprPtr);
+ if (expr.Maybe<TDqConnection>()) {
+ return false;
+ }
+ if (args.contains(exprPtr.Get())) {
+ result.insert(exprPtr.Get());
+ }
+ return true;
+ });
+ return result;
+}
+
+//FIXME: simplify KIKIMR-16987
+TExprBase KqpApplyLimitToReadTableSource(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext&) {
auto stage = node.Cast<TDqStage>();
TMaybe<size_t> tableSourceIndex;
for (size_t i = 0; i < stage.Inputs().Size(); ++i) {
@@ -25,19 +48,10 @@ TExprBase KqpApplyLimitToReadTableSource(TExprBase node, TExprContext& ctx, cons
auto readRangesSource = source.Settings().Cast<TKqpReadRangesSourceSettings>();
auto settings = TKqpReadTableSettings::Parse(readRangesSource.Settings());
- if (kqpCtx.IsScanQuery()) {
- auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, readRangesSource.Table().Path());
-
- if (tableDesc.Metadata->Kind != EKikimrTableKind::Olap) {
- return node;
- }
- }
-
if (settings.ItemsLimit) {
return node; // already set?
}
- NYql::TNodeOnNodeOwnedMap replaces;
auto sourceArg = stage.Program().Args().Arg(*tableSourceIndex);
TExprNode::TPtr foundTake;
bool singleConsumer = true;
@@ -100,15 +114,57 @@ TExprBase KqpApplyLimitToReadTableSource(TExprBase node, TExprContext& ctx, cons
if (limitValue.Maybe<TCoUint64>()) {
settings.SetItemsLimit(limitValue.Cast().Ptr());
} else {
+ if (auto args = CollectConnections(stage, limitValue.Cast())) {
+ TVector<TCoArgument> stageArgs;
+ TVector<TExprBase> inputs;
+ TNodeOnNodeOwnedMap replaces;
+
+ size_t index = 0;
+ for (auto&& arg : stage.Program().Args()) {
+ if (args.contains(arg.Raw())) {
+ TCoArgument replace{ctx.NewArgument(node.Pos(), TStringBuilder() << "_kqp_pc_arg_" << index)};
+ inputs.push_back(stage.Inputs().Item(index));
+ stageArgs.push_back(replace);
+ replaces[arg.Raw()] = replace.Ptr();
+ }
+ index += 1;
+ }
+
+ limitValue = Build<TDqCnValue>(ctx, node.Pos())
+ .Output()
+ .Stage<TDqStage>()
+ .Settings().Build()
+ .Inputs().Add(inputs).Build()
+ .Program<TCoLambda>()
+ .Args(stageArgs)
+ .Body<TCoToStream>()
+ .Input<TCoJust>()
+ .Input(ctx.ReplaceNodes(limitValue.Cast().Ptr(), replaces))
+ .Build()
+ .Build()
+ .Build()
+ .Build()
+ .Index().Build("0")
+ .Build()
+ .Done();
+ }
+
settings.SetItemsLimit(Build<TDqPrecompute>(ctx, node.Pos())
.Input(limitValue.Cast())
.Done().Ptr());
}
- replaces[readRangesSource.Settings().Raw()] = settings.BuildNode(ctx, source.Pos()).Ptr();
-
- return TExprBase(ctx.ReplaceNodes(node.Ptr(), replaces));
-}
+ auto newSettings = Build<TKqpReadRangesSourceSettings>(ctx, source.Pos())
+ .Table(readRangesSource.Table())
+ .Columns(readRangesSource.Columns())
+ .Settings(settings.BuildNode(ctx, source.Pos()))
+ .RangesExpr(readRangesSource.RangesExpr())
+ .ExplainPrompt(readRangesSource.ExplainPrompt())
+ .Done();
+
+ return ReplaceTableSourceSettings(stage, *tableSourceIndex, newSettings, ctx);
+}
+
TExprBase KqpApplyLimitToReadTable(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx) {
if (!node.Maybe<TCoTake>()) {
@@ -120,7 +176,7 @@ TExprBase KqpApplyLimitToReadTable(TExprBase node, TExprContext& ctx, const TKqp
auto input = maybeSkip ? maybeSkip.Cast().Input() : take.Input();
bool isReadTable = input.Maybe<TKqpReadTable>().IsValid();
- bool isReadTableRanges = input.Maybe<TKqlReadTableRangesBase>().IsValid();
+ bool isReadTableRanges = input.Maybe<TKqpReadTableRanges>().IsValid() || input.Maybe<TKqpReadOlapTableRanges>().IsValid() ;
if (!isReadTable && !isReadTableRanges) {
return node;
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp
index 08d99b41b7..6d79a76111 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp
@@ -7,6 +7,7 @@
#include <ydb/library/yql/core/yql_opt_utils.h>
#include <vector>
+#include <unordered_set>
namespace NKikimr::NKqp::NOpt {
@@ -15,6 +16,30 @@ using namespace NYql::NNodes;
namespace {
+static const std::unordered_set<std::string> SupportedAggFuncs = {
+ "count",
+ "count_all",
+ "sum",
+ "min",
+ "max",
+ "avg",
+ "some"
+};
+
+struct TAggInfo {
+ TAggInfo(const std::string& aggName, const std::string& colName, const std::string& opType, bool isOptional)
+ : AggName(aggName)
+ , ColName(colName)
+ , OpType(opType)
+ , IsOptional(isOptional)
+ {}
+
+ std::string AggName;
+ std::string ColName;
+ std::string OpType;
+ bool IsOptional;
+};
+
std::string GetColumnNameUnderAggregation(const TCoAggApply& aggApply, TExprContext& ctx) {
auto extractorBody = aggApply.Extractor().Body();
if (extractorBody.Maybe<TCoVoid>() && aggApply.Name() == "count_all") {
@@ -43,15 +68,134 @@ bool CanBePushedDown(const TExprBase& trait, TExprContext& ctx)
}
auto aggApply = trait.Cast<TCoAggApply>();
auto aggName = aggApply.Name();
- if (aggName == "count" || aggName == "count_all" || aggName == "sum"
- || aggName == "min" || aggName == "max")
- {
+ if (SupportedAggFuncs.find(aggName.StringValue()) != SupportedAggFuncs.end()) {
return true;
}
YQL_CLOG(DEBUG, ProviderKqp) << "Unsupported type of aggregation: " << aggName.StringValue();
return false;
}
+std::vector<TAggInfo> CollectAggInfos(const TCoAggregateTupleList& handlers, TExprContext& ctx) {
+ std::vector<TAggInfo> res;
+ for (auto handler : handlers) {
+ auto trait = handler.Trait();
+ if (!CanBePushedDown(trait, ctx)) {
+ res.clear();
+ return res;
+ }
+ auto aggApply = trait.Cast<TCoAggApply>();
+ auto aggName = GetAggregationName(handler.ColumnName(), ctx);
+ auto colName = GetColumnNameUnderAggregation(aggApply, ctx);
+ bool isOptional = aggApply.Ptr()->GetTypeAnn()->IsOptionalOrNull();
+ if (aggName.empty() || colName.empty()) {
+ res.clear();
+ return res;
+ }
+ auto aggOp = aggApply.Name().StringValue();
+ res.emplace_back(aggName, colName, aggOp, isOptional);
+ }
+ return res;
+}
+
+TExprBase GenerateResultTupleForAvg(const TAggInfo& aggInfo, const TExprBase& itemArg, const TPositionHandle& nodePos, TExprContext& ctx) {
+ // If SUM is not null, generate Just(convert(sum as double), count)
+ // If SUM is null, return null
+ auto sumMember = Build<TCoMember>(ctx, nodePos)
+ .Struct(itemArg)
+ .Name<TCoAtom>().Build(aggInfo.AggName + "_sum")
+ .Done();
+ auto cntMember = Build<TCoMember>(ctx, nodePos)
+ .Struct(itemArg)
+ .Name<TCoAtom>().Build(aggInfo.AggName + "_cnt")
+ .Done();
+
+ TMaybeNode<TExprBase> value;
+ if (aggInfo.IsOptional) {
+ value = Build<TCoIfPresent>(ctx, nodePos)
+ .Optional(sumMember)
+ .PresentHandler<TCoLambda>()
+ .Args({"sumAgg"})
+ .Body<TCoJust>()
+ .Input<TExprList>()
+ .Add<TCoConvert>()
+ .Input("sumAgg")
+ // For Decimal and Interval (currently unsupported in CS)
+ // need to change target type accoringly to aggregate.yql
+ .Type().Build("Double")
+ .Build()
+ .Add(cntMember)
+ .Build()
+ .Build()
+ .Build()
+ .MissingValue<TCoNull>()
+ .Build()
+ .Done();
+ } else {
+ value = Build<TExprList>(ctx, nodePos)
+ .Add<TCoConvert>()
+ .Input(sumMember)
+ // For Decimal and Interval (currently unsupported in CS)
+ // need to change target type accoringly to aggregate.yql
+ .Type().Build("Double")
+ .Build()
+ .Add(cntMember)
+ .Done();
+ }
+ return Build<TCoNameValueTuple>(ctx, nodePos)
+ .Name<TCoAtom>().Build(aggInfo.AggName)
+ .Value(value.Cast())
+ .Done();
+}
+
+TExprBase BuildAvgResultProcessing(const std::vector<TAggInfo>& aggInfos, const TCoAtomList& groupByKeys,
+ const TExprBase& input, const TPositionHandle& nodePos, TExprContext& ctx)
+{
+ const auto itemArg = Build<TCoArgument>(ctx, nodePos)
+ .Name("item")
+ .Done();
+ TVector<TExprBase> structMembers;
+ for (auto aggInfo : aggInfos) {
+ if (aggInfo.OpType == "avg") {
+ structMembers.emplace_back(
+ GenerateResultTupleForAvg(aggInfo, itemArg, nodePos, ctx)
+ );
+ } else {
+ structMembers.emplace_back(
+ Build<TCoNameValueTuple>(ctx, nodePos)
+ .Name<TCoAtom>().Build(aggInfo.AggName)
+ .Value<TCoMember>()
+ .Struct(itemArg)
+ .Name<TCoAtom>().Build(aggInfo.AggName)
+ .Build()
+ .Done()
+ );
+ }
+ }
+
+ // Add GROUP BY keys
+ for (auto key : groupByKeys) {
+ structMembers.emplace_back(
+ Build<TCoNameValueTuple>(ctx, nodePos)
+ .Name<TCoAtom>().Build(key)
+ .Value<TCoMember>()
+ .Struct(itemArg)
+ .Name<TCoAtom>().Build(key)
+ .Build()
+ .Done()
+ );
+ }
+
+ return Build<TCoMap>(ctx, nodePos)
+ .Input(input)
+ .Lambda()
+ .Args({itemArg})
+ .Body<TCoAsStruct>()
+ .Add(structMembers)
+ .Build()
+ .Build()
+ .Done();
+}
+
} // anonymous namespace end
TExprBase KqpPushOlapAggregate(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx)
@@ -85,29 +229,40 @@ TExprBase KqpPushOlapAggregate(TExprBase node, TExprContext& ctx, const TKqpOpti
auto read = maybeRead.Cast();
auto aggs = Build<TKqpOlapAggOperationList>(ctx, node.Pos());
- // TODO: TMaybeNode<TKqpOlapAggOperation>;
- for (auto handler: aggCombine.Handlers()) {
- auto trait = handler.Trait();
- if (!CanBePushedDown(trait, ctx)) {
- return node;
- }
- auto aggApply = trait.Cast<TCoAggApply>();
- auto aggName = GetAggregationName(handler.ColumnName(), ctx);
- auto colName = GetColumnNameUnderAggregation(aggApply, ctx);
- if (aggName.empty() || colName.empty()) {
- return node;
- }
- auto aggOp = aggApply.Name();
- if (aggOp == "count_all") {
- aggOp = TCoAtom(ctx.NewAtom(node.Pos(), "count"));
+
+ auto aggInfos = CollectAggInfos(aggCombine.Handlers(), ctx);
+ if (aggInfos.empty()) {
+ return node;
+ }
+
+ bool hasAvgAgg = false;
+ for (auto aggInfo : aggInfos) {
+ if (aggInfo.OpType == "count_all") {
+ aggInfo.OpType = TCoAtom(ctx.NewAtom(node.Pos(), "count"));
}
- aggs.Add<TKqpOlapAggOperation>()
- .Name().Build(aggName)
- .Type().Build(aggOp)
- .Column().Build(colName)
- .Build()
- .Done();
+ if (aggInfo.OpType == "avg") {
+ aggs.Add<TKqpOlapAggOperation>()
+ .Name().Build(aggInfo.AggName + "_sum")
+ .Type().Build("sum")
+ .Column().Build(aggInfo.ColName)
+ .Build()
+ .Done();
+ aggs.Add<TKqpOlapAggOperation>()
+ .Name().Build(aggInfo.AggName + "_cnt")
+ .Type().Build("count")
+ .Column().Build(aggInfo.ColName)
+ .Build()
+ .Done();
+ hasAvgAgg = true;
+ } else {
+ aggs.Add<TKqpOlapAggOperation>()
+ .Name().Build(aggInfo.AggName)
+ .Type().Build(aggInfo.OpType)
+ .Column().Build(aggInfo.ColName)
+ .Build()
+ .Done();
+ }
}
auto olapAgg = Build<TKqpOlapAgg>(ctx, node.Pos())
@@ -137,6 +292,10 @@ TExprBase KqpPushOlapAggregate(TExprBase node, TExprContext& ctx, const TKqpOpti
.Process(newProcessLambda)
.Done();
+ if (hasAvgAgg) {
+ return BuildAvgResultProcessing(aggInfos, aggCombine.Keys(), newRead, node.Pos(), ctx);
+ }
+
return newRead;
}
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp
index c28405ed7d..43f885a21e 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp
@@ -50,40 +50,28 @@ bool ValidateIfArgument(const TCoOptionalIf& optionalIf, const TExprNode* rawLam
return true;
}
- // Ok, maybe it is SELECT `field` ?
+ // Ok, maybe it is SELECT `field1`, `field2` ?
auto maybeAsStruct = optionalIf.Value().Maybe<TCoAsStruct>();
-
if (!maybeAsStruct) {
return false;
}
- auto asStruct = maybeAsStruct.Cast();
-
- // SELECT `field` has only one item
- if (asStruct.ArgCount() > 1) {
- return false;
- } else if (asStruct.ArgCount() == 0) {
- // In case of COUNT(*) we use empty AsStruct
- return true;
- }
-
- // Check that second tuple element is Member(lambda arg)
- auto tuple = asStruct.Arg(0).Maybe<TExprList>().Cast();
-
- if (tuple.Size() != 2) {
- return false;
- }
-
- auto maybeMember = tuple.Item(1).Maybe<TCoMember>();
-
- if (!maybeMember) {
- return false;
- }
+ for (auto arg : maybeAsStruct.Cast()) {
+ // Check that second tuple element is Member(lambda arg)
+ auto tuple = arg.Maybe<TExprList>().Cast();
+ if (tuple.Size() != 2) {
+ return false;
+ }
- auto member = maybeMember.Cast();
+ auto maybeMember = tuple.Item(1).Maybe<TCoMember>();
+ if (!maybeMember) {
+ return false;
+ }
- if (member.Struct().Raw() != rawLambdaArg) {
- return false;
+ auto member = maybeMember.Cast();
+ if (member.Struct().Raw() != rawLambdaArg) {
+ return false;
+ }
}
return true;
@@ -655,17 +643,20 @@ TMaybeNode<TExprBase> PredicatePushdown(const TExprBase& predicate, TExprContext
const TExprNode* lambdaArg, const TExprBase& input)
{
auto maybeCoalesce = predicate.Maybe<TCoCoalesce>();
-
if (maybeCoalesce.IsValid()) {
return CoalescePushdown(maybeCoalesce.Cast(), ctx, pos, lambdaArg, input);
}
auto maybeExists = predicate.Maybe<TCoExists>();
-
if (maybeExists.IsValid()) {
return ExistsPushdown(maybeExists.Cast(), ctx, pos, lambdaArg);
}
+ auto maybePredicate = predicate.Maybe<TCoCompare>();
+ if (maybePredicate.IsValid()) {
+ return SimplePredicatePushdown(maybePredicate.Cast(), ctx, pos, lambdaArg, input);
+ }
+
if (predicate.Maybe<TCoNot>()) {
auto notNode = predicate.Cast<TCoNot>();
auto pushedNot = PredicatePushdown(notNode.Value(), ctx, pos, lambdaArg, input);
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_rules.h b/ydb/core/kqp/opt/physical/kqp_opt_phy_rules.h
index 4e0a239bd2..512251ddd9 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_rules.h
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_rules.h
@@ -24,11 +24,16 @@ NYql::NNodes::TExprBase KqpBuildStreamLookupTableStages(NYql::NNodes::TExprBase
NYql::NNodes::TExprBase KqpRemoveRedundantSortByPk(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx,
const TKqpOptimizeContext& kqpCtx);
+NYql::NNodes::TExprBase KqpRemoveRedundantSortByPkOverSource(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx,
+ const TKqpOptimizeContext& kqpCtx);
+
NYql::NNodes::TExprBase KqpApplyLimitToReadTableSource(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx, const TKqpOptimizeContext& kqpCtx);
NYql::NNodes::TExprBase KqpApplyLimitToReadTable(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx,
const TKqpOptimizeContext& kqpCtx);
+NYql::NNodes::TExprBase ExpandSkipNullMembersForReadTableSource(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx, const TKqpOptimizeContext& kqpCtx);
+
NYql::NNodes::TExprBase KqpPushOlapFilter(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx,
const TKqpOptimizeContext& kqpCtx, NYql::TTypeAnnotationContext& typesCtx);
@@ -43,4 +48,6 @@ NYql::NNodes::TExprBase KqpFloatUpStage(NYql::NNodes::TExprBase node, NYql::TExp
NYql::NNodes::TExprBase KqpPropagatePrecomuteScalarRowset(NYql::NNodes::TExprBase node, NYql::TExprContext& ctx,
NYql::IOptimizationContext& optCtx, const NYql::TParentsMap& parentsMap, bool allowStageMultiUsage);
+bool AllowFuseJoinInputs(NYql::NNodes::TExprBase node);
+
} // NKikimr::NKqp::NOpt
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_sort.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_sort.cpp
index 17fa9d1813..4b09bf0655 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_sort.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_sort.cpp
@@ -13,7 +13,17 @@ using namespace NYql::NNodes;
// Temporary solution, should be replaced with constraints
// copy-past from old engine algo: https://a.yandex-team.ru/arc_vcs/yql/providers/kikimr/yql_kikimr_opt.cpp?rev=e592a5a9509952f1c29f1ec02343dd4c05fe426d#L122
-TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx) {
+
+using TTableData = std::pair<const NYql::TKikimrTableDescription*, NYql::TKqpReadTableSettings>;
+
+TExprBase KqpRemoveRedundantSortByPkBase(
+ TExprBase node,
+ TExprContext& ctx,
+ const TKqpOptimizeContext& kqpCtx,
+ std::function<TMaybe<TTableData>(TExprBase)> tableAccessor,
+ std::function<TExprBase(TExprBase, NYql::TKqpReadTableSettings)> rebuildInput,
+ bool allowSortForAllTables = false)
+{
auto maybeSort = node.Maybe<TCoSort>();
auto maybeTopSort = node.Maybe<TCoTopSort>();
@@ -38,13 +48,6 @@ TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TK
input = flatmap.Input();
}
- bool isReadTable = input.Maybe<TKqpReadTable>().IsValid();
- bool isReadTableRanges = input.Maybe<TKqlReadTableRangesBase>().IsValid();
-
- if (!isReadTable && !isReadTableRanges) {
- return node;
- }
-
enum : ui32 {
SortDirectionNone = 0,
SortDirectionForward = 1,
@@ -80,7 +83,12 @@ TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TK
}
}
- auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, GetReadTablePath(input, isReadTableRanges));
+ auto tableData = tableAccessor(input);
+ if (!tableData) {
+ return node;
+ }
+ auto& tableDesc = *tableData->first;
+ auto settings = tableData->second;
auto checkKey = [keySelector, &tableDesc, &passthroughFields] (TExprBase key, ui32 index) {
if (!key.Maybe<TCoMember>()) {
@@ -121,12 +129,10 @@ TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TK
bool olapTable = tableDesc.Metadata->Kind == EKikimrTableKind::Olap;
if (direction == SortDirectionReverse) {
- if (!olapTable && kqpCtx.IsScanQuery()) {
+ if (!allowSortForAllTables && !olapTable && kqpCtx.IsScanQuery()) {
return node;
}
- auto settings = GetReadTableSettings(input, isReadTableRanges);
-
if (settings.Reverse) {
return node;
}
@@ -134,12 +140,11 @@ TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TK
settings.SetReverse();
settings.SetSorted();
- input = BuildReadNode(input.Pos(), ctx, input, settings);
+ input = rebuildInput(input, settings);
} else if (direction == SortDirectionForward) {
- if (olapTable) {
- auto settings = GetReadTableSettings(input, isReadTableRanges);
+ if (olapTable || allowSortForAllTables) {
settings.SetSorted();
- input = BuildReadNode(input.Pos(), ctx, input, settings);
+ input = rebuildInput(input, settings);
}
}
@@ -160,5 +165,103 @@ TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TK
}
}
+TExprBase KqpRemoveRedundantSortByPk(TExprBase node, TExprContext& ctx, const TKqpOptimizeContext& kqpCtx) {
+ return KqpRemoveRedundantSortByPkBase(node, ctx, kqpCtx,
+ [&](TExprBase input) -> TMaybe<TTableData> {
+ bool isReadTable = input.Maybe<TKqpReadTable>().IsValid();
+ bool isReadTableRanges = input.Maybe<TKqpReadTableRanges>().IsValid() || input.Maybe<TKqpReadOlapTableRanges>().IsValid() ;
+ if (!isReadTable && !isReadTableRanges) {
+ return Nothing();
+ }
+ auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, GetReadTablePath(input, isReadTableRanges));
+ auto settings = GetReadTableSettings(input, isReadTableRanges);
+ return TTableData{&tableDesc, settings};
+ },
+ [&](TExprBase input, NYql::TKqpReadTableSettings settings) {
+ return BuildReadNode(input.Pos(), ctx, input, settings);
+ });
+}
+
+//FIXME: simplify KIKIMR-16987
+NYql::NNodes::TExprBase KqpRemoveRedundantSortByPkOverSource(
+ NYql::NNodes::TExprBase node, NYql::TExprContext& exprCtx, const TKqpOptimizeContext& kqpCtx)
+{
+ auto stage = node.Cast<TDqStage>();
+ TMaybe<size_t> tableSourceIndex;
+ for (size_t i = 0; i < stage.Inputs().Size(); ++i) {
+ auto input = stage.Inputs().Item(i);
+ if (input.Maybe<TDqSource>() && input.Cast<TDqSource>().Settings().Maybe<TKqpReadRangesSourceSettings>()) {
+ tableSourceIndex = i;
+ }
+ }
+ if (!tableSourceIndex) {
+ return node;
+ }
+
+ auto source = stage.Inputs().Item(*tableSourceIndex).Cast<TDqSource>();
+ auto readRangesSource = source.Settings().Cast<TKqpReadRangesSourceSettings>();
+ auto settings = TKqpReadTableSettings::Parse(readRangesSource.Settings());
+
+ auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, readRangesSource.Table().Path());
+
+ TVector<NYql::TKqpReadTableSettings> newSettings;
+ NYql::TNodeOnNodeOwnedMap bodyReplaces;
+ VisitExpr(stage.Program().Body().Ptr(),
+ [&](const TExprNode::TPtr& exprPtr) -> bool {
+ TExprBase expr(exprPtr);
+ if (expr.Maybe<TDqConnection>() || expr.Maybe<TDqPrecompute>() || expr.Maybe<TDqPhyPrecompute>()) {
+ return false;
+ }
+ if (TCoSort::Match(expr.Raw()) || TCoTopSort::Match(expr.Raw())) {
+ auto newExpr = KqpRemoveRedundantSortByPkBase(expr, exprCtx, kqpCtx,
+ [&](TExprBase node) -> TMaybe<TTableData> {
+ if (node.Ptr() != node.Ptr()) {
+ return Nothing();
+ }
+ return TTableData{&tableDesc, settings};
+ },
+ [&](TExprBase input, NYql::TKqpReadTableSettings settings) {
+ newSettings.push_back(settings);
+ return input;
+ },
+ /* allowSortForAllTables */ true);
+ if (newExpr.Ptr() != expr.Ptr()) {
+ bodyReplaces[expr.Raw()] = newExpr.Ptr();
+ }
+ }
+ return true;
+ });
+
+ if (newSettings) {
+ for (size_t i = 1; i < newSettings.size(); ++i) {
+ if (newSettings[0] != newSettings[i]) {
+ return node;
+ }
+ }
+
+ if (settings != newSettings[0]) {
+ auto newSource = Build<TKqpReadRangesSourceSettings>(exprCtx, source.Pos())
+ .Table(readRangesSource.Table())
+ .Columns(readRangesSource.Columns())
+ .Settings(newSettings[0].BuildNode(exprCtx, source.Settings().Pos()))
+ .RangesExpr(readRangesSource.RangesExpr())
+ .ExplainPrompt(readRangesSource.ExplainPrompt())
+ .Done();
+ stage = ReplaceTableSourceSettings(stage, *tableSourceIndex, newSource, exprCtx);
+ }
+ }
+
+ if (bodyReplaces.empty()) {
+ return stage;
+ }
+
+ return Build<TDqStage>(exprCtx, stage.Pos())
+ .Inputs(stage.Inputs())
+ .Outputs(stage.Outputs())
+ .Settings(stage.Settings())
+ .Program(TCoLambda(exprCtx.ReplaceNodes(stage.Program().Ptr(), bodyReplaces)))
+ .Done();
+}
+
} // namespace NKikimr::NKqp::NOpt
diff --git a/ydb/core/kqp/provider/yql_kikimr_datasource.cpp b/ydb/core/kqp/provider/yql_kikimr_datasource.cpp
index a7fa7d44dc..2cb1b0e38c 100644
--- a/ydb/core/kqp/provider/yql_kikimr_datasource.cpp
+++ b/ydb/core/kqp/provider/yql_kikimr_datasource.cpp
@@ -341,8 +341,9 @@ public:
token = credential->Content;
}
+ TIntrusiveConstPtr<NACLib::TUserToken> tokenPtr = new NACLib::TUserToken(token);
if (!token.empty()) {
- Gateway->SetToken(cluster, token);
+ Gateway->SetToken(cluster, tokenPtr);
}
}
diff --git a/ydb/core/kqp/provider/yql_kikimr_exec.cpp b/ydb/core/kqp/provider/yql_kikimr_exec.cpp
index c2d37a9412..60e158cbcb 100644
--- a/ydb/core/kqp/provider/yql_kikimr_exec.cpp
+++ b/ydb/core/kqp/provider/yql_kikimr_exec.cpp
@@ -975,16 +975,17 @@ public:
return SyncError();
}
} else if (name == "initial_scan") {
- // TODO: handle initial_scan setting
- ctx.AddError(TIssue(ctx.GetPosition(setting.Name().Pos()),
- TStringBuilder() << name << " setting is not supported yet"));
- return SyncError();
+ auto value = TString(
+ setting.Value().Cast<TCoDataCtor>().Literal().Cast<TCoAtom>().Value()
+ );
+
+ add_changefeed->set_initial_scan(FromString<bool>(to_lower(value)));
} else if (name == "virtual_timestamps") {
- auto vt = TString(
+ auto value = TString(
setting.Value().Cast<TCoDataCtor>().Literal().Cast<TCoAtom>().Value()
);
- add_changefeed->set_virtual_timestamps(FromString<bool>(to_lower(vt)));
+ add_changefeed->set_virtual_timestamps(FromString<bool>(to_lower(value)));
} else if (name == "retention_period") {
YQL_ENSURE(setting.Value().Maybe<TCoInterval>());
const auto value = FromString<i64>(
diff --git a/ydb/core/kqp/provider/yql_kikimr_gateway.h b/ydb/core/kqp/provider/yql_kikimr_gateway.h
index 35010a5a51..c8bea55906 100644
--- a/ydb/core/kqp/provider/yql_kikimr_gateway.h
+++ b/ydb/core/kqp/provider/yql_kikimr_gateway.h
@@ -598,7 +598,7 @@ public:
public:
virtual NThreading::TFuture<TTableMetadataResult> LoadTableMetadata(
const TString& cluster, const TString& table, const TLoadTableMetadataSettings& settings, const TString& database,
- const TMaybe<NACLib::TUserToken>& userToken) = 0;
+ const TIntrusiveConstPtr<NACLib::TUserToken>& userToken) = 0;
virtual TVector<TString> GetCollectedSchemeData() = 0;
@@ -611,7 +611,7 @@ public:
virtual TString GetDefaultCluster() = 0;
virtual TMaybe<TString> GetSetting(const TString& cluster, const TString& name) = 0;
- virtual void SetToken(const TString& cluster, const TString& token) = 0;
+ virtual void SetToken(const TString& cluster, const TIntrusiveConstPtr<NACLib::TUserToken>& token) = 0;
virtual NThreading::TFuture<TListPathResult> ListPath(const TString& cluster, const TString& path) = 0;
diff --git a/ydb/core/kqp/provider/yql_kikimr_settings.cpp b/ydb/core/kqp/provider/yql_kikimr_settings.cpp
index ba0d542024..4bf25f7e7b 100644
--- a/ydb/core/kqp/provider/yql_kikimr_settings.cpp
+++ b/ydb/core/kqp/provider/yql_kikimr_settings.cpp
@@ -42,6 +42,8 @@ TKikimrConfiguration::TKikimrConfiguration() {
REGISTER_SETTING(*this, _KqpEnableSpilling);
REGISTER_SETTING(*this, _KqpDisableLlvmForUdfStages);
+ REGISTER_SETTING(*this, KqpPushOlapProcess);
+
/* Compile time */
REGISTER_SETTING(*this, _CommitPerShardKeysSizeLimitBytes);
REGISTER_SETTING(*this, _DefaultCluster);
diff --git a/ydb/core/kqp/provider/yql_kikimr_settings.h b/ydb/core/kqp/provider/yql_kikimr_settings.h
index e3d77b239b..4168a1e664 100644
--- a/ydb/core/kqp/provider/yql_kikimr_settings.h
+++ b/ydb/core/kqp/provider/yql_kikimr_settings.h
@@ -31,6 +31,9 @@ struct TKikimrSettings {
NCommon::TConfSetting<bool, false> _KqpEnableSpilling;
NCommon::TConfSetting<bool, false> _KqpDisableLlvmForUdfStages;
+ /* No op just to avoid errors in Cloud Logging until they remove this from their queries */
+ NCommon::TConfSetting<bool, false> KqpPushOlapProcess;
+
/* Compile time */
NCommon::TConfSetting<ui64, false> _CommitPerShardKeysSizeLimitBytes;
NCommon::TConfSetting<TString, false> _DefaultCluster;
@@ -128,6 +131,11 @@ struct TKikimrConfiguration : public TKikimrSettings, public NCommon::TSettingDi
bool EnableKqpScanQuerySourceRead = false;
bool EnableKqpDataQuerySourceRead = false;
+ bool EnableKqpScanQueryStreamLookup = false;
+ bool EnableKqpDataQueryStreamLookup = false;
+ bool EnableKqpScanQueryStreamIdxLookupJoin = false;
+ bool EnablePredicateExtractForScanQuery = true;
+ bool EnablePredicateExtractForDataQuery = false;
};
}
diff --git a/ydb/core/kqp/provider/yql_kikimr_type_ann.cpp b/ydb/core/kqp/provider/yql_kikimr_type_ann.cpp
index 8b9750b16a..a6706d8324 100644
--- a/ydb/core/kqp/provider/yql_kikimr_type_ann.cpp
+++ b/ydb/core/kqp/provider/yql_kikimr_type_ann.cpp
@@ -465,7 +465,7 @@ private:
auto column = table->Metadata->Columns.FindPtr(TString(item->GetName()));
if (!column) {
ctx.AddError(YqlIssue(ctx.GetPosition(node.Pos()), TIssuesIds::KIKIMR_BAD_REQUEST, TStringBuilder()
- << "Column '" << column->Name << "' does not exist in table '" << node.Table().Value() << "'."));
+ << "Column '" << item->GetName() << "' does not exist in table '" << node.Table().Value() << "'."));
return TStatus::Error;
}
if (column->NotNull && item->HasOptionalOrNull()) {
diff --git a/ydb/core/kqp/proxy_service/kqp_proxy_service.cpp b/ydb/core/kqp/proxy_service/kqp_proxy_service.cpp
index 24984a56f8..eaee5fa451 100644
--- a/ydb/core/kqp/proxy_service/kqp_proxy_service.cpp
+++ b/ydb/core/kqp/proxy_service/kqp_proxy_service.cpp
@@ -199,35 +199,48 @@ public:
PublishResourceUsage();
AskSelfNodeInfo();
SendWhiteboardRequest();
- ScheduleIdleSessionCheck();
+ ScheduleIdleSessionCheck(TDuration::Seconds(2));
}
TDuration GetSessionIdleDuration() const {
return TDuration::Seconds(TableServiceConfig.GetSessionIdleDurationSeconds());
}
- void ScheduleIdleSessionCheck() {
+ void ScheduleIdleSessionCheck(const TDuration& scheduleInterval) {
if (!ShutdownState) {
- const TDuration IdleSessionsCheckInterval = TDuration::Seconds(2);
- Schedule(IdleSessionsCheckInterval, new TEvPrivate::TEvCloseIdleSessions());
+ Schedule(scheduleInterval, new TEvPrivate::TEvCloseIdleSessions());
}
}
void Handle(TEvPrivate::TEvCloseIdleSessions::TPtr&) {
- CheckIdleSessions();
- ScheduleIdleSessionCheck();
+ bool hasMoreToShutdown = CheckIdleSessions();
+ if (hasMoreToShutdown) {
+ // we already performed several session shutdowns, but there are many sessions to
+ // be shutdowned. so we need to speadup the process.
+ static const TDuration quickIdleCheckInterval = TDuration::MilliSeconds(10);
+ ScheduleIdleSessionCheck(quickIdleCheckInterval);
+ } else {
+ static const TDuration defaultIdleCheckInterval = TDuration::Seconds(2);
+ ScheduleIdleSessionCheck(defaultIdleCheckInterval);
+ }
}
- void CheckIdleSessions(const ui32 maxSessionsToClose = 10) {
+ bool CheckIdleSessions(const ui32 maxSessionsToClose = 10) {
ui32 closedIdleSessions = 0;
const NActors::TMonotonic now = TActivationContext::Monotonic();
while(true) {
const TKqpSessionInfo* sessionInfo = LocalSessions->GetIdleSession(now);
- if (sessionInfo == nullptr || closedIdleSessions > maxSessionsToClose)
- break;
+ if (sessionInfo == nullptr)
+ return false;
+ Counters->ReportSessionActorClosedIdle(sessionInfo->DbCounters);
+ LocalSessions->StopIdleCheck(sessionInfo);
SendSessionClose(sessionInfo);
++closedIdleSessions;
+
+ if (closedIdleSessions > maxSessionsToClose) {
+ return true;
+ }
}
}
@@ -452,6 +465,9 @@ public:
}
auto responseEv = MakeHolder<TEvKqp::TEvCreateSessionResponse>();
+ // If we create many sessions per second, it might be ok to check and close
+ // several idle sessions
+ CheckIdleSessions(3);
TProcessResult<TKqpSessionInfo*> result;
TKqpDbCountersPtr dbCounters;
@@ -468,7 +484,8 @@ public:
dbCounters = Counters->GetDbCounters(request.GetDatabase());
}
- LogRequest(request, requestInfo, ev->Sender, dbCounters);
+ Counters->ReportCreateSession(dbCounters, request.ByteSize());
+ KQP_PROXY_LOG_D("Received create session request, trace_id: " << event.GetTraceId());
responseEv->Record.SetResourceExhausted(result.ResourceExhausted);
responseEv->Record.SetYdbStatus(result.YdbStatus);
@@ -480,66 +497,50 @@ public:
}
void Handle(TEvKqp::TEvQueryRequest::TPtr& ev) {
- auto& event = ev->Get()->Record;
- auto& request = *event.MutableRequest();
- TString traceId = event.GetTraceId();
+ const TString& database = ev->Get()->GetDatabase();
+ const TString& traceId = ev->Get()->GetTraceId();
+ const auto queryType = ev->Get()->GetType();
+ const auto queryAction = ev->Get()->GetAction();
TKqpRequestInfo requestInfo(traceId);
ui64 requestId = PendingRequests.RegisterRequest(ev->Sender, ev->Cookie, traceId, TKqpEvents::EvQueryRequest);
- if (request.GetSessionId().empty()) {
+ if (ev->Get()->GetSessionId().empty()) {
TProcessResult<TKqpSessionInfo*> result;
if (!CreateNewSessionWorker(requestInfo, TString(DefaultKikimrPublicClusterName), false,
- request.GetDatabase(), false, result))
+ database, false, result))
{
- LogRequest(request, requestInfo, ev->Sender, requestId, Counters->GetDbCounters(request.GetDatabase()));
ReplyProcessError(result.YdbStatus, result.Error, requestId);
return;
}
- request.SetSessionId(result.Value->SessionId);
+ ev->Get()->SetSessionId(result.Value->SessionId);
}
- TString sessionId = request.GetSessionId();
+ const TString& sessionId = ev->Get()->GetSessionId();
const TKqpSessionInfo* sessionInfo = LocalSessions->FindPtr(sessionId);
auto dbCounters = sessionInfo ? sessionInfo->DbCounters : nullptr;
if (!dbCounters) {
- dbCounters = Counters->GetDbCounters(request.GetDatabase());
+ dbCounters = Counters->GetDbCounters(database);
}
PendingRequests.SetSessionId(requestId, sessionId, dbCounters);
- LogRequest(request, requestInfo, ev->Sender, requestId, dbCounters);
+ Counters->ReportQueryRequest(dbCounters, ev->Get()->GetRequestSize(), ev->Get()->GetParametersSize(), ev->Get()->GetQuerySize());
+ Counters->ReportQueryAction(dbCounters, queryAction);
+ Counters->ReportQueryType(dbCounters, queryType);
auto queryLimitBytes = TableServiceConfig.GetQueryLimitBytes();
- if (queryLimitBytes && IsSqlQuery(request.GetType())) {
- auto querySizeBytes = request.GetQuery().size();
- if (querySizeBytes > queryLimitBytes) {
- TString error = TStringBuilder() << "Query text size exceeds limit (" << querySizeBytes << "b > " << queryLimitBytes << "b)";
- ReplyProcessError(Ydb::StatusIds::BAD_REQUEST, error, requestId);
- return;
- }
+ if (queryLimitBytes && IsSqlQuery(queryType) && ev->Get()->GetQuerySize() > queryLimitBytes) {
+ TString error = TStringBuilder() << "Query text size exceeds limit ("
+ << ev->Get()->GetQuerySize() << "b > " << queryLimitBytes << "b)";
+ ReplyProcessError(Ydb::StatusIds::BAD_REQUEST, error, requestId);
+ return;
}
auto paramsLimitBytes = TableServiceConfig.GetParametersLimitBytes();
- if (paramsLimitBytes) {
- auto paramsBytes = request.GetParameters().ByteSizeLong();
- if (paramsBytes > paramsLimitBytes) {
- TString error = TStringBuilder() << "Parameters size exceeds limit (" << paramsBytes << "b > " << paramsLimitBytes << "b)";
- ReplyProcessError(Ydb::StatusIds::BAD_REQUEST, error, requestId);
- return;
- }
- }
-
- if (request.HasTxControl() && request.GetTxControl().has_begin_tx()) {
- switch (request.GetTxControl().begin_tx().tx_mode_case()) {
- case Ydb::Table::TransactionSettings::kSnapshotReadOnly:
- if (!AppData()->FeatureFlags.GetEnableMvccSnapshotReads()) {
- ReplyProcessError(Ydb::StatusIds::BAD_REQUEST,
- "Snapshot reads not supported in current database", requestId);
- return;
- }
-
- default:
- break;
- }
+ if (paramsLimitBytes && ev->Get()->GetParametersSize() > paramsLimitBytes) {
+ TString error = TStringBuilder() << "Parameters size exceeds limit ("
+ << ev->Get()->GetParametersSize() << "b > " << paramsLimitBytes << "b)";
+ ReplyProcessError(Ydb::StatusIds::BAD_REQUEST, error, requestId);
+ return;
}
TActorId targetId;
@@ -547,7 +548,7 @@ public:
targetId = sessionInfo->WorkerId;
LocalSessions->StopIdleCheck(sessionInfo);
} else {
- targetId = TryGetSessionTargetActor(request.GetSessionId(), requestInfo, requestId);
+ targetId = TryGetSessionTargetActor(sessionId, requestInfo, requestId);
if (!targetId) {
return;
}
@@ -557,10 +558,12 @@ public:
// because it is much better to give detailed error message rather than generic timeout.
// For example, it helps to avoid race in event order when worker and proxy recieve timeout at the same moment.
// If worker located in the different datacenter we should better substract some RTT estimate, but at this point it's not done.
- auto timeoutMs = GetQueryTimeout(request.GetType(), request.GetTimeoutMs(), TableServiceConfig) + DEFAULT_EXTRA_TIMEOUT_WAIT;
+ auto timeout = ev->Get()->GetOperationTimeout();
+ auto timeoutMs = GetQueryTimeout(queryType, timeout.MilliSeconds(), TableServiceConfig) + DEFAULT_EXTRA_TIMEOUT_WAIT;
StartQueryTimeout(requestId, timeoutMs);
Send(targetId, ev->Release().Release(), IEventHandle::FlagTrackDelivery, requestId);
- KQP_PROXY_LOG_D(TKqpRequestInfo(traceId, sessionId) << "Sent request to target, requestId: " << requestId << ", targetId: " << targetId);
+ KQP_PROXY_LOG_D("Sent request to target, requestId: " << requestId
+ << ", targetId: " << targetId << ", sessionId: " << sessionId);
}
void Handle(TEvKqp::TEvCloseSessionRequest::TPtr& ev) {
@@ -573,7 +576,7 @@ public:
const TKqpSessionInfo* sessionInfo = LocalSessions->FindPtr(sessionId);
auto dbCounters = sessionInfo ? sessionInfo->DbCounters : nullptr;
- LogRequest(request, requestInfo, ev->Sender, dbCounters);
+ Counters->ReportCloseSession(dbCounters, request.ByteSize());
if (LocalSessions->IsPendingShutdown(sessionId) && dbCounters) {
Counters->ReportSessionGracefulShutdownHit(dbCounters);
@@ -601,7 +604,8 @@ public:
ui64 requestId = PendingRequests.RegisterRequest(ev->Sender, ev->Cookie, traceId, TKqpEvents::EvPingSessionRequest);
const TKqpSessionInfo* sessionInfo = LocalSessions->FindPtr(sessionId);
auto dbCounters = sessionInfo ? sessionInfo->DbCounters : nullptr;
- LogRequest(request, requestInfo, ev->Sender, requestId, dbCounters);
+ KQP_PROXY_LOG_D("Received ping session request, request_id: " << requestId << ", trace_id: " << traceId);
+ Counters->ReportPingSession(dbCounters, request.ByteSize());
TActorId targetId;
if (sessionInfo) {
@@ -1058,39 +1062,6 @@ private:
Counters->ReportResponseStatus(dbCounters, event.ByteSize(), event.GetStatus());
}
- void LogRequest(const NKikimrKqp::TCloseSessionRequest& request,
- const TKqpRequestInfo& requestInfo, const TActorId& sender,
- TKqpDbCountersPtr dbCounters)
- {
- KQP_PROXY_LOG_D(requestInfo << "Received close session request, sender: " << sender << ", SessionId: " << request.GetSessionId());
- Counters->ReportCloseSession(dbCounters, request.ByteSize());
- }
-
- void LogRequest(const NKikimrKqp::TQueryRequest& request,
- const TKqpRequestInfo& requestInfo, const TActorId& sender, ui64 requestId,
- TKqpDbCountersPtr dbCounters)
- {
- KQP_PROXY_LOG_D(requestInfo << "Received new query request, sender: " << sender << ", RequestId: " << requestId
- << ", Query: \"" << request.GetQuery().substr(0, 10000) << "\"");
- Counters->ReportQueryRequest(dbCounters, request);
- }
-
- void LogRequest(const NKikimrKqp::TCreateSessionRequest& request,
- const TKqpRequestInfo& requestInfo, const TActorId& sender,
- TKqpDbCountersPtr dbCounters)
- {
- KQP_PROXY_LOG_D(requestInfo << "Received create session request, sender: " << sender);
- Counters->ReportCreateSession(dbCounters, request.ByteSize());
- }
-
- void LogRequest(const NKikimrKqp::TPingSessionRequest& request,
- const TKqpRequestInfo& requestInfo, const TActorId& sender, ui64 requestId,
- TKqpDbCountersPtr dbCounters)
- {
- KQP_PROXY_LOG_D(requestInfo << "Received ping session request, sender: " << sender << " selfID: " << SelfId() << ", RequestId: " << requestId);
- Counters->ReportPingSession(dbCounters, request.ByteSize());
- }
-
bool ReplyProcessError(Ydb::StatusIds::StatusCode ydbStatus, const TString& message, ui64 requestId)
{
auto response = TEvKqp::TEvProcessResponse::Error(ydbStatus, message);
diff --git a/ydb/core/kqp/proxy_service/kqp_proxy_service.h b/ydb/core/kqp/proxy_service/kqp_proxy_service.h
index 8dc1b9622d..f099125f7c 100644
--- a/ydb/core/kqp/proxy_service/kqp_proxy_service.h
+++ b/ydb/core/kqp/proxy_service/kqp_proxy_service.h
@@ -195,7 +195,6 @@ public:
return nullptr;
}
- StopIdleCheck(candidate);
return candidate;
}
diff --git a/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp b/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp
index ab44faba02..356838f9c7 100644
--- a/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp
+++ b/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp
@@ -156,8 +156,8 @@ void FillTable(const TKikimrTableMetadata& tableMeta, THashSet<TStringBuf>&& col
}
}
-template <typename TProto>
-void FillColumns(const TCoAtomList& columns, const TKikimrTableMetadata& tableMeta,
+template <typename TProto, typename TContainer>
+void FillColumns(const TContainer& columns, const TKikimrTableMetadata& tableMeta,
TProto& opProto, bool allowSystemColumns)
{
for (const auto& columnNode : columns) {
@@ -518,6 +518,17 @@ public:
for (auto member : programParams->GetItems()) {
inputsParams.push_back(member);
}
+
+ std::sort(inputsParams.begin(), inputsParams.end(),
+ [](const TItemExprType* first, const TItemExprType* second) {
+ return first->GetName() < second->GetName();
+ });
+ inputsParams.erase(std::unique(inputsParams.begin(), inputsParams.end(),
+ [](const TItemExprType* first, const TItemExprType* second) {
+ return first->GetName() == second->GetName();
+ }),
+ inputsParams.end());
+
return ctx.MakeType<TStructExprType>(inputsParams);
}
}
@@ -790,14 +801,24 @@ private:
auto tableMeta = TablesData->ExistingTable(Cluster, settings.Table().Cast().Path()).Metadata;
YQL_ENSURE(tableMeta);
- FillColumns(settings.Columns().Cast(), *tableMeta, readProto, allowSystemColumns);
+ {
+
+ THashMap<TString, const TExprNode*> columnsMap;
+ for (auto item : settings.Columns().Cast()) {
+ columnsMap[item.StringValue()] = item.Raw();
+ }
+ TVector<TCoAtom> columns;
+ auto type = settings.Raw()->GetTypeAnn()->Cast<TStreamExprType>()->GetItemType()->Cast<TStructExprType>();
+ for (auto item : type->GetItems()) {
+ columns.push_back(TCoAtom(columnsMap.at(item->GetName())));
+ }
+ FillColumns(columns, *tableMeta, readProto, allowSystemColumns);
+ }
auto readSettings = TKqpReadTableSettings::Parse(settings.Settings().Cast());
readProto.SetReverse(readSettings.Reverse);
readProto.SetSorted(readSettings.Sorted);
- for (auto&& key : readSettings.SkipNullKeys) {
- readProto.AddSkipNullKeys(key);
- }
+ YQL_ENSURE(readSettings.SkipNullKeys.empty());
auto ranges = settings.RangesExpr().template Maybe<TCoParameter>();
if (ranges.IsValid()) {
@@ -921,17 +942,21 @@ private:
streamLookupProto.AddKeyColumns(TString(keyColumn->GetName()));
}
- for (const auto& column : streamLookup.Columns()) {
- YQL_ENSURE(tableMeta->Columns.FindPtr(column), "Unknown column: " << TString(column));
- streamLookupProto.AddColumns(TString(column));
- }
-
const auto resultType = streamLookup.Ref().GetTypeAnn();
YQL_ENSURE(resultType, "Empty stream lookup result type");
YQL_ENSURE(resultType->GetKind() == ETypeAnnotationKind::Stream, "Unexpected stream lookup result type");
const auto resultItemType = resultType->Cast<TStreamExprType>()->GetItemType();
streamLookupProto.SetResultType(NMiniKQL::SerializeNode(CompileType(pgmBuilder, *resultItemType), TypeEnv));
+ YQL_ENSURE(resultItemType->GetKind() == ETypeAnnotationKind::Struct);
+ const auto& resultColumns = resultItemType->Cast<TStructExprType>()->GetItems();
+ for (const auto column : resultColumns) {
+ const auto& systemColumns = GetSystemColumns();
+ YQL_ENSURE(tableMeta->Columns.FindPtr(column->GetName()) || systemColumns.find(column->GetName()) != systemColumns.end(),
+ "Unknown column: " << column->GetName());
+ streamLookupProto.AddColumns(TString(column->GetName()));
+ }
+
return;
}
diff --git a/ydb/core/kqp/rm_service/kqp_rm_service.cpp b/ydb/core/kqp/rm_service/kqp_rm_service.cpp
index 81f3ec8612..45023d56a2 100644
--- a/ydb/core/kqp/rm_service/kqp_rm_service.cpp
+++ b/ydb/core/kqp/rm_service/kqp_rm_service.cpp
@@ -91,6 +91,8 @@ struct TTxState {
ui64 TxExternalDataQueryMemory = 0;
ui32 TxExecutionUnits = 0;
TInstant CreatedAt;
+
+ bool IsDataQuery = false;
};
struct TTxStatesBucket {
@@ -205,6 +207,10 @@ public:
bool AllocateResources(ui64 txId, ui64 taskId, const TKqpResourcesRequest& resources,
TKqpNotEnoughResources* details) override
{
+ if (resources.MemoryPool == EKqpMemoryPool::DataQuery) {
+ NotifyExternalResourcesAllocated(txId, taskId, resources);
+ return true;
+ }
Y_VERIFY(resources.MemoryPool == EKqpMemoryPool::ScanQuery);
if (Y_UNLIKELY(resources.Memory == 0 && resources.ExecutionUnits == 0)) {
return true;
@@ -350,12 +356,20 @@ public:
auto& txBucket = TxBucket(txId);
- with_lock (txBucket.Lock) {
+ {
+ TMaybe<TGuard<TMutex>> guard;
+ guard.ConstructInPlace(txBucket.Lock);
+
auto txIt = txBucket.Txs.find(txId);
if (txIt == txBucket.Txs.end()) {
return;
}
+ if (txIt->second.IsDataQuery) {
+ guard.Clear();
+ return NotifyExternalResourcesFreed(txId, taskId);
+ }
+
auto taskIt = txIt->second.Tasks.find(taskId);
if (taskIt == txIt->second.Tasks.end()) {
return;
@@ -403,11 +417,18 @@ public:
auto& txBucket = TxBucket(txId);
- with_lock (txBucket.Lock) {
+ {
+ TMaybe<TGuard<TMutex>> guard;
+ guard.ConstructInPlace(txBucket.Lock);
+
auto txIt = txBucket.Txs.find(txId);
if (txIt == txBucket.Txs.end()) {
return;
}
+ if (txIt->second.IsDataQuery) {
+ guard.Clear();
+ return NotifyExternalResourcesFreed(txId);
+ }
for (auto& [taskId, taskState] : txIt->second.Tasks) {
bool finished = ResourceBroker->FinishTaskInstant(
@@ -442,12 +463,14 @@ public:
void NotifyExternalResourcesAllocated(ui64 txId, ui64 taskId, const TKqpResourcesRequest& resources) override {
LOG_D("TxId: " << txId << ", taskId: " << taskId << ". External allocation: " << resources.ToString());
- YQL_ENSURE(resources.ExecutionUnits == 0);
+ // we don't register data execution units for now
+ //YQL_ENSURE(resources.ExecutionUnits == 0);
YQL_ENSURE(resources.MemoryPool == EKqpMemoryPool::DataQuery);
auto& txBucket = TxBucket(txId);
with_lock (txBucket.Lock) {
auto& tx = txBucket.Txs[txId];
+ tx.IsDataQuery = true;
auto& task = tx.Tasks[taskId];
task.ExternalDataQueryMemory = resources.Memory;
@@ -501,6 +524,35 @@ public:
FireResourcesPublishing();
}
+ void NotifyExternalResourcesFreed(ui64 txId) {
+ LOG_D("TxId: " << txId << ". External free.");
+
+ ui64 releaseMemory = 0;
+
+ auto& txBucket = TxBucket(txId);
+ with_lock (txBucket.Lock) {
+ auto txIt = txBucket.Txs.find(txId);
+ if (txIt == txBucket.Txs.end()) {
+ return;
+ }
+
+ for (auto task : txIt->second.Tasks) {
+ releaseMemory += task.second.ExternalDataQueryMemory;
+ }
+ txBucket.Txs.erase(txId);
+ } // with_lock (txBucket.Lock)
+
+ with_lock (Lock) {
+ Y_VERIFY_DEBUG(ExternalDataQueryMemory >= releaseMemory);
+ ExternalDataQueryMemory -= releaseMemory;
+ } // with_lock (Lock)
+
+ Counters->RmExternalMemory->Sub(releaseMemory);
+ Y_VERIFY_DEBUG(Counters->RmExternalMemory->Val() >= 0);
+
+ FireResourcesPublishing();
+ }
+
void RequestClusterResourcesInfo(TOnResourcesSnapshotCallback&& callback) override {
LOG_DEBUG_S(*ActorSystem, NKikimrServices::KQP_RESOURCE_MANAGER, "Schedule Snapshot request");
auto ev = MakeHolder<TEvPrivate::TEvTakeResourcesSnapshot>();
diff --git a/ydb/core/kqp/runtime/kqp_read_actor.cpp b/ydb/core/kqp/runtime/kqp_read_actor.cpp
index 482409e3fb..cc12f68b42 100644
--- a/ydb/core/kqp/runtime/kqp_read_actor.cpp
+++ b/ydb/core/kqp/runtime/kqp_read_actor.cpp
@@ -3,11 +3,14 @@
#include <ydb/core/kqp/runtime/kqp_scan_data.h>
#include <ydb/core/base/tablet_pipecache.h>
#include <ydb/core/engine/minikql/minikql_engine_host.h>
+
+#include <ydb/core/kqp/gateway/kqp_gateway.h>
#include <ydb/core/kqp/common/kqp_yql.h>
#include <ydb/core/protos/tx_datashard.pb.h>
#include <ydb/core/tx/datashard/datashard.h>
#include <ydb/core/tx/datashard/range_ops.h>
#include <ydb/core/tx/scheme_cache/scheme_cache.h>
+#include <ydb/core/actorlib_impl/long_timer.h>
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h>
@@ -18,9 +21,6 @@
namespace {
-static constexpr ui64 EVREAD_MAX_ROWS = 32767;
-static constexpr ui64 EVREAD_MAX_BYTES = 200_MB;
-
static constexpr ui64 MAX_SHARD_RETRIES = 5;
static constexpr ui64 MAX_SHARD_RESOLVES = 3;
@@ -29,8 +29,45 @@ bool IsDebugLogEnabled(const NActors::TActorSystem* actorSystem, NActors::NLog::
return settings && settings->Satisfies(NActors::NLog::EPriority::PRI_DEBUG, component);
}
+struct TDefaultRangeEvReadSettings {
+ NKikimrTxDataShard::TEvRead Data;
+
+ TDefaultRangeEvReadSettings() {
+ Data.SetMaxRows(32767);
+ Data.SetMaxBytes(5_MB);
+ }
+
+} DefaultRangeEvReadSettings;
+
+THolder<NKikimr::TEvDataShard::TEvRead> DefaultReadSettings() {
+ auto result = MakeHolder<NKikimr::TEvDataShard::TEvRead>();
+ result->Record.MergeFrom(DefaultRangeEvReadSettings.Data);
+ return result;
+}
+
+struct TDefaultRangeEvReadAckSettings {
+ NKikimrTxDataShard::TEvReadAck Data;
+
+ TDefaultRangeEvReadAckSettings() {
+ Data.SetMaxRows(32767);
+ Data.SetMaxBytes(5_MB);
+ }
+
+} DefaultRangeEvReadAckSettings;
+
+THolder<NKikimr::TEvDataShard::TEvReadAck> DefaultAckSettings() {
+ auto result = MakeHolder<NKikimr::TEvDataShard::TEvReadAck>();
+ result->Record.MergeFrom(DefaultRangeEvReadAckSettings.Data);
+ return result;
+}
+
+NActors::TActorId PipeCacheId = NKikimr::MakePipePeNodeCacheID(false);
+
+TDuration StartRetryDelay = TDuration::MilliSeconds(250);
+
}
+
namespace NKikimr {
namespace NKqp {
@@ -39,46 +76,74 @@ using namespace NYql::NDq;
using namespace NKikimr;
using namespace NKikimr::NDataShard;
-
class TKqpReadActor : public TActorBootstrapped<TKqpReadActor>, public NYql::NDq::IDqComputeActorAsyncInput {
using TBase = TActorBootstrapped<TKqpReadActor>;
public:
+ struct TResult {
+ ui64 ShardId;
+ THolder<TEventHandle<TEvDataShard::TEvReadResult>> ReadResult;
+ TMaybe<NKikimr::NMiniKQL::TUnboxedValueVector> Batch;
+ size_t ProcessedRows = 0;
+ size_t PackedRows = 0;
+
+ TResult(ui64 shardId, THolder<TEventHandle<TEvDataShard::TEvReadResult>> readResult)
+ : ShardId(shardId)
+ , ReadResult(std::move(readResult))
+ {
+ }
+ };
+
struct TShardState : public TIntrusiveListItem<TShardState> {
- TSmallVec<TSerializedTableRange> Ranges;
- TSmallVec<TSerializedCellVec> Points;
TOwnedCellVec LastKey;
- ui32 FirstUnprocessedRequest = 0;
+ TMaybe<ui32> FirstUnprocessedRequest;
TMaybe<ui32> ReadId;
ui64 TabletId;
+ TVector<Ydb::Issue::IssueMessage> Issues;
+
size_t ResolveAttempt = 0;
size_t RetryAttempt = 0;
- bool NeedResolve = false;
-
- void CopyContinuationToken(TShardState* state) {
- if (state->LastKey.DataSize() != 0) {
- LastKey = state->LastKey;
- }
- FirstUnprocessedRequest = state->FirstUnprocessedRequest;
- }
-
TShardState(ui64 tabletId)
: TabletId(tabletId)
{
}
- TTableRange GetBounds() {
+ TTableRange GetBounds(bool reverse) {
if (Ranges.empty()) {
YQL_ENSURE(!Points.empty());
- return TTableRange(
- Points.front().GetCells(), true,
- Points.back().GetCells(), true);
+ if (reverse) {
+ return TTableRange(
+ Points.front().GetCells(), true,
+ Points[FirstUnprocessedRequest.GetOrElse(Points.size() - 1)].GetCells(), true);
+ } else {
+ return TTableRange(
+ Points[FirstUnprocessedRequest.GetOrElse(0)].GetCells(), true,
+ Points.back().GetCells(), true);
+ }
} else {
- return TTableRange(
- Ranges.front().From.GetCells(), Ranges.front().FromInclusive,
- Ranges.back().To.GetCells(), Ranges.back().ToInclusive);
+ if (reverse) {
+ if (LastKey.empty()) {
+ return TTableRange(
+ Ranges.front().From.GetCells(), Ranges.front().FromInclusive,
+ Ranges[FirstUnprocessedRequest.GetOrElse(Ranges.size() - 1)].To.GetCells(), Ranges.back().ToInclusive);
+ } else {
+ return TTableRange(
+ Ranges.front().From.GetCells(), Ranges.front().FromInclusive,
+ LastKey, false);
+ }
+ } else {
+ if (LastKey.empty()) {
+ return TTableRange(
+ Ranges[FirstUnprocessedRequest.GetOrElse(0)].From.GetCells(), Ranges.front().FromInclusive,
+ Ranges.back().To.GetCells(), Ranges.back().ToInclusive);
+ } else {
+ return TTableRange(
+ LastKey, false,
+ Ranges.back().To.GetCells(), Ranges.back().ToInclusive);
+ }
+ }
}
}
@@ -97,35 +162,37 @@ public:
// Absent cells mean infinity. So in prefix notation `From` should be exclusive.
// For example x >= (Key1, Key2, +infinity) is equivalent to x > (Key1, Key2) where x is arbitrary tuple
- if (range.From.GetCells().size() < keyColumns) {
- fromInclusive = false;
+ if (from.size() < keyColumns) {
noop = range.FromInclusive;
- } else if (range.FromInclusive) {
+ fromInclusive = false;
+ } else if (fromInclusive) {
// Nulls are minimum values so we should remove null padding.
// x >= (Key1, Key2, null) is equivalent to x >= (Key1, Key2)
- ssize_t i = range.From.GetCells().size();
- while (i > 0 && range.From.GetCells()[i - 1].IsNull()) {
+ ssize_t i = from.size();
+ while (i > 0 && from[i - 1].IsNull()) {
--i;
noop = false;
}
- from = range.From.GetCells().subspan(0, i);
+ from = from.subspan(0, i);
}
// Absent cells mean infinity. So in prefix notation `To` should be inclusive.
// For example x < (Key1, Key2, +infinity) is equivalent to x <= (Key1, Key2) where x is arbitrary tuple
- if (range.To.GetCells().size() < keyColumns) {
+ if (to.size() < keyColumns) {
toInclusive = true;
+ noop = noop && range.ToInclusive;
+ } else if (!range.ToInclusive) {
// Nulls are minimum values so we should remove null padding.
// For example x < (Key1, Key2, null) is equivalent to x < (Key1, Key2)
- ssize_t i = range.To.GetCells().size();
- while (i > 0 && range.To.GetCells()[i - 1].IsNull()) {
+ ssize_t i = to.size();
+ while (i > 0 && to[i - 1].IsNull()) {
--i;
noop = false;
}
- to = range.To.GetCells().subspan(0, i);
+ to = to.subspan(0, i);
}
- if (!noop) {
+ if (noop) {
return;
}
@@ -134,7 +201,8 @@ public:
void FillUnprocessedRanges(
TVector<TSerializedTableRange>& result,
- TConstArrayRef<NScheme::TTypeInfo> keyTypes) const
+ TConstArrayRef<NScheme::TTypeInfo> keyTypes,
+ bool reverse) const
{
// Form new vector. Skip ranges already read.
bool lastKeyEmpty = LastKey.DataSize() == 0;
@@ -143,32 +211,53 @@ public:
YQL_ENSURE(keyTypes.size() == LastKey.size(), "Key columns size != last key");
}
- auto rangeIt = Ranges.begin() + FirstUnprocessedRequest;
+ if (reverse) {
+ auto rangeIt = Ranges.begin() + FirstUnprocessedRequest.GetOrElse(Ranges.size() - 1);
- if (!lastKeyEmpty) {
- // It is range, where read was interrupted. Restart operation from last read key.
- result.emplace_back(std::move(TSerializedTableRange(
- TSerializedCellVec::Serialize(LastKey), rangeIt->To.GetBuffer(), false, rangeIt->ToInclusive
- )));
- ++rangeIt;
- }
+ if (!lastKeyEmpty) {
+ // It is range, where read was interrupted. Restart operation from last read key.
+ result.emplace_back(std::move(TSerializedTableRange(
+ rangeIt->From.GetBuffer(), TSerializedCellVec::Serialize(LastKey), rangeIt->ToInclusive, false
+ )));
+ } else {
+ ++rangeIt;
+ }
+
+ result.insert(result.begin(), Ranges.begin(), rangeIt);
+ } else {
+ auto rangeIt = Ranges.begin() + FirstUnprocessedRequest.GetOrElse(0);
+
+ if (!lastKeyEmpty) {
+ // It is range, where read was interrupted. Restart operation from last read key.
+ result.emplace_back(std::move(TSerializedTableRange(
+ TSerializedCellVec::Serialize(LastKey), rangeIt->To.GetBuffer(), false, rangeIt->ToInclusive
+ )));
+ ++rangeIt;
+ }
- // And push all others
- result.insert(result.end(), rangeIt, Ranges.end());
- for (auto& range : result) {
- MakePrefixRange(range, keyTypes.size());
+ // And push all others
+ result.insert(result.end(), rangeIt, Ranges.end());
}
}
- void FillUnprocessedPoints(TVector<TSerializedCellVec>& result) const {
- result.insert(result.begin(), Points.begin() + FirstUnprocessedRequest, Points.end());
+ void FillUnprocessedPoints(TVector<TSerializedCellVec>& result, bool reverse) const {
+ if (reverse) {
+ auto it = FirstUnprocessedRequest ? Points.begin() + *FirstUnprocessedRequest + 1 : Points.end();
+ result.insert(result.begin(), Points.begin(), it);
+ } else {
+ auto it = FirstUnprocessedRequest ? Points.begin() + *FirstUnprocessedRequest : Points.begin();
+ result.insert(result.begin(), it, Points.end());
+ }
}
- void FillEvRead(TEvDataShard::TEvRead& ev, TConstArrayRef<NScheme::TTypeInfo> keyTypes) {
+ void FillEvRead(TEvDataShard::TEvRead& ev, TConstArrayRef<NScheme::TTypeInfo> keyTypes, bool reversed) {
if (Ranges.empty()) {
- FillUnprocessedPoints(ev.Keys);
+ FillUnprocessedPoints(ev.Keys, reversed);
} else {
- FillUnprocessedRanges(ev.Ranges, keyTypes);
+ FillUnprocessedRanges(ev.Ranges, keyTypes, reversed);
+ for (auto& range : ev.Ranges) {
+ MakePrefixRange(range, keyTypes.size());
+ }
}
}
@@ -193,6 +282,26 @@ public:
}
return DebugPrintPoint(keyTypes, LastKey, *AppData()->TypeRegistry);
}
+
+ bool HasRanges() {
+ return !Ranges.empty();
+ }
+
+ bool HasPoints() {
+ return !Points.empty();
+ }
+
+ void AddRange(TSerializedTableRange&& range) {
+ Ranges.push_back(std::move(range));
+ }
+
+ void AddPoint(TSerializedCellVec&& point) {
+ Points.push_back(std::move(point));
+ }
+
+ private:
+ TSmallVec<TSerializedTableRange> Ranges;
+ TSmallVec<TSerializedCellVec> Points;
};
using TShardQueue = TIntrusiveListWithAutoDelete<TShardState, TDelete>;
@@ -218,19 +327,39 @@ public:
void Reset() {
Shard = nullptr;
+ Finished = true;
+ }
+ };
+
+ enum EEv {
+ EvRetryShard = EventSpaceBegin(TKikimrEvents::ES_PRIVATE),
+ };
+
+ struct TEvRetryShard: public TEventLocal<TEvRetryShard, EvRetryShard> {
+ public:
+ explicit TEvRetryShard(const ui64 readId, const ui64 maxSeqNo)
+ : ReadId(readId)
+ , MaxSeqNo(maxSeqNo)
+ {
}
+ public:
+ ui64 ReadId = 0;
+ ui64 MaxSeqNo = 0;
};
public:
TKqpReadActor(
NKikimrTxDataShard::TKqpReadRangesSourceSettings&& settings,
- const NYql::NDq::TDqAsyncIoFactory::TSourceArguments& args)
+ const NYql::NDq::TDqAsyncIoFactory::TSourceArguments& args,
+ TIntrusivePtr<TKqpCounters> counters)
: Settings(std::move(settings))
- , LogPrefix(TStringBuilder() << "SelfId: " << this->SelfId() << ", TxId: " << args.TxId << ", task: " << args.TaskId << ". ")
+ , LogPrefix(TStringBuilder() << "TxId: " << args.TxId << ", task: " << args.TaskId << ", CA Id " << args.ComputeActorId << ". ")
, ComputeActorId(args.ComputeActorId)
, InputIndex(args.InputIndex)
, TypeEnv(args.TypeEnv)
, HolderFactory(args.HolderFactory)
+ , Alloc(args.Alloc)
+ , Counters(counters)
{
TableId = TTableId(
Settings.GetTable().GetTableId().GetOwnerId(),
@@ -240,8 +369,28 @@ public:
);
KeyColumnTypes.reserve(Settings.GetKeyColumnTypes().size());
- for (auto typeId : Settings.GetKeyColumnTypes()) {
- KeyColumnTypes.push_back(NScheme::TTypeInfo((NScheme::TTypeId)typeId));
+ for (size_t i = 0; i < Settings.KeyColumnTypesSize(); ++i) {
+ auto typeId = Settings.GetKeyColumnTypes(i);
+ KeyColumnTypes.push_back(
+ NScheme::TTypeInfo(
+ (NScheme::TTypeId)typeId,
+ (typeId == NScheme::NTypeIds::Pg) ?
+ NPg::TypeDescFromPgTypeId(
+ Settings.GetKeyColumnTypeInfos(i).GetPgTypeId()
+ ) : nullptr));
+ }
+ Counters->ReadActorsCount->Inc();
+ Snapshot = IKqpGateway::TKqpSnapshot(Settings.GetSnapshot().GetStep(), Settings.GetSnapshot().GetTxId());
+ }
+
+ static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
+ return NKikimrServices::TActivity::KQP_SOURCE_READ_ACTOR;
+ }
+
+ virtual ~TKqpReadActor() {
+ if (!Results.empty() && Alloc) {
+ TGuard<NMiniKQL::TScopedAlloc> allocGuard(*Alloc);
+ Results.clear();
}
}
@@ -252,6 +401,7 @@ public:
hFunc(TEvDataShard::TEvReadResult, HandleRead);
hFunc(TEvTxProxySchemeCache::TEvResolveKeySetResult, HandleResolve);
hFunc(TEvPipeCache::TEvDeliveryProblem, HandleError);
+ hFunc(TEvRetryShard, HandleRetry);
IgnoreFunc(TEvInterconnect::TEvNodeConnected);
IgnoreFunc(TEvTxProxySchemeCache::TEvInvalidateTableResult);
}
@@ -261,46 +411,57 @@ public:
}
void Bootstrap() {
+ LogPrefix = TStringBuilder() << "SelfId: " << this->SelfId() << ", " << LogPrefix;
+ }
+
+ void StartTableScan() {
+ ScanStarted = true;
THolder<TShardState> stateHolder = MakeHolder<TShardState>(Settings.GetShardIdHint());
PendingShards.PushBack(stateHolder.Get());
auto& state = *stateHolder.Release();
if (Settings.HasFullRange()) {
- state.Ranges.push_back(TSerializedTableRange(Settings.GetFullRange()));
+ state.AddRange(TSerializedTableRange(Settings.GetFullRange()));
} else {
YQL_ENSURE(Settings.HasRanges());
if (Settings.GetRanges().KeyRangesSize() > 0) {
YQL_ENSURE(Settings.GetRanges().KeyPointsSize() == 0);
for (const auto& range : Settings.GetRanges().GetKeyRanges()) {
- state.Ranges.push_back(TSerializedTableRange(range));
+ state.AddRange(TSerializedTableRange(range));
}
} else {
for (const auto& point : Settings.GetRanges().GetKeyPoints()) {
- state.Points.push_back(TSerializedCellVec(point));
+ state.AddPoint(TSerializedCellVec(point));
}
}
}
if (!Settings.HasShardIdHint()) {
- state.NeedResolve = true;
ResolveShard(&state);
} else {
- StartTableScan();
+ StartShards();
}
Become(&TKqpReadActor::ReadyState);
}
- bool StartTableScan() {
+ bool StartShards() {
const ui32 maxAllowedInFlight = Settings.GetSorted() ? 1 : MaxInFlight;
+ CA_LOG_D("effective maxinflight " << maxAllowedInFlight << " sorted " << Settings.GetSorted());
bool isFirst = true;
while (!PendingShards.Empty() && RunningReads() + 1 <= maxAllowedInFlight) {
if (isFirst) {
CA_LOG_D("BEFORE: " << PendingShards.Size() << "." << RunningReads());
isFirst = false;
}
- auto state = THolder<TShardState>(PendingShards.PopFront());
- InFlightShards.PushFront(state.Get());
- StartRead(state.Release());
+ if (Settings.GetReverse()) {
+ auto state = THolder<TShardState>(PendingShards.PopBack());
+ InFlightShards.PushBack(state.Get());
+ StartRead(state.Release());
+ } else {
+ auto state = THolder<TShardState>(PendingShards.PopFront());
+ InFlightShards.PushFront(state.Get());
+ StartRead(state.Release());
+ }
}
if (!isFirst) {
CA_LOG_D("AFTER: " << PendingShards.Size() << "." << RunningReads());
@@ -319,16 +480,17 @@ public:
return;
}
+ Counters->IteratorsShardResolve->Inc();
state->ResolveAttempt++;
- auto range = state->GetBounds();
+ auto range = state->GetBounds(Settings.GetReverse());
TVector<TKeyDesc::TColumnOp> columns;
columns.reserve(Settings.GetColumns().size());
for (const auto& column : Settings.GetColumns()) {
TKeyDesc::TColumnOp op;
op.Column = column.GetId();
op.Operation = TKeyDesc::EColumnOperation::Read;
- op.ExpectedType = NScheme::TTypeInfo((NScheme::TTypeId)column.GetType());
+ op.ExpectedType = MakeTypeInfo(column);
columns.emplace_back(std::move(op));
}
@@ -398,11 +560,20 @@ public:
return;
}
- if (keyDesc->GetPartitions().size() == 1 && !state->NeedResolve) {
- // we re-resolved the same shard
- RuntimeError(TStringBuilder() << "too many retries for shard " << state->TabletId, NDqProto::StatusIds::StatusIds::INTERNAL_ERROR);
- PendingShards.PushBack(state.Release());
- return;
+ if (keyDesc->GetPartitions().size() == 1) {
+ auto& partition = keyDesc->GetPartitions()[0];
+ if (partition.ShardId == state->TabletId) {
+ // we re-resolved the same shard
+ NYql::TIssues issues;
+ for (auto& issue : state->Issues) {
+ issues.AddIssue(issue.message());
+ }
+ RuntimeError(TStringBuilder() << "Too many retries for shard " << state->TabletId, NDqProto::StatusIds::StatusIds::INTERNAL_ERROR, issues);
+ PendingShards.PushBack(state.Release());
+ return;
+ }
+ } else if (!Snapshot.IsValid()) {
+ return RuntimeError("inconsistent reads after shards split", NDqProto::StatusIds::INTERNAL_ERROR);
}
if (keyDesc->GetPartitions().empty()) {
@@ -416,58 +587,94 @@ public:
TVector<THolder<TShardState>> newShards;
newShards.reserve(keyDesc->GetPartitions().size());
- for (ui64 idx = 0, i = 0; idx < keyDesc->GetPartitions().size(); ++idx) {
+ auto bounds = state->GetBounds(Settings.GetReverse());
+ size_t pointIndex = 0;
+ size_t rangeIndex = 0;
+ TVector<TSerializedTableRange> ranges;
+ if (state->HasRanges()) {
+ state->FillUnprocessedRanges(ranges, KeyColumnTypes, Settings.GetReverse());
+ }
+
+ TVector<TSerializedCellVec> points;
+ if (state->HasPoints()) {
+ state->FillUnprocessedPoints(points, Settings.GetReverse());
+ }
+
+ for (ui64 idx = 0; idx < keyDesc->GetPartitions().size(); ++idx) {
const auto& partition = keyDesc->GetPartitions()[idx];
TTableRange partitionRange{
- idx == 0 ? state->Ranges.front().From.GetCells() : keyDesc->GetPartitions()[idx - 1].Range->EndKeyPrefix.GetCells(),
- idx == 0 ? state->Ranges.front().FromInclusive : !keyDesc->GetPartitions()[idx - 1].Range->IsInclusive,
+ idx == 0 ? bounds.From : keyDesc->GetPartitions()[idx - 1].Range->EndKeyPrefix.GetCells(),
+ idx == 0 ? bounds.InclusiveFrom : !keyDesc->GetPartitions()[idx - 1].Range->IsInclusive,
keyDesc->GetPartitions()[idx].Range->EndKeyPrefix.GetCells(),
keyDesc->GetPartitions()[idx].Range->IsInclusive
};
CA_LOG_D("Processing resolved ShardId# " << partition.ShardId
<< ", partition range: " << DebugPrintRange(KeyColumnTypes, partitionRange, tr)
- << ", i: " << i << ", state ranges: " << state->Ranges.size());
+ << ", i: " << rangeIndex << ", state ranges: " << ranges.size()
+ << ", points: " << points.size());
auto newShard = MakeHolder<TShardState>(partition.ShardId);
- if (idx == 0 && state) {
- newShard->CopyContinuationToken(state.Get());
- }
-
- for (ui64 j = i; j < state->Ranges.size(); ++j) {
- CA_LOG_D("Intersect state range #" << j << " " << DebugPrintRange(KeyColumnTypes, state->Ranges[j].ToTableRange(), tr)
- << " with partition range " << DebugPrintRange(KeyColumnTypes, partitionRange, tr));
+ if (state->HasRanges()) {
+ for (ui64 j = rangeIndex; j < ranges.size(); ++j) {
+ CA_LOG_D("Intersect state range #" << j << " " << DebugPrintRange(KeyColumnTypes, ranges[j].ToTableRange(), tr)
+ << " with partition range " << DebugPrintRange(KeyColumnTypes, partitionRange, tr));
- auto intersection = Intersect(KeyColumnTypes, partitionRange, state->Ranges[j].ToTableRange());
+ auto intersection = Intersect(KeyColumnTypes, partitionRange, ranges[j].ToTableRange());
- if (!intersection.IsEmptyRange(KeyColumnTypes)) {
- CA_LOG_D("Add range to new shardId: " << partition.ShardId
- << ", range: " << DebugPrintRange(KeyColumnTypes, intersection, tr));
+ if (!intersection.IsEmptyRange(KeyColumnTypes)) {
+ CA_LOG_D("Add range to new shardId: " << partition.ShardId
+ << ", range: " << DebugPrintRange(KeyColumnTypes, intersection, tr));
- newShard->Ranges.emplace_back(TSerializedTableRange(intersection));
- } else {
- CA_LOG_D("empty intersection");
- if (j > i) {
- i = j - 1;
+ newShard->AddRange(TSerializedTableRange(intersection));
+ } else {
+ CA_LOG_D("empty intersection");
+ if (j > rangeIndex) {
+ rangeIndex = j - 1;
+ }
+ break;
}
- break;
}
- }
- if (!newShard->Ranges.empty()) {
- newShards.push_back(std::move(newShard));
+ if (newShard->HasRanges()) {
+ newShards.push_back(std::move(newShard));
+ }
+ }
+ if (state->HasPoints()) {
+ while (pointIndex < points.size()) {
+ int intersection = ComparePointAndRange(
+ points[pointIndex].GetCells(),
+ partitionRange,
+ KeyColumnTypes,
+ KeyColumnTypes);
+
+ if (intersection == 0) {
+ newShard->AddPoint(std::move(points[pointIndex]));
+ CA_LOG_D("Add point to new shardId: " << partition.ShardId);
+ }
+ if (intersection < 0) {
+ break;
+ }
+ pointIndex += 1;
+ }
+ if (newShard->HasPoints()) {
+ newShards.push_back(std::move(newShard));
+ }
}
}
YQL_ENSURE(!newShards.empty());
- for (int i = newShards.ysize() - 1; i >= 0; --i) {
- PendingShards.PushFront(newShards[i].Release());
- }
-
- if (!state->LastKey.empty()) {
- PendingShards.Front()->LastKey = std::move(state->LastKey);
+ Counters->IteratorsReadSplits->Add(newShards.size() - 1);
+ if (Settings.GetReverse()) {
+ for (size_t i = 0; i < newShards.size(); ++i) {
+ PendingShards.PushBack(newShards[i].Release());
+ }
+ } else {
+ for (int i = newShards.ysize() - 1; i >= 0; --i) {
+ PendingShards.PushFront(newShards[i].Release());
+ }
}
if (IsDebugLogEnabled(TlsActivationContext->ActorSystem(), NKikimrServices::KQP_COMPUTE)
@@ -489,26 +696,49 @@ public:
}
CA_LOG_D(sb);
}
- StartTableScan();
+ StartShards();
+ }
+
+ void HandleRetry(TEvRetryShard::TPtr& ev) {
+ auto& read = Reads[ev->Get()->ReadId];
+ if (read.LastSeqNo <= ev->Get()->MaxSeqNo) {
+ DoRetryRead(ev->Get()->ReadId);
+ }
+ }
+
+ void RetryRead(ui64 id, bool allowInstantRetry = true) {
+ if (!Reads[id]) {
+ return;
+ }
+
+ auto state = Reads[id].Shard;
+ if (state->RetryAttempt == 0 && allowInstantRetry) { // instant retry
+ return DoRetryRead(id);
+ }
+ auto delay = ::StartRetryDelay;
+ for (size_t i = 0; i < state->RetryAttempt; ++i) {
+ delay *= 2;
+ }
+
+ CA_LOG_D("schedule retry #" << id << " after " << delay);
+ TlsActivationContext->Schedule(delay, new IEventHandle(SelfId(), SelfId(), new TEvRetryShard(id, Reads[id].LastSeqNo)));
}
- void RetryRead(ui64 id) {
+ void DoRetryRead(ui64 id) {
if (!Reads[id]) {
return;
}
auto state = Reads[id].Shard;
- Reads[id].Finished = true;
state->RetryAttempt += 1;
if (state->RetryAttempt >= MAX_SHARD_RETRIES) {
+ ResetRead(id);
return ResolveShard(state);
}
CA_LOG_D("Retrying read #" << id);
- auto cancel = MakeHolder<TEvDataShard::TEvReadCancel>();
- cancel->Record.SetReadId(id);
- Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvForward(cancel.Release(), state->TabletId), IEventHandle::FlagTrackDelivery);
+ ResetRead(id);
if (Reads[id].SerializedContinuationToken) {
NKikimrTxDataShard::TReadContinuationToken token;
@@ -521,32 +751,33 @@ public:
}
}
+ Counters->ReadActorRetries->Inc();
StartRead(state);
}
void StartRead(TShardState* state) {
- ui64 limit = 0;
+ TMaybe<ui64> limit;
if (Settings.GetItemsLimit()) {
- limit = Settings.GetItemsLimit() - Min(Settings.GetItemsLimit(), RecievedRowCount);
- } else {
- limit = EVREAD_MAX_ROWS;
- }
- if (limit == 0) {
- delete state;
- return;
+ limit = Settings.GetItemsLimit() - Min(Settings.GetItemsLimit(), ReceivedRowCount);
+
+ if (*limit == 0) {
+ return;
+ }
}
- THolder<TEvDataShard::TEvRead> ev(new TEvDataShard::TEvRead());
+ auto ev = ::DefaultReadSettings();
auto& record = ev->Record;
- state->FillEvRead(*ev, KeyColumnTypes);
+ state->FillEvRead(*ev, KeyColumnTypes, Settings.GetReverse());
for (const auto& column : Settings.GetColumns()) {
- record.AddColumns(column.GetId());
+ if (!IsSystemColumn(column.GetId())) {
+ record.AddColumns(column.GetId());
+ }
}
- if (record.HasSnapshot()) {
- record.MutableSnapshot()->SetTxId(Settings.GetSnapshot().GetTxId());
- record.MutableSnapshot()->SetStep(Settings.GetSnapshot().GetStep());
+ if (Snapshot.IsValid()) {
+ record.MutableSnapshot()->SetTxId(Snapshot.TxId);
+ record.MutableSnapshot()->SetStep(Snapshot.Step);
}
//if (RuntimeSettings.Timeout) {
@@ -567,52 +798,132 @@ public:
record.MutableTableId()->SetSchemaVersion(Settings.GetTable().GetSchemaVersion());
record.SetReverse(Settings.GetReverse());
- record.SetMaxRows(limit);
- record.SetMaxBytes(EVREAD_MAX_BYTES);
+ if (limit) {
+ record.SetMaxRows(*limit);
+ }
+ record.SetMaxBytes(Min<ui64>(record.GetMaxBytes(), BufSize));
record.SetResultFormat(Settings.GetDataFormat());
+ if (Settings.HasLockTxId() && BrokenLocks.empty()) {
+ record.SetLockTxId(Settings.GetLockTxId());
+ }
+
+ if (Settings.HasLockNodeId()) {
+ record.SetLockNodeId(Settings.GetLockNodeId());
+ }
+
CA_LOG_D(TStringBuilder() << "Send EvRead to shardId: " << state->TabletId << ", tablePath: " << Settings.GetTable().GetTablePath()
<< ", ranges: " << DebugPrintRanges(KeyColumnTypes, ev->Ranges, *AppData()->TypeRegistry)
- << ", readId = " << id);
+ << ", limit: " << limit
+ << ", readId = " << id
+ << ", reverse = " << record.GetReverse()
+ << " snapshot = (txid=" << Settings.GetSnapshot().GetTxId() << ",step=" << Settings.GetSnapshot().GetStep() << ")"
+ << " lockTxId = " << Settings.GetLockTxId());
+ Counters->CreatedIterators->Inc();
ReadIdByTabletId[state->TabletId].push_back(id);
- Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvForward(ev.Release(), state->TabletId, true),
+ Send(::PipeCacheId, new TEvPipeCache::TEvForward(ev.Release(), state->TabletId, true),
IEventHandle::FlagTrackDelivery);
}
+ void NotifyCA() {
+ Send(ComputeActorId, new TEvNewAsyncInputDataArrived(InputIndex));
+ }
+
+ TString DebugPrintContionuationToken(TString s) {
+ NKikimrTxDataShard::TReadContinuationToken token;
+ Y_VERIFY(token.ParseFromString(s));
+ TString lastKey = "(empty)";
+ if (!token.GetLastProcessedKey().empty()) {
+ TStringBuilder builder;
+ TVector<NScheme::TTypeInfo> types;
+ for (auto& column : Settings.GetColumns()) {
+ types.push_back(NScheme::TTypeInfo((NScheme::TTypeId)column.GetType()));
+ }
+
+ TSerializedCellVec row(token.GetLastProcessedKey());
+
+ lastKey = DebugPrintPoint(types, row.GetCells(), *AppData()->TypeRegistry);
+ }
+ return TStringBuilder() << "first request = " << token.GetFirstUnprocessedQuery() << " lastkey = " << lastKey;
+ }
+
void HandleRead(TEvDataShard::TEvReadResult::TPtr ev) {
const auto& record = ev->Get()->Record;
auto id = record.GetReadId();
- Y_VERIFY(id < ReadId);
if (!Reads[id] || Reads[id].Finished) {
// dropped read
return;
}
+ Counters->DataShardIteratorMessages->Inc();
if (record.GetStatus().GetCode() != Ydb::StatusIds::SUCCESS) {
- for (auto& issue : record.GetStatus().GetIssues()) {
- CA_LOG_D("read id #" << id << " got issue " << issue.Getmessage());
+ Counters->DataShardIteratorFails->Inc();
+ }
+
+ for (auto& issue : record.GetStatus().GetIssues()) {
+ CA_LOG_D("read id #" << id << " got issue " << issue.Getmessage());
+ Reads[id].Shard->Issues.push_back(issue);
+ }
+ switch (record.GetStatus().GetCode()) {
+ case Ydb::StatusIds::SUCCESS:
+ break;
+ case Ydb::StatusIds::OVERLOADED: {
+ return RetryRead(id, false);
+ }
+ case Ydb::StatusIds::INTERNAL_ERROR: {
+ return RetryRead(id);
+ }
+ case Ydb::StatusIds::NOT_FOUND: {
+ auto shard = Reads[id].Shard;
+ ResetRead(id);
+ return ResolveShard(shard);
+ }
+ default: {
+ NYql::TIssues issues;
+ NYql::IssuesFromMessage(record.GetStatus().GetIssues(), issues);
+ return RuntimeError("Read request aborted", NYql::NDqProto::StatusIds::ABORTED, issues);
}
return RetryRead(id);
}
+ for (auto& lock : record.GetTxLocks()) {
+ Locks.push_back(lock);
+ }
+
+ if (!Snapshot.IsValid()) {
+ Snapshot = IKqpGateway::TKqpSnapshot(record.GetSnapshot().GetStep(), record.GetSnapshot().GetTxId());
+ }
+
+ for (auto& lock : record.GetBrokenTxLocks()) {
+ BrokenLocks.push_back(lock);
+ }
+
+ CA_LOG_D("Taken " << Locks.size() << " locks");
Reads[id].SerializedContinuationToken = record.GetContinuationToken();
Reads[id].RegisterMessage(*ev->Get());
- YQL_ENSURE(record.GetResultFormat() == NKikimrTxDataShard::EScanDataFormat::CELLVEC);
- RecievedRowCount += ev->Get()->GetRowsCount();
+ ReceivedRowCount += ev->Get()->GetRowsCount();
+ CA_LOG_D(TStringBuilder() << "new data for read #" << id
+ << " seqno = " << ev->Get()->Record.GetSeqNo()
+ << " finished = " << ev->Get()->Record.GetFinished());
+ CA_LOG_T(TStringBuilder() << "read #" << id << " pushed " << DebugPrintCells(ev->Get()) << " continuation token " << DebugPrintContionuationToken(record.GetContinuationToken()));
Results.push({Reads[id].Shard->TabletId, THolder<TEventHandle<TEvDataShard::TEvReadResult>>(ev.Release())});
- CA_LOG_D(TStringBuilder() << "new data for read #" << id << " pushed");
- Send(ComputeActorId, new TEvNewAsyncInputDataArrived(InputIndex));
+ NotifyCA();
}
void HandleError(TEvPipeCache::TEvDeliveryProblem::TPtr& ev) {
auto& msg = *ev->Get();
- for (auto& read : ReadIdByTabletId[msg.TabletId]) {
- CA_LOG_W("Got EvDeliveryProblem, TabletId: " << msg.TabletId << ", NotDelivered: " << msg.NotDelivered);
+ TVector<ui32> reads;
+ reads = ReadIdByTabletId[msg.TabletId];
+ CA_LOG_W("Got EvDeliveryProblem, TabletId: " << msg.TabletId << ", NotDelivered: " << msg.NotDelivered);
+ for (auto read : reads) {
+ if (Reads[read]) {
+ Counters->IteratorDeliveryProblems->Inc();
+ }
RetryRead(read);
}
}
@@ -621,17 +932,32 @@ public:
return Reads.size() - ResetReads;
}
+ void ResetRead(size_t id) {
+ if (Reads[id]) {
+ Counters->SentIteratorCancels->Inc();
+ auto* state = Reads[id].Shard;
+ auto cancel = MakeHolder<TEvDataShard::TEvReadCancel>();
+ cancel->Record.SetReadId(id);
+ Send(::PipeCacheId, new TEvPipeCache::TEvForward(cancel.Release(), state->TabletId, false));
+
+ Reads[id].Reset();
+ ResetReads++;
+ }
+ }
+
ui64 GetInputIndex() const override {
return InputIndex;
}
NMiniKQL::TBytesStatistics GetRowSize(const NUdf::TUnboxedValue* row) {
NMiniKQL::TBytesStatistics rowStats{0, 0};
- for (size_t i = 0; i < Settings.ColumnsSize(); ++i) {
- if (IsSystemColumn(Settings.GetColumns(i).GetId())) {
+ size_t columnIndex = 0;
+ for (size_t resultColumnIndex = 0; resultColumnIndex < Settings.ColumnsSize(); ++resultColumnIndex) {
+ if (IsSystemColumn(Settings.GetColumns(resultColumnIndex).GetId())) {
rowStats.AllocatedBytes += sizeof(NUdf::TUnboxedValue);
} else {
- rowStats.AddStatistics(NMiniKQL::GetUnboxedValueSize(row[i], NScheme::TTypeInfo((NScheme::TTypeId)Settings.GetColumns(i).GetType())));
+ rowStats.AddStatistics(NMiniKQL::GetUnboxedValueSize(row[columnIndex], MakeTypeInfo(Settings.GetColumns(resultColumnIndex))));
+ columnIndex += 1;
}
}
if (Settings.ColumnsSize() == 0) {
@@ -644,39 +970,42 @@ public:
return TypeEnv.BindAllocator();
}
- NMiniKQL::TBytesStatistics PackArrow(
- THolder<TEventHandle<TEvDataShard::TEvReadResult>>& result,
- ui64 shardId,
- NKikimr::NMiniKQL::TUnboxedValueVector& batch)
- {
+ NMiniKQL::TBytesStatistics PackArrow(TResult& handle, i64& freeSpace) {
+ auto& [shardId, result, batch, _, packed] = handle;
NMiniKQL::TBytesStatistics stats;
bool hasResultColumns = false;
+ if (result->Get()->GetRowsCount() == 0) {
+ return {};
+ }
+ YQL_ENSURE(packed == 0);
if (Settings.ColumnsSize() == 0) {
- batch.resize(result->Get()->GetRowsCount(), HolderFactory.GetEmptyContainer());
+ batch->resize(result->Get()->GetRowsCount(), HolderFactory.GetEmptyContainer());
} else {
TVector<NUdf::TUnboxedValue*> editAccessors(result->Get()->GetRowsCount());
- batch.reserve(result->Get()->GetRowsCount());
+ batch->reserve(result->Get()->GetRowsCount());
for (ui64 rowIndex = 0; rowIndex < result->Get()->GetRowsCount(); ++rowIndex) {
- batch.emplace_back(HolderFactory.CreateDirectArrayHolder(
+ batch->emplace_back(HolderFactory.CreateDirectArrayHolder(
Settings.columns_size(),
editAccessors[rowIndex])
);
}
- for (size_t columnIndex = 0; columnIndex < Settings.ColumnsSize(); ++columnIndex) {
- auto tag = Settings.GetColumns(columnIndex).GetId();
- auto type = NScheme::TTypeInfo((NScheme::TTypeId)Settings.GetColumns(columnIndex).GetType());
+ size_t columnIndex = 0;
+ for (size_t resultColumnIndex = 0; resultColumnIndex < Settings.ColumnsSize(); ++resultColumnIndex) {
+ auto tag = Settings.GetColumns(resultColumnIndex).GetId();
+ auto type = NScheme::TTypeInfo((NScheme::TTypeId)Settings.GetColumns(resultColumnIndex).GetType());
if (IsSystemColumn(tag)) {
for (ui64 rowIndex = 0; rowIndex < result->Get()->GetRowsCount(); ++rowIndex) {
- NMiniKQL::FillSystemColumn(editAccessors[rowIndex][columnIndex], shardId, tag, type);
+ NMiniKQL::FillSystemColumn(editAccessors[rowIndex][resultColumnIndex], shardId, tag, type);
stats.AllocatedBytes += sizeof(NUdf::TUnboxedValue);
}
} else {
hasResultColumns = true;
stats.AddStatistics(
- NMiniKQL::WriteColumnValuesFromArrow(editAccessors, *result->Get()->ArrowBatch, columnIndex, type)
+ NMiniKQL::WriteColumnValuesFromArrow(editAccessors, *result->Get()->GetArrowBatch(), columnIndex, resultColumnIndex, type)
);
+ columnIndex += 1;
}
}
}
@@ -685,114 +1014,159 @@ public:
auto rowsCnt = result->Get()->GetRowsCount();
stats.AddStatistics({sizeof(ui64) * rowsCnt, sizeof(ui64) * rowsCnt});
}
+ freeSpace -= static_cast<i64>(stats.AllocatedBytes);
+ packed = result->Get()->GetRowsCount();
return stats;
}
- NMiniKQL::TBytesStatistics PackCells(
- THolder<TEventHandle<TEvDataShard::TEvReadResult>>& result,
- ui64 shardId,
- NKikimr::NMiniKQL::TUnboxedValueVector& batch)
- {
+ TString DebugPrintCells(const TEvDataShard::TEvReadResult* result) {
+ if (result->Record.GetResultFormat() == NKikimrTxDataShard::EScanDataFormat::ARROW) {
+ return "{ARROW}";
+ }
+ TStringBuilder builder;
+ TVector<NScheme::TTypeInfo> types;
+ for (auto& column : Settings.GetColumns()) {
+ types.push_back(NScheme::TTypeInfo((NScheme::TTypeId)column.GetType()));
+ }
+
+ for (size_t rowIndex = 0; rowIndex < result->GetRowsCount(); ++rowIndex) {
+ const auto& row = result->GetCells(rowIndex);
+ builder << "|" << DebugPrintPoint(types, row, *AppData()->TypeRegistry);
+ }
+ return builder;
+ }
+
+ NMiniKQL::TBytesStatistics PackCells(TResult& handle, i64& freeSpace) {
+ auto& [shardId, result, batch, _, packed] = handle;
NMiniKQL::TBytesStatistics stats;
- batch.reserve(batch.size());
- for (size_t rowIndex = 0; rowIndex < result->Get()->GetRowsCount(); ++rowIndex) {
+ batch->reserve(batch->size());
+ for (size_t rowIndex = packed; rowIndex < result->Get()->GetRowsCount(); ++rowIndex) {
const auto& row = result->Get()->GetCells(rowIndex);
NUdf::TUnboxedValue* rowItems = nullptr;
- batch.emplace_back(HolderFactory.CreateDirectArrayHolder(Settings.ColumnsSize(), rowItems));
- for (size_t i = 0; i < Settings.ColumnsSize(); ++i) {
- auto tag = Settings.GetColumns(i).GetId();
- auto type = NScheme::TTypeInfo((NScheme::TTypeId)Settings.GetColumns(i).GetType());
+ batch->emplace_back(HolderFactory.CreateDirectArrayHolder(Settings.ColumnsSize(), rowItems));
+
+ i64 rowSize = 0;
+ size_t columnIndex = 0;
+ for (size_t resultColumnIndex = 0; resultColumnIndex < Settings.ColumnsSize(); ++resultColumnIndex) {
+ auto tag = Settings.GetColumns(resultColumnIndex).GetId();
+ if (!IsSystemColumn(tag)) {
+ rowSize += row[columnIndex].Size();
+ columnIndex += 1;
+ }
+ }
+ // min row size according to datashard
+ rowSize = std::max(rowSize, (i64)8);
+
+ columnIndex = 0;
+ for (size_t resultColumnIndex = 0; resultColumnIndex < Settings.ColumnsSize(); ++resultColumnIndex) {
+ auto tag = Settings.GetColumns(resultColumnIndex).GetId();
+ auto type = MakeTypeInfo(Settings.GetColumns(resultColumnIndex));
if (IsSystemColumn(tag)) {
- NMiniKQL::FillSystemColumn(rowItems[i], shardId, tag, type);
+ NMiniKQL::FillSystemColumn(rowItems[resultColumnIndex], shardId, tag, type);
} else {
- rowItems[i] = NMiniKQL::GetCellValue(row[i], type);
+ rowItems[resultColumnIndex] = NMiniKQL::GetCellValue(row[columnIndex], type);
+ columnIndex += 1;
}
}
- stats.AddStatistics(GetRowSize(rowItems));
+
+ stats.DataBytes += rowSize;
+ stats.AllocatedBytes += GetRowSize(rowItems).AllocatedBytes;
+ freeSpace -= rowSize;
+ packed = rowIndex + 1;
+
+ if (freeSpace <= 0) {
+ break;
+ }
}
return stats;
}
+ bool LimitReached() const {
+ return Settings.GetItemsLimit() && ProcessedRowCount >= Settings.GetItemsLimit();
+ }
+
i64 GetAsyncInputData(
NKikimr::NMiniKQL::TUnboxedValueVector& resultVector,
TMaybe<TInstant>&,
bool& finished,
i64 freeSpace) override
{
+ if (!ScanStarted) {
+ BufSize = freeSpace;
+ StartTableScan();
+ return 0;
+ }
+
+ CA_LOG_D(TStringBuilder() << " enter getasyncinputdata results size " << Results.size());
ui64 bytes = 0;
while (!Results.empty()) {
- auto& [shardId, result, batch, processedRows] = Results.front();
- auto& msg = *result->Get();
+ auto& result = Results.front();
+
+ auto& batch = result.Batch;
+ auto& msg = *result.ReadResult->Get();
if (!batch.Defined()) {
batch.ConstructInPlace();
switch (msg.Record.GetResultFormat()) {
case NKikimrTxDataShard::EScanDataFormat::ARROW:
- PackArrow(result, shardId, *batch);
+ BytesStats.AddStatistics(PackArrow(result, freeSpace));
break;
case NKikimrTxDataShard::EScanDataFormat::UNSPECIFIED:
case NKikimrTxDataShard::EScanDataFormat::CELLVEC:
- PackCells(result, shardId, *batch);
+ BytesStats.AddStatistics(PackCells(result, freeSpace));
}
}
- auto id = result->Get()->Record.GetReadId();
- if (!Reads[id]) {
- Results.pop();
- continue;
- }
- auto* state = Reads[id].Shard;
+ auto id = result.ReadResult->Get()->Record.GetReadId();
- for (; processedRows < batch->size(); ++processedRows) {
- NMiniKQL::TBytesStatistics rowSize = GetRowSize((*batch)[processedRows].GetElements());
- if (static_cast<ui64>(freeSpace) < bytes + rowSize.AllocatedBytes) {
- break;
- }
- resultVector.push_back(std::move((*batch)[processedRows]));
+ for (; result.ProcessedRows < result.PackedRows; ++result.ProcessedRows) {
+ NMiniKQL::TBytesStatistics rowSize = GetRowSize((*batch)[result.ProcessedRows].GetElements());
+ resultVector.push_back(std::move((*batch)[result.ProcessedRows]));
ProcessedRowCount += 1;
bytes += rowSize.AllocatedBytes;
+ if (ProcessedRowCount == Settings.GetItemsLimit()) {
+ finished = true;
+ CA_LOG_D(TStringBuilder() << " returned async data because limit reached");
+ return bytes;
+ }
}
- CA_LOG_D(TStringBuilder() << "returned " << resultVector.size() << " rows");
+ CA_LOG_D(TStringBuilder() << "returned " << resultVector.size() << " rows; processed " << ProcessedRowCount << " rows");
- if (batch->size() == processedRows) {
+ size_t rowCount = result.ReadResult.Get()->Get()->GetRowsCount();
+ if (rowCount == result.ProcessedRows) {
auto& record = msg.Record;
- if (Reads[id].IsLastMessage(msg)) {
- Reads[id].Reset();
- ResetReads++;
- } else if (!Reads[id].Finished) {
- ui64 limit = 0;
+ if (!Reads[id].Finished) {
+ TMaybe<ui64> limit;
if (Settings.GetItemsLimit()) {
- limit = Settings.GetItemsLimit() - Min(Settings.GetItemsLimit(), RecievedRowCount);
- } else {
- limit = EVREAD_MAX_ROWS;
+ limit = Settings.GetItemsLimit() - Min(Settings.GetItemsLimit(), ReceivedRowCount);
}
- if (limit > 0) {
- THolder<TEvDataShard::TEvReadAck> request(new TEvDataShard::TEvReadAck());
+ if (!limit || *limit > 0) {
+ auto request = ::DefaultAckSettings();
request->Record.SetReadId(record.GetReadId());
request->Record.SetSeqNo(record.GetSeqNo());
- request->Record.SetMaxRows(limit);
- request->Record.SetMaxBytes(EVREAD_MAX_BYTES);
- Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvForward(request.Release(), state->TabletId, true),
+ request->Record.SetMaxBytes(Min<ui64>(request->Record.GetMaxBytes(), BufSize));
+ if (limit) {
+ request->Record.SetMaxRows(*limit);
+ }
+ Counters->SentIteratorAcks->Inc();
+ CA_LOG_D("sending ack for read #" << id << " limit " << limit << " seqno = " << record.GetSeqNo());
+ Send(::PipeCacheId, new TEvPipeCache::TEvForward(request.Release(), Reads[id].Shard->TabletId, true),
IEventHandle::FlagTrackDelivery);
} else {
- auto cancel = MakeHolder<TEvDataShard::TEvReadCancel>();
- cancel->Record.SetReadId(id);
- Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvForward(cancel.Release(), state->TabletId), IEventHandle::FlagTrackDelivery);
- delete state;
- Reads[id].Reset();
- ResetReads++;
+ Reads[id].Finished = true;
}
}
- StartTableScan();
- if (PendingShards.Size() > 0) {
- return bytes;
+ if (Reads[id].IsLastMessage(msg)) {
+ ResetRead(id);
}
+ StartShards();
+
Results.pop();
- CA_LOG_D("dropping batch");
+ CA_LOG_D("dropping batch for read #" << id);
- if (RunningReads() == 0 || (Settings.HasItemsLimit() && ProcessedRowCount >= Settings.GetItemsLimit())) {
+ if (LimitReached()) {
finished = true;
break;
}
@@ -801,17 +1175,69 @@ public:
}
}
+ if (RunningReads() == 0 && PendingShards.Empty() && ScanStarted) {
+ finished = true;
+ }
+
+ CA_LOG_D(TStringBuilder() << "returned async data"
+ << " processed rows " << ProcessedRowCount
+ << " received rows " << ReceivedRowCount
+ << " running reads " << RunningReads()
+ << " pending shards " << PendingShards.Size()
+ << " finished = " << finished
+ << " has limit " << (Settings.GetItemsLimit() != 0)
+ << " limit reached " << LimitReached());
+
+ if (!Results.empty()) {
+ NotifyCA();
+ }
+
return bytes;
}
+ void FillExtraStats(NDqProto::TDqTaskStats* stats, bool last, const NYql::NDq::TDqMeteringStats* mstats) override {
+ if (last) {
+ NDqProto::TDqTableStats* tableStats = nullptr;
+ for (size_t i = 0; i < stats->TablesSize(); ++i) {
+ auto* table = stats->MutableTables(i);
+ if (table->GetTablePath() == Settings.GetTable().GetTablePath()) {
+ tableStats = table;
+ }
+ }
+ if (!tableStats) {
+ tableStats = stats->AddTables();
+ tableStats->SetTablePath(Settings.GetTable().GetTablePath());
+
+ }
+
+ auto consumedRows = mstats ? mstats->Inputs[InputIndex]->RowsConsumed : ReceivedRowCount;
+
+ //FIXME: use real rows count
+ tableStats->SetReadRows(tableStats->GetReadRows() + consumedRows);
+ tableStats->SetReadBytes(tableStats->GetReadBytes() + (mstats ? mstats->Inputs[InputIndex]->BytesConsumed : BytesStats.DataBytes));
+ tableStats->SetAffectedPartitions(tableStats->GetAffectedPartitions() + InFlightShards.Size());
+
+ //FIXME: use evread statistics after KIKIMR-16924
+ //tableStats->SetReadRows(tableStats->GetReadRows() + ReceivedRowCount);
+ //tableStats->SetReadBytes(tableStats->GetReadBytes() + BytesStats.DataBytes);
+ //tableStats->SetAffectedPartitions(tableStats->GetAffectedPartitions() + InFlightShards.Size());
+ }
+ }
+
+
void SaveState(const NYql::NDqProto::TCheckpoint&, NYql::NDqProto::TSourceState&) override {}
void CommitState(const NYql::NDqProto::TCheckpoint&) override {}
void LoadState(const NYql::NDqProto::TSourceState&) override {}
void PassAway() override {
+ Counters->ReadActorsCount->Dec();
{
auto guard = BindAllocator();
Results.clear();
+ for (size_t i = 0; i < Reads.size(); ++i) {
+ ResetRead(i);
+ }
+ Send(PipeCacheId, new TEvPipeCache::TEvUnlink(0));
}
TBase::PassAway();
}
@@ -827,13 +1253,38 @@ public:
Send(ComputeActorId, new TEvAsyncInputError(InputIndex, std::move(issues), statusCode));
}
+ TMaybe<google::protobuf::Any> ExtraData() override {
+ google::protobuf::Any result;
+ NKikimrTxDataShard::TEvKqpInputActorResultInfo resultInfo;
+ for (auto& lock : Locks) {
+ resultInfo.AddLocks()->CopyFrom(lock);
+ }
+ for (auto& lock : BrokenLocks) {
+ resultInfo.AddLocks()->CopyFrom(lock);
+ }
+ result.PackFrom(resultInfo);
+ return result;
+ }
+
+
+ NScheme::TTypeInfo MakeTypeInfo(const NKikimrTxDataShard::TKqpTransaction_TColumnMeta& info) {
+ auto typeId = info.GetType();
+ return NScheme::TTypeInfo(
+ (NScheme::TTypeId)typeId,
+ (typeId == NScheme::NTypeIds::Pg) ?
+ NPg::TypeDescFromPgTypeId(
+ info.GetTypeInfo().GetPgTypeId()
+ ) : nullptr);
+ }
+
private:
NKikimrTxDataShard::TKqpReadRangesSourceSettings Settings;
TVector<NScheme::TTypeInfo> KeyColumnTypes;
- size_t RecievedRowCount = 0;
- size_t ProcessedRowCount = 0;
+ NMiniKQL::TBytesStatistics BytesStats;
+ ui64 ReceivedRowCount = 0;
+ ui64 ProcessedRowCount = 0;
ui64 ResetReads = 0;
ui64 ReadId = 0;
TVector<TReadState> Reads;
@@ -845,39 +1296,50 @@ private:
TShardQueue InFlightShards;
TShardQueue PendingShards;
- struct TResult {
- ui64 ShardId;
- THolder<TEventHandle<TEvDataShard::TEvReadResult>> ReadResult;
- TMaybe<NKikimr::NMiniKQL::TUnboxedValueVector> Batch;
- size_t ProcessedRows = 0;
-
- TResult(ui64 shardId, THolder<TEventHandle<TEvDataShard::TEvReadResult>> readResult)
- : ShardId(shardId)
- , ReadResult(std::move(readResult))
- {
- }
- };
TQueue<TResult> Results;
+ TVector<NKikimrTxDataShard::TLock> Locks;
+ TVector<NKikimrTxDataShard::TLock> BrokenLocks;
+
+ IKqpGateway::TKqpSnapshot Snapshot;
+
ui32 MaxInFlight = 1024;
- const TString LogPrefix;
+ TString LogPrefix;
TTableId TableId;
+ bool ScanStarted = false;
+ size_t BufSize = 0;
+
const TActorId ComputeActorId;
const ui64 InputIndex;
const NMiniKQL::TTypeEnvironment& TypeEnv;
const NMiniKQL::THolderFactory& HolderFactory;
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> Alloc;
+
+ TIntrusivePtr<TKqpCounters> Counters;
};
-void RegisterKqpReadActor(NYql::NDq::TDqAsyncIoFactory& factory) {
+void RegisterKqpReadActor(NYql::NDq::TDqAsyncIoFactory& factory, TIntrusivePtr<TKqpCounters> counters) {
factory.RegisterSource<NKikimrTxDataShard::TKqpReadRangesSourceSettings>(
TString(NYql::KqpReadRangesSourceName),
- [] (NKikimrTxDataShard::TKqpReadRangesSourceSettings&& settings, NYql::NDq::TDqAsyncIoFactory::TSourceArguments&& args) {
- auto* actor = new TKqpReadActor(std::move(settings), args);
+ [counters] (NKikimrTxDataShard::TKqpReadRangesSourceSettings&& settings, NYql::NDq::TDqAsyncIoFactory::TSourceArguments&& args) {
+ auto* actor = new TKqpReadActor(std::move(settings), args, counters);
return std::make_pair<NYql::NDq::IDqComputeActorAsyncInput*, IActor*>(actor, actor);
});
}
+void InjectRangeEvReadSettings(const NKikimrTxDataShard::TEvRead& read) {
+ ::DefaultRangeEvReadSettings.Data.MergeFrom(read);
+}
+
+void InjectRangeEvReadAckSettings(const NKikimrTxDataShard::TEvReadAck& ack) {
+ ::DefaultRangeEvReadAckSettings.Data.MergeFrom(ack);
+}
+
+void InterceptReadActorPipeCache(NActors::TActorId id) {
+ ::PipeCacheId = id;
+}
+
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/runtime/kqp_read_actor.h b/ydb/core/kqp/runtime/kqp_read_actor.h
index 28f3e17873..22c4e05d5c 100644
--- a/ydb/core/kqp/runtime/kqp_read_actor.h
+++ b/ydb/core/kqp/runtime/kqp_read_actor.h
@@ -1,11 +1,23 @@
#pragma once
+#include <ydb/core/kqp/counters/kqp_counters.h>
+
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io_factory.h>
+namespace NKikimrTxDataShard {
+class TEvRead;
+class TEvReadAck;
+}
+
namespace NKikimr {
namespace NKqp {
-void RegisterKqpReadActor(NYql::NDq::TDqAsyncIoFactory& factory);
+void RegisterKqpReadActor(NYql::NDq::TDqAsyncIoFactory&, TIntrusivePtr<TKqpCounters>);
+
+void InjectRangeEvReadSettings(const NKikimrTxDataShard::TEvRead&);
+void InjectRangeEvReadAckSettings(const NKikimrTxDataShard::TEvReadAck&);
+
+void InterceptReadActorPipeCache(NActors::TActorId);
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/runtime/kqp_scan_data.cpp b/ydb/core/kqp/runtime/kqp_scan_data.cpp
index 52800f87a1..1f8cf36826 100644
--- a/ydb/core/kqp/runtime/kqp_scan_data.cpp
+++ b/ydb/core/kqp/runtime/kqp_scan_data.cpp
@@ -302,6 +302,16 @@ TBytesStatistics WriteColumnValuesFromArrow(const TVector<NUdf::TUnboxedValue*>&
return WriteColumnValuesFromArrowImpl(accessor, batch, columnIndex, columnType);
}
+TBytesStatistics WriteColumnValuesFromArrow(const TVector<NUdf::TUnboxedValue*>& editAccessors,
+ const arrow::RecordBatch& batch, i64 columnIndex, i64 resultColumnIndex, NScheme::TTypeInfo columnType)
+{
+ const auto accessor = [=, &editAccessors](const ui32 rowIndex, const ui32 colIndex) -> NUdf::TUnboxedValue& {
+ YQL_ENSURE(colIndex == columnIndex);
+ return editAccessors[rowIndex][resultColumnIndex];
+ };
+ return WriteColumnValuesFromArrowImpl(accessor, batch, columnIndex, columnType);
+}
+
std::pair<ui64, ui64> GetUnboxedValueSizeForTests(const NUdf::TUnboxedValue& value, NScheme::TTypeInfo type) {
auto sizes = GetUnboxedValueSize(value, type);
return {sizes.AllocatedBytes, sizes.DataBytes};
diff --git a/ydb/core/kqp/runtime/kqp_scan_data.h b/ydb/core/kqp/runtime/kqp_scan_data.h
index 13f0f1c070..f9af9ffc02 100644
--- a/ydb/core/kqp/runtime/kqp_scan_data.h
+++ b/ydb/core/kqp/runtime/kqp_scan_data.h
@@ -39,6 +39,8 @@ TBytesStatistics WriteColumnValuesFromArrow(const TVector<NUdf::TUnboxedValue*>&
const arrow::RecordBatch& batch, i64 columnIndex, NScheme::TTypeInfo columnType);
TBytesStatistics WriteColumnValuesFromArrow(NUdf::TUnboxedValue* editAccessors,
const arrow::RecordBatch& batch, i64 columnIndex, const ui32 columnsCount, NScheme::TTypeInfo columnType);
+TBytesStatistics WriteColumnValuesFromArrow(const TVector<NUdf::TUnboxedValue*>& editAccessors,
+ const arrow::RecordBatch& batch, i64 columnIndex, i64 resultColumnIndex, NScheme::TTypeInfo columnType);
void FillSystemColumn(NUdf::TUnboxedValue& rowItem, TMaybe<ui64> shardId, NTable::TTag tag, NScheme::TTypeInfo type);
diff --git a/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp b/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp
index 8da7f66365..8fc24fb2a3 100644
--- a/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp
+++ b/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp
@@ -8,36 +8,80 @@
#include <ydb/core/kqp/common/kqp_resolve.h>
#include <ydb/core/kqp/gateway/kqp_gateway.h>
#include <ydb/core/protos/kqp.pb.h>
+#include <ydb/core/protos/kqp_stats.pb.h>
#include <ydb/core/tx/scheme_cache/scheme_cache.h>
#include <ydb/core/tx/datashard/datashard.h>
+#include <ydb/core/kqp/common/kqp_event_ids.h>
+#include <ydb/library/yql/public/issue/yql_issue_message.h>
+#include <ydb/core/kqp/runtime/kqp_scan_data.h>
+#include <ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h>
namespace NKikimr {
namespace NKqp {
namespace {
-static constexpr TDuration SCHEME_CACHE_REQUEST_TIMEOUT = TDuration::Seconds(5);
-static constexpr TDuration RETRY_READ_TIMEOUT = TDuration::Seconds(10);
+static constexpr TDuration SCHEME_CACHE_REQUEST_TIMEOUT = TDuration::Seconds(10);
+static constexpr ui64 MAX_SHARD_RETRIES = 10;
class TKqpStreamLookupActor : public NActors::TActorBootstrapped<TKqpStreamLookupActor>, public NYql::NDq::IDqComputeActorAsyncInput {
public:
TKqpStreamLookupActor(ui64 inputIndex, const NUdf::TUnboxedValue& input, const NActors::TActorId& computeActorId,
const NMiniKQL::TTypeEnvironment& typeEnv, const NMiniKQL::THolderFactory& holderFactory,
- NKikimrKqp::TKqpStreamLookupSettings&& settings)
- : InputIndex(inputIndex), Input(input), ComputeActorId(computeActorId), TypeEnv(typeEnv)
- , HolderFactory(holderFactory), TableId(MakeTableId(settings.GetTable()))
+ std::shared_ptr<NMiniKQL::TScopedAlloc>& alloc, NKikimrKqp::TKqpStreamLookupSettings&& settings,
+ TIntrusivePtr<TKqpCounters> counters)
+ : LogPrefix(TStringBuilder() << "StreamLookupActor, inputIndex: " << inputIndex << ", CA Id " << computeActorId)
+ , InputIndex(inputIndex), Input(input), ComputeActorId(computeActorId), TypeEnv(typeEnv)
+ , HolderFactory(holderFactory), Alloc(alloc), TablePath(settings.GetTable().GetPath())
+ , TableId(MakeTableId(settings.GetTable()))
, Snapshot(settings.GetSnapshot().GetStep(), settings.GetSnapshot().GetTxId())
, LockTxId(settings.HasLockTxId() ? settings.GetLockTxId() : TMaybe<ui64>())
- , ImmediateTx(settings.GetImmediateTx())
- , KeyPrefixColumns(settings.GetKeyColumns().begin(), settings.GetKeyColumns().end())
- , Columns(settings.GetColumns().begin(), settings.GetColumns().end())
, SchemeCacheRequestTimeout(SCHEME_CACHE_REQUEST_TIMEOUT)
- , RetryReadTimeout(RETRY_READ_TIMEOUT) {
+ , Counters(counters)
+ {
+ KeyColumns.reserve(settings.GetKeyColumns().size());
+ i32 keyOrder = 0;
+ for (const auto& keyColumn : settings.GetKeyColumns()) {
+ KeyColumns.emplace(
+ keyColumn.GetName(),
+ TSysTables::TTableColumnInfo{
+ keyColumn.GetName(),
+ keyColumn.GetId(),
+ NScheme::TTypeInfo{static_cast<NScheme::TTypeId>(keyColumn.GetTypeId())},
+ keyOrder++
+ }
+ );
+ }
+
+ LookupKeyColumns.reserve(KeyColumns.size());
+ for (const auto& lookupKeyColumn : settings.GetLookupKeyColumns()) {
+ auto columnIt = KeyColumns.find(lookupKeyColumn);
+ YQL_ENSURE(columnIt != KeyColumns.end());
+ LookupKeyColumns.push_back(&columnIt->second);
+ }
+
+ Columns.reserve(settings.GetColumns().size());
+ for (const auto& column : settings.GetColumns()) {
+ Columns.emplace_back(TSysTables::TTableColumnInfo{
+ column.GetName(),
+ column.GetId(),
+ NScheme::TTypeInfo{static_cast<NScheme::TTypeId>(column.GetTypeId())}
+ });
+ }
};
+ virtual ~TKqpStreamLookupActor() {
+ if (Input.HasValue() && Alloc) {
+ TGuard<NMiniKQL::TScopedAlloc> allocGuard(*Alloc);
+ Input.Clear();
+ }
+ }
+
void Bootstrap() {
- ResolveTable();
+ CA_LOG_D("Start stream lookup actor");
+ Counters->StreamLookupActorsCount->Inc();
+ ResolveTableShards();
Become(&TKqpStreamLookupActor::StateFunc);
}
@@ -45,6 +89,34 @@ public:
return NKikimrServices::TActivity::KQP_STREAM_LOOKUP_ACTOR;
}
+ void FillExtraStats(NYql::NDqProto::TDqTaskStats* stats , bool last, const NYql::NDq::TDqMeteringStats*) override {
+ if (last) {
+ NYql::NDqProto::TDqTableStats* tableStats = nullptr;
+ for (auto& table : *stats->MutableTables()) {
+ if (table.GetTablePath() == TablePath) {
+ tableStats = &table;
+ }
+ }
+
+ if (!tableStats) {
+ tableStats = stats->AddTables();
+ tableStats->SetTablePath(TablePath);
+ }
+
+ // TODO: use evread statistics after KIKIMR-16924
+ tableStats->SetReadRows(tableStats->GetReadRows() + ReadRowsCount);
+ tableStats->SetReadBytes(tableStats->GetReadBytes() + ReadBytesCount);
+ tableStats->SetAffectedPartitions(tableStats->GetAffectedPartitions() + ReadsPerShard.size());
+
+ NKqpProto::TKqpReadActorTableAggrExtraStats tableExtraStats;
+ for (const auto& [shardId, _] : ReadsPerShard) {
+ tableExtraStats.AddAffectedShards(shardId);
+ }
+
+ tableStats->MutableExtra()->PackFrom(tableExtraStats);
+ }
+ }
+
private:
enum class EReadState {
Initial,
@@ -65,17 +137,11 @@ private:
: Id(id)
, ShardId(shardId)
, Keys(std::move(keys))
- , State(EReadState::Initial)
- , Retried(false) {}
+ , State(EReadState::Initial) {}
- void SetFinished(const NActors::TActorContext& ctx) {
+ void SetFinished() {
Keys.clear();
State = EReadState::Finished;
-
- if (RetryDeadlineTimerId) {
- ctx.Send(RetryDeadlineTimerId, new TEvents::TEvPoisonPill());
- RetryDeadlineTimerId = {};
- }
}
bool Finished() const {
@@ -86,13 +152,17 @@ private:
const ui64 ShardId;
std::vector<TOwnedTableRange> Keys;
EReadState State;
- TActorId RetryDeadlineTimerId;
- bool Retried;
};
- enum EEvSchemeCacheRequestTag : ui64 {
- TableSchemeResolving,
- TableShardsResolving
+ struct TShardState {
+ ui64 RetryAttempts = 0;
+ std::vector<TReadState*> Reads;
+ };
+
+ struct TResult {
+ const ui64 ShardId;
+ THolder<TEventHandle<TEvDataShard::TEvReadResult>> ReadResult;
+ size_t UnprocessedResultRow = 0;
};
struct TEvPrivate {
@@ -102,37 +172,7 @@ private:
};
struct TEvSchemeCacheRequestTimeout : public TEventLocal<TEvSchemeCacheRequestTimeout, EvSchemeCacheRequestTimeout> {
- TEvSchemeCacheRequestTimeout(EEvSchemeCacheRequestTag tag) : Tag(tag) {}
-
- const EEvSchemeCacheRequestTag Tag;
};
-
- struct TEvRetryReadTimeout : public TEventLocal<TEvRetryReadTimeout, EvRetryReadTimeout> {
- TEvRetryReadTimeout(ui64 readId) : ReadId(readId) {}
-
- const ui64 ReadId;
- };
- };
-
- struct TTableScheme {
- TTableScheme(const THashMap<ui32, TSysTables::TTableColumnInfo>& columns) {
- std::map<ui32, NScheme::TTypeInfo> keyColumnTypesByKeyOrder;
- for (const auto& [_, column] : columns) {
- if (column.KeyOrder >= 0) {
- keyColumnTypesByKeyOrder[column.KeyOrder] = column.PType;
- }
-
- ColumnsByName.emplace(column.Name, std::move(column));
- }
-
- KeyColumnTypes.resize(keyColumnTypesByKeyOrder.size());
- for (const auto& [keyOrder, keyColumnType] : keyColumnTypesByKeyOrder) {
- KeyColumnTypes[keyOrder] = keyColumnType;
- }
- }
-
- std::unordered_map<TString, TSysTables::TTableColumnInfo> ColumnsByName;
- std::vector<NScheme::TTypeInfo> KeyColumnTypes;
};
private:
@@ -145,9 +185,16 @@ private:
}
void PassAway() final {
+ Counters->StreamLookupActorsCount->Dec();
{
auto alloc = BindAllocator();
Input.Clear();
+ for (auto& [id, state] : Reads) {
+ Counters->SentIteratorCancels->Inc();
+ auto cancel = MakeHolder<TEvDataShard::TEvReadCancel>();
+ cancel->Record.SetReadId(id);
+ Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvForward(cancel.Release(), state.ShardId, false));
+ }
}
Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvUnlink(0));
@@ -157,36 +204,46 @@ private:
i64 GetAsyncInputData(NKikimr::NMiniKQL::TUnboxedValueVector& batch, TMaybe<TInstant>&, bool& finished, i64 freeSpace) final {
i64 totalDataSize = 0;
- if (TableScheme) {
- totalDataSize = PackResults(batch, freeSpace);
- auto status = FetchLookupKeys();
-
- if (Partitioning) {
- ProcessLookupKeys();
- }
+ totalDataSize = PackResults(batch, freeSpace);
+ auto status = FetchLookupKeys();
- finished = (status == NUdf::EFetchStatus::Finish)
- && UnprocessedKeys.empty()
- && AllReadsFinished()
- && Results.empty();
- } else {
- Send(ComputeActorId, new TEvNewAsyncInputDataArrived(InputIndex));
+ if (Partitioning) {
+ ProcessLookupKeys();
}
+ finished = (status == NUdf::EFetchStatus::Finish)
+ && UnprocessedKeys.empty()
+ && AllReadsFinished()
+ && Results.empty();
+
+ CA_LOG_D("Returned " << totalDataSize << " bytes, finished: " << finished);
return totalDataSize;
}
+ TMaybe<google::protobuf::Any> ExtraData() override {
+ google::protobuf::Any result;
+ NKikimrTxDataShard::TEvKqpInputActorResultInfo resultInfo;
+ for (auto& lock : Locks) {
+ resultInfo.AddLocks()->CopyFrom(lock);
+ }
+
+ for (auto& lock : BrokenLocks) {
+ resultInfo.AddLocks()->CopyFrom(lock);
+ }
+
+ result.PackFrom(resultInfo);
+ return result;
+ }
+
STFUNC(StateFunc) {
Y_UNUSED(ctx);
try {
switch (ev->GetTypeRewrite()) {
hFunc(TEvTxProxySchemeCache::TEvResolveKeySetResult, Handle);
- hFunc(TEvTxProxySchemeCache::TEvNavigateKeySetResult, Handle);
hFunc(TEvDataShard::TEvReadResult, Handle);
hFunc(TEvPipeCache::TEvDeliveryProblem, Handle);
hFunc(TEvPrivate::TEvSchemeCacheRequestTimeout, Handle);
- hFunc(TEvPrivate::TEvRetryReadTimeout, Handle);
IgnoreFunc(TEvTxProxySchemeCache::TEvInvalidateTableResult);
default:
RuntimeError(TStringBuilder() << "Unexpected event: " << ev->GetTypeRewrite(),
@@ -198,6 +255,7 @@ private:
}
void Handle(TEvTxProxySchemeCache::TEvResolveKeySetResult::TPtr& ev) {
+ CA_LOG_D("TEvResolveKeySetResult was received for table: " << TablePath);
if (ev->Get()->Request->ErrorCount > 0) {
return RuntimeError(TStringBuilder() << "Failed to get partitioning for table: " << TableId,
NYql::NDqProto::StatusIds::SCHEME_ERROR);
@@ -210,23 +268,12 @@ private:
ProcessLookupKeys();
}
- void Handle(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr& ev) {
- auto& resultSet = ev->Get()->Request->ResultSet;
- YQL_ENSURE(resultSet.size() == 1, "Expected one result for table: " << TableId);
- auto& result = resultSet[0];
-
- if (result.Status != NSchemeCache::TSchemeCacheNavigate::EStatus::Ok) {
- return RuntimeError(TStringBuilder() << "Failed to resolve table: " << ToString(result.Status),
- NYql::NDqProto::StatusIds::SCHEME_ERROR);
- }
-
- TableScheme = std::make_unique<TTableScheme>(result.Columns);
- ResolveTableShards();
- }
-
void Handle(TEvDataShard::TEvReadResult::TPtr& ev) {
const auto& record = ev->Get()->Record;
+ CA_LOG_D("TEvReadResult was received for table: " << TablePath <<
+ ", readId: " << record.GetReadId() << ", finished: " << record.GetFinished());
+
auto readIt = Reads.find(record.GetReadId());
YQL_ENSURE(readIt != Reads.end(), "Unexpected readId: " << record.GetReadId());
auto& read = readIt->second;
@@ -235,151 +282,157 @@ private:
return;
}
- if (record.BrokenTxLocksSize()) {
- return RuntimeError("Transaction locks invalidated.", NYql::NDqProto::StatusIds::ABORTED);
+ for (auto& lock : record.GetBrokenTxLocks()) {
+ BrokenLocks.push_back(lock);
}
- if (!Snapshot.IsValid() && !record.GetFinished()) {
- // HEAD read was converted to repeatable read
- Snapshot = IKqpGateway::TKqpSnapshot(record.GetSnapshot().GetStep(), record.GetSnapshot().GetTxId());
- } else if (Snapshot.IsValid()) {
- YQL_ENSURE(record.GetSnapshot().GetStep() == Snapshot.Step && record.GetSnapshot().GetTxId() == Snapshot.TxId,
- "Snapshot version mismatch");
+ for (auto& lock : record.GetTxLocks()) {
+ Locks.push_back(lock);
}
- // TODO: refactor after KIKIMR-15102
+ Counters->DataShardIteratorMessages->Inc();
if (record.GetStatus().GetCode() != Ydb::StatusIds::SUCCESS) {
- NKikimrTxDataShard::TReadContinuationToken continuationToken;
- bool parseResult = continuationToken.ParseFromString(record.GetContinuationToken());
- YQL_ENSURE(parseResult, "Failed to parse continuation token");
- YQL_ENSURE(continuationToken.GetFirstUnprocessedQuery() <= read.Keys.size());
-
- return RetryTableRead(read, continuationToken);
+ Counters->DataShardIteratorFails->Inc();
}
- YQL_ENSURE(record.GetResultFormat() == NKikimrTxDataShard::EScanDataFormat::CELLVEC);
- auto nrows = ev->Get()->GetRowsCount();
- for (ui64 rowId = 0; rowId < nrows; ++rowId) {
- Results.emplace_back(ev->Get()->GetCells(rowId));
- }
+ switch (record.GetStatus().GetCode()) {
+ case Ydb::StatusIds::SUCCESS:
+ break;
+ case Ydb::StatusIds::NOT_FOUND:
+ case Ydb::StatusIds::OVERLOADED:
+ case Ydb::StatusIds::INTERNAL_ERROR: {
+ TMaybe<NKikimrTxDataShard::TReadContinuationToken> continuationToken;
+ if (record.HasContinuationToken()) {
+ bool parseResult = continuationToken->ParseFromString(record.GetContinuationToken());
+ YQL_ENSURE(parseResult, "Failed to parse continuation token");
+ }
- Send(ComputeActorId, new TEvNewAsyncInputDataArrived(InputIndex));
+ return RetryTableRead(read, continuationToken);
+ }
+ default: {
+ NYql::TIssues issues;
+ NYql::IssuesFromMessage(record.GetStatus().GetIssues(), issues);
+ return RuntimeError("Read request aborted", NYql::NDqProto::StatusIds::ABORTED, issues);
+ }
+ }
if (record.GetFinished()) {
- read.SetFinished(TlsActivationContext->AsActorContext());
+ read.SetFinished();
} else {
+ Counters->SentIteratorAcks->Inc();
THolder<TEvDataShard::TEvReadAck> request(new TEvDataShard::TEvReadAck());
request->Record.SetReadId(record.GetReadId());
request->Record.SetSeqNo(record.GetSeqNo());
+ request->Record.SetMaxRows(Max<ui16>());
+ request->Record.SetMaxBytes(5_MB);
Send(MakePipePeNodeCacheID(false), new TEvPipeCache::TEvForward(request.Release(), read.ShardId, true),
IEventHandle::FlagTrackDelivery);
+
+ CA_LOG_D("TEvReadAck was sent to shard: " << read.ShardId);
}
+
+ Results.emplace_back(TResult{read.ShardId, THolder<TEventHandle<TEvDataShard::TEvReadResult>>(ev.Release())});
+ Send(ComputeActorId, new TEvNewAsyncInputDataArrived(InputIndex));
}
void Handle(TEvPipeCache::TEvDeliveryProblem::TPtr& ev) {
+ CA_LOG_D("TEvDeliveryProblem was received from tablet: " << ev->Get()->TabletId);
+
const auto& tabletId = ev->Get()->TabletId;
auto shardIt = ReadsPerShard.find(tabletId);
YQL_ENSURE(shardIt != ReadsPerShard.end());
- for (auto readId : shardIt->second) {
- auto readIt = Reads.find(readId);
- YQL_ENSURE(readIt != Reads.end());
- auto& read = readIt->second;
-
- if (read.State == EReadState::Running) {
- for (auto& key : read.Keys) {
+ for (auto* read : shardIt->second.Reads) {
+ if (read->State == EReadState::Running) {
+ Counters->IteratorDeliveryProblems->Inc();
+ for (auto& key : read->Keys) {
UnprocessedKeys.emplace_back(std::move(key));
}
- read.SetFinished(TlsActivationContext->AsActorContext());
+ read->SetFinished();
}
}
- ReadsPerShard.erase(shardIt);
ResolveTableShards();
}
- void Handle(TEvPrivate::TEvSchemeCacheRequestTimeout::TPtr& ev) {
- switch (ev->Get()->Tag) {
- case EEvSchemeCacheRequestTag::TableSchemeResolving:
- if (!TableScheme) {
- RuntimeError(TStringBuilder() << "Failed to resolve scheme for table: " << TableId
- << " (request timeout exceeded)", NYql::NDqProto::StatusIds::TIMEOUT);
- }
- break;
- case EEvSchemeCacheRequestTag::TableShardsResolving:
- if (!Partitioning) {
- RuntimeError(TStringBuilder() << "Failed to resolve shards for table: " << TableId
- << " (request timeout exceeded)", NYql::NDqProto::StatusIds::TIMEOUT);
- }
- break;
- default:
- RuntimeError(TStringBuilder() << "Unexpected tag for TEvSchemeCacheRequestTimeout: " << (ui64)ev->Get()->Tag,
- NYql::NDqProto::StatusIds::INTERNAL_ERROR);
- }
- }
+ void Handle(TEvPrivate::TEvSchemeCacheRequestTimeout::TPtr&) {
+ CA_LOG_D("TEvSchemeCacheRequestTimeout was received, shards for table " << TablePath
+ << " was resolved: " << !!Partitioning);
- void Handle(TEvPrivate::TEvRetryReadTimeout::TPtr& ev) {
- auto readIt = Reads.find(ev->Get()->ReadId);
- YQL_ENSURE(readIt != Reads.end(), "Unexpected readId: " << ev->Get()->ReadId);
- auto& read = readIt->second;
-
- if (read.Retried) {
- RuntimeError(TStringBuilder() << "Retry timeout exceeded for read: " << ev->Get()->ReadId,
- NYql::NDqProto::StatusIds::TIMEOUT);
+ if (!Partitioning) {
+ RuntimeError(TStringBuilder() << "Failed to resolve shards for table: " << TableId
+ << " (request timeout exceeded)", NYql::NDqProto::StatusIds::TIMEOUT);
}
}
ui64 PackResults(NKikimr::NMiniKQL::TUnboxedValueVector& batch, i64 freeSpace) {
- YQL_ENSURE(TableScheme);
-
i64 totalSize = 0;
+ bool sizeLimitExceeded = false;
batch.clear();
- batch.reserve(Results.size());
- std::vector<NKikimr::NScheme::TTypeInfo> columnTypes;
- columnTypes.reserve(Columns.size());
- for (const auto& column : Columns) {
- auto colIt = TableScheme->ColumnsByName.find(column);
- YQL_ENSURE(colIt != TableScheme->ColumnsByName.end());
- columnTypes.push_back(colIt->second.PType);
- }
-
- for (; !Results.empty(); Results.pop_front()) {
- const auto& result = Results.front();
- YQL_ENSURE(result.size() == Columns.size(), "Result columns mismatch");
+ size_t rowsCount = 0;
+ for (const auto& result : Results) {
+ rowsCount += result.ReadResult->Get()->GetRowsCount();
+ }
+ batch.reserve(rowsCount);
+
+ while (!Results.empty() && !sizeLimitExceeded) {
+ auto& result = Results.front();
+ for (; result.UnprocessedResultRow < result.ReadResult->Get()->GetRowsCount(); ++result.UnprocessedResultRow) {
+ const auto& resultRow = result.ReadResult->Get()->GetCells(result.UnprocessedResultRow);
+ YQL_ENSURE(resultRow.size() <= Columns.size(), "Result columns mismatch");
+
+ NUdf::TUnboxedValue* rowItems = nullptr;
+ auto row = HolderFactory.CreateDirectArrayHolder(Columns.size(), rowItems);
+
+ i64 rowSize = 0;
+ for (size_t colIndex = 0, resultColIndex = 0; colIndex < Columns.size(); ++colIndex) {
+ const auto& column = Columns[colIndex];
+ if (IsSystemColumn(column.Name)) {
+ NMiniKQL::FillSystemColumn(rowItems[colIndex], result.ShardId, column.Id, column.PType);
+ rowSize += sizeof(NUdf::TUnboxedValue);
+ } else {
+ YQL_ENSURE(resultColIndex < resultRow.size());
+ rowItems[colIndex] = NMiniKQL::GetCellValue(resultRow[resultColIndex], column.PType);
+ rowSize += NMiniKQL::GetUnboxedValueSize(rowItems[colIndex], column.PType).AllocatedBytes;
+ ++resultColIndex;
+ }
+ }
- NUdf::TUnboxedValue* rowItems = nullptr;
- auto row = HolderFactory.CreateDirectArrayHolder(Columns.size(), rowItems);
+ if (totalSize + rowSize > freeSpace) {
+ row.DeleteUnreferenced();
+ sizeLimitExceeded = true;
+ break;
+ }
- i64 rowSize = 0;
- for (ui32 colId = 0; colId < Columns.size(); ++colId) {
- rowItems[colId] = NMiniKQL::GetCellValue(result[colId], columnTypes[colId]);
- rowSize += result[colId].Size();
+ batch.push_back(std::move(row));
+ ++ReadRowsCount;
+ ReadBytesCount += rowSize;
+ totalSize += rowSize;
}
- if (totalSize + rowSize > freeSpace) {
- row.DeleteUnreferenced();
- break;
+ if (result.UnprocessedResultRow == result.ReadResult->Get()->GetRowsCount()) {
+ Results.pop_front();
}
-
- batch.push_back(std::move(row));
- totalSize += rowSize;
}
+ CA_LOG_D("Total batch size: " << totalSize << ", size limit exceeded: " << sizeLimitExceeded);
return totalSize;
}
NUdf::EFetchStatus FetchLookupKeys() {
- YQL_ENSURE(TableScheme);
- YQL_ENSURE(KeyPrefixColumns.size() <= TableScheme->KeyColumnTypes.size());
+ YQL_ENSURE(LookupKeyColumns.size() <= KeyColumns.size());
NUdf::EFetchStatus status;
NUdf::TUnboxedValue key;
while ((status = Input.Fetch(key)) == NUdf::EFetchStatus::Ok) {
- std::vector<TCell> keyCells(KeyPrefixColumns.size());
- for (ui32 colId = 0; colId < KeyPrefixColumns.size(); ++colId) {
- keyCells[colId] = MakeCell(TableScheme->KeyColumnTypes[colId], key.GetElement(colId), TypeEnv, /* copy */ true);
+ std::vector<TCell> keyCells(LookupKeyColumns.size());
+ for (size_t colId = 0; colId < LookupKeyColumns.size(); ++colId) {
+ const auto* lookupKeyColumn = LookupKeyColumns[colId];
+ YQL_ENSURE(lookupKeyColumn->KeyOrder < static_cast<i64>(keyCells.size()));
+ keyCells[lookupKeyColumn->KeyOrder] = MakeCell(lookupKeyColumn->PType,
+ key.GetElement(colId), TypeEnv, /* copy */ true);
}
UnprocessedKeys.emplace_back(std::move(keyCells));
@@ -391,15 +444,15 @@ private:
void ProcessLookupKeys() {
YQL_ENSURE(Partitioning, "Table partitioning should be initialized before lookup keys processing");
- std::map<ui64, std::vector<TOwnedTableRange>> shardKeys;
+ std::unordered_map<ui64, std::vector<TOwnedTableRange>> shardKeys;
for (; !UnprocessedKeys.empty(); UnprocessedKeys.pop_front()) {
const auto& key = UnprocessedKeys.front();
YQL_ENSURE(key.Point);
std::vector<ui64> shardIds;
- if (KeyPrefixColumns.size() < TableScheme->KeyColumnTypes.size()) {
+ if (LookupKeyColumns.size() < KeyColumns.size()) {
/* build range [[key_prefix, NULL, ..., NULL], [key_prefix, +inf, ..., +inf]) */
- std::vector<TCell> fromCells(TableScheme->KeyColumnTypes.size());
+ std::vector<TCell> fromCells(KeyColumns.size());
fromCells.insert(fromCells.begin(), key.From.begin(), key.From.end());
std::vector<TCell> toCells(key.From.begin(), key.From.end());
@@ -410,7 +463,7 @@ private:
}
for (auto shardId : shardIds) {
- shardKeys[shardId].emplace_back(key);
+ shardKeys[shardId].emplace_back(std::move(key));
}
}
@@ -420,15 +473,20 @@ private:
}
std::vector<ui64> GetRangePartitioning(const TOwnedTableRange& range) {
- YQL_ENSURE(TableScheme);
YQL_ENSURE(Partitioning);
+ std::vector<NScheme::TTypeInfo> keyColumnTypes(KeyColumns.size());
+ for (const auto& [_, columnInfo] : KeyColumns) {
+ YQL_ENSURE(columnInfo.KeyOrder < static_cast<i64>(keyColumnTypes.size()));
+ keyColumnTypes[columnInfo.KeyOrder] = columnInfo.PType;
+ }
+
auto it = LowerBound(Partitioning->begin(), Partitioning->end(), /* value */ true,
[&](const auto& partition, bool) {
const int result = CompareBorders<true, false>(
partition.Range->EndKeyPrefix.GetCells(), range.From,
partition.Range->IsInclusive || partition.Range->IsPoint,
- range.InclusiveFrom || range.Point, TableScheme->KeyColumnTypes
+ range.InclusiveFrom || range.Point, keyColumnTypes
);
return (result < 0);
@@ -448,7 +506,7 @@ private:
auto cmp = CompareBorders<true, true>(
it->Range->EndKeyPrefix.GetCells(), range.To,
it->Range->IsInclusive || it->Range->IsPoint,
- range.InclusiveTo || range.Point, TableScheme->KeyColumnTypes
+ range.InclusiveTo || range.Point, keyColumnTypes
);
if (cmp >= 0) {
@@ -463,21 +521,23 @@ private:
const auto readId = GetNextReadId();
TReadState read(readId, shardId, std::move(keys));
+ CA_LOG_D("Start reading of table: " << TablePath << ", readId: " << readId << ", shardId: " << shardId);
+
+ Counters->CreatedIterators->Inc();
THolder<TEvDataShard::TEvRead> request(new TEvDataShard::TEvRead());
auto& record = request->Record;
- if (Snapshot.IsValid()) {
- record.MutableSnapshot()->SetStep(Snapshot.Step);
- record.MutableSnapshot()->SetTxId(Snapshot.TxId);
- } else {
- YQL_ENSURE(ImmediateTx, "HEAD reading is only available for immediate txs");
- }
+ YQL_ENSURE(Snapshot.IsValid(), "Invalid snapshot value");
+ record.MutableSnapshot()->SetStep(Snapshot.Step);
+ record.MutableSnapshot()->SetTxId(Snapshot.TxId);
- if (LockTxId) {
+ if (LockTxId && BrokenLocks.empty()) {
record.SetLockTxId(*LockTxId);
}
record.SetReadId(read.Id);
+ record.SetMaxRows(Max<ui16>());
+ record.SetMaxBytes(5_MB);
record.SetResultFormat(NKikimrTxDataShard::EScanDataFormat::CELLVEC);
record.MutableTableId()->SetOwnerId(TableId.PathId.OwnerId);
@@ -485,9 +545,9 @@ private:
record.MutableTableId()->SetSchemaVersion(TableId.SchemaVersion);
for (const auto& column : Columns) {
- auto colIt = TableScheme->ColumnsByName.find(column);
- YQL_ENSURE(colIt != TableScheme->ColumnsByName.end());
- record.AddColumns(colIt->second.Id);
+ if (!IsSystemColumn(column.Name)) {
+ record.AddColumns(column.Id);
+ }
}
for (auto& key : read.Keys) {
@@ -502,63 +562,58 @@ private:
const auto [readIt, succeeded] = Reads.insert({readId, std::move(read)});
YQL_ENSURE(succeeded);
- ReadsPerShard[shardId].insert(readId);
+ ReadsPerShard[shardId].Reads.push_back(&readIt->second);
return readIt->second;
}
- void RetryTableRead(TReadState& failedRead, NKikimrTxDataShard::TReadContinuationToken& token) {
- YQL_ENSURE(token.GetFirstUnprocessedQuery() <= failedRead.Keys.size());
- std::vector<TOwnedTableRange> unprocessedKeys(failedRead.Keys.size() - token.GetFirstUnprocessedQuery());
- for (ui64 idx = token.GetFirstUnprocessedQuery(); idx < failedRead.Keys.size(); ++idx) {
- unprocessedKeys.emplace_back(std::move(failedRead.Keys[idx]));
- }
+ void RetryTableRead(TReadState& failedRead, TMaybe<NKikimrTxDataShard::TReadContinuationToken>& token) {
+ CA_LOG_D("Retry reading of table: " << TablePath << ", readId: " << failedRead.Id
+ << ", shardId: " << failedRead.ShardId);
- auto& newRead = StartTableRead(failedRead.ShardId, std::move(unprocessedKeys));
- if (failedRead.Retried) {
- newRead.RetryDeadlineTimerId = failedRead.RetryDeadlineTimerId;
- failedRead.RetryDeadlineTimerId = {};
- } else {
- failedRead.Retried = true;
- newRead.RetryDeadlineTimerId = CreateLongTimer(TlsActivationContext->AsActorContext(), RetryReadTimeout,
- new IEventHandle(SelfId(), SelfId(), new TEvPrivate::TEvRetryReadTimeout(newRead.Id)));
+ size_t firstUnprocessedQuery = token ? token->GetFirstUnprocessedQuery() : 0;
+ YQL_ENSURE(firstUnprocessedQuery <= failedRead.Keys.size());
+ for (ui64 idx = firstUnprocessedQuery; idx < failedRead.Keys.size(); ++idx) {
+ UnprocessedKeys.emplace_back(std::move(failedRead.Keys[idx]));
}
- failedRead.SetFinished(TlsActivationContext->AsActorContext());
- }
-
- void ResolveTable() {
- TAutoPtr<NSchemeCache::TSchemeCacheNavigate> request(new NSchemeCache::TSchemeCacheNavigate());
- NSchemeCache::TSchemeCacheNavigate::TEntry entry;
- entry.TableId = TableId;
- entry.RequestType = NSchemeCache::TSchemeCacheNavigate::TEntry::ERequestType::ByTableId;
- entry.Operation = NSchemeCache::TSchemeCacheNavigate::OpTable;
- entry.ShowPrivatePath = true;
- request->ResultSet.emplace_back(entry);
- Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvNavigateKeySet(request));
+ failedRead.SetFinished();
- SchemeCacheRequestTimeoutTimer = CreateLongTimer(TlsActivationContext->AsActorContext(), SchemeCacheRequestTimeout,
- new IEventHandle(SelfId(), SelfId(), new TEvPrivate::TEvSchemeCacheRequestTimeout(EEvSchemeCacheRequestTag::TableSchemeResolving)));
+ auto& shardState = ReadsPerShard[failedRead.ShardId];
+ if (shardState.RetryAttempts > MAX_SHARD_RETRIES) {
+ RuntimeError(TStringBuilder() << "Retry limit exceeded for shard: " << failedRead.ShardId,
+ NYql::NDqProto::StatusIds::ABORTED);
+ } else {
+ ++shardState.RetryAttempts;
+ ResolveTableShards();
+ }
}
void ResolveTableShards() {
- YQL_ENSURE(TableScheme);
+ CA_LOG_D("Resolve shards for table: " << TablePath);
+
Partitioning.reset();
auto request = MakeHolder<NSchemeCache::TSchemeCacheRequest>();
- TVector<TCell> minusInf(TableScheme->KeyColumnTypes.size());
+ TVector<TCell> minusInf(KeyColumns.size());
TVector<TCell> plusInf;
TTableRange range(minusInf, true, plusInf, true, false);
+ std::vector<NScheme::TTypeInfo> keyColumnTypes(KeyColumns.size());
+ for (const auto& [_, columnInfo] : KeyColumns) {
+ keyColumnTypes[columnInfo.KeyOrder] = columnInfo.PType;
+ }
+
request->ResultSet.emplace_back(MakeHolder<TKeyDesc>(TableId, range, TKeyDesc::ERowOperation::Read,
- TableScheme->KeyColumnTypes, TVector<TKeyDesc::TColumnOp>{}));
+ keyColumnTypes, TVector<TKeyDesc::TColumnOp>{}));
+ Counters->IteratorsShardResolve->Inc();
Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvInvalidateTable(TableId, {}));
Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvResolveKeySet(request));
SchemeCacheRequestTimeoutTimer = CreateLongTimer(TlsActivationContext->AsActorContext(), SchemeCacheRequestTimeout,
- new IEventHandle(SelfId(), SelfId(), new TEvPrivate::TEvSchemeCacheRequestTimeout(EEvSchemeCacheRequestTag::TableShardsResolving)));
+ new IEventHandle(SelfId(), SelfId(), new TEvPrivate::TEvSchemeCacheRequestTimeout()));
}
bool AllReadsFinished() const {
@@ -592,35 +647,45 @@ private:
}
private:
+ const TString LogPrefix;
const ui64 InputIndex;
NUdf::TUnboxedValue Input;
const NActors::TActorId ComputeActorId;
const NMiniKQL::TTypeEnvironment& TypeEnv;
const NMiniKQL::THolderFactory& HolderFactory;
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> Alloc;
+ const TString TablePath;
const TTableId TableId;
IKqpGateway::TKqpSnapshot Snapshot;
const TMaybe<ui64> LockTxId;
- const bool ImmediateTx;
- const std::vector<TString> KeyPrefixColumns;
- const std::vector<TString> Columns;
- std::unique_ptr<const TTableScheme> TableScheme;
- std::deque<TOwnedCellVec> Results;
+ std::vector<TSysTables::TTableColumnInfo*> LookupKeyColumns;
+ std::unordered_map<TString, TSysTables::TTableColumnInfo> KeyColumns;
+ std::vector<TSysTables::TTableColumnInfo> Columns;
+ std::deque<TResult> Results;
std::unordered_map<ui64, TReadState> Reads;
- std::unordered_map<ui64, std::set<ui64>> ReadsPerShard;
+ std::unordered_map<ui64, TShardState> ReadsPerShard;
std::shared_ptr<const TVector<TKeyDesc::TPartitionInfo>> Partitioning;
std::deque<TOwnedTableRange> UnprocessedKeys;
const TDuration SchemeCacheRequestTimeout;
NActors::TActorId SchemeCacheRequestTimeoutTimer;
- const TDuration RetryReadTimeout;
+ TVector<NKikimrTxDataShard::TLock> Locks;
+ TVector<NKikimrTxDataShard::TLock> BrokenLocks;
+
+ // stats
+ ui64 ReadRowsCount = 0;
+ ui64 ReadBytesCount = 0;
+ TIntrusivePtr<TKqpCounters> Counters;
};
} // namespace
std::pair<NYql::NDq::IDqComputeActorAsyncInput*, NActors::IActor*> CreateStreamLookupActor(ui64 inputIndex,
const NUdf::TUnboxedValue& input, const NActors::TActorId& computeActorId, const NMiniKQL::TTypeEnvironment& typeEnv,
- const NMiniKQL::THolderFactory& holderFactory, NKikimrKqp::TKqpStreamLookupSettings&& settings) {
- auto actor = new TKqpStreamLookupActor(inputIndex, input, computeActorId, typeEnv, holderFactory,
- std::move(settings));
+ const NMiniKQL::THolderFactory& holderFactory, std::shared_ptr<NMiniKQL::TScopedAlloc>& alloc,
+ NKikimrKqp::TKqpStreamLookupSettings&& settings,
+ TIntrusivePtr<TKqpCounters> counters) {
+ auto actor = new TKqpStreamLookupActor(inputIndex, input, computeActorId, typeEnv, holderFactory, alloc,
+ std::move(settings), counters);
return {actor, actor};
}
diff --git a/ydb/core/kqp/runtime/kqp_stream_lookup_actor.h b/ydb/core/kqp/runtime/kqp_stream_lookup_actor.h
index 59d8d83b87..29fe5d70d8 100644
--- a/ydb/core/kqp/runtime/kqp_stream_lookup_actor.h
+++ b/ydb/core/kqp/runtime/kqp_stream_lookup_actor.h
@@ -1,5 +1,6 @@
#pragma once
+#include <ydb/core/kqp/counters/kqp_counters.h>
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io.h>
#include <ydb/core/protos/kqp.pb.h>
@@ -8,7 +9,8 @@ namespace NKqp {
std::pair<NYql::NDq::IDqComputeActorAsyncInput*, NActors::IActor*> CreateStreamLookupActor(ui64 inputIndex,
const NUdf::TUnboxedValue& input, const NActors::TActorId& computeActorId, const NMiniKQL::TTypeEnvironment& typeEnv,
- const NMiniKQL::THolderFactory& holderFactory, NKikimrKqp::TKqpStreamLookupSettings&& settings);
+ const NMiniKQL::THolderFactory& holderFactory, std::shared_ptr<NMiniKQL::TScopedAlloc>& alloc,
+ NKikimrKqp::TKqpStreamLookupSettings&& settings, TIntrusivePtr<TKqpCounters>);
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/runtime/kqp_stream_lookup_factory.cpp b/ydb/core/kqp/runtime/kqp_stream_lookup_factory.cpp
index dab7ce8f5c..59ee432d95 100644
--- a/ydb/core/kqp/runtime/kqp_stream_lookup_factory.cpp
+++ b/ydb/core/kqp/runtime/kqp_stream_lookup_factory.cpp
@@ -4,11 +4,11 @@
namespace NKikimr {
namespace NKqp {
-void RegisterStreamLookupActorFactory(NYql::NDq::TDqAsyncIoFactory& factory) {
- factory.RegisterInputTransform<NKikimrKqp::TKqpStreamLookupSettings>("StreamLookupInputTransformer", [](NKikimrKqp::TKqpStreamLookupSettings&& settings,
+void RegisterStreamLookupActorFactory(NYql::NDq::TDqAsyncIoFactory& factory, TIntrusivePtr<TKqpCounters> counters) {
+ factory.RegisterInputTransform<NKikimrKqp::TKqpStreamLookupSettings>("StreamLookupInputTransformer", [counters](NKikimrKqp::TKqpStreamLookupSettings&& settings,
NYql::NDq::TDqAsyncIoFactory::TInputTransformArguments&& args) {
return CreateStreamLookupActor(args.InputIndex, args.TransformInput, args.ComputeActorId, args.TypeEnv,
- args.HolderFactory, std::move(settings));
+ args.HolderFactory, args.Alloc, std::move(settings), counters);
});
}
diff --git a/ydb/core/kqp/runtime/kqp_stream_lookup_factory.h b/ydb/core/kqp/runtime/kqp_stream_lookup_factory.h
index 1eded0576b..db49e005fa 100644
--- a/ydb/core/kqp/runtime/kqp_stream_lookup_factory.h
+++ b/ydb/core/kqp/runtime/kqp_stream_lookup_factory.h
@@ -1,11 +1,12 @@
#pragma once
+#include <ydb/core/kqp/counters/kqp_counters.h>
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io_factory.h>
namespace NKikimr {
namespace NKqp {
-void RegisterStreamLookupActorFactory(NYql::NDq::TDqAsyncIoFactory& factory);
+void RegisterStreamLookupActorFactory(NYql::NDq::TDqAsyncIoFactory& factory, TIntrusivePtr<NKqp::TKqpCounters>);
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/session_actor/kqp_session_actor.cpp b/ydb/core/kqp/session_actor/kqp_session_actor.cpp
index 5eda7bcb2b..530a542f60 100644
--- a/ydb/core/kqp/session_actor/kqp_session_actor.cpp
+++ b/ydb/core/kqp/session_actor/kqp_session_actor.cpp
@@ -7,6 +7,7 @@
#include <ydb/core/kqp/common/kqp_timeouts.h>
#include <ydb/core/kqp/compile_service/kqp_compile_service.h>
#include <ydb/core/kqp/executer_actor/kqp_executer.h>
+#include <ydb/core/kqp/executer_actor/kqp_locks_helper.h>
#include <ydb/core/kqp/host/kqp_host_impl.h>
#include <ydb/core/kqp/opt/kqp_query_plan.h>
#include <ydb/core/kqp/provider/yql_kikimr_provider.h>
@@ -54,64 +55,6 @@ namespace {
#define LOG_D(msg) LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::KQP_SESSION, LogPrefix() << msg)
#define LOG_T(msg) LOG_TRACE_S(*TlsActivationContext, NKikimrServices::KQP_SESSION, LogPrefix() << msg)
-inline bool NeedSnapshot(const TKqpTransactionContext& txCtx, const NYql::TKikimrConfiguration& config, bool rollbackTx,
- bool commitTx, const NKqpProto::TKqpPhyQuery& physicalQuery)
-{
- if (*txCtx.EffectiveIsolationLevel != NKikimrKqp::ISOLATION_LEVEL_SERIALIZABLE)
- return false;
-
- if (!config.FeatureFlags.GetEnableMvccSnapshotReads())
- return false;
-
- if (txCtx.GetSnapshot().IsValid())
- return false;
-
- if (rollbackTx)
- return false;
- if (!commitTx)
- return true;
-
- size_t readPhases = 0;
- bool hasEffects = false;
-
- for (const auto &tx : physicalQuery.GetTransactions()) {
- switch (tx.GetType()) {
- case NKqpProto::TKqpPhyTx::TYPE_COMPUTE:
- // ignore pure computations
- break;
-
- default:
- ++readPhases;
- break;
- }
-
- if (tx.GetHasEffects()) {
- hasEffects = true;
- }
- }
-
- if (config.FeatureFlags.GetEnableKqpImmediateEffects() && physicalQuery.GetHasUncommittedChangesRead()) {
- return true;
- }
-
- // We don't want snapshot when there are effects at the moment,
- // because it hurts performance when there are multiple single-shard
- // reads and a single distributed commit. Taking snapshot costs
- // similar to an additional distributed transaction, and it's very
- // hard to predict when that happens, causing performance
- // degradation.
- if (hasEffects) {
- return false;
- }
-
- // We need snapshot when there are multiple table read phases, most
- // likely it involves multiple tables and we would have to use a
- // distributed commit otherwise. Taking snapshot helps as avoid TLI
- // for read-only transactions, and costs less than a final distributed
- // commit.
- return readPhases > 1;
-}
-
class TRequestFail : public yexception {
public:
Ydb::StatusIds::StatusCode Status;
@@ -124,11 +67,10 @@ public:
{}
};
-
struct TKqpQueryState {
TActorId Sender;
ui64 ProxyRequestId = 0;
- NKikimrKqp::TQueryRequest Request;
+ std::unique_ptr<TEvKqp::TEvQueryRequest> RequestEv;
ui64 ParametersSize = 0;
TPreparedQueryHolder::TConstPtr PreparedQuery;
TKqpCompileResult::TConstPtr CompileResult;
@@ -147,14 +89,13 @@ struct TKqpQueryState {
NKqpProto::TKqpStatsQuery Stats;
bool KeepSession = false;
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
NLWTrace::TOrbit Orbit;
NWilson::TSpan KqpSessionSpan;
ETableReadType MaxReadType = ETableReadType::Other;
- TULID TxId; // User tx
- TString TxId_Human = "";
+ TTxId TxId; // User tx
bool Commit = false;
bool Commited = false;
@@ -162,6 +103,126 @@ struct TKqpQueryState {
TDuration CpuTime;
std::optional<NCpuTime::TCpuTimer> CurrentTimer;
+ NKikimrKqp::EQueryAction GetAction() const {
+ return RequestEv->GetAction();
+ }
+
+ bool GetKeepSession() const {
+ return RequestEv->GetKeepSession();
+ }
+
+ const TString& GetQuery() const {
+ return RequestEv->GetQuery();
+ }
+
+ const TString& GetPreparedQuery() const {
+ return RequestEv->GetPreparedQuery();
+ }
+
+ NKikimrKqp::EQueryType GetType() const {
+ return RequestEv->GetType();
+ }
+
+ void EnsureAction() {
+ YQL_ENSURE(RequestEv->HasAction());
+ }
+
+ bool GetUsePublicResponseDataFormat() const {
+ return RequestEv->GetUsePublicResponseDataFormat();
+ }
+
+ void SetQueryDeadlines(const NKikimrConfig::TTableServiceConfig& service) {
+ auto now = TAppData::TimeProvider->Now();
+ auto cancelAfter = RequestEv->GetCancelAfter();
+ auto timeout = RequestEv->GetOperationTimeout();
+ if (cancelAfter.MilliSeconds() > 0) {
+ QueryDeadlines.CancelAt = now + cancelAfter;
+ }
+
+ auto timeoutMs = GetQueryTimeout(GetType(), timeout.MilliSeconds(), service);
+ QueryDeadlines.TimeoutAt = now + timeoutMs;
+ }
+
+ bool HasTopicOperations() const {
+ return RequestEv->HasTopicOperations();
+ }
+
+ bool GetQueryKeepInCache() const {
+ return RequestEv->GetQueryKeepInCache();
+ }
+
+ const TString& GetDatabase() const {
+ return RequestEv->GetDatabase();
+ }
+
+ TString ExtractQueryText() const {
+ if (CompileResult) {
+ if (CompileResult->Query) {
+ return CompileResult->Query->Text;
+ }
+ return {};
+ }
+ return RequestEv->GetQuery();
+ }
+
+ const ::NKikimrKqp::TTopicOperations& GetTopicOperations() const {
+ return RequestEv->GetTopicOperations();
+ }
+
+ bool NeedPersistentSnapshot() const {
+ auto type = GetType();
+ return (
+ type == NKikimrKqp::QUERY_TYPE_SQL_SCAN ||
+ type == NKikimrKqp::QUERY_TYPE_AST_SCAN
+ );
+ }
+
+ bool HasTxControl() const {
+ return RequestEv->HasTxControl();
+ }
+
+ const ::Ydb::Table::TransactionControl& GetTxControl() const {
+ return RequestEv->GetTxControl();
+ }
+
+ const ::NKikimrMiniKQL::TParams& GetParameters() const {
+ return RequestEv->GetParameters();
+ }
+
+ const ::google::protobuf::Map<TProtoStringType, ::Ydb::TypedValue>& GetYdbParameters() const {
+ return RequestEv->GetYdbParameters();
+ }
+
+ Ydb::Table::QueryStatsCollection::Mode GetStatsMode() const {
+ if (!RequestEv->HasCollectStats()) {
+ return Ydb::Table::QueryStatsCollection::STATS_COLLECTION_NONE;
+ }
+
+ auto cStats = RequestEv->GetCollectStats();
+ if (cStats == Ydb::Table::QueryStatsCollection::STATS_COLLECTION_UNSPECIFIED) {
+ return Ydb::Table::QueryStatsCollection::STATS_COLLECTION_NONE;
+ }
+
+ return cStats;
+ }
+
+ bool CollectStatsDefined() const {
+ return GetStatsMode() != Ydb::Table::QueryStatsCollection::STATS_COLLECTION_NONE;
+ }
+
+ bool HasPreparedQuery() const {
+ return RequestEv->HasPreparedQuery();
+ }
+
+ bool IsStreamResult() const {
+ auto type = GetType();
+ return (
+ type == NKikimrKqp::QUERY_TYPE_AST_SCAN ||
+ type == NKikimrKqp::QUERY_TYPE_SQL_SCAN ||
+ type == NKikimrKqp::QUERY_TYPE_SQL_QUERY
+ );
+ }
+
void ResetTimer() {
if (CurrentTimer) {
CpuTime += CurrentTimer->GetTime();
@@ -176,8 +237,7 @@ struct TKqpQueryState {
};
struct TKqpCleanupCtx {
- ui64 AbortedTransactionsCount = 0;
- ui64 TransactionsToBeAborted = 0;
+ std::deque<TIntrusivePtr<TKqpTransactionContext>> TransactionsToBeAborted;
bool IsWaitingForWorkerToClose = false;
bool Final = false;
TInstant Start = TInstant::Now();
@@ -206,10 +266,6 @@ private:
TKqpSessionActor* This;
};
-enum EWakeupTag {
- ClientLost,
-};
-
public:
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
return NKikimrServices::TActivity::KQP_SESSION_ACTOR;
@@ -225,7 +281,7 @@ public:
, ModuleResolverState(moduleResolverState)
, KqpSettings(kqpSettings)
, Config(CreateConfig(kqpSettings, workerSettings))
- , ExplicitTransactions(*Config->_KqpMaxActiveTxPerSession.Get())
+ , Transactions(*Config->_KqpMaxActiveTxPerSession.Get(), TDuration::Seconds(*Config->_KqpTxIdleTimeoutSec.Get()))
{
RequestCounters = MakeIntrusive<TKqpRequestCounters>();
RequestCounters->Counters = Counters;
@@ -245,6 +301,7 @@ public:
Config->FeatureFlags = AppData()->FeatureFlags;
+ RequestControls.Reqister(TlsActivationContext->AsActorContext());
Become(&TKqpSessionActor::ReadyState);
}
@@ -259,36 +316,43 @@ public:
return result;
}
- NYql::TKikimrQueryDeadlines GetQueryDeadlines(const NKikimrKqp::TQueryRequest& queryRequest) {
- NYql::TKikimrQueryDeadlines res;
-
- auto now = TAppData::TimeProvider->Now();
- if (queryRequest.GetCancelAfterMs()) {
- res.CancelAt = now + TDuration::MilliSeconds(queryRequest.GetCancelAfterMs());
- }
-
- auto timeoutMs = GetQueryTimeout(queryRequest.GetType(), queryRequest.GetTimeoutMs(), Settings.Service);
- res.TimeoutAt = now + timeoutMs;
- return res;
- }
-
- void MakeNewQueryState(NKikimrKqp::TQueryRequest* request) {
+ void MakeNewQueryState(TEvKqp::TEvQueryRequest::TPtr& ev) {
++QueryId;
YQL_ENSURE(!QueryState);
QueryState = std::make_shared<TKqpQueryState>();
- QueryState->Request.Swap(request);
+ QueryState->Sender = ev->Sender;
+ QueryState->ProxyRequestId = ev->Cookie;
+ QueryState->TraceId = ev->Get()->GetTraceId();
+ QueryState->IsDocumentApiRestricted = IsDocumentApiRestricted(ev->Get()->GetRequestType());
+ QueryState->StartTime = TInstant::Now();
+ QueryState->UserToken = ev->Get()->GetUserToken();
+ QueryState->ParametersSize = ev->Get()->GetParametersSize();
+ QueryState->RequestActorId = ev->Get()->GetRequestActorId();
+ auto selfId = SelfId();
+ auto as = TActivationContext::ActorSystem();
+ ev->Get()->SetClientLostAction(selfId, as);
+ QueryState->RequestEv.reset(ev->Release().Release());
+ QueryState->KeepSession = Settings.LongSession || QueryState->GetKeepSession();
+ QueryState->SetQueryDeadlines(Settings.Service);
+ auto action = QueryState->GetAction();
+
+ NWilson::TTraceId id;
+ if (false) { // change to enable Wilson tracing
+ id = NWilson::TTraceId::NewTraceId(TWilsonKqp::KqpSession, Max<ui32>());
+ LOG_I("wilson tracing started, id: " + std::to_string(id.GetTraceId()));
+ }
+ QueryState->KqpSessionSpan = NWilson::TSpan(TWilsonKqp::KqpSession, std::move(id), "Session.query." + NKikimrKqp::EQueryAction_Name(action), NWilson::EFlags::AUTO_END);
}
- bool ConvertParameters(TEvKqp::TEvQueryRequest::TPtr& ev) {
- ui64 proxyRequestId = ev->Cookie;
- auto& event = ev->Get()->Record;
+ bool ConvertParameters() {
+ auto& event = QueryState->RequestEv->Record;
if (!event.GetRequest().HasParameters() && event.GetRequest().YdbParametersSize()) {
try {
ConvertYdbParamsToMiniKQLParams(event.GetRequest().GetYdbParameters(), *event.MutableRequest()->MutableParameters());
} catch (const std::exception& ex) {
TString message = TStringBuilder() << "Failed to parse query parameters. "<< ex.what();
- ReplyProcessError(ev->Sender, proxyRequestId, Ydb::StatusIds::BAD_REQUEST, message);
+ ReplyProcessError(QueryState->Sender, QueryState->ProxyRequestId, Ydb::StatusIds::BAD_REQUEST, message);
return false;
}
}
@@ -297,95 +361,69 @@ public:
}
void ForwardRequest(TEvKqp::TEvQueryRequest::TPtr& ev) {
- if (!ConvertParameters(ev))
+ if (!ConvertParameters())
return;
+ QueryState->RequestEv->PrepareRemote();
+
if (!WorkerId) {
std::unique_ptr<IActor> workerActor(CreateKqpWorkerActor(SelfId(), SessionId, KqpSettings, Settings,
ModuleResolverState, Counters));
WorkerId = RegisterWithSameMailbox(workerActor.release());
}
- TlsActivationContext->Send(new IEventHandle(*WorkerId, SelfId(), ev->Release().Release(), ev->Flags, ev->Cookie,
+ TlsActivationContext->Send(new IEventHandle(*WorkerId, SelfId(), QueryState->RequestEv.release(), ev->Flags, ev->Cookie,
nullptr, std::move(ev->TraceId)));
Become(&TKqpSessionActor::ExecuteState);
}
void ForwardResponse(TEvKqp::TEvQueryResponse::TPtr& ev) {
- TlsActivationContext->Send(new IEventHandle(Owner, SelfId(), ev->Release().Release(), ev->Flags, ev->Cookie,
- nullptr, std::move(ev->TraceId)));
+ QueryResponse = std::unique_ptr<TEvKqp::TEvQueryResponse>(ev->Release().Release());
Cleanup();
}
- TIntrusivePtr<TKqpTransactionContext> FindTransaction(const TULID& id) {
- auto it = ExplicitTransactions.Find(id);
- if (it != ExplicitTransactions.End()) {
- auto& value = it.Value();
- value->Touch();
- return value;
- }
-
- return {};
- }
-
- void RemoveTransaction(const TULID& txId) {
- auto it = ExplicitTransactions.FindWithoutPromote(txId);
- if (it != ExplicitTransactions.End()) {
- ExplicitTransactions.Erase(it);
- }
+ void ReplyTransactionNotFound(const TString& txId) {
+ std::vector<TIssue> issues{YqlIssue(TPosition(), TIssuesIds::KIKIMR_TRANSACTION_NOT_FOUND,
+ TStringBuilder() << "Transaction not found: " << txId)};
+ ReplyQueryError(Ydb::StatusIds::NOT_FOUND, "", MessageFromIssues(issues));
}
void RollbackTx() {
- auto& queryRequest = QueryState->Request;
- YQL_ENSURE(queryRequest.HasTxControl(),
- "Can't perform ROLLBACK_TX: TxControl isn't set in TQueryRequest");
- const auto& txControl = queryRequest.GetTxControl();
+ YQL_ENSURE(QueryState->HasTxControl(), "Can't perform ROLLBACK_TX: TxControl isn't set in TQueryRequest");
+ const auto& txControl = QueryState->GetTxControl();
QueryState->Commit = txControl.commit_tx();
- TULID txId;
- txId.ParseString(txControl.tx_id());
- auto txCtx = FindTransaction(txId);
- if (!txCtx) {
- std::vector<TIssue> issues{YqlIssue(TPosition(), TIssuesIds::KIKIMR_TRANSACTION_NOT_FOUND,
- TStringBuilder() << "Transaction not found: " << txControl.tx_id())};
- ReplyQueryError(Ydb::StatusIds::NOT_FOUND, "", MessageFromIssues(issues));
- } else {
- txCtx->Invalidate();
- InvalidateExplicitTransaction(txCtx, txId);
-
+ auto txId = TTxId::FromString(txControl.tx_id());
+ if (auto ctx = Transactions.ReleaseTransaction(txId)) {
+ ctx->Invalidate();
+ Transactions.AddToBeAborted(std::move(ctx));
ReplySuccess();
+ } else {
+ ReplyTransactionNotFound(txControl.tx_id());
}
}
void CommitTx() {
- auto& queryRequest = QueryState->Request;
-
- YQL_ENSURE(queryRequest.HasTxControl());
-
- auto& txControl = queryRequest.GetTxControl();
+ YQL_ENSURE(QueryState->HasTxControl());
+ const auto& txControl = QueryState->GetTxControl();
YQL_ENSURE(txControl.tx_selector_case() == Ydb::Table::TransactionControl::kTxId, "Can't commit transaction - "
- << " there is no TxId in Query's TxControl, queryRequest: " << queryRequest.DebugString());
+ << " there is no TxId in Query's TxControl");
QueryState->Commit = txControl.commit_tx();
- TULID txId;
- txId.ParseString(txControl.tx_id());
- auto txCtx = FindTransaction(txId);
+ auto txId = TTxId::FromString(txControl.tx_id());
+ auto txCtx = Transactions.Find(txId);
LOG_D("queryRequest TxControl: " << txControl.DebugString() << " txCtx: " << (void*)txCtx.Get());
if (!txCtx) {
- std::vector<TIssue> issues{YqlIssue(TPosition(), TIssuesIds::KIKIMR_TRANSACTION_NOT_FOUND,
- TStringBuilder() << "Transaction not found: " << txControl.tx_id())};
- ReplyQueryError(Ydb::StatusIds::NOT_FOUND, "", MessageFromIssues(issues));
+ ReplyTransactionNotFound(txControl.tx_id());
return;
}
QueryState->TxCtx = std::move(txCtx);
QueryState->QueryData = std::make_shared<TQueryData>(QueryState->TxCtx->TxAlloc);
QueryState->TxId = txId;
- QueryState->TxId_Human = txControl.tx_id();
if (!CheckTransacionLocks()) {
return;
}
bool replied = ExecutePhyTx(/*query*/ nullptr, /*tx*/ nullptr, /*commit*/ true);
-
if (!replied) {
Become(&TKqpSessionActor::ExecuteState);
}
@@ -411,44 +449,36 @@ public:
}
}
- void HandleWakeup(TEvents::TEvWakeup::TPtr &ev) {
- switch ((EWakeupTag) ev->Get()->Tag) {
- case EWakeupTag::ClientLost:
- LOG_D("Got TEvWakeup ClientLost event, send AbortExecution to executor: "
- << ExecuterId);
+ void HandleClientLost(NGRpcService::TEvClientLost::TPtr&) {
+ LOG_D("Got ClientLost event, send AbortExecution to executor: "
+ << ExecuterId);
- if (ExecuterId) {
- auto abortEv = TEvKqp::TEvAbortExecution::Aborted("Client lost"); // any status code can be here
+ if (ExecuterId) {
+ auto abortEv = TEvKqp::TEvAbortExecution::Aborted("Client lost"); // any status code can be here
- Send(ExecuterId, abortEv.Release());
- }
- Cleanup();
- break;
- default:
- YQL_ENSURE(false, "Unexpected Wakeup tag for HandleWakeup: " << (ui64) ev->Get()->Tag);
+ Send(ExecuterId, abortEv.Release());
}
+ Cleanup();
}
void HandleReady(TEvKqp::TEvQueryRequest::TPtr& ev, const NActors::TActorContext& ctx) {
ui64 proxyRequestId = ev->Cookie;
- auto& event = ev->Get()->Record;
- YQL_ENSURE(event.GetRequest().GetSessionId() == SessionId,
- "Invalid session, expected: " << SessionId << ", got: " << event.GetRequest().GetSessionId());
-
- if (event.HasYdbStatus()) {
- if (event.GetYdbStatus() != Ydb::StatusIds::SUCCESS) {
- NYql::TIssues issues;
- NYql::IssuesFromMessage(event.GetQueryIssues(), issues);
- TString errMsg = issues.ToString();
-
- LOG_N(TKqpRequestInfo("", SessionId)
- << "Got invalid query request, reply with status: "
- << event.GetYdbStatus()
- << " msg: "
- << errMsg <<".");
- ReplyProcessError(ev->Sender, proxyRequestId, event.GetYdbStatus(), errMsg);
- return;
- }
+ YQL_ENSURE(ev->Get()->GetSessionId() == SessionId,
+ "Invalid session, expected: " << SessionId << ", got: " << ev->Get()->GetSessionId());
+
+ if (ev->Get()->HasYdbStatus() && ev->Get()->GetYdbStatus() != Ydb::StatusIds::SUCCESS) {
+ NYql::TIssues issues;
+ NYql::IssuesFromMessage(ev->Get()->GetQueryIssues(), issues);
+ TString errMsg = issues.ToString();
+ auto status = ev->Get()->GetYdbStatus();
+
+ LOG_N(TKqpRequestInfo("", SessionId)
+ << "Got invalid query request, reply with status: "
+ << status
+ << " msg: "
+ << errMsg <<".");
+ ReplyProcessError(ev->Sender, proxyRequestId, status, errMsg);
+ return;
}
if (ShutdownState && ShutdownState->SoftTimeoutReached()) {
@@ -459,61 +489,35 @@ public:
return;
}
- MakeNewQueryState(event.MutableRequest());
+ MakeNewQueryState(ev);
TTimerGuard timer(this);
- auto& queryRequest = QueryState->Request;
+ YQL_ENSURE(QueryState->GetDatabase() == Settings.Database,
+ "Wrong database, expected:" << Settings.Database << ", got: " << QueryState->GetDatabase());
- YQL_ENSURE(queryRequest.GetDatabase() == Settings.Database,
- "Wrong database, expected:" << Settings.Database << ", got: " << queryRequest.GetDatabase());
-
- YQL_ENSURE(queryRequest.HasAction());
- auto action = queryRequest.GetAction();
-
- NWilson::TTraceId id;
- if (false) { // change to enable Wilson tracing
- id = NWilson::TTraceId::NewTraceId(TWilsonKqp::KqpSession, Max<ui32>());
- LOG_I("wilson tracing started, id: " + std::to_string(id.GetTraceId()));
- }
- QueryState->KqpSessionSpan = NWilson::TSpan(TWilsonKqp::KqpSession, std::move(id), "Session.query." + NKikimrKqp::EQueryAction_Name(action), NWilson::EFlags::AUTO_END);
+ QueryState->EnsureAction();
+ auto action = QueryState->GetAction();
LWTRACK(KqpSessionQueryRequest,
QueryState->Orbit,
- queryRequest.GetDatabase(),
- queryRequest.HasType() ? queryRequest.GetType() : NKikimrKqp::QUERY_TYPE_UNDEFINED,
+ QueryState->GetDatabase(),
+ QueryState->GetType(),
action,
- queryRequest.GetQuery());
-
- QueryState->Sender = ev->Sender;
- QueryState->ProxyRequestId = proxyRequestId;
- QueryState->TraceId = event.GetTraceId();
- QueryState->IsDocumentApiRestricted = IsDocumentApiRestricted(event.GetRequestType());
- QueryState->StartTime = TInstant::Now();
- QueryState->UserToken = event.GetUserToken();
- QueryState->QueryDeadlines = GetQueryDeadlines(queryRequest);
+ QueryState->GetQuery());
LOG_D("received request,"
<< " proxyRequestId: " << proxyRequestId
- << " prepared: " << queryRequest.HasPreparedQuery()
- << " tx_control: " << queryRequest.HasTxControl()
+ << " prepared: " << QueryState->HasPreparedQuery()
+ << " tx_control: " << QueryState->HasTxControl()
<< " action: " << action
- << " type: " << (queryRequest.HasType() ? queryRequest.GetType() : NKikimrKqp::QUERY_TYPE_UNDEFINED)
- << " text: " << (queryRequest.HasQuery() ? queryRequest.GetQuery() : "")
+ << " type: " << QueryState->GetType()
+ << " text: " << QueryState->GetQuery()
);
- QueryState->ParametersSize = queryRequest.GetParameters().ByteSize();
- QueryState->RequestActorId = ActorIdFromProto(event.GetRequestActorId());
- QueryState->KeepSession = Settings.LongSession || queryRequest.GetKeepSession();
-
- auto selfId = SelfId();
- auto as = TActivationContext::ActorSystem();
- ev->Get()->SetClientLostAction(selfId, EWakeupTag::ClientLost, as);
-
switch (action) {
case NKikimrKqp::QUERY_ACTION_EXECUTE:
case NKikimrKqp::QUERY_ACTION_PREPARE:
case NKikimrKqp::QUERY_ACTION_EXECUTE_PREPARED: {
- YQL_ENSURE(queryRequest.HasType());
- auto type = queryRequest.GetType();
+ auto type = QueryState->GetType();
YQL_ENSURE(type != NKikimrKqp::QUERY_TYPE_UNDEFINED, "query type is undefined");
if (action == NKikimrKqp::QUERY_ACTION_PREPARE) {
@@ -524,39 +528,32 @@ public:
}
if (!IsQueryTypeSupported(type)) {
- event.MutableRequest()->Swap(&QueryState->Request);
- ForwardRequest(ev);
- return;
+ return ForwardRequest(ev);
}
break;
}
case NKikimrKqp::QUERY_ACTION_BEGIN_TX: {
- YQL_ENSURE(queryRequest.HasTxControl(),
+ YQL_ENSURE(QueryState->HasTxControl(),
"Can't perform BEGIN_TX: TxControl isn't set in TQueryRequest");
- auto& txControl = queryRequest.GetTxControl();
+ const auto& txControl = QueryState->GetTxControl();
QueryState->Commit = txControl.commit_tx();
BeginTx(txControl.begin_tx());
ReplySuccess();
return;
}
case NKikimrKqp::QUERY_ACTION_ROLLBACK_TX: {
- RollbackTx();
- return;
+ return RollbackTx();
}
case NKikimrKqp::QUERY_ACTION_COMMIT_TX:
- CommitTx();
- return;
+ return CommitTx();
// not supported yet
case NKikimrKqp::QUERY_ACTION_EXPLAIN:
case NKikimrKqp::QUERY_ACTION_VALIDATE:
case NKikimrKqp::QUERY_ACTION_PARSE:
- event.MutableRequest()->Swap(&QueryState->Request);
- ForwardRequest(ev);
- return;
+ return ForwardRequest(ev);
case NKikimrKqp::QUERY_ACTION_TOPIC:
- AddOffsetsToTransaction(ctx);
- return;
+ return AddOffsetsToTransaction(ctx);
}
CompileQuery();
@@ -568,9 +565,9 @@ public:
return;
}
- YQL_ENSURE(QueryState->Request.HasTopicOperations());
+ YQL_ENSURE(QueryState->HasTopicOperations());
- const NKikimrKqp::TTopicOperations& operations = QueryState->Request.GetTopicOperations();
+ const NKikimrKqp::TTopicOperations& operations = QueryState->GetTopicOperations();
TMaybe<TString> consumer;
if (operations.HasConsumer()) {
@@ -581,7 +578,7 @@ public:
for (auto& topic : operations.GetTopics()) {
auto path =
- CanonizePath(NPersQueue::GetFullTopicPath(ctx, QueryState->Request.GetDatabase(), topic.path()));
+ CanonizePath(NPersQueue::GetFullTopicPath(ctx, QueryState->GetDatabase(), topic.path()));
for (auto& partition : topic.partitions()) {
if (partition.partition_offsets().empty()) {
@@ -599,10 +596,10 @@ public:
}
auto navigate = std::make_unique<NSchemeCache::TSchemeCacheNavigate>();
- navigate->DatabaseName = CanonizePath(QueryState->Request.GetDatabase());
+ navigate->DatabaseName = CanonizePath(QueryState->GetDatabase());
QueryState->TopicOperations.FillSchemeCacheNavigate(*navigate,
std::move(consumer));
- navigate->UserToken = new NACLib::TUserToken(QueryState->UserToken);
+ navigate->UserToken = QueryState->UserToken;
Become(&TKqpSessionActor::TopicOpsState);
ctx.Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvNavigateKeySet(navigate.release()));
@@ -610,26 +607,24 @@ public:
void CompileQuery() {
YQL_ENSURE(QueryState);
- auto& queryRequest = QueryState->Request;
-
TMaybe<TKqpQueryId> query;
TMaybe<TString> uid;
bool keepInCache = false;
- switch (queryRequest.GetAction()) {
+ switch (QueryState->GetAction()) {
case NKikimrKqp::QUERY_ACTION_EXECUTE:
- query = TKqpQueryId(Settings.Cluster, Settings.Database, queryRequest.GetQuery(), queryRequest.GetType());
- keepInCache = queryRequest.GetQueryCachePolicy().keep_in_cache() && query->IsSql();
+ query = TKqpQueryId(Settings.Cluster, Settings.Database, QueryState->GetQuery(), QueryState->GetType());
+ keepInCache = QueryState->GetQueryKeepInCache() && query->IsSql();
break;
case NKikimrKqp::QUERY_ACTION_PREPARE:
- query = TKqpQueryId(Settings.Cluster, Settings.Database, queryRequest.GetQuery(), queryRequest.GetType());
+ query = TKqpQueryId(Settings.Cluster, Settings.Database, QueryState->GetQuery(), QueryState->GetType());
keepInCache = query->IsSql();
break;
case NKikimrKqp::QUERY_ACTION_EXECUTE_PREPARED:
- uid = queryRequest.GetPreparedQuery();
- keepInCache = queryRequest.GetQueryCachePolicy().keep_in_cache();
+ uid = QueryState->GetPreparedQuery();
+ keepInCache = QueryState->GetQueryKeepInCache();
break;
default:
@@ -683,10 +678,8 @@ public:
QueryState->CompileResult = compileResult;
QueryState->CompileStats.Swap(&ev->Get()->Stats);
QueryState->PreparedQuery = compileResult->PreparedQuery;
- QueryState->Request.SetQuery(QueryState->PreparedQuery->GetText());
- auto& queryRequest = QueryState->Request;
- if (queryRequest.GetAction() == NKikimrKqp::QUERY_ACTION_PREPARE) {
+ if (QueryState->GetAction() == NKikimrKqp::QUERY_ACTION_PREPARE) {
ReplyPrepareResult(compileResult);
return;
}
@@ -699,20 +692,12 @@ public:
QueryState->TxCtx->OnBeginQuery();
- if (queryRequest.GetType() == NKikimrKqp::QUERY_TYPE_SQL_SCAN
- || queryRequest.GetType() == NKikimrKqp::QUERY_TYPE_AST_SCAN
- ) {
- AcquirePersistentSnapshot();
- return;
- } else if (queryRequest.GetType() == NKikimrKqp::QUERY_TYPE_SQL_QUERY) {
- // TODO: Switch to MVCC snapshots after moving to separate executer.
- AcquirePersistentSnapshot();
- return;
+ if (QueryState->NeedPersistentSnapshot()) {
+ return AcquirePersistentSnapshot();
} else if (NeedSnapshot(*QueryState->TxCtx, *Config, /*rollback*/ false, QueryState->Commit,
QueryState->PreparedQuery->GetPhysicalQuery()))
{
- AcquireMvccSnapshot();
- return;
+ return AcquireMvccSnapshot();
}
// Can reply inside (in case of deferred-only transactions) and become ReadyState
@@ -738,6 +723,12 @@ public:
tablesSet.insert(input.GetStreamLookup().GetTable().GetPath());
}
}
+
+ for (const auto& source : stage.GetSources()) {
+ if (source.GetTypeCase() == NKqpProto::TKqpSource::kReadRangesSource) {
+ tablesSet.insert(source.GetReadRangesSource().GetTable().GetPath());
+ }
+ }
}
}
TVector<TString> tables(tablesSet.begin(), tablesSet.end());
@@ -765,14 +756,27 @@ public:
Send(snapMgrActorId, ev.release());
}
+ Ydb::StatusIds::StatusCode StatusForSnapshotError(NKikimrIssues::TStatusIds::EStatusCode status) {
+ switch (status) {
+ case NKikimrIssues::TStatusIds::SCHEME_ERROR:
+ return Ydb::StatusIds::SCHEME_ERROR;
+ case NKikimrIssues::TStatusIds::TIMEOUT:
+ return Ydb::StatusIds::TIMEOUT;
+ case NKikimrIssues::TStatusIds::OVERLOADED:
+ return Ydb::StatusIds::OVERLOADED;
+ default:
+ // snapshot is acquired before transactions execution, so we can return UNAVAILABLE here
+ return Ydb::StatusIds::UNAVAILABLE;
+ }
+ }
+
void HandleExecute(TEvKqpSnapshot::TEvCreateSnapshotResponse::TPtr& ev) {
TTimerGuard timer(this);
auto *response = ev->Get();
if (response->Status != NKikimrIssues::TStatusIds::SUCCESS) {
auto& issues = response->Issues;
- LOG_E("failed to acquire snapshot: " << issues.ToString());
- ReplyQueryError(GetYdbStatus(issues), "", MessageFromIssues(issues));
+ ReplyQueryError(StatusForSnapshotError(response->Status), "", MessageFromIssues(issues));
return;
}
QueryState->TxCtx->SnapshotHandle.Snapshot = response->Snapshot;
@@ -781,43 +785,24 @@ public:
ExecuteOrDefer();
}
- void RemoveOldTransactions() {
- if (ExplicitTransactions.Size() == *Config->_KqpMaxActiveTxPerSession.Get()) {
- auto it = ExplicitTransactions.FindOldest();
- auto idleDuration = TInstant::Now() - it.Value()->LastAccessTime;
- if (idleDuration.Seconds() >= *Config->_KqpTxIdleTimeoutSec.Get()) {
- it.Value()->Invalidate();
- TransactionsToBeAborted.emplace_back(std::move(it.Value()));
- ExplicitTransactions.Erase(it);
- ++EvictedTx;
- } else {
- std::vector<TIssue> issues{
- YqlIssue({}, TIssuesIds::KIKIMR_TOO_MANY_TRANSACTIONS)
- };
- ythrow TRequestFail(Ydb::StatusIds::BAD_SESSION, MessageFromIssues(issues))
- << "Too many transactions, current active: " << ExplicitTransactions.Size()
- << " MaxTxPerSession: " << *Config->_KqpMaxActiveTxPerSession.Get();
- }
- }
- }
-
- void CreateNewTx() {
- RemoveOldTransactions();
- auto success = ExplicitTransactions.Insert(std::make_pair(QueryState->TxId, QueryState->TxCtx));
- YQL_ENSURE(success);
- }
-
void BeginTx(const Ydb::Table::TransactionSettings& settings) {
QueryState->TxId = UlidGen.Next();
- QueryState->TxId_Human = QueryState->TxId.ToString();
QueryState->TxCtx = MakeIntrusive<TKqpTransactionContext>(false, AppData()->FunctionRegistry, AppData()->TimeProvider, AppData()->RandomProvider);
QueryState->QueryData = std::make_shared<TQueryData>(QueryState->TxCtx->TxAlloc);
QueryState->TxCtx->SetIsolationLevel(settings);
- CreateNewTx();
+ QueryState->TxCtx->OnBeginQuery();
+
+ if (!Transactions.CreateNew(QueryState->TxId, QueryState->TxCtx)) {
+ std::vector<TIssue> issues{
+ YqlIssue({}, TIssuesIds::KIKIMR_TOO_MANY_TRANSACTIONS)};
+ ythrow TRequestFail(Ydb::StatusIds::BAD_SESSION,
+ MessageFromIssues(issues))
+ << "Too many transactions, current active: " << Transactions.Size()
+ << " MaxTxPerSession: " << Transactions.MaxSize();
+ }
Counters->ReportTxCreated(Settings.DbCounters);
- Counters->ReportBeginTransaction(Settings.DbCounters, EvictedTx, ExplicitTransactions.Size(),
- TransactionsToBeAborted.size());
+ Counters->ReportBeginTransaction(Settings.DbCounters, Transactions.EvictedTx, Transactions.Size(), Transactions.ToBeAbortedSize());
}
std::pair<bool, TIssues> ApplyTableOperations(TKqpTransactionContext* txCtx, const NKqpProto::TKqpPhyQuery& query) {
@@ -831,27 +816,21 @@ public:
}
bool PrepareQueryTransaction() {
- auto& queryRequest = QueryState->Request;
-
- if (queryRequest.HasTxControl()) {
- auto& txControl = queryRequest.GetTxControl();
+ if (QueryState->HasTxControl()) {
+ const auto& txControl = QueryState->GetTxControl();
QueryState->Commit = txControl.commit_tx();
switch (txControl.tx_selector_case()) {
case Ydb::Table::TransactionControl::kTxId: {
- TULID txId;
- txId.ParseString(txControl.tx_id());
- auto it = ExplicitTransactions.Find(txId);
- if (it == ExplicitTransactions.End()) {
- std::vector<TIssue> issues{YqlIssue(TPosition(), TIssuesIds::KIKIMR_TRANSACTION_NOT_FOUND,
- TStringBuilder() << "Transaction not found: " << txControl.tx_id())};
- ReplyQueryError(Ydb::StatusIds::NOT_FOUND, "", MessageFromIssues(issues));
+ auto txId = TTxId::FromString(txControl.tx_id());
+ auto txCtx = Transactions.Find(txId);
+ if (!txCtx) {
+ ReplyTransactionNotFound(txControl.tx_id());
return false;
}
- QueryState->TxCtx = *it;
+ QueryState->TxCtx = txCtx;
QueryState->QueryData = std::make_shared<TQueryData>(QueryState->TxCtx->TxAlloc);
QueryState->TxId = txId;
- QueryState->TxId_Human = txControl.tx_id();
break;
}
case Ydb::Table::TransactionControl::kBeginTx: {
@@ -887,9 +866,8 @@ public:
return false;
}
- auto& queryRequest = QueryState->Request;
- auto action = queryRequest.GetAction();
- auto type = queryRequest.GetType();
+ auto action = QueryState->GetAction();
+ auto type = QueryState->GetType();
if (action == NKikimrKqp::QUERY_ACTION_EXECUTE && type == NKikimrKqp::QUERY_TYPE_SQL_DML
|| action == NKikimrKqp::QUERY_ACTION_EXECUTE && type == NKikimrKqp::QUERY_TYPE_AST_DML)
@@ -915,8 +893,8 @@ public:
YQL_ENSURE(false, "Unexpected query action: " << action);
}
- ParseParameters(QueryState->Request.GetParameters());
- ParseParameters(QueryState->Request.GetYdbParameters());
+ ParseParameters(QueryState->GetParameters());
+ ParseParameters(QueryState->GetYdbParameters());
return true;
}
@@ -971,8 +949,7 @@ public:
request.CancelAfter = cancelAt - now;
}
- EKikimrStatsMode statsMode = GetStatsModeInt(queryState->Request);
- request.StatsMode = GetStatsMode(statsMode);
+ request.StatsMode = queryState->GetStatsMode();
}
const auto& limits = GetQueryLimits(Settings);
@@ -1009,8 +986,9 @@ public:
request.MaxComputeActors = Config->_KqpMaxComputeActors.Get().GetRef();
request.DisableLlvmForUdfStages = Config->DisableLlvmForUdfStages();
- request.LlvmEnabled = Config->GetEnableLlvm() != EOptionalFlag::Disabled;
YQL_ENSURE(queryState);
+ bool enableLlvm = queryState->PreparedQuery->GetEnableLlvm().value_or(true);
+ request.LlvmEnabled = enableLlvm && IsSqlQuery(queryState->GetType());
request.Snapshot = queryState->TxCtx->GetSnapshot();
return request;
@@ -1019,8 +997,12 @@ public:
IKqpGateway::TExecPhysicalRequest PrepareGenericRequest(TKqpQueryState *queryState) {
auto request = PrepareBaseRequest(queryState, queryState->TxCtx->TxAlloc);
- YQL_ENSURE(queryState);
- request.Snapshot = queryState->TxCtx->GetSnapshot();
+ if (queryState) {
+ request.Snapshot = queryState->TxCtx->GetSnapshot();
+ request.IsolationLevel = *queryState->TxCtx->EffectiveIsolationLevel;
+ } else {
+ request.IsolationLevel = NKikimrKqp::ISOLATION_LEVEL_SERIALIZABLE;
+ }
return request;
}
@@ -1191,8 +1173,14 @@ public:
if (QueryState->Commit && Config->FeatureFlags.GetEnableKqpImmediateEffects() && phyQuery.GetHasUncommittedChangesRead()) {
// every phy tx should acquire LockTxId, so commit is sent separately at the end
commit = QueryState->CurrentTx >= phyQuery.TransactionsSize();
- } else if (QueryState->Commit) {
- commit = QueryState->CurrentTx >= phyQuery.TransactionsSize() - 1;
+ } else if (QueryState->Commit && QueryState->CurrentTx >= phyQuery.TransactionsSize() - 1) {
+ if (!tx) {
+ // no physical transactions left, perform commit
+ commit = true;
+ } else {
+ // we can merge commit with last tx only for read-only transactions
+ commit = txCtx.DeferredEffects.Empty();
+ }
}
if (tx || commit) {
@@ -1275,8 +1263,10 @@ public:
<< " EraseLocks: " << request.EraseLocks);
for (auto& [lockId, lock] : txCtx.Locks.LocksMap) {
- request.Locks.emplace_back(lock.GetValueRef(txCtx.Locks.LockType));
+ auto dsLock = ExtractLock(lock.GetValueRef(txCtx.Locks.LockType));
+ request.DataShardLocks[dsLock.GetDataShard()].emplace_back(dsLock);
}
+
}
request.TopicOperations = std::move(txCtx.TopicOperations);
@@ -1288,7 +1278,7 @@ public:
QueryState->Orbit,
QueryState->CurrentTx,
request.Transactions.size(),
- request.Locks.size(),
+ txCtx.Locks.Size(),
request.AcquireLocksTxId.Defined());
SendToExecuter(std::move(request));
@@ -1300,12 +1290,14 @@ public:
if (QueryState) {
request.Orbit = std::move(QueryState->Orbit);
}
+ request.PerRequestDataSizeLimit = RequestControls.PerRequestDataSizeLimit;
+ request.MaxShardCount = RequestControls.MaxShardCount;
request.TraceId = QueryState ? QueryState->KqpSessionSpan.GetTraceId() : NWilson::TTraceId();
LOG_D("Sending to Executer TraceId: " << request.TraceId.GetTraceId() << " " << request.TraceId.GetSpanIdSize());
auto executerActor = CreateKqpExecuter(std::move(request), Settings.Database,
- (QueryState && QueryState->UserToken) ? TMaybe<TString>(QueryState->UserToken) : Nothing(),
- RequestCounters);
+ QueryState ? QueryState->UserToken : TIntrusiveConstPtr<NACLib::TUserToken>(),
+ RequestCounters, Settings.Service.GetExecuterRetriesConfig());
auto exId = RegisterWithSameMailbox(executerActor);
LOG_D("Created new KQP executer: " << exId);
@@ -1372,6 +1364,11 @@ public:
}
void HandleExecute(TEvKqpExecuter::TEvTxResponse::TPtr& ev) {
+ // outdated response from dead executer.
+ // it this case we should just ignore the event.
+ if (ExecuterId != ev->Sender)
+ return;
+
TTimerGuard timer(this);
ProcessExecuterResult(ev->Get());
}
@@ -1469,21 +1466,10 @@ public:
ReplyQueryError(NYql::NDq::DqStatusToYdbStatus(msg.GetStatusCode()), "Got AbortExecution", MessageFromIssues(issues));
}
- TString ExtractQueryText() const {
- auto compileResult = QueryState->CompileResult;
- if (compileResult) {
- if (compileResult->Query) {
- return compileResult->Query->Text;
- }
- return {};
- }
- return QueryState->Request.GetQuery();
- }
-
void CollectSystemViewQueryStats(const NKqpProto::TKqpStatsQuery* stats, TDuration queryDuration,
const TString& database, ui64 requestUnits)
{
- auto type = QueryState->Request.GetType();
+ auto type = QueryState->GetType();
switch (type) {
case NKikimrKqp::QUERY_TYPE_SQL_DML:
case NKikimrKqp::QUERY_TYPE_PREPARED_DML:
@@ -1491,9 +1477,9 @@ public:
case NKikimrKqp::QUERY_TYPE_SQL_SCRIPT:
case NKikimrKqp::QUERY_TYPE_SQL_SCRIPT_STREAMING:
case NKikimrKqp::QUERY_TYPE_SQL_QUERY: {
- TString text = ExtractQueryText();
+ TString text = QueryState->ExtractQueryText();
if (IsQueryAllowedToLog(text)) {
- auto userSID = NACLib::TUserToken(QueryState->UserToken).GetUserSID();
+ auto userSID = QueryState->UserToken->GetUserSID();
NSysView::CollectQueryStats(TlsActivationContext->AsActorContext(), stats, queryDuration, text,
userSID, QueryState->ParametersSize, database, type, requestUnits);
}
@@ -1516,24 +1502,20 @@ public:
auto requestInfo = TKqpRequestInfo(QueryState->TraceId, SessionId);
YQL_ENSURE(QueryState);
- const auto& queryRequest = QueryState->Request;
-
- if (IsExecuteAction(queryRequest.GetAction())) {
+ if (IsExecuteAction(QueryState->GetAction())) {
auto ru = NRuCalc::CalcRequestUnit(*stats);
record->SetConsumedRu(ru);
auto now = TInstant::Now();
auto queryDuration = now - QueryState->StartTime;
- CollectSystemViewQueryStats(stats, queryDuration, queryRequest.GetDatabase(), ru);
+ CollectSystemViewQueryStats(stats, queryDuration, QueryState->GetDatabase(), ru);
SlowLogQuery(TlsActivationContext->AsActorContext(), Config.Get(), requestInfo, queryDuration,
record->GetYdbStatus(), QueryState->UserToken, QueryState->ParametersSize, record,
- [this]() { return this->ExtractQueryText(); });
+ [this]() { return this->QueryState->ExtractQueryText(); });
}
- bool reportStats = (GetStatsModeInt(queryRequest) != EKikimrStatsMode::None);
- if (reportStats) {
+ if (QueryState->CollectStatsDefined()) {
response->SetQueryPlan(SerializeAnalyzePlan(*stats));
-
response->MutableQueryStats()->Swap(stats);
}
}
@@ -1549,11 +1531,12 @@ public:
void FillTxInfo(NKikimrKqp::TQueryResponse* response) {
YQL_ENSURE(QueryState);
if (QueryState->Commit) {
- RemoveTransaction(QueryState->TxId);
- QueryState->TxId = CreateEmptyULID();
- QueryState->TxId_Human = "";
+ if (auto ctx = Transactions.ReleaseTransaction(QueryState->TxId)) {
+ Transactions.AddToBeAborted(std::move(ctx));
+ }
+ QueryState->TxId = TTxId();
}
- response->MutableTxMeta()->set_id(QueryState->TxId_Human);
+ response->MutableTxMeta()->set_id(QueryState->TxId.GetHumanStr());
if (QueryState->TxCtx) {
auto txInfo = QueryState->TxCtx->GetInfo();
@@ -1571,7 +1554,7 @@ public:
auto now = TInstant::Now();
auto queryDuration = now - QueryState->StartTime;
- Counters->ReportQueryLatency(Settings.DbCounters, QueryState->Request.GetAction(), queryDuration);
+ Counters->ReportQueryLatency(Settings.DbCounters, QueryState->GetAction(), queryDuration);
if (QueryState->MaxReadType == ETableReadType::FullScan) {
Counters->ReportQueryWithFullScan(Settings.DbCounters);
@@ -1628,15 +1611,14 @@ public:
bool replyQueryId = false;
bool replyQueryParameters = false;
- auto& queryRequest = QueryState->Request;
- switch (queryRequest.GetAction()) {
+ switch (QueryState->GetAction()) {
case NKikimrKqp::QUERY_ACTION_PREPARE:
replyQueryId = true;
replyQueryParameters = true;
break;
case NKikimrKqp::QUERY_ACTION_EXECUTE:
- replyQueryParameters = replyQueryId = queryRequest.GetQueryCachePolicy().keep_in_cache();
+ replyQueryParameters = replyQueryId = QueryState->GetQueryKeepInCache();
break;
case NKikimrKqp::QUERY_ACTION_PARSE:
@@ -1662,15 +1644,9 @@ public:
response->SetPreparedQuery(queryId);
}
- bool useYdbResponseFormat = QueryState->Request.GetUsePublicResponseDataFormat();
-
+ bool useYdbResponseFormat = QueryState->GetUsePublicResponseDataFormat();
// Result for scan query is sent directly to target actor.
- bool streamResult =
- QueryState->Request.GetType() == NKikimrKqp::QUERY_TYPE_AST_SCAN ||
- QueryState->Request.GetType() == NKikimrKqp::QUERY_TYPE_SQL_SCAN ||
- QueryState->Request.GetType() == NKikimrKqp::QUERY_TYPE_SQL_QUERY;
-
- if (QueryState->PreparedQuery && !streamResult) {
+ if (QueryState->PreparedQuery && !QueryState->IsStreamResult()) {
auto& phyQuery = QueryState->PreparedQuery->GetPhysicalQuery();
for (size_t i = 0; i < phyQuery.ResultBindingsSize(); ++i) {
auto& rb = phyQuery.GetResultBindings(i);
@@ -1700,7 +1676,7 @@ public:
}
resEv->Record.GetRef().SetYdbStatus(Ydb::StatusIds::SUCCESS);
- LOG_D("Create QueryResponse for action: " << queryRequest.GetAction() << " with SUCCESS status");
+ LOG_D("Create QueryResponse for action: " << QueryState->GetAction() << " with SUCCESS status");
QueryResponse = std::move(resEv);
@@ -1711,26 +1687,19 @@ public:
QueryResponse = std::make_unique<TEvKqp::TEvQueryResponse>();
FillCompileStatus(compileResult, QueryResponse->Record);
- auto& queryRequest = QueryState->Request;
- TULID txId = CreateEmptyULID();
- TString txId_Human = "";
- if (queryRequest.HasTxControl()) {
- auto& txControl = queryRequest.GetTxControl();
-
+ auto txId = TTxId();
+ if (QueryState->HasTxControl()) {
+ const auto& txControl = QueryState->GetTxControl();
if (txControl.tx_selector_case() == Ydb::Table::TransactionControl::kTxId) {
- txId.ParseString(txControl.tx_id());
- txId_Human = txControl.tx_id();
+ txId = TTxId::FromString(txControl.tx_id());
}
}
- LOG_W("ReplyQueryCompileError, status " << compileResult->Status << " remove tx with tx_id: " << txId_Human);
- auto txCtx = FindTransaction(txId);
- if (txCtx) {
- txCtx->Invalidate();
- InvalidateExplicitTransaction(txCtx, txId);
+ LOG_W("ReplyQueryCompileError, status " << compileResult->Status << " remove tx with tx_id: " << txId.GetHumanStr());
+ if (auto ctx = Transactions.ReleaseTransaction(txId)) {
+ ctx->Invalidate();
+ Transactions.AddToBeAborted(std::move(ctx));
}
- txId = CreateEmptyULID();
- txId_Human = "";
auto* record = &QueryResponse->Record.GetRef();
FillTxInfo(record->MutableResponse());
@@ -1886,8 +1855,10 @@ public:
// Should tx with empty LocksMap be aborted?
for (auto& [lockId, lock] : txCtx->Locks.LocksMap) {
- request.Locks.emplace_back(lock.GetValueRef(txCtx->Locks.LockType));
+ auto dsLock = ExtractLock(lock.GetValueRef(txCtx->Locks.LockType));
+ request.DataShardLocks[dsLock.GetDataShard()].emplace_back(dsLock);
}
+
SendToExecuter(std::move(request), true);
}
@@ -1907,18 +1878,14 @@ public:
Cleanup(true);
}
- void InvalidateExplicitTransaction(TIntrusivePtr<TKqpTransactionContext> txCtx, const TULID& txId) {
- TransactionsToBeAborted.emplace_back(std::move(txCtx));
- RemoveTransaction(txId);
- }
-
void Cleanup(bool isFinal = false) {
isFinal = isFinal || QueryState && !QueryState->KeepSession;
if (QueryState && QueryState->TxCtx) {
auto& txCtx = QueryState->TxCtx;
if (txCtx->IsInvalidated()) {
- InvalidateExplicitTransaction(QueryState->TxCtx, QueryState->TxId);
+ Transactions.AddToBeAborted(txCtx);
+ Transactions.ReleaseTransaction(QueryState->TxId);
}
DiscardPersistentSnapshot(txCtx->SnapshotHandle);
}
@@ -1927,12 +1894,8 @@ public:
Counters->ReportSessionActorClosedRequest(Settings.DbCounters);
if (isFinal) {
- for (auto it = ExplicitTransactions.Begin(); it != ExplicitTransactions.End(); ++it) {
- it.Value()->Invalidate();
- TransactionsToBeAborted.emplace_back(std::move(it.Value()));
- }
- Counters->ReportTxAborted(Settings.DbCounters, TransactionsToBeAborted.size());
- ExplicitTransactions.Clear();
+ Transactions.FinalCleanup();
+ Counters->ReportTxAborted(Settings.DbCounters, Transactions.ToBeAbortedSize());
}
if (WorkerId) {
@@ -1946,17 +1909,16 @@ public:
CleanupCtx->IsWaitingForWorkerToClose = true;
}
- if (TransactionsToBeAborted.size()) {
+ if (Transactions.ToBeAbortedSize()) {
if (!CleanupCtx)
CleanupCtx.reset(new TKqpCleanupCtx);
CleanupCtx->Final = isFinal;
- CleanupCtx->AbortedTransactionsCount = 0;
- CleanupCtx->TransactionsToBeAborted = TransactionsToBeAborted.size();
- SendRollbackRequest(TransactionsToBeAborted.front().Get());
+ CleanupCtx->TransactionsToBeAborted = Transactions.ReleaseToBeAborted();
+ SendRollbackRequest(CleanupCtx->TransactionsToBeAborted.front().Get());
}
LOG_I("Cleanup start, isFinal: " << isFinal << " CleanupCtx: " << bool{CleanupCtx}
- << " TransactionsToBeAborted.size(): " << TransactionsToBeAborted.size());
+ << " TransactionsToBeAborted.size(): " << (CleanupCtx ? CleanupCtx->TransactionsToBeAborted.size() : 0));
if (CleanupCtx) {
Become(&TKqpSessionActor::CleanupState);
} else {
@@ -1966,7 +1928,7 @@ public:
void HandleCleanup(TEvKqp::TEvCloseSessionResponse::TPtr&) {
CleanupCtx->IsWaitingForWorkerToClose = false;
- if (CleanupCtx->AbortedTransactionsCount == CleanupCtx->TransactionsToBeAborted) {
+ if (CleanupCtx->TransactionsToBeAborted.empty()) {
EndCleanup(CleanupCtx->Final);
}
}
@@ -1986,10 +1948,9 @@ public:
}
YQL_ENSURE(CleanupCtx);
- ++CleanupCtx->AbortedTransactionsCount;
- if (CleanupCtx->AbortedTransactionsCount < CleanupCtx->TransactionsToBeAborted) {
- auto& txCtx = TransactionsToBeAborted[CleanupCtx->AbortedTransactionsCount];
- SendRollbackRequest(txCtx.Get());
+ CleanupCtx->TransactionsToBeAborted.pop_front();
+ if (CleanupCtx->TransactionsToBeAborted.size()) {
+ SendRollbackRequest(CleanupCtx->TransactionsToBeAborted.front().Get());
} else {
if (!CleanupCtx->IsWaitingForWorkerToClose)
EndCleanup(CleanupCtx->Final);
@@ -2019,10 +1980,15 @@ public:
LOG_D("Session actor destroyed");
PassAway();
} else {
- TransactionsToBeAborted.clear();
CleanupCtx.reset();
+ bool doNotKeepSession = QueryState && !QueryState->KeepSession;
QueryState.reset();
- Become(&TKqpSessionActor::ReadyState);
+ if (doNotKeepSession) {
+ // TEvCloseSessionRequest was received in final=false CleanupState, so actor should rerun Cleanup with final=true
+ CleanupAndPassAway();
+ } else {
+ Become(&TKqpSessionActor::ReadyState);
+ }
}
ExecuterId = TActorId{};
}
@@ -2100,7 +2066,7 @@ public:
hFunc(TEvKqp::TEvInitiateSessionShutdown, Handle);
hFunc(TEvKqp::TEvContinueShutdown, Handle);
hFunc(TEvKqpExecuter::TEvTxResponse, HandleTxResponse);
- hFunc(TEvents::TEvWakeup, HandleWakeup);
+ hFunc(NGRpcService::TEvClientLost, HandleClientLost);
default:
UnexpectedEvent("CompileState", ev);
}
@@ -2127,7 +2093,7 @@ public:
hFunc(TEvKqp::TEvCloseSessionRequest, HandleExecute);
hFunc(TEvKqp::TEvInitiateSessionShutdown, Handle);
hFunc(TEvKqp::TEvContinueShutdown, Handle);
- hFunc(TEvents::TEvWakeup, HandleWakeup);
+ hFunc(NGRpcService::TEvClientLost, HandleClientLost);
// always come from WorkerActor
hFunc(TEvKqp::TEvQueryResponse, ForwardResponse);
@@ -2153,7 +2119,7 @@ public:
hFunc(TEvKqp::TEvCloseSessionRequest, HandleCleanup);
hFunc(TEvKqp::TEvInitiateSessionShutdown, Handle);
hFunc(TEvKqp::TEvContinueShutdown, Handle);
- hFunc(TEvents::TEvWakeup, HandleNoop);
+ hFunc(NGRpcService::TEvClientLost, HandleNoop);
// always come from WorkerActor
hFunc(TEvKqp::TEvCloseSessionResponse, HandleCleanup);
@@ -2255,8 +2221,6 @@ private:
bool denied = false;
TStringBuilder builder;
- NACLib::TUserToken token(QueryState->UserToken);
-
builder << "Access for topic(s)";
for (auto& result : response.ResultSet) {
if (result.Status != NSchemeCache::TSchemeCacheNavigate::EStatus::Ok) {
@@ -2264,15 +2228,14 @@ private:
}
auto rights = NACLib::EAccessRights::ReadAttributes | NACLib::EAccessRights::WriteAttributes;
- if (result.SecurityObject && !result.SecurityObject->CheckAccess(rights, token)) {
+ if (result.SecurityObject && !result.SecurityObject->CheckAccess(rights, *QueryState->UserToken)) {
builder << " '" << JoinPath(result.Path) << "'";
denied = true;
}
}
if (denied) {
- builder << " is denied for subject '" << token.GetUserSID() << "'";
-
+ builder << " is denied for subject '" << QueryState->UserToken->GetUserSID() << "'";
message = std::move(builder);
}
@@ -2318,14 +2281,6 @@ private:
}
private:
-
- TULID CreateEmptyULID() {
- TULID next;
- memset(next.Data, 0, sizeof(next.Data));
- return next;
- }
-
-private:
TActorId Owner;
TString SessionId;
@@ -2343,12 +2298,11 @@ private:
ui32 QueryId = 0;
TKikimrConfiguration::TPtr Config;
IDataProvider::TFillSettings FillSettings;
- TLRUCache<TULID, TIntrusivePtr<TKqpTransactionContext>> ExplicitTransactions;
- std::vector<TIntrusivePtr<TKqpTransactionContext>> TransactionsToBeAborted;
- ui64 EvictedTx = 0;
+ TTransactionsCache Transactions;
std::unique_ptr<TEvKqp::TEvQueryResponse> QueryResponse;
std::optional<TSessionShutdownState> ShutdownState;
TULIDGenerator UlidGen;
+ NTxProxy::TRequestControls RequestControls;
};
} // namespace
diff --git a/ydb/core/kqp/session_actor/kqp_tx.cpp b/ydb/core/kqp/session_actor/kqp_tx.cpp
index c253e526ae..201e051cd8 100644
--- a/ydb/core/kqp/session_actor/kqp_tx.cpp
+++ b/ydb/core/kqp/session_actor/kqp_tx.cpp
@@ -135,5 +135,63 @@ TKqpTransactionInfo TKqpTransactionContext::GetInfo() const {
return txInfo;
}
+bool NeedSnapshot(const TKqpTransactionContext& txCtx, const NYql::TKikimrConfiguration& config, bool rollbackTx,
+ bool commitTx, const NKqpProto::TKqpPhyQuery& physicalQuery)
+{
+ if (*txCtx.EffectiveIsolationLevel != NKikimrKqp::ISOLATION_LEVEL_SERIALIZABLE)
+ return false;
+
+ if (!config.FeatureFlags.GetEnableMvccSnapshotReads())
+ return false;
+
+ if (txCtx.GetSnapshot().IsValid())
+ return false;
+
+ if (rollbackTx)
+ return false;
+ if (!commitTx)
+ return true;
+
+ size_t readPhases = 0;
+ bool hasEffects = false;
+
+ for (const auto &tx : physicalQuery.GetTransactions()) {
+ switch (tx.GetType()) {
+ case NKqpProto::TKqpPhyTx::TYPE_COMPUTE:
+ // ignore pure computations
+ break;
+
+ default:
+ ++readPhases;
+ break;
+ }
+
+ if (tx.GetHasEffects()) {
+ hasEffects = true;
+ }
+ }
+
+ if (config.FeatureFlags.GetEnableKqpImmediateEffects() && physicalQuery.GetHasUncommittedChangesRead()) {
+ return true;
+ }
+
+ // We don't want snapshot when there are effects at the moment,
+ // because it hurts performance when there are multiple single-shard
+ // reads and a single distributed commit. Taking snapshot costs
+ // similar to an additional distributed transaction, and it's very
+ // hard to predict when that happens, causing performance
+ // degradation.
+ if (hasEffects) {
+ return false;
+ }
+
+ // We need snapshot when there are multiple table read phases, most
+ // likely it involves multiple tables and we would have to use a
+ // distributed commit otherwise. Taking snapshot helps as avoid TLI
+ // for read-only transactions, and costs less than a final distributed
+ // commit.
+ return readPhases > 1;
+}
+
} // namespace NKqp
} // namespace NKikimr
diff --git a/ydb/core/kqp/session_actor/kqp_tx.h b/ydb/core/kqp/session_actor/kqp_tx.h
index 377d8ddd58..0d63338bb7 100644
--- a/ydb/core/kqp/session_actor/kqp_tx.h
+++ b/ydb/core/kqp/session_actor/kqp_tx.h
@@ -4,6 +4,8 @@
#include <ydb/core/kqp/gateway/kqp_gateway.h>
#include <ydb/core/kqp/provider/yql_kikimr_provider.h>
+#include <ydb/core/util/ulid.h>
+
#include <ydb/library/mkql_proto/protos/minikql.pb.h>
#include <library/cpp/actors/core/actorid.h>
@@ -241,10 +243,134 @@ public:
IKqpGateway::TKqpSnapshotHandle SnapshotHandle;
};
+struct TTxId {
+ TULID Id;
+ TString HumanStr;
+
+ TTxId()
+ : Id(TULID::Min())
+ {}
+
+ TTxId(const TULID& other)
+ : Id(other)
+ , HumanStr(Id.ToString())
+ {}
+
+ static TTxId FromString(const TString& str) {
+ TTxId res;
+ if (res.Id.ParseString(str)) {
+ res.HumanStr = str;
+ }
+ return res;
+ }
+
+ friend bool operator==(const TTxId& lhs, const TTxId& rhs) {
+ return lhs.Id == rhs.Id;
+ }
+
+ TString GetHumanStr() {
+ return HumanStr;
+ }
+};
+
+class TTransactionsCache {
+ TLRUCache<TTxId, TIntrusivePtr<TKqpTransactionContext>> Active;
+ std::deque<TIntrusivePtr<TKqpTransactionContext>> ToBeAborted;
+public:
+ ui64 EvictedTx = 0;
+ TDuration IdleTimeout;
+
+ TTransactionsCache(size_t size, TDuration idleTimeout)
+ : Active(size)
+ , IdleTimeout(idleTimeout)
+ {}
+
+ size_t Size() {
+ return Active.Size();
+ }
+
+ size_t MaxSize() {
+ return Active.GetMaxSize();
+ }
+
+ TIntrusivePtr<TKqpTransactionContext> Find(const TTxId& id) {
+ if (auto it = Active.Find(id); it != Active.End()) {
+ it.Value()->Touch();
+ return *it;
+ } else {
+ return {};
+ }
+ }
+
+ TIntrusivePtr<TKqpTransactionContext> ReleaseTransaction(const TTxId& txId) {
+ if (auto it = Active.FindWithoutPromote(txId); it != Active.End()) {
+ auto ret = std::move(it.Value());
+ Active.Erase(it);
+ return ret;
+ }
+ return {};
+ }
+
+ void AddToBeAborted(TIntrusivePtr<TKqpTransactionContext> ctx) {
+ ToBeAborted.emplace_back(std::move(ctx));
+ }
+
+ bool RemoveOldTransactions() {
+ if (Active.Size() < Active.GetMaxSize()) {
+ return true;
+ } else {
+ auto it = Active.FindOldest();
+ auto currentIdle = TInstant::Now() - it.Value()->LastAccessTime;
+ if (currentIdle >= IdleTimeout) {
+ it.Value()->Invalidate();
+ ToBeAborted.emplace_back(std::move(it.Value()));
+ Active.Erase(it);
+ ++EvictedTx;
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ bool CreateNew(const TTxId& txId, TIntrusivePtr<TKqpTransactionContext> txCtx) {
+ if (!RemoveOldTransactions()) {
+ return false;
+ }
+ return Active.Insert(std::make_pair(txId, txCtx));
+ }
+
+ void FinalCleanup() {
+ for (auto it = Active.Begin(); it != Active.End(); ++it) {
+ it.Value()->Invalidate();
+ ToBeAborted.emplace_back(std::move(it.Value()));
+ }
+ Active.Clear();
+ }
+
+ size_t ToBeAbortedSize() {
+ return ToBeAborted.size();
+ }
+
+ std::deque<TIntrusivePtr<TKqpTransactionContext>> ReleaseToBeAborted() {
+ return std::exchange(ToBeAborted, {});
+ }
+};
+
bool MergeLocks(const NKikimrMiniKQL::TType& type, const NKikimrMiniKQL::TValue& value, TKqpTransactionContext& txCtx,
NYql::TExprContext& ctx);
std::pair<bool, std::vector<NYql::TIssue>> MergeLocks(const NKikimrMiniKQL::TType& type,
const NKikimrMiniKQL::TValue& value, TKqpTransactionContext& txCtx);
+bool NeedSnapshot(const TKqpTransactionContext& txCtx, const NYql::TKikimrConfiguration& config, bool rollbackTx,
+ bool commitTx, const NKqpProto::TKqpPhyQuery& physicalQuery);
+
} // namespace NKikimr::NKqp
+
+template<>
+struct THash<NKikimr::NKqp::TTxId> {
+ inline size_t operator()(const NKikimr::NKqp::TTxId& id) const noexcept {
+ return THash<NKikimr::TULID>()(id.Id);
+ }
+};
diff --git a/ydb/core/kqp/session_actor/kqp_worker_actor.cpp b/ydb/core/kqp/session_actor/kqp_worker_actor.cpp
index 1be1327762..0e63e5ad0a 100644
--- a/ydb/core/kqp/session_actor/kqp_worker_actor.cpp
+++ b/ydb/core/kqp/session_actor/kqp_worker_actor.cpp
@@ -55,7 +55,7 @@ struct TKqpQueryState {
TString TraceId;
TString RequestType;
ui64 ParametersSize = 0;
- TString UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TActorId RequestActorId;
TInstant StartTime;
TDuration CpuTime;
@@ -203,7 +203,7 @@ public:
QueryState->RequestType = event.GetRequestType();
QueryState->StartTime = now;
QueryState->ReplyFlags = queryRequest.GetReplyFlags();
- QueryState->UserToken = event.GetUserToken();
+ QueryState->UserToken = new NACLib::TUserToken(event.GetUserToken());
QueryState->RequestActorId = ActorIdFromProto(event.GetRequestActorId());
if (GetStatsMode(queryRequest, EKikimrStatsMode::None) > EKikimrStatsMode::Basic) {
@@ -902,7 +902,7 @@ private:
case NKikimrKqp::QUERY_TYPE_SQL_SCRIPT_STREAMING: {
TString text = ExtractQueryText();
if (IsQueryAllowedToLog(text)) {
- auto userSID = NACLib::TUserToken(QueryState->UserToken).GetUserSID();
+ auto userSID = QueryState->UserToken->GetUserSID();
NSysView::CollectQueryStats(ctx, stats, queryDuration, text,
userSID, QueryState->ParametersSize, database, type, requestUnits);
}
diff --git a/ydb/core/kqp/session_actor/kqp_worker_common.cpp b/ydb/core/kqp/session_actor/kqp_worker_common.cpp
index 27a9e93b72..23e204005f 100644
--- a/ydb/core/kqp/session_actor/kqp_worker_common.cpp
+++ b/ydb/core/kqp/session_actor/kqp_worker_common.cpp
@@ -66,21 +66,6 @@ bool IsSameProtoTypeImpl(const NKikimrMiniKQL::TVariantType& actual, const NKiki
} // namespace
-EKikimrStatsMode GetStatsModeInt(const NKikimrKqp::TQueryRequest& queryRequest) {
- switch (queryRequest.GetCollectStats()) {
- case Ydb::Table::QueryStatsCollection::STATS_COLLECTION_NONE:
- return EKikimrStatsMode::None;
- case Ydb::Table::QueryStatsCollection::STATS_COLLECTION_BASIC:
- return EKikimrStatsMode::Basic;
- case Ydb::Table::QueryStatsCollection::STATS_COLLECTION_FULL:
- return EKikimrStatsMode::Full;
- case Ydb::Table::QueryStatsCollection::STATS_COLLECTION_PROFILE:
- return EKikimrStatsMode::Profile;
- default:
- return EKikimrStatsMode::None;
- }
-}
-
TKikimrQueryLimits GetQueryLimits(const TKqpWorkerSettings& settings) {
const auto& queryLimitsProto = settings.Service.GetQueryLimits();
const auto& phaseLimitsProto = queryLimitsProto.GetPhaseLimits();
@@ -96,7 +81,7 @@ TKikimrQueryLimits GetQueryLimits(const TKqpWorkerSettings& settings) {
}
void SlowLogQuery(const TActorContext &ctx, const TKikimrConfiguration* config, const TKqpRequestInfo& requestInfo,
- const TDuration& duration, Ydb::StatusIds::StatusCode status, const TString& userToken, ui64 parametersSize,
+ const TDuration& duration, Ydb::StatusIds::StatusCode status, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, ui64 parametersSize,
NKikimrKqp::TEvQueryResponse *record, const std::function<TString()> extractQueryText)
{
auto logSettings = ctx.LoggerSettings();
@@ -121,7 +106,7 @@ void SlowLogQuery(const TActorContext &ctx, const TKikimrConfiguration* config,
}
if (duration >= TDuration::MilliSeconds(thresholdMs)) {
- auto username = NACLib::TUserToken(userToken).GetUserSID();
+ auto username = userToken->GetUserSID();
if (username.empty()) {
username = "UNAUTHENTICATED";
}
diff --git a/ydb/core/kqp/session_actor/kqp_worker_common.h b/ydb/core/kqp/session_actor/kqp_worker_common.h
index b718ad652b..507256a315 100644
--- a/ydb/core/kqp/session_actor/kqp_worker_common.h
+++ b/ydb/core/kqp/session_actor/kqp_worker_common.h
@@ -123,10 +123,9 @@ inline ETableReadType ExtractMostHeavyReadType(const TString& queryPlan) {
}
void SlowLogQuery(const TActorContext &ctx, const NYql::TKikimrConfiguration* config, const TKqpRequestInfo& requestInfo,
- const TDuration& duration, Ydb::StatusIds::StatusCode status, const TString& userToken, ui64 parametersSize,
+ const TDuration& duration, Ydb::StatusIds::StatusCode status, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, ui64 parametersSize,
NKikimrKqp::TEvQueryResponse *record, const std::function<TString()> extractQueryText);
-NYql::EKikimrStatsMode GetStatsModeInt(const NKikimrKqp::TQueryRequest& queryRequest);
NYql::TKikimrQueryLimits GetQueryLimits(const TKqpWorkerSettings& settings);
inline bool IsDocumentApiRestricted(const TString& requestType) {
diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.cpp b/ydb/core/kqp/ut/common/kqp_ut_common.cpp
index bf02c9e80d..a244b59620 100644
--- a/ydb/core/kqp/ut/common/kqp_ut_common.cpp
+++ b/ydb/core/kqp/ut/common/kqp_ut_common.cpp
@@ -256,6 +256,11 @@ void TKikimrRunner::CreateSampleTables() {
PRIMARY KEY (Key)
);
+ CREATE TABLE `KeyValueLargePartition` (
+ Key Uint64,
+ Value String,
+ PRIMARY KEY (Key)
+ );
CREATE TABLE `Test` (
Group Uint32,
@@ -290,6 +295,32 @@ void TKikimrRunner::CreateSampleTables() {
AssertSuccessResult(session.ExecuteDataQuery(R"(
+ REPLACE INTO `KeyValueLargePartition` (Key, Value) VALUES
+ (101u, "Value1"),
+ (102u, "Value2"),
+ (103u, "Value3"),
+ (201u, "Value1"),
+ (202u, "Value2"),
+ (203u, "Value3"),
+ (301u, "Value1"),
+ (302u, "Value2"),
+ (303u, "Value3"),
+ (401u, "Value1"),
+ (402u, "Value2"),
+ (403u, "Value3"),
+ (501u, "Value1"),
+ (502u, "Value2"),
+ (503u, "Value3"),
+ (601u, "Value1"),
+ (602u, "Value2"),
+ (603u, "Value3"),
+ (701u, "Value1"),
+ (702u, "Value2"),
+ (703u, "Value3"),
+ (801u, "Value1"),
+ (802u, "Value2"),
+ (803u, "Value3");
+
REPLACE INTO `TwoShard` (Key, Value1, Value2) VALUES
(1u, "One", -1),
(2u, "Two", 0),
@@ -509,7 +540,7 @@ TDataQueryResult ExecQueryAndTestResult(TSession& session, const TString& query,
const TString& expectedYson)
{
NYdb::NTable::TExecDataQuerySettings settings;
- settings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ settings.CollectQueryStats(ECollectQueryStatsMode::Profile);
TDataQueryResult result = session.ExecuteDataQuery(query, TTxControl::BeginTx().CommitTx(), params, settings)
.ExtractValueSync();
diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.h b/ydb/core/kqp/ut/common/kqp_ut_common.h
index 558cdc6491..cd15942a43 100644
--- a/ydb/core/kqp/ut/common/kqp_ut_common.h
+++ b/ydb/core/kqp/ut/common/kqp_ut_common.h
@@ -81,7 +81,6 @@ struct TKikimrSettings: public TTestFeatureFlagsHolder<TKikimrSettings> {
TKikimrSettings()
{
- this->SetEnableKqpScanQueryStreamLookup(true);
}
TKikimrSettings& SetAppConfig(const NKikimrConfig::TAppConfig& value) { AppConfig = value; return *this; }
diff --git a/ydb/core/kqp/ut/effects/kqp_immediate_effects_ut.cpp b/ydb/core/kqp/ut/effects/kqp_immediate_effects_ut.cpp
index 9fa4704b1d..86c40267f4 100644
--- a/ydb/core/kqp/ut/effects/kqp_immediate_effects_ut.cpp
+++ b/ydb/core/kqp/ut/effects/kqp_immediate_effects_ut.cpp
@@ -32,8 +32,6 @@ namespace {
Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(Upsert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -90,8 +88,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpsertDuplicates) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -125,8 +121,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpsertExistingKey) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -173,8 +167,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(Replace) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -231,8 +223,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(ReplaceDuplicates) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -266,8 +256,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(ReplaceExistingKey) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -314,8 +302,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(Insert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -372,8 +358,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(InsertDuplicates) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -401,8 +385,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(InsertExistingKey) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -429,8 +411,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpdateOn) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -483,8 +463,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(Delete) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -533,8 +511,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpdateAfterUpsert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -564,8 +540,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(DeleteAfterUpsert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -604,8 +578,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpdateAfterInsert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -635,8 +607,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(DeleteAfterInsert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -676,8 +646,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpsertAfterInsert) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -703,8 +671,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(UpsertAfterInsertWithIndex) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -780,8 +746,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(DeleteOnAfterInsertWithIndex) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -843,8 +807,6 @@ Y_UNIT_TEST_SUITE(KqpImmediateEffects) {
Y_UNIT_TEST(MultipleEffectsWithIndex) {
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetEnableKqpImmediateEffects(true);
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
diff --git a/ydb/core/kqp/ut/effects/kqp_inplace_update_ut.cpp b/ydb/core/kqp/ut/effects/kqp_inplace_update_ut.cpp
index 3a1bde4868..e1168bbaf4 100644
--- a/ydb/core/kqp/ut/effects/kqp_inplace_update_ut.cpp
+++ b/ydb/core/kqp/ut/effects/kqp_inplace_update_ut.cpp
@@ -40,7 +40,16 @@ void Test(bool enableInplaceUpdate, const TString& query, TParams&& params, cons
setting.SetName("_KqpAllowUnsafeCommit");
setting.SetValue("true");
- TKikimrRunner kikimr({setting});
+ // source read and stream lookup use iterator interface, that doesn't use datashard transactions
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(false);
+
+ auto settings = TKikimrSettings()
+ .SetAppConfig(appConfig)
+ .SetKqpSettings({setting});
+
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -362,7 +371,15 @@ Y_UNIT_TEST_TWIN(BigRow, EnableInplaceUpdate) {
unsafeCommitSetting.SetName("_KqpAllowUnsafeCommit");
unsafeCommitSetting.SetValue("true");
- TKikimrRunner kikimr({keysLimitSetting, unsafeCommitSetting});
+ // source read use iterator interface, that doesn't use datashard transactions
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+
+ auto settings = TKikimrSettings()
+ .SetAppConfig(appConfig)
+ .SetKqpSettings({keysLimitSetting, unsafeCommitSetting});
+
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
diff --git a/ydb/core/kqp/ut/indexes/kqp_indexes_multishard_ut.cpp b/ydb/core/kqp/ut/indexes/kqp_indexes_multishard_ut.cpp
index 4a026cadea..1b2ea03c11 100644
--- a/ydb/core/kqp/ut/indexes/kqp_indexes_multishard_ut.cpp
+++ b/ydb/core/kqp/ut/indexes/kqp_indexes_multishard_ut.cpp
@@ -382,12 +382,16 @@ Y_UNIT_TEST_SUITE(KqpMultishardIndex) {
}
- Y_UNIT_TEST_TWIN(DataColumnUpsertMixedSemantic, WithMvcc) {
+ Y_UNIT_TEST_TWIN(DataColumnUpsertMixedSemantic, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(StreamLookup);
+
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc)
+ .SetAppConfig(appConfig)
.SetKqpSettings({setting});
+
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -427,12 +431,16 @@ Y_UNIT_TEST_SUITE(KqpMultishardIndex) {
}
}
- Y_UNIT_TEST_TWIN(DataColumnWriteNull, WithMvcc) {
+ Y_UNIT_TEST_TWIN(DataColumnWriteNull, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(StreamLookup);
+
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc)
+ .SetAppConfig(appConfig)
.SetKqpSettings({setting});
+
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -506,12 +514,16 @@ Y_UNIT_TEST_SUITE(KqpMultishardIndex) {
}
}
- Y_UNIT_TEST_TWIN(DataColumnWrite, WithMvcc) {
+ Y_UNIT_TEST_TWIN(DataColumnWrite, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(StreamLookup);
+
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc)
+ .SetAppConfig(appConfig)
.SetKqpSettings({setting});
+
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -903,12 +915,16 @@ Y_UNIT_TEST_SUITE(KqpMultishardIndex) {
}
}
- Y_UNIT_TEST_TWIN(DataColumnSelect, WithMvcc) {
+ Y_UNIT_TEST_TWIN(DataColumnSelect, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(StreamLookup);
+
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc)
+ .SetAppConfig(appConfig)
.SetKqpSettings({setting});
+
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -997,12 +1013,16 @@ Y_UNIT_TEST_SUITE(KqpMultishardIndex) {
}
}
- Y_UNIT_TEST_TWIN(DuplicateUpsert, WithMvcc) {
+ Y_UNIT_TEST_TWIN(DuplicateUpsert, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(StreamLookup);
+
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc)
+ .SetAppConfig(appConfig)
.SetKqpSettings({setting});
+
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -1030,12 +1050,15 @@ Y_UNIT_TEST_SUITE(KqpMultishardIndex) {
}
}
- Y_UNIT_TEST_TWIN(SortByPk, WithMvcc) {
+ Y_UNIT_TEST_TWIN(SortByPk, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(StreamLookup);
+
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc);
- TKikimrRunner kikimr(serverSettings);
+ .SetAppConfig(appConfig);
+ TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
CreateTableWithMultishardIndex(kikimr.GetTestClient(), false);
diff --git a/ydb/core/kqp/ut/indexes/kqp_indexes_ut.cpp b/ydb/core/kqp/ut/indexes/kqp_indexes_ut.cpp
index f839f7a75f..5ced5147eb 100644
--- a/ydb/core/kqp/ut/indexes/kqp_indexes_ut.cpp
+++ b/ydb/core/kqp/ut/indexes/kqp_indexes_ut.cpp
@@ -109,8 +109,6 @@ Y_UNIT_TEST_SUITE(KqpIndexMetadata) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
@@ -163,8 +161,6 @@ Y_UNIT_TEST_SUITE(KqpIndexMetadata) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
@@ -335,8 +331,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SelectConcurentTX) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -416,8 +410,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SelectConcurentTX2) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -497,8 +489,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(UpsertWithoutExtraNullDelete) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -524,7 +514,7 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
)"));
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(
query1,
TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(),
@@ -561,7 +551,7 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
)");
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(
query1,
TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(),
@@ -596,7 +586,7 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
)");
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(
query2,
TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(),
@@ -636,7 +626,7 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
)");
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(
query2,
TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(),
@@ -676,7 +666,7 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
)");
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(
query2,
TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(),
@@ -708,8 +698,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(UpsertWithNullKeysSimple) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({ setting });
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -804,8 +792,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(UpsertWithNullKeysComplex) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -942,8 +928,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexUpsert1DeleteUpdate) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1130,8 +1114,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexUpsert2Update) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1221,8 +1203,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexUpdateOnUsingIndex) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1288,8 +1268,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexSelectUsingScripting) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1329,8 +1307,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexOrderBy) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1627,8 +1603,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexOrderBy2) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1696,16 +1670,24 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 0;
- int tablePhaseId = 1;
-
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).name(), "/Root/TestTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).reads().rows(), 3);
-
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable/ix_cust/indexImplTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 3);
+ if (serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 3);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(1).name(), "/Root/TestTable/ix_cust/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(1).reads().rows(), 3);
+ } else {
+ int indexPhaseId = 0;
+ int tablePhaseId = 1;
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).name(), "/Root/TestTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).reads().rows(), 3);
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable/ix_cust/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 3);
+ }
}
}
@@ -1736,16 +1718,24 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 0;
- int tablePhaseId = 1;
-
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).name(), "/Root/TestTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).reads().rows(), 2);
-
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable/ix_cust2/indexImplTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ if (serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(1).name(), "/Root/TestTable/ix_cust2/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(1).reads().rows(), 2);
+ } else {
+ int indexPhaseId = 0;
+ int tablePhaseId = 1;
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).name(), "/Root/TestTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(tablePhaseId).table_access(0).reads().rows(), 2);
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable/ix_cust2/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ }
}
}
@@ -1776,7 +1766,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
int indexPhaseId = 0;
-
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable/ix_cust3/indexImplTable");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
@@ -1787,8 +1776,6 @@ Y_UNIT_TEST_SUITE(KqpIndexes) {
Y_UNIT_TEST(SecondaryIndexReplace) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1866,8 +1853,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(SecondaryIndexInsert1) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1912,8 +1897,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(MultipleSecondaryIndex) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -1977,8 +1960,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(MultipleSecondaryIndexWithSameComulns) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -2315,8 +2296,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(SecondaryIndexWithPrimaryKeySameComulns) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -2589,12 +2568,11 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(SecondaryIndexUsingInJoin) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
+ bool streamLookupEnabled = serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup();
{
auto tableBuilder = db.GetTableBuilder();
@@ -2662,9 +2640,8 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 1;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
- indexPhaseId = 2;
+ int indexPhaseId = streamLookupEnabled ? 1 : 2;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), streamLookupEnabled ? 2 : 3);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable1");
@@ -2693,9 +2670,8 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 1;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
- indexPhaseId = 2;
+ int indexPhaseId = streamLookupEnabled ? 1 : 2;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), streamLookupEnabled ? 2 : 3);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable1");
@@ -2726,8 +2702,8 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
int indexPhaseId = 1;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
- indexPhaseId = 2;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), streamLookupEnabled ? 2 : 3);
+ indexPhaseId = streamLookupEnabled ? 1 : 2;
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable1");
@@ -2756,9 +2732,8 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 1;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
- indexPhaseId = 2;
+ int indexPhaseId = streamLookupEnabled ? 1 : 2;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), streamLookupEnabled ? 2 : 3);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable1");
@@ -2773,12 +2748,11 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(SecondaryIndexUsingInJoin2) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
+ bool streamLookupEnabled = serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup();
NYdb::NTable::TExecDataQuerySettings execSettings;
execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
@@ -2847,23 +2821,30 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 1;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 4);
- indexPhaseId = 2;
+ int indexPhaseId = streamLookupEnabled ? 1 : 2;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), streamLookupEnabled ? 2 : 4);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable1");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 3);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2/Index1/indexImplTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ if (streamLookupEnabled) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(1).name(), "/Root/TestTable2/Index1/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(1).reads().rows(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2/Index1/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
- indexPhaseId++;
+ indexPhaseId++;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ }
}
{
@@ -2885,31 +2866,36 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- int indexPhaseId = 1;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 4);
- indexPhaseId = 2;
+ int indexPhaseId = streamLookupEnabled ? 1 : 2;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), streamLookupEnabled ? 2 : 4);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/TestTable1");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 3);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2/Index1/indexImplTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ if (streamLookupEnabled) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(1).name(), "/Root/TestTable2/Index1/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(1).reads().rows(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2/Index1/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
- indexPhaseId++;
+ indexPhaseId++;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).name(), "/Root/TestTable2");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(indexPhaseId).table_access(0).reads().rows(), 2);
+ }
}
}
Y_UNIT_TEST(ForbidViewModification) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -2996,8 +2982,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(ForbidDirectIndexTableCreation) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -3047,8 +3031,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(DuplicateUpsertInterleave) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -3085,8 +3067,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(DuplicateUpsertInterleaveParams) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -3173,8 +3153,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(MultipleModifications) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -3224,8 +3202,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
kqpSetting.SetValue("1");
auto settings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({kqpSetting});
TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
@@ -3308,8 +3284,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
kqpSetting.SetValue("1");
auto settings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({kqpSetting});
TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
@@ -3366,8 +3340,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
setting.SetName("_KqpYqlSyntaxVersion");
setting.SetValue("1");
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -3428,19 +3400,28 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
auto& stats = NYdb::TProtoAccessor::GetProto(*result2.GetStats());
- int readPhase = 0;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
- readPhase = 1;
+ int readPhase = 1;
+ if (serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).name(), "/Root/SecondaryComplexKeys");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).reads().rows(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(1).name(), "/Root/SecondaryComplexKeys/Index/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(1).reads().rows(), 1);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).name(), "/Root/SecondaryComplexKeys/Index/indexImplTable");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).reads().rows(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).name(), "/Root/SecondaryComplexKeys/Index/indexImplTable");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).reads().rows(), 1);
- readPhase++;
+ readPhase++;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).name(), "/Root/SecondaryComplexKeys");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).reads().rows(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).name(), "/Root/SecondaryComplexKeys");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(readPhase).table_access(0).reads().rows(), 1);
+ }
}
}
@@ -3450,8 +3431,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
setting.SetName("_KqpYqlSyntaxVersion");
setting.SetValue("1");
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
@@ -3626,8 +3605,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(DeleteByIndex) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
@@ -3717,8 +3694,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(UpdateDeletePlan) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
@@ -3775,8 +3750,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(UpsertNoIndexColumns) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
@@ -3827,8 +3800,6 @@ R"([[#;#;["Primary1"];[41u]];[["Secondary2"];[2u];["Primary2"];[42u]];[["Seconda
Y_UNIT_TEST(UpdateIndexSubsetPk) {
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKqpSettings({setting});
TKikimrRunner kikimr(serverSettings);
diff --git a/ydb/core/kqp/ut/join/kqp_index_lookup_join_ut.cpp b/ydb/core/kqp/ut/join/kqp_index_lookup_join_ut.cpp
index da4fcf5149..36dcc7713c 100644
--- a/ydb/core/kqp/ut/join/kqp_index_lookup_join_ut.cpp
+++ b/ydb/core/kqp/ut/join/kqp_index_lookup_join_ut.cpp
@@ -83,14 +83,15 @@ void PrepareTables(TSession session) {
Y_UNIT_TEST_SUITE(KqpIndexLookupJoin) {
void Test(const TString& query, const TString& answer, size_t rightTableReads) {
- TKikimrRunner kikimr;
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
PrepareTables(session);
TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q_(query), TTxControl::BeginTx().CommitTx(), execSettings).ExtractValueSync();
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
@@ -98,15 +99,21 @@ void Test(const TString& query, const TString& answer, size_t rightTableReads) {
CompareYson(answer, FormatResultSetYson(result.GetResultSet(0)));
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/Left");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 5);
ui32 index = 1;
- UNIT_ASSERT(stats.query_phases(1).table_access().empty()); // keys extraction for lookups
- index = 2;
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT(stats.query_phases(1).table_access().empty()); // keys extraction for lookups
+ index = 2;
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).name(), "/Root/Right");
diff --git a/ydb/core/kqp/ut/join/kqp_join_ut.cpp b/ydb/core/kqp/ut/join/kqp_join_ut.cpp
index a7d2ace1f9..b832fbb171 100644
--- a/ydb/core/kqp/ut/join/kqp_join_ut.cpp
+++ b/ydb/core/kqp/ut/join/kqp_join_ut.cpp
@@ -179,14 +179,15 @@ static TParams NoParams = TParamsBuilder().Build();
Y_UNIT_TEST_SUITE(KqpJoin) {
Y_UNIT_TEST(IdxLookupLeftPredicate) {
- TKikimrRunner kikimr;
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
CreateSampleTables(session);
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q_(R"(
PRAGMA DisableSimpleColumns;
@@ -202,15 +203,21 @@ Y_UNIT_TEST_SUITE(KqpJoin) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/Join1_1");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 8);
ui32 index = 1;
- UNIT_ASSERT(stats.query_phases(1).table_access().empty()); // keys extraction for lookups
- index = 2;
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT(stats.query_phases(1).table_access().empty()); // keys extraction for lookups
+ index = 2;
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).name(), "/Root/Join1_2");
@@ -218,14 +225,15 @@ Y_UNIT_TEST_SUITE(KqpJoin) {
}
Y_UNIT_TEST(IdxLookupPartialLeftPredicate) {
- TKikimrRunner kikimr;
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
CreateSampleTables(session);
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q_(R"(
PRAGMA DisableSimpleColumns;
@@ -245,15 +253,21 @@ Y_UNIT_TEST_SUITE(KqpJoin) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
Cerr << stats.DebugString() << Endl;
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/Join1_1");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 8);
ui32 index = 1;
- UNIT_ASSERT(stats.query_phases(1).table_access().empty()); // keys extraction for lookups
- index = 2;
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT(stats.query_phases(1).table_access().empty()); // keys extraction for lookups
+ index = 2;
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).name(), "/Root/Join1_2");
diff --git a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp
index 58828d88eb..56795e3202 100644
--- a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp
+++ b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp
@@ -129,6 +129,34 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
}
};
+ class TTableWithNullsHelper : public Tests::NCS::TTableWithNullsHelper {
+ private:
+ using TBase = Tests::NCS::TTableWithNullsHelper;
+ public:
+ using TBase::TBase;
+
+ TTableWithNullsHelper(TKikimrRunner& runner)
+ : TBase(runner.GetTestServer())
+ {}
+
+ void CreateTableWithNulls(TString tableName = "tableWithNulls", ui32 shardsCount = 4) {
+ TActorId sender = Server.GetRuntime()->AllocateEdgeActor();
+
+ TBase::CreateTestOlapTable(sender, "", Sprintf(R"(
+ Name: "%s"
+ ColumnShardCount: %d
+ Schema {
+ %s
+ }
+ Sharding {
+ HashSharding {
+ Function: HASH_FUNCTION_MODULO_N
+ Columns: "id"
+ }
+ })", tableName.c_str(), shardsCount, PROTO_SCHEMA));
+ }
+ };
+
void WriteTestData(TKikimrRunner& kikimr, TString testTable, ui64 pathIdBegin, ui64 tsBegin, size_t rowCount) {
UNIT_ASSERT(testTable != "/Root/benchTable"); // TODO: check schema instead
@@ -150,6 +178,26 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
UNIT_ASSERT_VALUES_EQUAL_C(resCommitTx.Status().GetStatus(), EStatus::SUCCESS, resCommitTx.Status().GetIssues().ToString());
}
+ void WriteTestDataForTableWithNulls(TKikimrRunner& kikimr, TString testTable) {
+ UNIT_ASSERT(testTable == "/Root/tableWithNulls"); // TODO: check schema instead
+ TTableWithNullsHelper lHelper(kikimr.GetTestServer());
+ NYdb::NLongTx::TClient client(kikimr.GetDriver());
+
+ NLongTx::TLongTxBeginResult resBeginTx = client.BeginWriteTx().GetValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(resBeginTx.Status().GetStatus(), EStatus::SUCCESS, resBeginTx.Status().GetIssues().ToString());
+
+ auto txId = resBeginTx.GetResult().tx_id();
+ auto batch = lHelper.TestArrowBatch();
+ TString data = NArrow::SerializeBatchNoCompression(batch);
+
+ NLongTx::TLongTxWriteResult resWrite =
+ client.Write(txId, testTable, txId, data, Ydb::LongTx::Data::APACHE_ARROW).GetValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(resWrite.Status().GetStatus(), EStatus::SUCCESS, resWrite.Status().GetIssues().ToString());
+
+ NLongTx::TLongTxCommitResult resCommitTx = client.CommitTx(txId).GetValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(resCommitTx.Status().GetStatus(), EStatus::SUCCESS, resCommitTx.Status().GetIssues().ToString());
+ }
+
TVector<THashMap<TString, NYdb::TValue>> CollectRows(NYdb::NTable::TScanQueryPartIterator& it) {
TVector<THashMap<TString, NYdb::TValue>> rows;
@@ -469,7 +517,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]];[["1"];[1000001u]]])");
+ CompareYson(result, R"([[["0"];1000000u];[["1"];1000001u]])");
}
}
@@ -499,7 +547,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]]])");
+ CompareYson(result, R"([[["0"];1000000u]])");
}
}
@@ -530,7 +578,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]];[["1"];[1000001u]]])");
+ CompareYson(result, R"([[["0"];1000000u];[["1"];1000001u]])");
}
}
@@ -561,7 +609,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]]])");
+ CompareYson(result, R"([[["0"];1000000u]])");
}
{
@@ -578,7 +626,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]];[["1"];[1000001u]]])");
+ CompareYson(result, R"([[["0"];1000000u];[["1"];1000001u]])");
}
{
@@ -595,7 +643,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["1"];[1000001u]]])");
+ CompareYson(result, R"([[["1"];1000001u]])");
}
{
@@ -612,7 +660,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]]])");
+ CompareYson(result, R"([[["0"];1000000u]])");
}
{
@@ -629,7 +677,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["1"];[1000001u]]])");
+ CompareYson(result, R"([[["1"];1000001u]])");
}
{
@@ -646,7 +694,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["1"];[1000001u]]])");
+ CompareYson(result, R"([[["1"];1000001u]])");
}
{
@@ -663,7 +711,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[["0"];[1000000u]]])");
+ CompareYson(result, R"([[["0"];1000000u]])");
}
}
@@ -720,7 +768,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
TString result = StreamResultToYson(it);
Cout << result << Endl;
- CompareYson(result, R"([[[1u];["Value-001"];["1"];["1"];[1000001u]];[[2u];["Value-002"];["2"];["2"];[1000002u]]])");
+ CompareYson(result, R"([[[1u];["Value-001"];["1"];["1"];1000001u];[[2u];["Value-002"];["2"];["2"];1000002u]])");
}
}
@@ -869,7 +917,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
[0];
["some prefix xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"];
["5"];
- [1000005u];
+ 1000005u;
["uid_1000005"]
]])");
}
@@ -952,10 +1000,10 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
auto ysonResult = CollectStreamResult(it).ResultSetYson;
auto expectedYson = TString(R"([
- [[1000127u]];
- [[1000126u]];
- [[1000125u]];
- [[1000124u]]
+ [1000127u];
+ [1000126u];
+ [1000125u];
+ [1000124u]
])");
CompareYson(expectedYson, ysonResult);
@@ -1430,7 +1478,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
queryFixed << "PRAGMA Kikimr.OptEnableOlapPushdown = \"false\";" << Endl;
}
queryFixed << "PRAGMA Kikimr.OptUseFinalizeByKey;" << Endl;
-
+
queryFixed << Query << Endl;
Cerr << "REQUEST:\n" << queryFixed << Endl;
return queryFixed;
@@ -1639,6 +1687,47 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
}
}
+ void TestTableWithNulls(const std::vector<TAggregationTestCase>& cases) {
+ auto settings = TKikimrSettings()
+ .SetWithSampleTables(false)
+ .SetEnableOlapSchemaOperations(true);
+ TKikimrRunner kikimr(settings);
+
+ EnableDebugLogging(kikimr);
+ TTableWithNullsHelper(kikimr).CreateTableWithNulls();
+ auto tableClient = kikimr.GetTableClient();
+
+ {
+ WriteTestDataForTableWithNulls(kikimr, "/Root/tableWithNulls");
+ }
+
+ for (auto&& i : cases) {
+ const TString queryFixed = i.GetFixedQuery();
+ {
+ auto it = tableClient.StreamExecuteScanQuery(queryFixed).GetValueSync();
+ UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
+ TString result = StreamResultToYson(it);
+ if (!i.GetExpectedReply().empty()) {
+ CompareYson(result, i.GetExpectedReply());
+ }
+ }
+ CheckPlanForAggregatePushdown(queryFixed, tableClient, i.GetExpectedPlanOptions(), i.GetExpectedReadNodeType());
+ }
+ }
+
+ Y_UNIT_TEST(Filter_NotAllUsedFieldsInResultSet) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT id, resource_id FROM `/Root/tableWithNulls`
+ WHERE
+ level = 5;
+ )")
+ .SetExpectedReply("[[5;#]]")
+ .AddExpectedPlanOptions("KqpOlapFilter");
+
+ TestTableWithNulls({ testCase });
+ }
+
Y_UNIT_TEST(Aggregation_ResultDistinctCountRI_GroupByL) {
TAggregationTestCase testCase;
testCase.SetQuery(R"(
@@ -1812,6 +1901,145 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TestAggregations({ testCase });
}
+ Y_UNIT_TEST(Aggregation_Count_Null) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ COUNT(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 5;
+ )")
+ .SetExpectedReply("[[0u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Count_NullMix) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ COUNT(level)
+ FROM `/Root/tableWithNulls`;
+ )")
+ .SetExpectedReply("[[5u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Count_GroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, COUNT(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 4 AND 5
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[4;1u];[5;1u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Count_NullGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, COUNT(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 6 AND 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[6;0u];[7;0u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Count_NullMixGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, COUNT(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 4 AND id < 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[5;1u];[6;0u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Count_GroupByNull) {
+ // Wait for KIKIMR-16940 fix
+ return;
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, COUNT(id), COUNT(level), COUNT(*)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 5
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;5u;0u;5u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Count_GroupByNullMix) {
+ // Wait for KIKIMR-16940 fix
+ return;
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, COUNT(id), COUNT(level), COUNT(*)
+ FROM `/Root/tableWithNulls`
+ WHERE id >= 5
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;5u;0u;5u];[[5];1u;1u;1u]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
Y_UNIT_TEST(Aggregation_NoPushdownOnDisabledEmitAggApply) {
TAggregationTestCase testCase;
testCase.SetQuery(R"(
@@ -1845,6 +2073,158 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TestAggregations({ testCase });
}
+ Y_UNIT_TEST(Aggregation_Avg) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ AVG(level), MIN(level)
+ FROM `/Root/olapStore/olapTable`
+ )")
+ .SetExpectedReply("[[[2.];[0]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestAggregations({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_Null) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ AVG(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 5;
+ )")
+ .SetExpectedReply("[[#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_NullMix) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ AVG(level)
+ FROM `/Root/tableWithNulls`;
+ )")
+ .SetExpectedReply("[[[3.]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_GroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, AVG(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 4 AND 5
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[4;[4.]];[5;[5.]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_NullGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, AVG(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 6 AND 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[6;#];[7;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_NullMixGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, AVG(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 4 AND id < 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[5;[5.]];[6;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_GroupByNull) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, AVG(id), AVG(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 5
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;8.;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Avg_GroupByNullMix) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, AVG(id), AVG(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id >= 5
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;8.;#];[[5];5.;[5.]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
Y_UNIT_TEST(Aggregation_Sum) {
TAggregationTestCase testCase;
testCase.SetQuery(R"(
@@ -1862,6 +2242,141 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TestAggregations({ testCase });
}
+ Y_UNIT_TEST(Aggregation_Sum_Null) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ SUM(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 5;
+ )")
+ .SetExpectedReply("[[#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Sum_NullMix) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ SUM(level)
+ FROM `/Root/tableWithNulls`;
+ )")
+ .SetExpectedReply("[[[15]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Sum_GroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, SUM(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 4 AND 5
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[4;[4]];[5;[5]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Sum_NullGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, SUM(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 6 AND 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[6;#];[7;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Sum_NullMixGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, SUM(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 4 AND id < 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[5;[5]];[6;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Sum_GroupByNull) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, SUM(id), SUM(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 5
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;40;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Sum_GroupByNullMix) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, SUM(id), SUM(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id >= 5
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;40;#];[[5];5;[5]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
Y_UNIT_TEST(Aggregation_SumL_GroupL_OrderL) {
TAggregationTestCase testCase;
testCase.SetQuery(R"(
@@ -1973,6 +2488,134 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
TestAggregations({ testCase });
}
+ Y_UNIT_TEST(Aggregation_Some) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT SOME(level) FROM `/Root/tableWithNulls` WHERE id=1
+ )")
+ .SetExpectedReply("[[[1]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Some_Null) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT SOME(level) FROM `/Root/tableWithNulls` WHERE id > 5
+ )")
+ .SetExpectedReply("[[#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Some_GroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, SOME(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 4 AND 5
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[4;[4]];[5;[5]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Some_NullGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, SOME(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 6 AND 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[6;#];[7;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Some_NullMixGroupBy) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ id, SOME(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id > 4 AND id < 7
+ GROUP BY id
+ ORDER BY id;
+ )")
+ .SetExpectedReply("[[5;[5]];[6;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Some_GroupByNullMix) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, SOME(id), SOME(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id BETWEEN 5 AND 6
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;6;#];[[5];5;[5]]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
+ Y_UNIT_TEST(Aggregation_Some_GroupByNull) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ SELECT
+ level, SOME(id), SOME(level)
+ FROM `/Root/tableWithNulls`
+ WHERE id = 6
+ GROUP BY level
+ ORDER BY level;
+ )")
+ .SetExpectedReply("[[#;6;#]]")
+#if SSA_RUNTIME_VERSION >= 2U
+ .AddExpectedPlanOptions("TKqpOlapAgg");
+#else
+ .AddExpectedPlanOptions("CombineCore");
+#endif
+
+ TestTableWithNulls({ testCase });
+ }
+
Y_UNIT_TEST(ClickBenchSmoke) {
TAggregationTestCase q7;
q7.SetQuery(R"(
@@ -3193,6 +3836,20 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
b << "------------------------------------------------" << Endl;
UNIT_ASSERT_C(falsePositive.empty() && falseNegative.empty(), b);
}
+
+ Y_UNIT_TEST(NoErrorOnLegacyPragma) {
+ TAggregationTestCase testCase;
+ testCase.SetQuery(R"(
+ PRAGMA Kikimr.KqpPushOlapProcess = "false";
+ SELECT id, resource_id FROM `/Root/tableWithNulls`
+ WHERE
+ level = 5;
+ )")
+ .SetExpectedReply("[[5;#]]")
+ .AddExpectedPlanOptions("KqpOlapFilter");
+
+ TestTableWithNulls({ testCase });
+ }
}
} // namespace NKqp
diff --git a/ydb/core/kqp/ut/opt/CMakeLists.darwin.txt b/ydb/core/kqp/ut/opt/CMakeLists.darwin.txt
index 3b0df221ab..6446f0cbdd 100644
--- a/ydb/core/kqp/ut/opt/CMakeLists.darwin.txt
+++ b/ydb/core/kqp/ut/opt/CMakeLists.darwin.txt
@@ -33,6 +33,7 @@ target_link_options(ydb-core-kqp-ut-opt PRIVATE
CoreFoundation
)
target_sources(ydb-core-kqp-ut-opt PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_agg_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_not_null_ut.cpp
diff --git a/ydb/core/kqp/ut/opt/CMakeLists.linux-aarch64.txt b/ydb/core/kqp/ut/opt/CMakeLists.linux-aarch64.txt
index de6af2b371..1d42b9398a 100644
--- a/ydb/core/kqp/ut/opt/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/kqp/ut/opt/CMakeLists.linux-aarch64.txt
@@ -36,6 +36,7 @@ target_link_options(ydb-core-kqp-ut-opt PRIVATE
-ldl
)
target_sources(ydb-core-kqp-ut-opt PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_agg_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_not_null_ut.cpp
diff --git a/ydb/core/kqp/ut/opt/CMakeLists.linux.txt b/ydb/core/kqp/ut/opt/CMakeLists.linux.txt
index c24994ff91..c141b2ae7f 100644
--- a/ydb/core/kqp/ut/opt/CMakeLists.linux.txt
+++ b/ydb/core/kqp/ut/opt/CMakeLists.linux.txt
@@ -38,6 +38,7 @@ target_link_options(ydb-core-kqp-ut-opt PRIVATE
-ldl
)
target_sources(ydb-core-kqp-ut-opt PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_agg_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/opt/kqp_not_null_ut.cpp
diff --git a/ydb/core/kqp/ut/opt/kqp_agg_ut.cpp b/ydb/core/kqp/ut/opt/kqp_agg_ut.cpp
new file mode 100644
index 0000000000..2000c73ad0
--- /dev/null
+++ b/ydb/core/kqp/ut/opt/kqp_agg_ut.cpp
@@ -0,0 +1,94 @@
+#include <ydb/core/kqp/ut/common/kqp_ut_common.h>
+
+namespace NKikimr::NKqp {
+
+using namespace NYdb;
+using namespace NYdb::NTable;
+
+Y_UNIT_TEST_SUITE(KqpAgg) {
+ Y_UNIT_TEST(AggWithLookup) {
+ TKikimrRunner kikimr;
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ auto result = session.ExecuteDataQuery(R"(
+ --!syntax_v1
+
+ $dict =
+ SELECT ToDict(AGGREGATE_LIST(AsTuple(Value2, AsStruct(Key as Lookup))))
+ FROM TwoShard
+ WHERE Key < 10;
+
+ SELECT
+ Text,
+ SUM(DictLookup($dict, Data).Lookup) AS SumLookup
+ FROM EightShard
+ GROUP BY Text
+ ORDER BY SumLookup, Text;
+ )", TTxControl::BeginTx().CommitTx()).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+ CompareYson(R"([
+ [["Value3"];[6u]];
+ [["Value1"];[9u]];
+ [["Value2"];[9u]]
+ ])", FormatResultSetYson(result.GetResultSet(0)));
+ }
+
+ Y_UNIT_TEST(AggWithSelfLookup) {
+ TKikimrRunner kikimr;
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ auto result = session.ExecuteDataQuery(R"(
+ --!syntax_v1
+
+ $dict =
+ SELECT ToDict(AGGREGATE_LIST(AsTuple(Key - 100, AsStruct(Data as Lookup))))
+ FROM EightShard;
+
+ SELECT
+ Text,
+ SUM(DictLookup($dict, Data).Lookup) AS SumLookup
+ FROM EightShard
+ GROUP BY Text
+ ORDER BY SumLookup, Text;
+ )", TTxControl::BeginTx().CommitTx()).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+ CompareYson(R"([
+ [["Value2"];[15]];
+ [["Value1"];[16]];
+ [["Value3"];[17]]
+ ])", FormatResultSetYson(result.GetResultSet(0)));
+ }
+
+ Y_UNIT_TEST(AggWithSelfLookup2) {
+ TKikimrRunner kikimr;
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ auto result = session.ExecuteDataQuery(R"(
+ --!syntax_v1
+
+ $dict =
+ SELECT ToDict(AGGREGATE_LIST(AsTuple(Key - 100, AsStruct(Data as Lookup))))
+ FROM EightShard;
+
+ SELECT Text, SUM(Lookup) AS SumLookup
+ FROM (
+ SELECT Text, DictLookup($dict, MIN(Data)).Lookup AS Lookup
+ FROM EightShard
+ GROUP BY Text
+ )
+ GROUP BY Text
+ ORDER BY SumLookup, Text;
+ )", TTxControl::BeginTx().CommitTx()).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+ CompareYson(R"([
+ [["Value1"];[1]];
+ [["Value2"];[1]];
+ [["Value3"];[1]]
+ ])", FormatResultSetYson(result.GetResultSet(0)));
+ }
+}
+
+} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp b/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp
index 5ad531a8d7..ed50117f36 100644
--- a/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp
+++ b/ydb/core/kqp/ut/opt/kqp_merge_ut.cpp
@@ -442,7 +442,12 @@ Y_UNIT_TEST_SUITE(KqpMergeCn) {
}
Y_UNIT_TEST(SortBy_PK_Uint64_Desc) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(false);
+ TKikimrSettings ksettings;
+ ksettings.SetAppConfig(app);
+
+ TKikimrRunner kikimr{ksettings};
auto db = kikimr.GetTableClient();
CreateSimpleDataTypes(kikimr);
diff --git a/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp b/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp
index c591b2d63f..314716295a 100644
--- a/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp
+++ b/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp
@@ -1,6 +1,7 @@
#include <ydb/core/kqp/ut/common/kqp_ut_common.h>
#include <ydb/public/sdk/cpp/client/ydb_proto/accessor.h>
+#include <ydb/core/kqp/runtime/kqp_read_actor.h>
namespace NKikimr::NKqp {
@@ -65,7 +66,8 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(PkSelect1) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -79,15 +81,20 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
auto explainResult = session.ExplainDataQuery(query).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(explainResult.GetStatus(), EStatus::SUCCESS, explainResult.GetIssues().ToString());
- UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpLookupTable"), explainResult.GetAst());
- UNIT_ASSERT_C(!explainResult.GetAst().Contains("Take"), explainResult.GetAst());
+
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQuerySourceRead()) {
+ UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpReadRangesSource"), explainResult.GetAst());
+ } else {
+ UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpLookupTable"), explainResult.GetAst());
+ UNIT_ASSERT_C(!explainResult.GetAst().Contains("Take"), explainResult.GetAst());
+ }
auto params = kikimr.GetTableClient().GetParamsBuilder()
.AddParam("$key").Uint64(302).Build()
.Build();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(query,
TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(), params, execSettings).ExtractValueSync();
@@ -97,9 +104,11 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases().size()); // no LiteralExecuter phase
UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].table_access().size());
- UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].affected_shards());
UNIT_ASSERT_VALUES_EQUAL("/Root/EightShard", stats.query_phases()[0].table_access()[0].name());
- UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].table_access()[0].partitions_count());
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].affected_shards());
+ UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].table_access()[0].partitions_count());
+ }
params = kikimr.GetTableClient().GetParamsBuilder()
.AddParam("$key").Uint64(330).Build()
@@ -113,13 +122,16 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases().size()); // no LiteralExecuter phase
UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].table_access().size());
- UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].affected_shards());
UNIT_ASSERT_VALUES_EQUAL("/Root/EightShard", stats.query_phases()[0].table_access()[0].name());
- UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].table_access()[0].partitions_count());
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].affected_shards());
+ UNIT_ASSERT_VALUES_EQUAL(1, stats.query_phases()[0].table_access()[0].partitions_count());
+ }
}
Y_UNIT_TEST(PkSelect2) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -134,7 +146,11 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
auto explainResult = session.ExplainDataQuery(query).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(explainResult.GetStatus(), EStatus::SUCCESS, explainResult.GetIssues().ToString());
- UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpLookupTable"), explainResult.GetAst());
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQuerySourceRead()) {
+ UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpReadRangesSource"), explainResult.GetAst());
+ } else {
+ UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpLookupTable"), explainResult.GetAst());
+ }
auto params = kikimr.GetTableClient().GetParamsBuilder()
.AddParam("$group").OptionalUint32(1).Build()
@@ -1103,14 +1119,43 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
)", FormatResultSetYson(result.GetResultSet(0)));
}
- Y_UNIT_TEST(PrunePartitionsByLiteral) {
- auto kikimr = DefaultKikimrRunner();
+ Y_UNIT_TEST(ReadAfterWrite) {
+ auto settings = TKikimrSettings();
+ auto kikimr = TKikimrRunner{settings};
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
+ auto result = session.ExecuteDataQuery(R"(
+ UPSERT INTO KeyValue (Key, Value) VALUES (3u, "Three")
+ )", TTxControl::BeginTx(TTxSettings::SerializableRW())).ExtractValueSync();
+ AssertSuccessResult(result);
+
+ auto tx = result.GetTransaction();
+
NYdb::NTable::TExecDataQuerySettings execSettings;
execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ result = session.ExecuteDataQuery(R"(
+ SELECT Amount FROM Test WHERE Group = 1 ORDER BY Amount DESC;
+ )", TTxControl::Tx(*tx).CommitTx(), execSettings).ExtractValueSync();
+ AssertSuccessResult(result);
+
+ CompareYson(R"([[[3500u]];[[300u]]])", FormatResultSetYson(result.GetResultSet(0)));
+
+ auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
+ // Commit cannot be merged with physical tx for read-write transactions
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ }
+
+ Y_UNIT_TEST(PrunePartitionsByLiteral) {
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ NYdb::NTable::TExecDataQuerySettings execSettings;
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
+
auto result = session.ExecuteDataQuery(R"(
SELECT * FROM `/Root/EightShard` WHERE Key = 101 OR Key = 301
ORDER BY Key;
@@ -1124,8 +1169,10 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1); // no literal phase
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 2);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 2);
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 2);
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/EightShard");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 2);
UNIT_ASSERT(stats.query_phases(0).table_access(0).reads().bytes() > 0);
@@ -1133,7 +1180,8 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(PrunePartitionsByExpr) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -1142,7 +1190,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
.Build();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(R"(
DECLARE $key AS Uint64;
@@ -1154,19 +1202,20 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
CompareYson(R"([[[3];[301u];["Value1"]]])", FormatResultSetYson(result.GetResultSet(0)));
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ ui32 index = 0;
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 0);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 0);
UNIT_ASSERT(stats.query_phases(0).table_access().size() == 0);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).affected_shards(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).partitions_count(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).name(), "/Root/EightShard");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).reads().rows(), 1);
- UNIT_ASSERT(stats.query_phases(1).table_access(0).reads().bytes() > 0);
- UNIT_ASSERT(stats.query_phases(1).duration_us() > 0);
+ index = 1;
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).name(), "/Root/EightShard");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).reads().rows(), 1);
+ UNIT_ASSERT(stats.query_phases(index).table_access(0).reads().bytes() > 0);
+ UNIT_ASSERT(stats.query_phases(index).duration_us() > 0);
}
Y_UNIT_TEST(PruneWritePartitions) {
@@ -1342,12 +1391,13 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(JoinIdxLookup) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(R"(
@@ -1375,16 +1425,84 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
])", FormatResultSetYson(result.GetResultSet(0)));
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/Join1");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access().size(), 0);
+ ui32 index = 1;
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access().size(), 0);
+ index = 2;
+ }
+
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).name(), "/Root/Join2");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(index).table_access(0).reads().rows(), 4);
+ }
+
+ Y_UNIT_TEST(JoinIdxLookupWithPredicate) {
+ TKikimrRunner kikimr;
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ AssertSuccessResult(session.ExecuteSchemeQuery(R"(
+ CREATE TABLE `Left` (
+ Key Uint64,
+ Value1 Uint64,
+ Value2 String,
+ PRIMARY KEY (Key)
+ );
+ )").GetValueSync());
+
+ AssertSuccessResult(session.ExecuteSchemeQuery(R"(
+ CREATE TABLE `Right` (
+ Key Uint64,
+ Value String,
+ PRIMARY KEY (Key)
+ );
+ )").GetValueSync());
+
+ AssertSuccessResult(session.ExecuteDataQuery(R"(
+ REPLACE INTO `Left` (Key, Value1, Value2) VALUES
+ (1, 6, "Value1"),
+ (2, 2, "Value1"),
+ (3, 3, "Value2"),
+ (4, 4, "Value2"),
+ (5, 5, "Value3"),
+ (6, 6, "Value1");
+
+ REPLACE INTO `Right` (Key, Value) VALUES
+ (1, "One"),
+ (2, "Two"),
+ (3, "Three"),
+ (4, "Four"),
+ (5, "Five"),
+ (6, "Six");
+ )", TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx()).GetValueSync());
+
+ auto result = session.ExecuteDataQuery(R"(
+ $input = (
+ SELECT Key, Value1
+ FROM `Left` WHERE Value2 == "Value1"
+ );
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(2).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(2).table_access(0).name(), "/Root/Join2");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(2).table_access(0).reads().rows(), 4);
+ SELECT t1.Key AS Key, t2.Value AS Value
+ FROM $input AS t1
+ INNER JOIN `Right` AS t2
+ ON t1.Value1 = t2.Key AND t1.Key = t2.Key
+ ORDER BY Key, Value;
+ )", TTxControl::BeginTx().CommitTx()).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+
+ CompareYson(R"([
+ [[2u];["Two"]];
+ [[6u];["Six"]]
+ ])", FormatResultSetYson(result.GetResultSet(0)));
}
Y_UNIT_TEST(LeftSemiJoin) {
@@ -1723,7 +1841,8 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(PruneEffectPartitions) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings serverSettings;
+ TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -1742,7 +1861,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
.Build();
auto settings = TExecDataQuerySettings()
- .CollectQueryStats(ECollectQueryStatsMode::Basic);
+ .CollectQueryStats(ECollectQueryStatsMode::Profile);
auto it = session.ExecuteDataQuery(query, TTxControl::BeginTx().CommitTx(), std::move(params), settings).GetValueSync();
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
@@ -1751,8 +1870,10 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 1);
+ if (!serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 1);
+ }
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/EightShard");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).updates().rows(), 0);
@@ -2622,7 +2743,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
auto session = db.CreateSession().GetValueSync().GetSession();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto params = TParamsBuilder()
.AddParam("$group").Uint32(1).Build()
@@ -2756,7 +2877,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(DeleteWithInputMultiConsumptionLimit) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrRunner kikimr;
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -3018,7 +3139,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
auto session = db.CreateSession().GetValueSync().GetSession();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(R"(
--!syntax_v1
@@ -3152,8 +3273,10 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(PushFlatmapInnerConnectionsToStageInput) {
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
auto settings = TKikimrSettings()
- .SetEnablePredicateExtractForDataQueries(false);
+ .SetAppConfig(app);
TKikimrRunner kikimr{settings};
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -3255,8 +3378,10 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(MultiUsageInnerConnection) {
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
auto settings = TKikimrSettings()
- .SetEnablePredicateExtractForDataQueries(false);
+ .SetAppConfig(app);
TKikimrRunner kikimr{settings};
auto db = kikimr.GetTableClient();
@@ -3277,10 +3402,9 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(StreamLookupForDataQuery) {
- auto settings = TKikimrSettings()
- .SetEnableKqpDataQueryStreamLookup(true)
- .SetEnablePredicateExtractForDataQueries(false);
- TKikimrRunner kikimr{settings};
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -3316,11 +3440,12 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
UNIT_ASSERT(streamLookup.IsDefined());
auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/EightShard");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(1).name(), "/Root/KeyValue");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(1).reads().rows(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).name(), "/Root/KeyValue");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).reads().rows(), 2);
}
{
@@ -3355,33 +3480,13 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/KeyValue");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 2);
}
-
- {
- auto result = session.ExecuteDataQuery(R"(
- --!syntax_v1
-
- SELECT * FROM `/Root/KeyValue`
- WHERE Key = 1;
- )", TTxControl::BeginTx().CommitTx(), querySettings).ExtractValueSync();
- UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
- CompareYson(R"([[[1u];["One"]]])", FormatResultSetYson(result.GetResultSet(0)));
-
- NJson::TJsonValue plan;
- NJson::ReadJsonTree(result.GetQueryPlan(), &plan, true);
- auto streamLookup = FindPlanNodeByKv(plan, "Node Type", "TableLookup");
- UNIT_ASSERT(streamLookup.IsDefined());
-
- auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/KeyValue");
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 1);
- }
}
Y_UNIT_TEST(FlatmapLambdaMutiusedConnections) {
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
auto settings = TKikimrSettings()
- .SetEnablePredicateExtractForDataQueries(false);
+ .SetAppConfig(app);
TKikimrRunner kikimr{settings};
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -3426,8 +3531,10 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
}
Y_UNIT_TEST(FlatMapLambdaInnerPrecompute) {
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
auto settings = TKikimrSettings()
- .SetEnablePredicateExtractForDataQueries(false);
+ .SetAppConfig(app);
TKikimrRunner kikimr{settings};
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -3445,14 +3552,42 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
}
+ Y_UNIT_TEST(DqSourceCount) {
+ TKikimrSettings settings;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
+ settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
+ settings.SetAppConfig(appConfig);
+
+ TKikimrRunner kikimr(settings);
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(1);
+ evread.SetMaxRows(2);
+ InjectRangeEvReadSettings(evread);
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ evreadack.SetMaxRows(2);
+ InjectRangeEvReadAckSettings(evreadack);
+
+ {
+ auto result = session.ExecuteDataQuery(R"(
+ SELECT COUNT(*) FROM `/Root/EightShard`;
+ )", TTxControl::BeginTx().CommitTx()).GetValueSync();
+ UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
+ CompareYson(R"([[24u]])", FormatResultSetYson(result.GetResultSet(0)));
+ }
+ }
+
Y_UNIT_TEST(DqSource) {
TKikimrSettings settings;
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(true);
settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
- TFeatureFlags flags;
- flags.SetEnablePredicateExtractForDataQueries(true);
- settings.SetFeatureFlags(flags);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
settings.SetAppConfig(appConfig);
TKikimrRunner kikimr(settings);
@@ -3473,9 +3608,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(true);
settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
- TFeatureFlags flags;
- flags.SetEnablePredicateExtractForDataQueries(true);
- settings.SetFeatureFlags(flags);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
settings.SetAppConfig(appConfig);
TKikimrRunner kikimr(settings);
@@ -3501,6 +3634,77 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) {
CompareYson(R"([[[101u];[1]];[[102u];[3]]])", FormatResultSetYson(result.GetResultSet(0)));
}
}
+
+ Y_UNIT_TEST(DqSourceLimit) {
+ TKikimrSettings settings;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
+ settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
+ settings.SetAppConfig(appConfig);
+
+ TKikimrRunner kikimr(settings);
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(2);
+ InjectRangeEvReadSettings(evread);
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ InjectRangeEvReadAckSettings(evreadack);
+
+ {
+ auto result = session.ExecuteDataQuery(R"(
+ SELECT Key, Value FROM `/Root/KeyValueLargePartition` WHERE Key >= 202 ORDER BY Key LIMIT 5;
+ )", TTxControl::BeginTx().CommitTx()).GetValueSync();
+ UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
+ CompareYson(R"([[[202u];["Value2"]];[[203u];["Value3"]];[[301u];["Value1"]];[[302u];["Value2"]];[[303u];["Value3"]]])", FormatResultSetYson(result.GetResultSet(0)));
+ }
+ }
+
+ Y_UNIT_TEST(DqSourceLocksEffects) {
+ TKikimrSettings settings;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
+ settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
+ settings.SetAppConfig(appConfig);
+
+ TKikimrRunner kikimr(settings);
+ auto db = kikimr.GetTableClient();
+ auto session1 = db.CreateSession().GetValueSync().GetSession();
+ auto session3 = db.CreateSession().GetValueSync().GetSession();
+
+ auto result = session1.ExecuteDataQuery(R"(
+ SELECT * FROM `/Root/TwoShard` WHERE Key <= 1;
+ )", TTxControl::BeginTx(TTxSettings::SerializableRW())).GetValueSync();
+ AssertSuccessResult(result);
+
+ auto tx = result.GetTransaction();
+
+ auto session2 = db.CreateSession().GetValueSync().GetSession();
+ result = session2.ExecuteDataQuery(R"(
+ UPSERT INTO `/Root/TwoShard` (Key, Value1) VALUES(1, "NewValue2");
+ )", TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx()).GetValueSync();
+ AssertSuccessResult(result);
+
+ result = session1.ExecuteDataQuery(R"(
+ UPSERT INTO `/Root/TwoShard` (Key,Value1) VALUES(1, "NewValue");
+ )", TTxControl::Tx(*tx).CommitTx()).GetValueSync();
+ UNIT_ASSERT(!result.IsSuccess());
+ result.GetIssues().PrintTo(Cerr);
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::ABORTED);
+ UNIT_ASSERT(HasIssue(result.GetIssues(), NYql::TIssuesIds::KIKIMR_LOCKS_INVALIDATED));
+
+ result = session2.ExecuteDataQuery(R"(
+ SELECT Key, Value1 FROM `/Root/TwoShard` WHERE Key <= 1;
+ )", TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx()).GetValueSync();
+ AssertSuccessResult(result);
+
+ CompareYson(R"([[[1u];["NewValue2"]]])",
+ FormatResultSetYson(result.GetResultSet(0)));
+ }
}
} // namespace NKikimr::NKqp
diff --git a/ydb/core/kqp/ut/opt/kqp_ranges_ut.cpp b/ydb/core/kqp/ut/opt/kqp_ranges_ut.cpp
index c8baea4fba..2da3eff00b 100644
--- a/ydb/core/kqp/ut/opt/kqp_ranges_ut.cpp
+++ b/ydb/core/kqp/ut/opt/kqp_ranges_ut.cpp
@@ -502,7 +502,8 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
}
Y_UNIT_TEST(UpdateWhereInNoFullScan) {
- TKikimrRunner kikimr;
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -512,7 +513,7 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
{
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(query, TTxControl::BeginTx().CommitTx(), execSettings).ExtractValueSync();
result.GetIssues().PrintTo(Cerr);
UNIT_ASSERT(result.IsSuccess());
@@ -707,14 +708,15 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
}
Y_UNIT_TEST(DateKeyPredicate) {
- TKikimrRunner kikimr;
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
CreateSampleTables(session);
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q_(R"(
SELECT Value FROM `/Root/TestDate`
WHERE Key = Date("2019-07-01")
@@ -726,10 +728,13 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 1);
+
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 1);
+ }
}
Y_UNIT_TEST(DuplicateKeyPredicateLiteral) {
@@ -892,7 +897,8 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
}
Y_UNIT_TEST(DeleteNotFullScan) {
- TKikimrRunner kikimr;
+ TKikimrSettings serverSettings;
+ TKikimrRunner kikimr(serverSettings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -904,11 +910,13 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
)");
NYdb::NTable::TExecDataQuerySettings settings;
- settings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ settings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(query, TTxControl::BeginTx().CommitTx(), settings).ExtractValueSync();
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
+ Cerr << result.GetQueryPlan() << Endl;
+
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
@@ -928,14 +936,15 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
}
Y_UNIT_TEST(LiteralOr) {
- TKikimrRunner kikimr;
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
CreateSampleTables(session);
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q_(R"(
SELECT * FROM `/Root/EightShard`
WHERE Key = 101 OR Key = 302 OR Key = 403 OR Key = 705
@@ -950,10 +959,13 @@ Y_UNIT_TEST_SUITE(KqpRanges) {
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 4);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).reads().rows(), 3);
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 4);
+
+ if (!settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).affected_shards(), 4);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).partitions_count(), 4);
+ }
}
Y_UNIT_TEST(LiteralOrCompisite) {
diff --git a/ydb/core/kqp/ut/opt/kqp_sort_ut.cpp b/ydb/core/kqp/ut/opt/kqp_sort_ut.cpp
index 25825aab10..26ccac56a4 100644
--- a/ydb/core/kqp/ut/opt/kqp_sort_ut.cpp
+++ b/ydb/core/kqp/ut/opt/kqp_sort_ut.cpp
@@ -61,6 +61,9 @@ Y_UNIT_TEST_SUITE(KqpSort) {
NJson::TJsonValue plan;
NJson::ReadJsonTree(result.GetPlan(), &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "Limit-TableRangeScan"); // without `Sort`
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "Filter-TableRangeScan"); // without `Sort`
+ }
UNIT_ASSERT_C(node.IsDefined(), result.GetPlan());
auto read = FindPlanNodeByKv(node, "Name", "TableRangeScan");
UNIT_ASSERT(read.IsDefined());
@@ -168,6 +171,9 @@ Y_UNIT_TEST_SUITE(KqpSort) {
NJson::TJsonValue plan;
NJson::ReadJsonTree(result.GetPlan(), &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "Limit-TableRangeScan");
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "Filter-TableRangeScan");
+ }
UNIT_ASSERT_C(node.IsDefined(), result.GetPlan());
auto read = FindPlanNodeByKv(node, "Name", "TableRangeScan");
UNIT_ASSERT(read.IsDefined());
@@ -247,14 +253,22 @@ Y_UNIT_TEST_SUITE(KqpSort) {
NJson::TJsonValue plan;
NJson::ReadJsonTree(result.GetPlan(), &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "Limit-TableRangeScan");
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "Filter-TableRangeScan");
+ }
UNIT_ASSERT_C(node.IsDefined(), result.GetPlan());
auto read = FindPlanNodeByKv(node, "Name", "TableRangeScan");
UNIT_ASSERT(read.IsDefined());
UNIT_ASSERT(read.GetMapSafe().contains("Reverse"));
auto limit = FindPlanNodeByKv(node, "Name", "Limit");
- UNIT_ASSERT(limit.IsDefined());
- UNIT_ASSERT(limit.GetMapSafe().contains("Limit"));
- UNIT_ASSERT_C(result.GetAst().Contains("'\"ItemsLimit\""), result.GetAst());
+ if (!limit.IsDefined()) {
+ limit = FindPlanNodeByKv(node, "Name", "Filter");
+ UNIT_ASSERT(limit.GetMapSafe().contains("Limit"));
+ } else {
+ UNIT_ASSERT(limit.IsDefined());
+ UNIT_ASSERT(limit.GetMapSafe().contains("Limit"));
+ UNIT_ASSERT_C(result.GetAst().Contains("'\"ItemsLimit\""), result.GetAst());
+ }
}
{
@@ -336,6 +350,9 @@ Y_UNIT_TEST_SUITE(KqpSort) {
NJson::TJsonValue plan;
NJson::ReadJsonTree(result.GetPlan(), &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "TopSort-TableRangeScan");
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "TopSort-Filter-TableRangeScan");
+ }
UNIT_ASSERT_C(node.IsDefined(), result.GetPlan());
}
@@ -390,6 +407,9 @@ Y_UNIT_TEST_SUITE(KqpSort) {
NJson::TJsonValue plan;
NJson::ReadJsonTree(result.GetPlan(), &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "TopSort-TableRangeScan");
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "TopSort-Filter-TableRangeScan");
+ }
UNIT_ASSERT_C(node.IsDefined(), result.GetPlan());
}
diff --git a/ydb/core/kqp/ut/opt/kqp_sqlin_ut.cpp b/ydb/core/kqp/ut/opt/kqp_sqlin_ut.cpp
index f9fce43ff6..253d0dafaa 100644
--- a/ydb/core/kqp/ut/opt/kqp_sqlin_ut.cpp
+++ b/ydb/core/kqp/ut/opt/kqp_sqlin_ut.cpp
@@ -86,7 +86,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
auto params = TParamsBuilder(paramsType);
auto result = ExecQueryAndTestResult(session, query, params.Build(), R"([])");
- AssertTableReads(result, "/Root/KeyValue", 0);
+ AssertTableReads(result, "/Root/KeyValue", 6);
}
// not empty parameters
@@ -99,7 +99,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
pl.EndList().Build();
auto result = ExecQueryAndTestResult(session, query, params.Build(), R"([[[1u];["One"]]])");
- AssertTableReads(result, "/Root/KeyValue", 3);
+ AssertTableReads(result, "/Root/KeyValue", 6);
}
}
@@ -142,10 +142,10 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
};
test(DisableOpt, true /* optionalParams */, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/KeyValue", 3);
+ AssertTableReads(result, "/Root/KeyValue", 6);
});
test(DisableOpt, false /* optionalParams */, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/KeyValue", 3);
+ AssertTableReads(result, "/Root/KeyValue", 6);
});
test(EnableOpt, true /* optionalParams */, [](const TDataQueryResult& result) {
@@ -417,7 +417,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
};
test(DisableOpt, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/KeyValue", 2);
+ AssertTableReads(result, "/Root/KeyValue", 6);
});
test(EnableOpt, [](const TDataQueryResult& result) {
@@ -459,7 +459,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
};
test(DisableOpt, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/Test", 3);
+ AssertTableReads(result, "/Root/Test", 8);
});
test(EnableOpt, [](const TDataQueryResult& result) {
@@ -494,7 +494,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
};
test(DisableOpt, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/Test", 3);
+ AssertTableReads(result, "/Root/Test", 8);
});
test(EnableOpt, [](const TDataQueryResult& result) {
@@ -686,7 +686,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
};
test(DisableOpt, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/SecondaryComplexKeys", 2);
+ AssertTableReads(result, "/Root/SecondaryComplexKeys", 5);
});
test(EnableOpt, [](const TDataQueryResult& result) {
@@ -940,11 +940,11 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
};
test(DisableOpt, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/Test", 4);
+ AssertTableReads(result, "/Root/Test", 8);
});
test(EnableOpt, [](const TDataQueryResult& result) {
- AssertTableReads(result, "/Root/Test", 4);
+ AssertTableReads(result, "/Root/Test", 8);
});
}
@@ -994,7 +994,7 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
.Build();
NYdb::NTable::TExecDataQuerySettings settings;
- settings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ settings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q1_(R"(
DECLARE $keys AS List<Uint64>;
@@ -1012,7 +1012,8 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
}
Y_UNIT_TEST(PhasesCount) {
- TKikimrRunner kikimr;
+ TKikimrSettings serverSettings;
+ TKikimrRunner kikimr(serverSettings);
auto session = kikimr.GetTableClient().CreateSession().GetValueSync().GetSession();
// simple key
@@ -1040,7 +1041,11 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
CompareYson(R"([[[1u];["One"]]])", FormatResultSetYson(result.GetResultSet(0)));
const Ydb::TableStats::QueryStats stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_EQUAL_C(2, stats.query_phases_size(), stats.DebugString());
+ if (serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_EQUAL_C(1, stats.query_phases_size(), stats.DebugString());
+ } else {
+ UNIT_ASSERT_EQUAL_C(2, stats.query_phases_size(), stats.DebugString());
+ }
}
// complex (tuple) key
@@ -1078,7 +1083,11 @@ Y_UNIT_TEST_SUITE(KqpSqlIn) {
CompareYson(R"([[[3500u];["None"];[1u];["Anna"]]])", FormatResultSetYson(result.GetResultSet(0)));
const Ydb::TableStats::QueryStats stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_EQUAL_C(2, stats.query_phases_size(), stats.DebugString());
+ if (serverSettings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_EQUAL_C(1, stats.query_phases_size(), stats.DebugString());
+ } else {
+ UNIT_ASSERT_EQUAL_C(2, stats.query_phases_size(), stats.DebugString());
+ }
}
}
}
diff --git a/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp b/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp
index 816bcec8a2..7f8d5c3bf9 100644
--- a/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp
+++ b/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp
@@ -295,7 +295,7 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
.Build();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q1_(R"(
DECLARE $key AS Uint64;
@@ -331,7 +331,7 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
.Build();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto result = session.ExecuteDataQuery(Q1_(R"(
DECLARE $key AS Uint64;
@@ -472,12 +472,13 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
}
Y_UNIT_TEST(IdxLookupJoin) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto params = db.GetParamsBuilder()
.AddParam("$key").Int32(3).Build()
@@ -494,16 +495,21 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ }
}
Y_UNIT_TEST(IdxLookupJoinThreeWay) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
NYdb::NTable::TExecDataQuerySettings execSettings;
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
auto params = db.GetParamsBuilder()
.AddParam("$key").Int32(3).Build()
@@ -521,7 +527,11 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) {
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
- UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 5);
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 5);
+ }
}
Y_UNIT_TEST(ComputeLength) {
diff --git a/ydb/core/kqp/ut/query/kqp_explain_ut.cpp b/ydb/core/kqp/ut/query/kqp_explain_ut.cpp
index 90ccbc9b0d..4383c55383 100644
--- a/ydb/core/kqp/ut/query/kqp_explain_ut.cpp
+++ b/ydb/core/kqp/ut/query/kqp_explain_ut.cpp
@@ -61,7 +61,9 @@ bool ValidatePlanNodeIds(const NJson::TJsonValue& plan) {
Y_UNIT_TEST_SUITE(KqpExplain) {
Y_UNIT_TEST(Explain) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamIdxLookupJoin(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
TStreamExecScanQuerySettings settings;
settings.Explain(true);
@@ -84,14 +86,14 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT(join.IsDefined());
auto left = FindPlanNodeByKv(join, "Table", "EightShard");
UNIT_ASSERT(left.IsDefined());
- auto lookup = FindPlanNodeByKv(join, "Node Type", "TableLookup");
- UNIT_ASSERT(lookup.IsDefined());
- auto right = FindPlanNodeByKv(lookup, "Table", "KeyValue");
+ auto right = FindPlanNodeByKv(join, "Table", "KeyValue");
UNIT_ASSERT(right.IsDefined());
}
Y_UNIT_TEST(ExplainStream) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamIdxLookupJoin(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
TStreamExecScanQuerySettings settings;
settings.Explain(true);
@@ -113,9 +115,7 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT(join.IsDefined());
auto left = FindPlanNodeByKv(join, "Table", "EightShard");
UNIT_ASSERT(left.IsDefined());
- auto lookup = FindPlanNodeByKv(join, "Node Type", "TableLookup");
- UNIT_ASSERT(lookup.IsDefined());
- auto right = FindPlanNodeByKv(lookup, "Table", "KeyValue");
+ auto right = FindPlanNodeByKv(join, "Table", "KeyValue");
UNIT_ASSERT(right.IsDefined());
}
@@ -170,7 +170,9 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
}
Y_UNIT_TEST(ComplexJoin) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamIdxLookupJoin(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
CreateSampleTables(kikimr);
auto db = kikimr.GetTableClient();
TStreamExecScanQuerySettings settings;
@@ -193,6 +195,8 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
UNIT_ASSERT(res.PlanJson);
+ Cerr << *res.PlanJson << Endl;
+
NJson::TJsonValue plan;
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
UNIT_ASSERT(ValidatePlanNodeIds(plan));
@@ -205,9 +209,7 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT(join.IsDefined());
auto left = FindPlanNodeByKv(join, "Table", "EightShard");
UNIT_ASSERT(left.IsDefined());
- auto lookup = FindPlanNodeByKv(join, "Node Type", "TableLookup");
- UNIT_ASSERT(lookup.IsDefined());
- auto right = FindPlanNodeByKv(lookup, "Table", "FourShard");
+ auto right = FindPlanNodeByKv(join, "Table", "FourShard");
UNIT_ASSERT(right.IsDefined());
}
@@ -261,10 +263,17 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT(ValidatePlanNodeIds(plan));
auto read = FindPlanNodeByKv(plan, "Node Type", "Limit-TablePointLookup");
+ size_t operatorsCount = 2;
+ size_t lookupMember = 1;
+ if (!read.IsDefined()) {
+ read = FindPlanNodeByKv(plan, "Node Type", "Limit-Filter-TablePointLookup");
+ operatorsCount = 3;
+ lookupMember = 2;
+ }
auto& operators = read.GetMapSafe().at("Operators").GetArraySafe();
- UNIT_ASSERT(operators.size() == 2);
+ UNIT_ASSERT(operators.size() == operatorsCount);
- auto& lookup = operators[1].GetMapSafe();
+ auto& lookup = operators[lookupMember].GetMapSafe();
UNIT_ASSERT(lookup.at("Name") == "TablePointLookup");
UNIT_ASSERT(lookup.at("ReadRange").GetArraySafe()[0] == "App (new_app_1)");
}
@@ -289,6 +298,9 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT(ValidatePlanNodeIds(plan));
auto scanSort = FindPlanNodeByKv(plan, "Node Type", "Sort-TableRangeScan");
+ if (!scanSort.IsDefined()) {
+ scanSort = FindPlanNodeByKv(plan, "Node Type", "Sort-Filter-TableRangeScan");
+ }
UNIT_ASSERT(scanSort.IsDefined());
}
@@ -318,7 +330,9 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
}
Y_UNIT_TEST(SelfJoin3xSameLabels) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamIdxLookupJoin(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
TStreamExecScanQuerySettings settings;
settings.Explain(true);
@@ -442,7 +456,8 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
}
Y_UNIT_TEST(ExplainDataQuery) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -468,7 +483,8 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
}
Y_UNIT_TEST(FewEffects) {
- auto kikimr = DefaultKikimrRunner();
+ TKikimrSettings settings;
+ TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -483,7 +499,7 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
NJson::ReadJsonTree(result.GetPlan(), &plan, true);
UNIT_ASSERT(ValidatePlanNodeIds(plan));
- // Cerr << plan << Endl;
+ Cerr << plan << Endl;
auto upsertsCount = CountPlanNodesByKv(plan, "Node Type", "Upsert-ConstantExpr");
UNIT_ASSERT_VALUES_EQUAL(upsertsCount, 2);
@@ -491,13 +507,20 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
auto deletesCount = CountPlanNodesByKv(plan, "Node Type", "Delete-ConstantExpr");
UNIT_ASSERT_VALUES_EQUAL(deletesCount, 1);
- auto fullScansCount = CountPlanNodesByKv(plan, "Node Type", "TableFullScan");
+ auto fullScansCount = CountPlanNodesByKv(plan, "Node Type", "TableFullScan") +
+ CountPlanNodesByKv(plan, "Node Type", "Stage-TableFullScan");
UNIT_ASSERT_VALUES_EQUAL(fullScansCount, 1);
- auto rangeScansCount = CountPlanNodesByKv(plan, "Node Type", "TableRangeScan");
+ auto rangeScansCount = CountPlanNodesByKv(plan, "Node Type", "TableRangeScan") +
+ CountPlanNodesByKv(plan, "Name", "TableRangeScan");
UNIT_ASSERT_VALUES_EQUAL(rangeScansCount, 1);
- auto lookupsCount = CountPlanNodesByKv(plan, "Node Type", "TablePointLookup-ConstantExpr");
+ ui32 lookupsCount = 0;
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQuerySourceRead()) {
+ lookupsCount = CountPlanNodesByKv(plan, "Node Type", "Stage-TablePointLookup");
+ } else {
+ lookupsCount = CountPlanNodesByKv(plan, "Node Type", "TablePointLookup-ConstantExpr");
+ }
UNIT_ASSERT_VALUES_EQUAL(lookupsCount, 3);
/* check tables section */
@@ -600,14 +623,14 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
)", TTxControl::BeginTx().CommitTx()).GetValueSync();
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
- TVector<std::pair<TString, TString>> testData = {
+ TVector<std::pair<TString, TVector<TString>>> testData = {
{
"SELECT * FROM `/Root/TwoKeys`;",
- "TableFullScan"
+ {"TableFullScan", "Collect-TableFullScan"}
},
{
"SELECT * FROM `/Root/TwoKeys` WHERE Key2 > 101;",
- "Filter-TableFullScan"
+ {"Filter-TableFullScan"}
}
};
@@ -618,11 +641,19 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
UNIT_ASSERT(res.PlanJson);
+ Cerr << *res.PlanJson << Endl;
+
NJson::TJsonValue plan;
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
UNIT_ASSERT(ValidatePlanNodeIds(plan));
- auto read = FindPlanNodeByKv(plan, "Node Type", data.second);
+ auto read = FindPlanNodeByKv(plan, "Node Type", data.second[0]);
+ if (!read.IsDefined()) {
+ size_t i = 1;
+ while (!read.IsDefined() && i < data.second.size()) {
+ read = FindPlanNodeByKv(plan, "Node Type", data.second[i]);
+ }
+ }
UNIT_ASSERT(read.IsDefined());
auto rangesKeys = FindPlanNodeByKv(plan, "ReadRangesKeys", "[]");
@@ -650,11 +681,16 @@ Y_UNIT_TEST_SUITE(KqpExplain) {
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
UNIT_ASSERT(res.PlanJson);
+ Cerr << *res.PlanJson << Endl;
+
NJson::TJsonValue plan;
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
UNIT_ASSERT(ValidatePlanNodeIds(plan));
auto read = FindPlanNodeByKv(plan, "Node Type", "TableRangesScan");
+ if (!read.IsDefined()) {
+ read = FindPlanNodeByKv(plan, "Name", "TableRangesScan");
+ }
UNIT_ASSERT(read.IsDefined());
auto keys = FindPlanNodeByKv(plan, "ReadRangesKeys", "[\"Key\"]");
UNIT_ASSERT(keys.IsDefined());
diff --git a/ydb/core/kqp/ut/query/kqp_limits_ut.cpp b/ydb/core/kqp/ut/query/kqp_limits_ut.cpp
index b1905eb042..89f9d7323f 100644
--- a/ydb/core/kqp/ut/query/kqp_limits_ut.cpp
+++ b/ydb/core/kqp/ut/query/kqp_limits_ut.cpp
@@ -109,6 +109,8 @@ Y_UNIT_TEST_SUITE(KqpLimits) {
Y_UNIT_TEST(DatashardReplySize) {
auto app = NKikimrConfig::TAppConfig();
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+
auto& queryLimits = *app.MutableTableServiceConfig()->MutableQueryLimits();
queryLimits.MutablePhaseLimits()->SetComputeNodeMemoryLimitBytes(1'000'000'000);
TKikimrRunner kikimr(app);
@@ -357,43 +359,9 @@ Y_UNIT_TEST_SUITE(KqpLimits) {
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
}
- Y_UNIT_TEST(TotalReadSizeLimit) {
- NKikimrConfig::TAppConfig appConfig;
- auto& queryLimits = *appConfig.MutableTableServiceConfig()->MutableQueryLimits();
- queryLimits.MutablePhaseLimits()->SetTotalReadSizeLimitBytes(100'000'000);
-
- auto serverSettings = TKikimrSettings()
- .SetAppConfig(appConfig)
- .SetEnableMvccSnapshotReads(false);
-
- TKikimrRunner kikimr(serverSettings);
- CreateLargeTable(kikimr, 20, 10, 1'000'000, 1);
-
- auto db = kikimr.GetTableClient();
- auto session = db.CreateSession().GetValueSync().GetSession();
-
- auto result = session.ExecuteDataQuery(Q_(R"(
- SELECT Key, KeyText, SUBSTRING(DataText, 0, 10) AS DataText
- FROM `/Root/LargeTable`;
- )"), TTxControl::BeginTx().CommitTx()).ExtractValueSync();
- result.GetIssues().PrintTo(Cerr);
- UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::PRECONDITION_FAILED);
- UNIT_ASSERT(HasIssue(result.GetIssues(), NYql::TIssuesIds::KIKIMR_PRECONDITION_FAILED,
- [] (const NYql::TIssue& issue) {
- return issue.GetMessage().Contains("Transaction total read size");
- }));
-
- result = session.ExecuteDataQuery(Q_(R"(
- SELECT Key, KeyText, SUBSTRING(DataText, 0, 10) AS DataText
- FROM `/Root/LargeTable`
- WHERE Key < 4000000;
- )"), TTxControl::BeginTx().CommitTx()).ExtractValueSync();
- UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
- }
-
Y_UNIT_TEST(ComputeNodeMemoryLimit) {
NKikimrConfig::TAppConfig appConfig;
- appConfig.MutableTableServiceConfig()->MutableResourceManager()->SetMkqlLightProgramMemoryLimit(1'000'000'000);
+ appConfig.MutableTableServiceConfig()->MutableResourceManager()->SetMkqlLightProgramMemoryLimit(1'000'000);
auto& queryLimits = *appConfig.MutableTableServiceConfig()->MutableQueryLimits();
queryLimits.MutablePhaseLimits()->SetComputeNodeMemoryLimitBytes(100'000'000);
@@ -444,12 +412,16 @@ Y_UNIT_TEST_SUITE(KqpLimits) {
Y_UNIT_TEST(QueryExecTimeout) {
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->MutableResourceManager()->SetMkqlLightProgramMemoryLimit(10'000'000'000);
+ appConfig.MutableTableServiceConfig()->SetCompileTimeoutMs(300000);
TKikimrRunner kikimr(appConfig);
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
+ auto prepareSettings =
+ TPrepareDataQuerySettings()
+ .OperationTimeout(TDuration::Seconds(300));
auto prepareResult = session.PrepareDataQuery(Q_(R"(
SELECT ToDict(
ListMap(
@@ -457,7 +429,7 @@ Y_UNIT_TEST_SUITE(KqpLimits) {
($x) -> { RETURN AsTuple($x, $x + 1); }
)
);
- )")).GetValueSync();
+ )"), prepareSettings).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(prepareResult.GetStatus(), EStatus::SUCCESS, prepareResult.GetIssues().ToString());
auto dataQuery = prepareResult.GetQuery();
diff --git a/ydb/core/kqp/ut/query/kqp_query_ut.cpp b/ydb/core/kqp/ut/query/kqp_query_ut.cpp
index 5de239abee..636e93a7a1 100644
--- a/ydb/core/kqp/ut/query/kqp_query_ut.cpp
+++ b/ydb/core/kqp/ut/query/kqp_query_ut.cpp
@@ -231,7 +231,10 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
}
Y_UNIT_TEST(QueryTimeout) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(app));
+
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -270,7 +273,11 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
}
Y_UNIT_TEST(QueryTimeoutImmediate) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ auto settings = TKikimrSettings()
+ .SetAppConfig(appConfig);
+ TKikimrRunner kikimr{settings};
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -299,11 +306,12 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus() == EStatus::SUCCESS || result.GetStatus() == EStatus::SESSION_BUSY, true, result.GetIssues().ToString());
}
- Y_UNIT_TEST_TWIN(QueryClientTimeout, WithMvcc) {
+ Y_UNIT_TEST_TWIN(QueryClientTimeout, EnableImmediateEffects) {
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
auto serverSettings = TKikimrSettings()
- .SetEnableMvcc(WithMvcc)
- .SetEnableMvccSnapshotReads(WithMvcc)
- .SetEnableKqpImmediateEffects(WithMvcc);
+ .SetEnableKqpImmediateEffects(EnableImmediateEffects)
+ .SetAppConfig(app);
TKikimrRunner kikimr(serverSettings);
@@ -337,7 +345,9 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
}
Y_UNIT_TEST(QueryClientTimeoutPrecompiled) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(app));
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -373,7 +383,9 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
}
Y_UNIT_TEST(QueryCancel) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(app));
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -401,7 +413,11 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
}
Y_UNIT_TEST(QueryCancelImmediate) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ auto settings = TKikimrSettings()
+ .SetAppConfig(appConfig);
+ TKikimrRunner kikimr{settings};
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -1106,10 +1122,13 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
WHERE TestUdfs::TestFilterTerminate(Cast(Key as Int64) ?? 0, 10)
)"), TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx()).ExtractValueSync();
result.GetIssues().PrintTo(Cerr);
- UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::GENERIC_ERROR);
- UNIT_ASSERT(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR, [](const NYql::TIssue& issue) {
- return issue.GetMessage().Contains("Execution failed");
- }));
+ if (result.GetStatus() == EStatus::GENERIC_ERROR) {
+ UNIT_ASSERT(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR, [](const NYql::TIssue& issue) {
+ return issue.GetMessage().Contains("Execution failed");
+ }));
+ } else {
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::PRECONDITION_FAILED);
+ }
}
Y_UNIT_TEST(UdfMemoryLimit) {
@@ -1302,6 +1321,17 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
}
+ Y_UNIT_TEST(TryToUpdateNonExistentColumn) {
+ TKikimrRunner kikimr;
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ auto result = session.ExecuteDataQuery(Q1_(R"(
+ UPDATE `/Root/KeyValue` SET NonExistentColumn = 'NewValue' WHERE Key = 1;
+ )"), TTxControl::BeginTx().CommitTx()).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::BAD_REQUEST, result.GetIssues().ToString());
+ }
+
}
} // namespace NKqp
diff --git a/ydb/core/kqp/ut/query/kqp_stats_ut.cpp b/ydb/core/kqp/ut/query/kqp_stats_ut.cpp
index d8253a9afc..09c9bf3dda 100644
--- a/ydb/core/kqp/ut/query/kqp_stats_ut.cpp
+++ b/ydb/core/kqp/ut/query/kqp_stats_ut.cpp
@@ -1,6 +1,7 @@
#include <ydb/core/kqp/ut/common/kqp_ut_common.h>
#include <ydb/public/sdk/cpp/client/ydb_table/table.h>
#include <ydb/public/sdk/cpp/client/resources/ydb_resources.h>
+#include <ydb/public/sdk/cpp/client/ydb_proto/accessor.h>
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor.h>
@@ -33,9 +34,13 @@ Y_UNIT_TEST(MultiTxStatsFullExp) {
])", res.ResultSetYson);
UNIT_ASSERT(res.PlanJson);
+ Cerr << *res.PlanJson << Endl;
NJson::TJsonValue plan;
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "TopSort-TableRangeScan");
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "TopSort-Filter-TableRangeScan");
+ }
UNIT_ASSERT_EQUAL(node.GetMap().at("Stats").GetMapSafe().at("TotalTasks").GetIntegerSafe(), 2);
}
@@ -58,8 +63,10 @@ Y_UNIT_TEST(JoinNoStats) {
}
Y_UNIT_TEST(JoinStatsBasic) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(false);
auto settings = TKikimrSettings()
- .SetEnableKqpScanQueryStreamLookup(false); // TODO: enable stream lookup KIKIMR-14294
+ .SetAppConfig(appConfig); // TODO: enable stream lookup KIKIMR-14294
TKikimrRunner kikimr(settings);
auto db = kikimr.GetTableClient();
@@ -118,6 +125,9 @@ Y_UNIT_TEST(MultiTxStatsFull) {
NJson::TJsonValue plan;
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
auto node = FindPlanNodeByKv(plan, "Node Type", "TopSort-TableRangeScan");
+ if (!node.IsDefined()) {
+ node = FindPlanNodeByKv(plan, "Node Type", "TopSort-Filter-TableRangeScan");
+ }
UNIT_ASSERT_EQUAL(node.GetMap().at("Stats").GetMapSafe().at("TotalTasks").GetIntegerSafe(), 2);
}
@@ -336,6 +346,41 @@ Y_UNIT_TEST(StatsProfile) {
UNIT_ASSERT_EQUAL(node2.GetMap().at("Stats").GetMapSafe().at("ComputeNodes").GetArraySafe().size(), 1);
}
+Y_UNIT_TEST(StreamLookupStats) {
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(app));
+ auto db = kikimr.GetTableClient();
+ auto session = db.CreateSession().GetValueSync().GetSession();
+
+ TExecDataQuerySettings settings;
+ settings.CollectQueryStats(ECollectQueryStatsMode::Full);
+
+ auto result = session.ExecuteDataQuery(R"(
+ $keys = SELECT Key FROM `/Root/KeyValue`;
+ SELECT * FROM `/Root/TwoShard` WHERE Key in $keys;
+ )", TTxControl::BeginTx().CommitTx(), settings).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+
+ Cerr << result.GetQueryPlan() << Endl;
+
+ NJson::TJsonValue plan;
+ NJson::ReadJsonTree(result.GetQueryPlan(), &plan, true);
+ auto streamLookup = FindPlanNodeByKv(plan, "Node Type", "TableLookup");
+ UNIT_ASSERT(streamLookup.IsDefined());
+
+ auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).affected_shards(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access().size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).name(), "/Root/TwoShard");
+ UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).partitions_count(), 1);
+
+ AssertTableStats(result, "/Root/TwoShard", {
+ .ExpectedReads = 2,
+ });
+}
+
} // suite
} // namespace NKqp
diff --git a/ydb/core/kqp/ut/scan/CMakeLists.darwin.txt b/ydb/core/kqp/ut/scan/CMakeLists.darwin.txt
index 51d863e82f..9449448477 100644
--- a/ydb/core/kqp/ut/scan/CMakeLists.darwin.txt
+++ b/ydb/core/kqp/ut/scan/CMakeLists.darwin.txt
@@ -34,6 +34,7 @@ target_link_options(ydb-core-kqp-ut-scan PRIVATE
target_sources(ydb-core-kqp-ut-scan PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_split_ut.cpp
)
add_test(
NAME
diff --git a/ydb/core/kqp/ut/scan/CMakeLists.linux-aarch64.txt b/ydb/core/kqp/ut/scan/CMakeLists.linux-aarch64.txt
index 2420b3c41e..cd538b634c 100644
--- a/ydb/core/kqp/ut/scan/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/kqp/ut/scan/CMakeLists.linux-aarch64.txt
@@ -37,6 +37,7 @@ target_link_options(ydb-core-kqp-ut-scan PRIVATE
target_sources(ydb-core-kqp-ut-scan PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_split_ut.cpp
)
add_test(
NAME
diff --git a/ydb/core/kqp/ut/scan/CMakeLists.linux.txt b/ydb/core/kqp/ut/scan/CMakeLists.linux.txt
index 49ccb304d5..5d2057cb89 100644
--- a/ydb/core/kqp/ut/scan/CMakeLists.linux.txt
+++ b/ydb/core/kqp/ut/scan/CMakeLists.linux.txt
@@ -39,6 +39,7 @@ target_link_options(ydb-core-kqp-ut-scan PRIVATE
target_sources(ydb-core-kqp-ut-scan PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/kqp/ut/scan/kqp_split_ut.cpp
)
add_test(
NAME
diff --git a/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp b/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp
index 376e55e152..bcf8e7a03e 100644
--- a/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp
+++ b/ydb/core/kqp/ut/scan/kqp_flowcontrol_ut.cpp
@@ -53,12 +53,12 @@ void DoFlowControlTest(ui64 limit, bool hasBlockedByCapacity) {
appCfg.MutableTableServiceConfig()->MutableResourceManager()->SetMinChannelBufferSize(limit);
appCfg.MutableTableServiceConfig()->MutableResourceManager()->SetMkqlHeavyProgramMemoryLimit(200ul << 20);
appCfg.MutableTableServiceConfig()->MutableResourceManager()->SetQueryMemoryLimit(20ul << 30);
+ appCfg.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(false);
// TODO: KIKIMR-14294
auto kikimrSettings = TKikimrSettings()
.SetAppConfig(appCfg)
- .SetKqpSettings({})
- .SetEnableKqpScanQueryStreamLookup(false);
+ .SetKqpSettings({});
TKikimrRunner kikimr{kikimrSettings};
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_EXECUTER, NActors::NLog::PRI_DEBUG);
diff --git a/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp b/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp
index a1429249a1..bcae28b42e 100644
--- a/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp
+++ b/ydb/core/kqp/ut/scan/kqp_scan_ut.cpp
@@ -1137,7 +1137,7 @@ Y_UNIT_TEST_SUITE(KqpScan) {
Y_UNIT_TEST_TWIN(PrunePartitionsByLiteral, WithPredicatesExtract) {
auto cfg = AppCfg();
- cfg.MutableFeatureFlags()->SetEnablePredicateExtractForScanQueries(WithPredicatesExtract);
+ cfg.MutableTableServiceConfig()->SetEnablePredicateExtractForScanQueries(WithPredicatesExtract);
auto kikimr = DefaultKikimrRunner({}, cfg);
auto db = kikimr.GetTableClient();
@@ -1693,7 +1693,9 @@ Y_UNIT_TEST_SUITE(KqpScan) {
}
Y_UNIT_TEST(SecondaryIndex) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -1977,10 +1979,8 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TKikimrSettings settings;
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForScanQueries(true);
settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
- TFeatureFlags flags;
- flags.SetEnablePredicateExtractForScanQueries(true);
- settings.SetFeatureFlags(flags);
settings.SetAppConfig(appConfig);
TKikimrRunner kikimr(settings);
@@ -1999,10 +1999,8 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TKikimrSettings settings;
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForScanQueries(true);
settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
- TFeatureFlags flags;
- flags.SetEnablePredicateExtractForScanQueries(true);
- settings.SetFeatureFlags(flags);
settings.SetAppConfig(appConfig);
TKikimrRunner kikimr(settings);
@@ -2022,10 +2020,8 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TKikimrSettings settings;
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true);
settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
- TFeatureFlags flags;
- flags.SetEnablePredicateExtractForDataQueries(true);
- settings.SetFeatureFlags(flags);
settings.SetAppConfig(appConfig);
TKikimrRunner kikimr(settings);
@@ -2125,7 +2121,9 @@ Y_UNIT_TEST_SUITE(KqpScan) {
}
Y_UNIT_TEST(StreamLookupByFullPk) {
- TKikimrRunner kikimr;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
CreateSampleTables(kikimr);
@@ -2178,13 +2176,15 @@ Y_UNIT_TEST_SUITE(KqpScan) {
}
Y_UNIT_TEST(StreamLookupTryGetDataBeforeSchemeInitialization) {
- TPortManager tp;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(true);
+ TPortManager tp;
ui16 mbusport = tp.GetPort(2134);
auto settings = Tests::TServerSettings(mbusport)
.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableKqpScanQueryStreamLookup(true);
+ .SetAppConfig(appConfig);
Tests::TServer::TPtr server = new Tests::TServer(settings);
@@ -2274,7 +2274,9 @@ Y_UNIT_TEST_SUITE(KqpScan) {
}
Y_UNIT_TEST(LimitOverSecondaryIndexRead) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -2301,6 +2303,9 @@ Y_UNIT_TEST_SUITE(KqpScan) {
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
auto indexRead = FindPlanNodeByKv(plan, "Node Type", "Limit-TablePointLookup");
+ if (!indexRead.IsDefined()) {
+ indexRead = FindPlanNodeByKv(plan, "Node Type", "Limit-Filter-TablePointLookup");
+ }
UNIT_ASSERT(indexRead.IsDefined());
auto indexTable = FindPlanNodeByKv(indexRead, "Table", "SecondaryComplexKeys/Index/indexImplTable");
UNIT_ASSERT(indexTable.IsDefined());
@@ -2309,7 +2314,9 @@ Y_UNIT_TEST_SUITE(KqpScan) {
}
Y_UNIT_TEST(TopSortOverSecondaryIndexRead) {
- auto kikimr = DefaultKikimrRunner();
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings().SetAppConfig(appConfig));
auto db = kikimr.GetTableClient();
auto session = db.CreateSession().GetValueSync().GetSession();
@@ -2336,6 +2343,9 @@ Y_UNIT_TEST_SUITE(KqpScan) {
NJson::ReadJsonTree(*res.PlanJson, &plan, true);
auto indexRead = FindPlanNodeByKv(plan, "Node Type", "Limit-TablePointLookup");
+ if (!indexRead.IsDefined()) {
+ indexRead = FindPlanNodeByKv(plan, "Node Type", "Limit-Filter-TablePointLookup");
+ }
UNIT_ASSERT(indexRead.IsDefined());
auto indexTable = FindPlanNodeByKv(indexRead, "Table", "SecondaryComplexKeys/Index/indexImplTable");
UNIT_ASSERT(indexTable.IsDefined());
diff --git a/ydb/core/kqp/ut/scan/kqp_split_ut.cpp b/ydb/core/kqp/ut/scan/kqp_split_ut.cpp
new file mode 100644
index 0000000000..0cf0526973
--- /dev/null
+++ b/ydb/core/kqp/ut/scan/kqp_split_ut.cpp
@@ -0,0 +1,646 @@
+#include <ydb/core/kqp/ut/common/kqp_ut_common.h>
+#include <ydb/core/kqp/counters/kqp_counters.h>
+#include <ydb/core/tx/scheme_cache/scheme_cache.h>
+
+#include <ydb/core/base/tablet_pipecache.h>
+#include <ydb/core/kqp/runtime/kqp_read_actor.h>
+
+#include <ydb/library/yql/dq/actors/compute/dq_compute_actor.h>
+
+#include <util/generic/size_literals.h>
+#include <ydb/core/kqp/common/kqp.h>
+#include <ydb/core/kqp/executer_actor/kqp_executer.h>
+
+#include <ydb/core/tx/tx_proxy/proxy.h>
+#include <ydb/core/tx/schemeshard/schemeshard.h>
+
+namespace NKikimr {
+namespace NKqp {
+
+
+Y_UNIT_TEST_SUITE(KqpSplit) {
+ static ui64 RunSchemeTx(
+ TTestActorRuntimeBase& runtime,
+ THolder<TEvTxUserProxy::TEvProposeTransaction>&& request,
+ TActorId sender = {},
+ bool viaActorSystem = false,
+ TEvTxUserProxy::TEvProposeTransactionStatus::EStatus expectedStatus = TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ExecInProgress)
+ {
+ if (!sender) {
+ sender = runtime.AllocateEdgeActor();
+ }
+
+ runtime.Send(new IEventHandle(MakeTxProxyID(), sender, request.Release()), 0, viaActorSystem);
+ auto ev = runtime.GrabEdgeEventRethrow<TEvTxUserProxy::TEvProposeTransactionStatus>(sender);
+ Cerr << (TStringBuilder() << "scheme op " << ev->Get()->Record.ShortDebugString()) << Endl;
+ UNIT_ASSERT_VALUES_EQUAL(ev->Get()->Record.GetStatus(), expectedStatus);
+
+ return ev->Get()->Record.GetTxId();
+ }
+
+ ui64 AsyncSplitTable(
+ Tests::TServer* server,
+ TActorId sender,
+ const TString& path,
+ ui64 sourceTablet,
+ ui64 splitKey)
+ {
+ auto request = MakeHolder<TEvTxUserProxy::TEvProposeTransaction>();
+ request->Record.SetExecTimeoutPeriod(Max<ui64>());
+
+ auto& tx = *request->Record.MutableTransaction()->MutableModifyScheme();
+ tx.SetOperationType(NKikimrSchemeOp::ESchemeOpSplitMergeTablePartitions);
+
+ auto& desc = *request->Record.MutableTransaction()->MutableModifyScheme()->MutableSplitMergeTablePartitions();
+ desc.SetTablePath(path);
+ desc.AddSourceTabletId(sourceTablet);
+ desc.AddSplitBoundary()->MutableKeyPrefix()->AddTuple()->MutableOptional()->SetUint64(splitKey);
+
+ return RunSchemeTx(*server->GetRuntime(), std::move(request), sender, true);
+ }
+
+ void WaitTxNotification(Tests::TServer* server, TActorId sender, ui64 txId) {
+ auto &runtime = *server->GetRuntime();
+ auto &settings = server->GetSettings();
+
+ auto request = MakeHolder<NSchemeShard::TEvSchemeShard::TEvNotifyTxCompletion>();
+ request->Record.SetTxId(txId);
+ auto tid = NKikimr::Tests::ChangeStateStorage(NKikimr::Tests::SchemeRoot, settings.Domain);
+ runtime.SendToPipe(tid, sender, request.Release(), 0, GetPipeConfigWithRetries());
+ runtime.GrabEdgeEventRethrow<NSchemeShard::TEvSchemeShard::TEvNotifyTxCompletionResult>(sender);
+ }
+
+ NKikimrScheme::TEvDescribeSchemeResult DescribeTable(Tests::TServer* server,
+ TActorId sender,
+ const TString &path)
+ {
+ auto &runtime = *server->GetRuntime();
+ TAutoPtr<IEventHandle> handle;
+ TVector<ui64> shards;
+
+ auto request = MakeHolder<TEvTxUserProxy::TEvNavigate>();
+ request->Record.MutableDescribePath()->SetPath(path);
+ request->Record.MutableDescribePath()->MutableOptions()->SetShowPrivateTable(true);
+ runtime.Send(new IEventHandle(MakeTxProxyID(), sender, request.Release()));
+ auto reply = runtime.GrabEdgeEventRethrow<NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult>(handle);
+
+ return *reply->MutableRecord();
+ }
+
+ TVector<ui64> GetTableShards(Tests::TServer* server,
+ TActorId sender,
+ const TString &path)
+ {
+ TVector<ui64> shards;
+ auto lsResult = DescribeTable(server, sender, path);
+ for (auto &part : lsResult.GetPathDescription().GetTablePartitions())
+ shards.push_back(part.GetDatashardId());
+
+ return shards;
+ }
+
+ i64 SetSplitMergePartCountLimit(TTestActorRuntime* runtime, i64 val) {
+ TAtomic prev;
+ runtime->GetAppData().Icb->SetValue("SchemeShard_SplitMergePartCountLimit", val, prev);
+ return prev;
+ }
+
+ class TReplyPipeStub : public TActor<TReplyPipeStub> {
+ public:
+ TReplyPipeStub(TActorId owner, TActorId client)
+ : TActor<TReplyPipeStub>(&TReplyPipeStub::State)
+ , Owner(owner)
+ , Client(client)
+ {
+ }
+
+ STATEFN(State) {
+ switch (ev->GetTypeRewrite()) {
+ hFunc(TEvPipeCache::TEvForward, Handle);
+ hFunc(TEvPipeCache::TEvUnlink, Handle);
+ hFunc(TEvDataShard::TEvReadResult, Handle);
+ default:
+ Handle(ev);
+ }
+ }
+
+ void Handle(TAutoPtr<IEventHandle> ev) {
+ Send(Client, ev->ReleaseBase());
+ }
+
+ void Handle(TEvDataShard::TEvReadResult::TPtr& ev) {
+ if (ToSkip.fetch_sub(1) <= 0 && ToCapture.fetch_sub(1) > 0) {
+ Cerr << "captured evreadresult -----------------------------------------------------------" << Endl;
+ with_lock(CaptureLock) {
+ Captured.push_back(THolder(ev.Release()));
+ }
+ if (ToCapture.load() <= 0) {
+ ReadsReceived.Signal();
+ }
+ return;
+ }
+ Send(Client, ev->ReleaseBase());
+ }
+
+ void Handle(TEvPipeCache::TEvForward::TPtr& ev) {
+ Send(PipeCache, ev->Release());
+ }
+
+ void Handle(TEvPipeCache::TEvUnlink::TPtr& ev) {
+ Send(PipeCache, ev->Release());
+ }
+
+ void SetupCapture(i64 skip, i64 capture) {
+ ToCapture.store(capture);
+ ToSkip.store(skip);
+ ReadsReceived.Reset();
+ }
+
+ void SendCaptured(NActors::TTestActorRuntime* runtime) {
+ TVector<THolder<IEventHandle>> tosend;
+ with_lock(CaptureLock) {
+ tosend.swap(Captured);
+ }
+ for (auto& ev : tosend) {
+ ev->Rewrite(ev->GetTypeRewrite(), Client);
+ runtime->Send(ev.Release());
+ }
+ }
+
+ private:
+ TActorId PipeCache = MakePipePeNodeCacheID(false);
+ TActorId Owner;
+ TActorId Client;
+
+ TMutex CaptureLock;
+ TVector<THolder<IEventHandle>> Captured;
+ TManualEvent ReadsReceived;
+
+ std::atomic<i64> ToCapture;
+ std::atomic<i64> ToSkip;
+ };
+
+ class TReadActorPipeCacheStub : public TActor<TReadActorPipeCacheStub> {
+ public:
+ TReadActorPipeCacheStub()
+ : TActor<TReadActorPipeCacheStub>(&TReadActorPipeCacheStub::State)
+ {
+ SkipAll();
+ AllowResults();
+ }
+
+ void SetupResultsCapture(i64 skip, i64 capture = std::numeric_limits<i64>::max()) {
+ ReverseSkip.store(skip);
+ ReverseCapture.store(capture);
+ for (auto& [_, pipe] : Pipes) {
+ pipe->SetupCapture(ReverseSkip.load(), ReverseCapture.load());
+ }
+ }
+
+ void AllowResults() {
+ SetupResultsCapture(std::numeric_limits<i64>::max(), 0);
+ }
+
+ void SetupCapture(i64 skip, i64 capture = std::numeric_limits<i64>::max()) {
+ ToCapture.store(capture);
+ ToSkip.store(skip);
+ ReadsReceived.Reset();
+ }
+
+ void SkipAll() {
+ SetupCapture(std::numeric_limits<i64>::max(), 0);
+ }
+
+ void State(TAutoPtr<::NActors::IEventHandle> &ev, const ::NActors::TActorContext &ctx) {
+ Y_UNUSED(ctx);
+ if (ev->GetTypeRewrite() == TEvPipeCache::TEvForward::EventType) {
+ auto* forw = reinterpret_cast<TEvPipeCache::TEvForward::TPtr*>(&ev);
+ auto readtype = TEvDataShard::TEvRead::EventType;
+ auto acktype = TEvDataShard::TEvReadAck::EventType;
+ auto actual = forw->Get()->Get()->Ev->Type();
+ bool isRead = actual == readtype || acktype;
+ if (isRead && ToSkip.fetch_sub(1) <= 0 && ToCapture.fetch_sub(1) > 0) {
+ Cerr << "captured evread -----------------------------------------------------------" << Endl;
+ with_lock(CaptureLock) {
+ Captured.push_back(THolder(ev.Release()));
+ }
+ if (ToCapture.load() <= 0) {
+ ReadsReceived.Signal();
+ }
+ return;
+ }
+ }
+ Forward(ev);
+ }
+
+ void Forward(TAutoPtr<::NActors::IEventHandle> ev) {
+ TReplyPipeStub* pipe = Pipes[ev->Sender];
+ if (pipe == nullptr) {
+ pipe = Pipes[ev->Sender] = new TReplyPipeStub(SelfId(), ev->Sender);
+ Register(pipe);
+ for (auto& [_, pipe] : Pipes) {
+ pipe->SetupCapture(ReverseSkip.load(), ReverseCapture.load());
+ }
+ }
+ auto id = pipe->SelfId();
+ Send(id, ev->ReleaseBase());
+ }
+
+ void SendCaptured(NActors::TTestActorRuntime* runtime, bool sendResults = true) {
+ TVector<THolder<IEventHandle>> tosend;
+ with_lock(CaptureLock) {
+ tosend.swap(Captured);
+ }
+ for (auto& ev : tosend) {
+ TReplyPipeStub* pipe = Pipes[ev->Sender];
+ if (pipe == nullptr) {
+ pipe = Pipes[ev->Sender] = new TReplyPipeStub(SelfId(), ev->Sender);
+ runtime->Register(pipe);
+ for (auto& [_, pipe] : Pipes) {
+ pipe->SetupCapture(ReverseSkip.load(), ReverseCapture.load());
+ }
+ }
+ auto id = pipe->SelfId();
+ ev->Rewrite(ev->GetTypeRewrite(), id);
+ runtime->Send(ev.Release());
+ }
+ if (sendResults) {
+ for (auto& [_, pipe] : Pipes) {
+ pipe->SendCaptured(runtime);
+ }
+ }
+ }
+
+ public:
+ TManualEvent ReadsReceived;
+ std::atomic<i64> ToCapture;
+ std::atomic<i64> ToSkip;
+
+ std::atomic<i64> ReverseCapture;
+ std::atomic<i64> ReverseSkip;
+
+ TMutex CaptureLock;
+ TVector<THolder<IEventHandle>> Captured;
+ THashMap<TActorId, TReplyPipeStub*> Pipes;
+ };
+
+ TString ALL = ",101,102,103,201,202,203,301,302,303,401,402,403,501,502,503,601,602,603,701,702,703,801,802,803";
+ TString Format(TVector<ui64> keys) {
+ TStringBuilder res;
+ for (auto k : keys) {
+ res << "," << k;
+ }
+ return res;
+ }
+
+ void SendScanQuery(TTestActorRuntime* runtime, TActorId kqpProxy, TActorId sender, const TString& queryText) {
+ auto ev = std::make_unique<NKqp::TEvKqp::TEvQueryRequest>();
+ ev->Record.MutableRequest()->SetAction(NKikimrKqp::QUERY_ACTION_EXECUTE);
+ ev->Record.MutableRequest()->SetType(NKikimrKqp::QUERY_TYPE_SQL_SCAN);
+ ev->Record.MutableRequest()->SetQuery(queryText);
+ ev->Record.MutableRequest()->SetKeepSession(false);
+ ActorIdToProto(sender, ev->Record.MutableRequestActorId());
+ runtime->Send(new IEventHandle(kqpProxy, sender, ev.release()));
+ };
+
+ void CollectKeysTo(TVector<ui64>* collectedKeys, TTestActorRuntime* runtime, TActorId sender) {
+ auto captureEvents = [=](TTestActorRuntimeBase&, TAutoPtr<IEventHandle> &ev) {
+ if (ev->GetTypeRewrite() == NKqp::TEvKqpExecuter::TEvStreamData::EventType) {
+ auto& record = ev->Get<NKqp::TEvKqpExecuter::TEvStreamData>()->Record;
+ for (auto& row : record.resultset().rows()) {
+ collectedKeys->push_back(row.items(0).uint64_value());
+ }
+
+ auto resp = MakeHolder<NKqp::TEvKqpExecuter::TEvStreamDataAck>();
+ resp->Record.SetEnough(false);
+ resp->Record.SetSeqNo(record.GetSeqNo());
+ runtime->Send(new IEventHandle(ev->Sender, sender, resp.Release()));
+ return true;
+ }
+
+ return false;
+ };
+ runtime->SetEventFilter(captureEvents);
+ }
+
+ enum class SortOrder {
+ Descending,
+ Ascending,
+ Unspecified
+ };
+
+ TString OrderBy(SortOrder o) {
+ if (o == SortOrder::Ascending) {
+ return " ORDER BY Key ";
+ }
+ if (o == SortOrder::Descending) {
+ return " ORDER BY Key DESC ";
+ }
+ return " ";
+ }
+
+ TVector<ui64> Canonize(TVector<ui64> collectedKeys, SortOrder o) {
+ if (o == SortOrder::Unspecified) {
+ Sort(collectedKeys);
+ }
+ if (o == SortOrder::Descending) {
+ Reverse(collectedKeys.begin(), collectedKeys.end());
+ }
+ return collectedKeys;
+ }
+
+#define Y_UNIT_TEST_SORT(N, OPT) \
+ template <SortOrder OPT> \
+ struct TTestCase##N : public TCurrentTestCase { \
+ TTestCase##N() : TCurrentTestCase() { \
+ if constexpr (OPT == SortOrder::Descending) { Name_ = #N "+Descending"; } \
+ if constexpr (OPT == SortOrder::Ascending) { Name_ = #N "+Ascending"; } \
+ if constexpr (OPT == SortOrder::Unspecified) { Name_ = #N "+Unspecified"; } \
+ } \
+ \
+ static THolder<NUnitTest::TBaseTestCase> Create() { return ::MakeHolder<TTestCase##N<Order>>(); } \
+ void Execute_(NUnitTest::TTestContext&) override; \
+ }; \
+ struct TTestRegistration##N { \
+ TTestRegistration##N() { \
+ TCurrentTest::AddTest(TTestCase##N<SortOrder::Ascending>::Create); \
+ TCurrentTest::AddTest(TTestCase##N<SortOrder::Descending>::Create); \
+ TCurrentTest::AddTest(TTestCase##N<SortOrder::Unspecified>::Create); \
+ } \
+ }; \
+ static TTestRegistration##N testRegistration##N; \
+ template <SortOrder OPT> \
+ void TTestCase##N<OPT>::Execute_(NUnitTest::TTestContext& ut_context Y_DECLARE_UNUSED)
+
+ struct TTestSetup {
+ TTestSetup(TString table = "/Root/KeyValueLargePartition")
+ : Table(table)
+ {
+ TKikimrSettings settings;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(true);
+ appConfig.MutableTableServiceConfig()->SetEnableKqpScanQueryStreamLookup(false);
+ appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForScanQueries(true);
+ settings.SetDomainRoot(KikimrDefaultUtDomainRoot);
+ settings.SetAppConfig(appConfig);
+
+ Kikimr.ConstructInPlace(settings);
+
+ auto db = Kikimr->GetTableClient();
+
+ Server = &Kikimr->GetTestServer();
+ Runtime = Server->GetRuntime();
+ KqpProxy = MakeKqpProxyID(Runtime->GetNodeId(0));
+
+ Sender = Runtime->AllocateEdgeActor();
+
+ CollectKeysTo(&CollectedKeys, Runtime, Sender);
+
+ SetSplitMergePartCountLimit(Runtime, -1);
+ }
+
+ TVector<ui64> Shards() {
+ return GetTableShards(Server, Sender, Table);
+ }
+
+ void Split(ui64 shard, ui32 key) {
+ auto senderSplit = Runtime->AllocateEdgeActor();
+ ui64 txId = AsyncSplitTable(Server, senderSplit, Table, shard, key);
+ WaitTxNotification(Server, senderSplit, txId);
+ }
+
+ void AssertSuccess() {
+ auto reply = Runtime->GrabEdgeEventRethrow<TEvKqp::TEvQueryResponse>(Sender);
+ UNIT_ASSERT_VALUES_EQUAL(reply->Get()->Record.GetRef().GetYdbStatus(), Ydb::StatusIds::SUCCESS);
+ }
+
+ void SendScanQuery(TString text) {
+ ::NKikimr::NKqp::NTestSuiteKqpSplit::SendScanQuery(Runtime, KqpProxy, Sender, text);
+ }
+
+ TMaybe<TKikimrRunner> Kikimr;
+ TVector<ui64> CollectedKeys;
+ Tests::TServer* Server;
+ NActors::TTestActorRuntime* Runtime;
+ TActorId KqpProxy;
+ TActorId Sender;
+
+ TString Table;
+ };
+
+ Y_UNIT_TEST_SORT(AfterResolve, Order) {
+ TTestSetup s;
+
+ auto shards = s.Shards();
+ auto* shim = new TReadActorPipeCacheStub();
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ shim->SetupCapture(0, 1);
+ s.SendScanQuery("SELECT Key FROM `/Root/KeyValueLargePartition`" + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+ s.Split(shards.at(0), 400);
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), ALL);
+ }
+
+ Y_UNIT_TEST_SORT(AfterResult, Order) {
+ TTestSetup s;
+ auto shards = s.Shards();
+
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(8);
+ evread.SetMaxRows(8);
+ InjectRangeEvReadSettings(evread);
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ evreadack.SetMaxRows(8);
+ InjectRangeEvReadAckSettings(evreadack);
+
+ auto* shim = new TReadActorPipeCacheStub();
+ shim->SetupCapture(1, 1);
+ shim->SetupResultsCapture(1);
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ s.SendScanQuery("SELECT Key FROM `/Root/KeyValueLargePartition`" + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+ s.Split(shards.at(0), 400);
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->AllowResults();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), ALL);
+ }
+
+ const TString SegmentsResult = ",101,102,103,202,203,301,303,401,403,501,502,601,602,603,702,703,801";
+ const TString SegmentsRequest =
+ "SELECT Key FROM `/Root/KeyValueLargePartition` where \
+ (Key >= 101 and Key <= 103) \
+ or (Key >= 202 and Key <= 301) \
+ or (Key >= 303 and Key <= 401) \
+ or (Key >= 403 and Key <= 502) \
+ or (Key >= 601 and Key <= 603) \
+ or (Key >= 702 and Key <= 801) \
+ ";
+
+ Y_UNIT_TEST_SORT(AfterResultMultiRange, Order) {
+ TTestSetup s;
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(5);
+ evread.SetMaxRows(5);
+ InjectRangeEvReadSettings(evread);
+
+ auto shards = s.Shards();
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ evreadack.SetMaxRows(5);
+ InjectRangeEvReadAckSettings(evreadack);
+
+ auto* shim = new TReadActorPipeCacheStub();
+ shim->SetupCapture(1, 1);
+ shim->SetupResultsCapture(1);
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ s.SendScanQuery(SegmentsRequest + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+ s.Split(shards.at(0), 404);
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->AllowResults();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), SegmentsResult);
+ }
+
+ Y_UNIT_TEST_SORT(AfterResultMultiRangeSegmentPartition, Order) {
+ TTestSetup s;
+ auto shards = s.Shards();
+
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(5);
+ evread.SetMaxRows(5);
+ InjectRangeEvReadSettings(evread);
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ evreadack.SetMaxRows(5);
+ InjectRangeEvReadAckSettings(evreadack);
+
+ auto* shim = new TReadActorPipeCacheStub();
+ shim->SetupCapture(1, 1);
+ shim->SetupResultsCapture(1);
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ s.SendScanQuery(SegmentsRequest + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+ s.Split(shards.at(0), 501);
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->AllowResults();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), SegmentsResult);
+ }
+
+ Y_UNIT_TEST_SORT(ChoosePartition, Order) {
+ TTestSetup s;
+ auto shards = s.Shards();
+
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(8);
+ evread.SetMaxRows(8);
+ InjectRangeEvReadSettings(evread);
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ evreadack.SetMaxRows(8);
+ InjectRangeEvReadAckSettings(evreadack);
+
+ auto* shim = new TReadActorPipeCacheStub();
+ shim->SetupCapture(2, 1);
+ shim->SetupResultsCapture(2);
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ s.SendScanQuery("SELECT Key FROM `/Root/KeyValueLargePartition`" + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+ s.Split(shards.at(0), 400);
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->AllowResults();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), ALL);
+ }
+
+
+ Y_UNIT_TEST_SORT(BorderKeys, Order) {
+ TTestSetup s;
+ auto shards = s.Shards();
+
+ NKikimrTxDataShard::TEvRead evread;
+ evread.SetMaxRowsInResult(12);
+ evread.SetMaxRows(12);
+ InjectRangeEvReadSettings(evread);
+
+ NKikimrTxDataShard::TEvReadAck evreadack;
+ evreadack.SetMaxRows(12);
+ InjectRangeEvReadAckSettings(evreadack);
+
+ auto* shim = new TReadActorPipeCacheStub();
+ shim->SetupCapture(1, 1);
+ shim->SetupResultsCapture(1);
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ s.SendScanQuery("SELECT Key FROM `/Root/KeyValueLargePartition`" + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+
+ s.Split(shards.at(0), 402);
+ shards = s.Shards();
+ s.Split(shards.at(1), 404);
+
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->AllowResults();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), ALL);
+ }
+
+ Y_UNIT_TEST_SORT(AfterResolvePoints, Order) {
+ TTestSetup s;
+ auto shards = s.Shards();
+
+ auto* shim = new TReadActorPipeCacheStub();
+ InterceptReadActorPipeCache(s.Runtime->Register(shim));
+ shim->SetupCapture(0, 5);
+ s.SendScanQuery(
+ "PRAGMA Kikimr.OptEnablePredicateExtract=\"false\"; SELECT Key FROM `/Root/KeyValueLargePartition` where Key in (103, 302, 402, 502, 703)" + OrderBy(Order));
+
+ shim->ReadsReceived.WaitI();
+ Cerr << "starting split -----------------------------------------------------------" << Endl;
+ s.Split(shards.at(0), 400);
+ Cerr << "resume evread -----------------------------------------------------------" << Endl;
+ shim->SkipAll();
+ shim->SendCaptured(s.Runtime);
+
+ s.AssertSuccess();
+ UNIT_ASSERT_VALUES_EQUAL(Format(Canonize(s.CollectedKeys, Order)), ",103,302,402,502,703");
+ }
+}
+
+
+} // namespace NKqp
+} // namespace NKikimr
diff --git a/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
index ba5dc5ad54..746433ec81 100644
--- a/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
+++ b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
@@ -2695,6 +2695,7 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
const auto& changefeeds = describeResult.GetTableDescription().GetChangefeedDescriptions();
UNIT_ASSERT_VALUES_EQUAL(changefeeds.size(), 1);
UNIT_ASSERT_VALUES_EQUAL(changefeeds.at(0), TChangefeedDescription("feed", mode, format));
+ UNIT_ASSERT_VALUES_EQUAL(changefeeds.at(0).GetState(), EChangefeedState::Enabled);
}
{
@@ -3339,9 +3340,9 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
auto query = TStringBuilder() << R"(
--!syntax_v1
CREATE TABLE `)" << tableName << R"(` (
- Key Uint64 NOT NULL,
- Value1 String,
- Value2 Int64 NOT NULL,
+ Key Timestamp NOT NULL,
+ Value1 Date,
+ Value2 Datetime NOT NULL,
PRIMARY KEY (Key)
)
PARTITION BY HASH(Value1, Value2)
@@ -3366,9 +3367,21 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
auto query4 = TStringBuilder() << R"(
--!syntax_v1
- DROP TABLE `)" << tableName << R"(`;)";
+ ALTER TABLE `)" << tableName << R"(` SET(TTL = Interval("P1D") ON Value1);)";
result = session.ExecuteSchemeQuery(query4).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+
+ auto query5 = TStringBuilder() << R"(
+ --!syntax_v1
+ ALTER TABLE `)" << tableName << R"(` SET(TTL = Interval("P1D") ON Value2);)";
+ result = session.ExecuteSchemeQuery(query5).GetValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
+
+ auto query6 = TStringBuilder() << R"(
+ --!syntax_v1
+ DROP TABLE `)" << tableName << R"(`;)";
+ result = session.ExecuteSchemeQuery(query6).GetValueSync();
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
}
Y_UNIT_TEST(AlterColumnTableTiering) {
@@ -3564,19 +3577,19 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
for (size_t i = 0; parser.TryNextRow(); ++i) {
{
auto& c = parser.ColumnParser("CUint8");
- UNIT_ASSERT_VALUES_EQUAL(i, *c.GetOptionalUint8().Get());
+ UNIT_ASSERT_VALUES_EQUAL(i, c.GetUint8());
}
{
auto& c = parser.ColumnParser("CInt8");
- UNIT_ASSERT_VALUES_EQUAL(i, *c.GetOptionalInt8().Get());
+ UNIT_ASSERT_VALUES_EQUAL(i, c.GetInt8());
}
{
auto& c = parser.ColumnParser("CUint16");
- UNIT_ASSERT_VALUES_EQUAL(i, *c.GetOptionalUint16().Get());
+ UNIT_ASSERT_VALUES_EQUAL(i, c.GetUint16());
}
{
auto& c = parser.ColumnParser("CInt16");
- UNIT_ASSERT_VALUES_EQUAL(i, *c.GetOptionalInt16().Get());
+ UNIT_ASSERT_VALUES_EQUAL(i, c.GetInt16());
}
}
}
diff --git a/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp b/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp
index 104121d452..984640e234 100644
--- a/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp
+++ b/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp
@@ -83,10 +83,19 @@ Y_UNIT_TEST(SelfJoin) {
[[9u];["jjjjjjjjjjjjjjjjjjjj"];[9u];["jjjjjjjjjjjjjjjjjjjj"]]
])", StreamResultToYson(it));
+ auto in = [](int pattern, std::vector<int> vals) {
+ for (auto&& val : vals) {
+ if (pattern == val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
TKqpCounters counters(kikimr.GetTestServer().GetRuntime()->GetAppData().Counters);
- UNIT_ASSERT_VALUES_EQUAL(14, counters.SpillingWriteBlobs->Val());
- UNIT_ASSERT_VALUES_EQUAL(14, counters.SpillingReadBlobs->Val());
- UNIT_ASSERT(0 == counters.SpillingStoredBlobs->Val() || 14 == counters.SpillingStoredBlobs->Val());
+ UNIT_ASSERT(in(counters.SpillingWriteBlobs->Val(), {3, 6, 14}));
+ UNIT_ASSERT(in(counters.SpillingReadBlobs->Val(), {3, 6, 14}));
+ UNIT_ASSERT(in(counters.SpillingStoredBlobs->Val(), {0, 14}));
}
} // suite
diff --git a/ydb/core/kqp/ut/sysview/kqp_sys_view_ut.cpp b/ydb/core/kqp/ut/sysview/kqp_sys_view_ut.cpp
index 17d421c060..cb8c09b705 100644
--- a/ydb/core/kqp/ut/sysview/kqp_sys_view_ut.cpp
+++ b/ydb/core/kqp/ut/sysview/kqp_sys_view_ut.cpp
@@ -82,11 +82,12 @@ Y_UNIT_TEST_SUITE(KqpSystemView) {
[[72057594046644480u];[9u];["/Root/BatchUpload"];[5u]];
[[72057594046644480u];[0u];["/Root/KeyValue"];[6u]];
[[72057594046644480u];[0u];["/Root/KeyValue2"];[7u]];
- [[72057594046644480u];[0u];["/Root/Test"];[8u]];
- [[72057594046644480u];[0u];["/Root/Join1"];[9u]];
- [[72057594046644480u];[1u];["/Root/Join1"];[9u]];
- [[72057594046644480u];[0u];["/Root/Join2"];[10u]];
- [[72057594046644480u];[1u];["/Root/Join2"];[10u]]
+ [[72057594046644480u];[0u];["/Root/KeyValueLargePartition"];[8u]];
+ [[72057594046644480u];[0u];["/Root/Test"];[9u]];
+ [[72057594046644480u];[0u];["/Root/Join1"];[10u]];
+ [[72057594046644480u];[1u];["/Root/Join1"];[10u]];
+ [[72057594046644480u];[0u];["/Root/Join2"];[11u]];
+ [[72057594046644480u];[1u];["/Root/Join2"];[11u]]
])", StreamResultToYson(it));
}
@@ -170,16 +171,17 @@ Y_UNIT_TEST_SUITE(KqpSystemView) {
TString query = R"(
SELECT OwnerId, PathId, PartIdx, Path
FROM `/Root/.sys/partition_stats`
- WHERE OwnerId = 72057594046644480ul AND PathId > 5u AND PathId <= 9u
+ WHERE OwnerId = 72057594046644480ul AND PathId > 5u AND PathId <= 10u
ORDER BY PathId, PartIdx;
)";
TString expectedYson = R"([
[[72057594046644480u];[6u];[0u];["/Root/KeyValue"]];
[[72057594046644480u];[7u];[0u];["/Root/KeyValue2"]];
- [[72057594046644480u];[8u];[0u];["/Root/Test"]];
- [[72057594046644480u];[9u];[0u];["/Root/Join1"]];
- [[72057594046644480u];[9u];[1u];["/Root/Join1"]]
+ [[72057594046644480u];[8u];[0u];["/Root/KeyValueLargePartition"]];
+ [[72057594046644480u];[9u];[0u];["/Root/Test"]];
+ [[72057594046644480u];[10u];[0u];["/Root/Join1"]];
+ [[72057594046644480u];[10u];[1u];["/Root/Join1"]]
])";
auto it = client.StreamExecuteScanQuery(query).GetValueSync();
@@ -208,7 +210,7 @@ Y_UNIT_TEST_SUITE(KqpSystemView) {
TString expectedYson = R"([
[[72057594046644480u];[6u];[0u];["/Root/KeyValue"]];
[[72057594046644480u];[7u];[0u];["/Root/KeyValue2"]];
- [[72057594046644480u];[8u];[0u];["/Root/Test"]]
+ [[72057594046644480u];[8u];[0u];["/Root/KeyValueLargePartition"]]
])";
auto it = client.StreamExecuteScanQuery(query).GetValueSync();
diff --git a/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp b/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp
index 365d1ac69f..05819756ef 100644
--- a/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp
+++ b/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp
@@ -10,10 +10,10 @@ using namespace NYdb::NTable;
Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
Y_UNIT_TEST(TestSnapshotExpiration) {
- TKikimrRunner kikimr(TKikimrSettings()
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
- .SetKeepSnapshotTimeout(TDuration::Seconds(1)));
+ auto settings = TKikimrSettings()
+ .SetKeepSnapshotTimeout(TDuration::Seconds(1));
+
+ TKikimrRunner kikimr(settings);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_BLOBS_STORAGE, NActors::NLog::PRI_DEBUG);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_DEBUG);
@@ -50,10 +50,21 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
if (result.GetStatus() == EStatus::SUCCESS)
continue;
- UNIT_ASSERT_C(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR,
- [](const NYql::TIssue& issue){
- return issue.GetMessage().Contains("stale snapshot");
- }), result.GetIssues().ToString());
+ if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQuerySourceRead()) {
+ UNIT_ASSERT_C(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR,
+ [](const NYql::TIssue& issue){
+ return issue.GetMessage().Contains("bellow low watermark");
+ }), result.GetIssues().ToString());
+
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::ABORTED);
+ } else {
+ UNIT_ASSERT_C(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR,
+ [](const NYql::TIssue& issue){
+ return issue.GetMessage().Contains("stale snapshot");
+ }), result.GetIssues().ToString());
+
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::PRECONDITION_FAILED);
+ }
caught = true;
break;
@@ -62,7 +73,11 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
}
Y_UNIT_TEST(ReadOnlyTxCommitsOnConcurrentWrite) {
- TKikimrRunner kikimr(TKikimrSettings().SetEnableMvcc(true).SetEnableMvccSnapshotReads(true));
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(true);
+ TKikimrRunner kikimr(TKikimrSettings()
+ .SetAppConfig(appConfig)
+ );
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_COMPUTE, NActors::NLog::PRI_DEBUG);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_BLOBS_STORAGE, NActors::NLog::PRI_DEBUG);
@@ -120,7 +135,7 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
}
Y_UNIT_TEST(ReadOnlyTxWithIndexCommitsOnConcurrentWrite) {
- TKikimrRunner kikimr(TKikimrSettings().SetEnableMvcc(true).SetEnableMvccSnapshotReads(true));
+ TKikimrRunner kikimr;
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_COMPUTE, NActors::NLog::PRI_DEBUG);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_BLOBS_STORAGE, NActors::NLog::PRI_DEBUG);
@@ -181,7 +196,7 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
}
Y_UNIT_TEST(ReadWriteTxFailsOnConcurrentWrite1) {
- TKikimrRunner kikimr(TKikimrSettings().SetEnableMvcc(true).SetEnableMvccSnapshotReads(true));
+ TKikimrRunner kikimr;
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_COMPUTE, NActors::NLog::PRI_DEBUG);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_BLOBS_STORAGE, NActors::NLog::PRI_DEBUG);
@@ -218,7 +233,7 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
}
Y_UNIT_TEST(ReadWriteTxFailsOnConcurrentWrite2) {
- TKikimrRunner kikimr(TKikimrSettings().SetEnableMvcc(true).SetEnableMvccSnapshotReads(true));
+ TKikimrRunner kikimr;
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_COMPUTE, NActors::NLog::PRI_DEBUG);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_BLOBS_STORAGE, NActors::NLog::PRI_DEBUG);
@@ -261,7 +276,12 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) {
}
Y_UNIT_TEST(ReadWriteTxFailsOnConcurrentWrite3) {
- TKikimrRunner kikimr(TKikimrSettings().SetEnableMvcc(true).SetEnableMvccSnapshotReads(true));
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(true);
+ TKikimrRunner kikimr(
+ TKikimrSettings()
+ .SetAppConfig(appConfig)
+ );
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_COMPUTE, NActors::NLog::PRI_DEBUG);
// kikimr.GetTestServer().GetRuntime()->SetLogPriority(NKikimrServices::KQP_BLOBS_STORAGE, NActors::NLog::PRI_DEBUG);
diff --git a/ydb/core/kqp/ut/tx/kqp_tx_ut.cpp b/ydb/core/kqp/ut/tx/kqp_tx_ut.cpp
index 44dcd90084..1efd0d9116 100644
--- a/ydb/core/kqp/ut/tx/kqp_tx_ut.cpp
+++ b/ydb/core/kqp/ut/tx/kqp_tx_ut.cpp
@@ -664,26 +664,6 @@ Y_UNIT_TEST_SUITE(KqpTx) {
auto commitResult = tx.Commit().ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(commitResult.GetStatus(), EStatus::SUCCESS, commitResult.GetIssues().ToString());
}
-
- Y_UNIT_TEST(SnapshotRONoMvccReads) {
- TKikimrRunner kikimr(TKikimrSettings()
- .SetEnableMvccSnapshotReads(false));
-
- auto db = kikimr.GetTableClient();
- auto session = db.CreateSession().GetValueSync().GetSession();
-
- // Query
- auto result = session.ExecuteDataQuery(Q1_(R"(
- SELECT * FROM EightShard WHERE Key = 102;
- )"), TTxControl::BeginTx(TTxSettings::SnapshotRO()).CommitTx()).ExtractValueSync();
- result.GetIssues().PrintTo(Cerr);
- UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
-
- // Begin
- auto beginResult = session.BeginTransaction(TTxSettings::SnapshotRO()).ExtractValueSync();
- beginResult.GetIssues().PrintTo(Cerr);
- UNIT_ASSERT_VALUES_EQUAL(beginResult.GetStatus(), EStatus::BAD_REQUEST);
- }
}
} // namespace NKqp
diff --git a/ydb/core/load_test/CMakeLists.darwin.txt b/ydb/core/load_test/CMakeLists.darwin.txt
index 478623a532..27946a3aa3 100644
--- a/ydb/core/load_test/CMakeLists.darwin.txt
+++ b/ydb/core/load_test/CMakeLists.darwin.txt
@@ -22,6 +22,7 @@ target_link_libraries(ydb-core-load_test PUBLIC
core-blobstorage-pdisk
ydb-core-control
ydb-core-keyvalue
+ core-kqp-common
ydb-library-workload
public-lib-base
public-lib-operation_id
diff --git a/ydb/core/load_test/CMakeLists.linux-aarch64.txt b/ydb/core/load_test/CMakeLists.linux-aarch64.txt
index 598df6875e..a2775a4bc5 100644
--- a/ydb/core/load_test/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/load_test/CMakeLists.linux-aarch64.txt
@@ -23,6 +23,7 @@ target_link_libraries(ydb-core-load_test PUBLIC
core-blobstorage-pdisk
ydb-core-control
ydb-core-keyvalue
+ core-kqp-common
ydb-library-workload
public-lib-base
public-lib-operation_id
diff --git a/ydb/core/load_test/CMakeLists.linux.txt b/ydb/core/load_test/CMakeLists.linux.txt
index 598df6875e..a2775a4bc5 100644
--- a/ydb/core/load_test/CMakeLists.linux.txt
+++ b/ydb/core/load_test/CMakeLists.linux.txt
@@ -23,6 +23,7 @@ target_link_libraries(ydb-core-load_test PUBLIC
core-blobstorage-pdisk
ydb-core-control
ydb-core-keyvalue
+ core-kqp-common
ydb-library-workload
public-lib-base
public-lib-operation_id
diff --git a/ydb/core/log_backend/CMakeLists.darwin.txt b/ydb/core/log_backend/CMakeLists.darwin.txt
new file mode 100644
index 0000000000..1660df1c28
--- /dev/null
+++ b/ydb/core/log_backend/CMakeLists.darwin.txt
@@ -0,0 +1,23 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(ydb-core-log_backend)
+target_compile_options(ydb-core-log_backend PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(ydb-core-log_backend PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-unified_agent_client
+ ydb-core-base
+)
+target_sources(ydb-core-log_backend PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/log_backend/log_backend.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/log_backend/log_backend_build.cpp
+)
diff --git a/ydb/core/log_backend/CMakeLists.linux-aarch64.txt b/ydb/core/log_backend/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..034f797c70
--- /dev/null
+++ b/ydb/core/log_backend/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,24 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(ydb-core-log_backend)
+target_compile_options(ydb-core-log_backend PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(ydb-core-log_backend PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-unified_agent_client
+ ydb-core-base
+)
+target_sources(ydb-core-log_backend PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/log_backend/log_backend.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/log_backend/log_backend_build.cpp
+)
diff --git a/ydb/core/log_backend/CMakeLists.linux.txt b/ydb/core/log_backend/CMakeLists.linux.txt
new file mode 100644
index 0000000000..034f797c70
--- /dev/null
+++ b/ydb/core/log_backend/CMakeLists.linux.txt
@@ -0,0 +1,24 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(ydb-core-log_backend)
+target_compile_options(ydb-core-log_backend PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(ydb-core-log_backend PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-unified_agent_client
+ ydb-core-base
+)
+target_sources(ydb-core-log_backend PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/log_backend/log_backend.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/log_backend/log_backend_build.cpp
+)
diff --git a/ydb/core/log_backend/CMakeLists.txt b/ydb/core/log_backend/CMakeLists.txt
new file mode 100644
index 0000000000..3e0811fb22
--- /dev/null
+++ b/ydb/core/log_backend/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (APPLE)
+ include(CMakeLists.darwin.txt)
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux.txt)
+endif()
diff --git a/ydb/core/log_backend/log_backend.cpp b/ydb/core/log_backend/log_backend.cpp
new file mode 100644
index 0000000000..249f1b6a77
--- /dev/null
+++ b/ydb/core/log_backend/log_backend.cpp
@@ -0,0 +1,141 @@
+#include "log_backend.h"
+#include "log_backend_build.h"
+#include <ydb/core/base/counters.h>
+
+namespace NKikimr {
+
+TAutoPtr<TLogBackend> CreateLogBackendWithUnifiedAgent(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters)
+{
+ if (runConfig.AppConfig.HasLogConfig()) {
+ const auto& logConfig = runConfig.AppConfig.GetLogConfig();
+ TAutoPtr<TLogBackend> logBackend = TLogBackendBuildHelper::CreateLogBackendFromLogConfig(logConfig);
+ if (logConfig.HasUAClientConfig()) {
+ const auto& uaClientConfig = logConfig.GetUAClientConfig();
+ auto uaCounters = GetServiceCounters(counters, "utils")->GetSubgroup("subsystem", "ua_client");
+ auto logName = uaClientConfig.GetLogName();
+ TAutoPtr<TLogBackend> uaLogBackend = TLogBackendBuildHelper::CreateLogBackendFromUAClientConfig(uaClientConfig, uaCounters, logName);
+ logBackend = logBackend ? NActors::CreateCompositeLogBackend({logBackend, uaLogBackend}) : uaLogBackend;
+ }
+ if (logBackend) {
+ return logBackend;
+ }
+ }
+
+ return NActors::CreateStderrBackend();
+}
+
+TAutoPtr<TLogBackend> CreateMeteringLogBackendWithUnifiedAgent(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters)
+{
+ TAutoPtr<TLogBackend> logBackend;
+ if (!runConfig.AppConfig.HasMeteringConfig())
+ return logBackend;
+
+ const auto& meteringConfig = runConfig.AppConfig.GetMeteringConfig();
+ if (meteringConfig.HasMeteringFilePath()) {
+ const auto& filePath = meteringConfig.GetMeteringFilePath();
+ try {
+ logBackend = new TFileLogBackend(filePath);
+ } catch (const TFileError& ex) {
+ Cerr << "CreateMeteringLogBackendWithUnifiedAgent: failed to open file '" << filePath << "': " << ex.what() << Endl;
+ exit(1);
+ }
+ }
+
+ if (meteringConfig.GetUnifiedAgentEnable() && runConfig.AppConfig.HasLogConfig() && runConfig.AppConfig.GetLogConfig().HasUAClientConfig()) {
+ const auto& logConfig = runConfig.AppConfig.GetLogConfig();
+ const auto& uaClientConfig = logConfig.GetUAClientConfig();
+ auto uaCounters = GetServiceCounters(counters, "utils")->GetSubgroup("subsystem", "ua_client");
+ auto logName = meteringConfig.HasLogName()
+ ? meteringConfig.GetLogName()
+ : uaClientConfig.GetLogName();
+ TAutoPtr<TLogBackend> uaLogBackend = TLogBackendBuildHelper::CreateLogBackendFromUAClientConfig(uaClientConfig, uaCounters, logName);
+ logBackend = logBackend ? NActors::CreateCompositeLogBackend({logBackend, uaLogBackend}) : uaLogBackend;
+ }
+
+ if (logBackend) {
+ return logBackend;
+ }
+ return NActors::CreateStderrBackend();
+}
+
+TAutoPtr<TLogBackend> CreateAuditLogFileBackend(
+ const TKikimrRunConfig& runConfig)
+{
+ TAutoPtr<TLogBackend> logBackend;
+ if (!runConfig.AppConfig.HasAuditConfig())
+ return logBackend;
+
+ const auto& auditConfig = runConfig.AppConfig.GetAuditConfig();
+ if (auditConfig.HasFileBackend() && auditConfig.GetFileBackend().HasFilePath()) {
+ const auto& filePath = auditConfig.GetFileBackend().GetFilePath();
+ try {
+ logBackend = new TFileLogBackend(filePath);
+ } catch (const TFileError& ex) {
+ Cerr << "CreateAuditLogFileBackend: failed to open file '" << filePath << "': " << ex.what() << Endl;
+ exit(1);
+ }
+ }
+
+ return logBackend;
+}
+
+
+TAutoPtr<TLogBackend> CreateAuditLogUnifiedAgentBackend(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters)
+{
+ TAutoPtr<TLogBackend> logBackend;
+ if (!runConfig.AppConfig.HasAuditConfig())
+ return logBackend;
+
+ const auto& auditConfig = runConfig.AppConfig.GetAuditConfig();
+ if (auditConfig.HasUnifiedAgentBackend() && runConfig.AppConfig.HasLogConfig() && runConfig.AppConfig.GetLogConfig().HasUAClientConfig()) {
+ const auto& logConfig = runConfig.AppConfig.GetLogConfig();
+ const auto& uaClientConfig = logConfig.GetUAClientConfig();
+ auto uaCounters = GetServiceCounters(counters, "utils")->GetSubgroup("subsystem", "ua_client");
+ auto logName = runConfig.AppConfig.GetAuditConfig().GetUnifiedAgentBackend().HasLogName()
+ ? runConfig.AppConfig.GetAuditConfig().GetUnifiedAgentBackend().GetLogName()
+ : uaClientConfig.GetLogName();
+ logBackend = TLogBackendBuildHelper::CreateLogBackendFromUAClientConfig(uaClientConfig, uaCounters, logName);
+ }
+
+ return logBackend;
+}
+
+TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> CreateAuditLogBackends(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters) {
+ TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> logBackends;
+ if (runConfig.AppConfig.HasAuditConfig() && runConfig.AppConfig.GetAuditConfig().HasStderrBackend()) {
+ auto logBackend = NActors::CreateStderrBackend();
+ auto format = runConfig.AppConfig.GetAuditConfig().GetStderrBackend().GetFormat();
+ logBackends[format].push_back(std::move(logBackend));
+ }
+
+ if (runConfig.AppConfig.HasAuditConfig() && runConfig.AppConfig.GetAuditConfig().HasFileBackend()) {
+ auto logBackend = CreateAuditLogFileBackend(runConfig);
+ if (logBackend) {
+ auto format = runConfig.AppConfig.GetAuditConfig().GetFileBackend().GetFormat();
+ logBackends[format].push_back(std::move(logBackend));
+ }
+ }
+
+ if (runConfig.AppConfig.HasAuditConfig() && runConfig.AppConfig.GetAuditConfig().HasUnifiedAgentBackend()) {
+ auto logBackend = CreateAuditLogUnifiedAgentBackend(runConfig, counters);
+ if (logBackend) {
+ auto format = runConfig.AppConfig.GetAuditConfig().GetUnifiedAgentBackend().GetFormat();
+ logBackends[format].push_back(std::move(logBackend));
+ }
+ }
+
+
+ return logBackends;
+}
+
+
+} // NKikimr
+
diff --git a/ydb/core/log_backend/log_backend.h b/ydb/core/log_backend/log_backend.h
new file mode 100644
index 0000000000..afdb4c0cd5
--- /dev/null
+++ b/ydb/core/log_backend/log_backend.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <ydb/core/driver_lib/run/config.h>
+
+#include <library/cpp/logger/backend.h>
+
+namespace NKikimr {
+
+TAutoPtr<TLogBackend> CreateLogBackendWithUnifiedAgent(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters);
+
+TAutoPtr<TLogBackend> CreateMeteringLogBackendWithUnifiedAgent(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters);
+
+TMap<NKikimrConfig::TAuditConfig::EFormat, TVector<THolder<TLogBackend>>> CreateAuditLogBackends(
+ const TKikimrRunConfig& runConfig,
+ NMonitoring::TDynamicCounterPtr counters);
+
+} // NKikimr
+
diff --git a/ydb/core/log_backend/log_backend_build.cpp b/ydb/core/log_backend/log_backend_build.cpp
new file mode 100644
index 0000000000..0bdd98ffeb
--- /dev/null
+++ b/ydb/core/log_backend/log_backend_build.cpp
@@ -0,0 +1,51 @@
+#include "log_backend_build.h"
+#include <util/system/getpid.h>
+#include <library/cpp/actors/core/log.h>
+
+namespace NKikimr {
+
+TAutoPtr<TLogBackend> TLogBackendBuildHelper::CreateLogBackendFromLogConfig(const NKikimrConfig::TLogConfig& logConfig, const TString& defaultIdent) {
+ TAutoPtr<TLogBackend> logBackend;
+ if (logConfig.HasSysLog() && logConfig.GetSysLog()) {
+ const TString& service = logConfig.GetSysLogService();
+ logBackend = NActors::CreateSysLogBackend(service ? service : defaultIdent, false, true);
+ } else if (logConfig.HasBackendFileName()) {
+ logBackend = NActors::CreateFileBackend(logConfig.GetBackendFileName());
+ }
+ return logBackend;
+}
+
+TAutoPtr<TLogBackend> TLogBackendBuildHelper::CreateLogBackendFromUAClientConfig(const NKikimrConfig::TUAClientConfig& uaClientConfig, NMonitoring::TDynamicCounterPtr uaCounters, const TString& logName) {
+ auto parameters = NUnifiedAgent::TClientParameters(uaClientConfig.GetUri())
+ .SetCounters(uaCounters)
+ .SetMaxInflightBytes(uaClientConfig.GetMaxInflightBytes());
+ if (uaClientConfig.HasSharedSecretKey()) {
+ parameters.SetSharedSecretKey(uaClientConfig.GetSharedSecretKey());
+ }
+ if (uaClientConfig.HasGrpcReconnectDelayMs()) {
+ parameters.SetGrpcReconnectDelay(TDuration::MilliSeconds(uaClientConfig.GetGrpcReconnectDelayMs()));
+ }
+ if (uaClientConfig.HasGrpcSendDelayMs()) {
+ parameters.SetGrpcSendDelay(TDuration::MilliSeconds(uaClientConfig.GetGrpcSendDelayMs()));
+ }
+ if (uaClientConfig.HasGrpcMaxMessageSize()) {
+ parameters.SetGrpcMaxMessageSize(uaClientConfig.GetGrpcMaxMessageSize());
+ }
+ if (uaClientConfig.HasClientLogFile()) {
+ TLog log(uaClientConfig.GetClientLogFile(),
+ static_cast<ELogPriority>(uaClientConfig.GetClientLogPriority()));
+ parameters.SetLog(log);
+ }
+
+ auto sessionParameters = NUnifiedAgent::TSessionParameters();
+ sessionParameters.Meta.ConstructInPlace();
+ (*sessionParameters.Meta)["_pid"] = ToString(GetPID());
+ if (logName) {
+ (*sessionParameters.Meta)["_log_name"] = logName;
+ }
+
+ TAutoPtr<TLogBackend> uaLogBackend = MakeLogBackend(parameters, sessionParameters).Release();
+ return uaLogBackend;
+}
+
+} // NKikimr
diff --git a/ydb/core/log_backend/log_backend_build.h b/ydb/core/log_backend/log_backend_build.h
new file mode 100644
index 0000000000..ab672bb819
--- /dev/null
+++ b/ydb/core/log_backend/log_backend_build.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <ydb/core/base/counters.h>
+#include <ydb/core/protos/config.pb.h>
+#include <library/cpp/logger/backend.h>
+#include <library/cpp/unified_agent_client/backend.h>
+#include <util/generic/ptr.h>
+
+namespace NKikimr {
+
+class TLogBackendBuildHelper {
+public:
+ static TAutoPtr<TLogBackend> CreateLogBackendFromLogConfig(
+ const NKikimrConfig::TLogConfig& logConfig,
+ const TString& defaultIdent = "KIKIMR");
+ static TAutoPtr<TLogBackend> CreateLogBackendFromUAClientConfig(
+ const NKikimrConfig::TUAClientConfig& uaClientConfig,
+ NMonitoring::TDynamicCounterPtr uaCounters,
+ const TString& logName);
+};
+}
diff --git a/ydb/core/mind/bscontroller/bsc.cpp b/ydb/core/mind/bscontroller/bsc.cpp
index e19f9dd1cb..17e5be0a6a 100644
--- a/ydb/core/mind/bscontroller/bsc.cpp
+++ b/ydb/core/mind/bscontroller/bsc.cpp
@@ -216,24 +216,26 @@ void TBlobStorageController::ValidateInternalState() {
const auto it = vslot->PDisk->VSlotsOnPDisk.find(vslotId.VSlotId);
Y_VERIFY(it != vslot->PDisk->VSlotsOnPDisk.end());
Y_VERIFY(it->second == vslot.Get());
+ const TGroupInfo *group = FindGroup(vslot->GroupId);
if (!vslot->IsBeingDeleted() && vslot->Mood != TMood::Donor) {
- Y_VERIFY(vslot->Group == FindGroup(vslot->GroupId));
+ Y_VERIFY(group);
+ Y_VERIFY(vslot->Group == group);
} else {
Y_VERIFY(!vslot->Group);
}
if (vslot->Mood == TMood::Donor) {
- const TVSlotInfo *acceptor = FindVSlot(vslot->AcceptorVSlotId);
- Y_VERIFY(acceptor);
- auto& donors = acceptor->Donors;
- const auto it = std::find(donors.begin(), donors.end(), std::make_pair(vslotId, vslot->GetVDiskId()));
- Y_VERIFY(it != donors.end());
+ const TVSlotInfo *acceptor = FindAcceptor(*vslot);
+ Y_VERIFY(!acceptor->IsBeingDeleted());
+ Y_VERIFY(acceptor->Mood != TMood::Donor);
+ Y_VERIFY(acceptor->Donors.contains(vslotId));
}
- for (const auto& [donorVSlotId, donorVDiskId] : vslot->Donors) {
+ for (const TVSlotId& donorVSlotId : vslot->Donors) {
const TVSlotInfo *donor = FindVSlot(donorVSlotId);
Y_VERIFY(donor);
- Y_VERIFY(donor->GetVDiskId() == donorVDiskId);
Y_VERIFY(donor->Mood == TMood::Donor);
- Y_VERIFY(donor->AcceptorVSlotId == vslotId);
+ Y_VERIFY(donor->GroupId == vslot->GroupId);
+ Y_VERIFY(donor->GroupGeneration < vslot->GroupGeneration + group->ContentChanged);
+ Y_VERIFY(donor->GetShortVDiskId() == vslot->GetShortVDiskId());
}
if (vslot->Group) {
if (vslot->Status == NKikimrBlobStorage::EVDiskStatus::READY) {
diff --git a/ydb/core/mind/bscontroller/cmds_box.cpp b/ydb/core/mind/bscontroller/cmds_box.cpp
index 17bfc9a2d6..cf160f9859 100644
--- a/ydb/core/mind/bscontroller/cmds_box.cpp
+++ b/ydb/core/mind/bscontroller/cmds_box.cpp
@@ -23,6 +23,9 @@ namespace NKikimr::NBsController {
TBoxInfo::THostInfo info;
info.HostConfigId = host.GetHostConfigId();
+ if (const ui32 nodeId = host.GetEnforcedNodeId()) {
+ info.EnforcedNodeId = nodeId;
+ }
const auto &hostConfigs = HostConfigs.Get();
if (!hostConfigs.count(info.HostConfigId)) {
diff --git a/ydb/core/mind/bscontroller/cmds_drive_status.cpp b/ydb/core/mind/bscontroller/cmds_drive_status.cpp
index 31b1696ea8..4d6f10c201 100644
--- a/ydb/core/mind/bscontroller/cmds_drive_status.cpp
+++ b/ydb/core/mind/bscontroller/cmds_drive_status.cpp
@@ -85,7 +85,7 @@ namespace NKikimr::NBsController {
item->SetPath(pdiskInfo.Path);
item->SetStatus(pdiskInfo.Status);
item->SetPDiskId(pdiskId.PDiskId);
- item->SetSerial(pdiskInfo.ExpectedSerial);
+ //item->SetSerial(pdiskInfo.ExpectedSerial);
item->SetStatusChangeTimestamp(pdiskInfo.StatusTimestamp.GetValue());
}
return true;
@@ -95,196 +95,94 @@ namespace NKikimr::NBsController {
void TBlobStorageController::TConfigState::ExecuteStep(const NKikimrBlobStorage::TAddDriveSerial& cmd,
TStatus& /*status*/) {
- const TString& newSerial = cmd.GetSerial();
-
- Schema::DriveSerial::BoxId::Type boxId = cmd.GetBoxId();
- const TDriveSerialInfo *driveInfo = DrivesSerials.Find(newSerial);
+ const auto& serial = cmd.GetSerial();
+ auto boxId = cmd.GetBoxId();
+ auto driveInfo = DrivesSerials.Find(serial);
if (driveInfo && driveInfo->LifeStage != NKikimrBlobStorage::TDriveLifeStage::REMOVED) {
- throw TExAlready() << "Device with such serial already exists in BSC database and not in lifeStage REMOVED";
+ throw TExAlready() << "Device with such serial already exists in BSC database in lifeStage " << driveInfo->LifeStage;
}
- if (auto it = NodeForSerial.find(newSerial); it != NodeForSerial.end()) {
- // Serial of drive is known, but drive not present in DrivesSerial
- // Check is it defined in HostConfigs
- TNodeId nodeId = it->second;
- const TNodeInfo& nodeInfo = Nodes.Get().at(nodeId);
- TString path = nodeInfo.KnownDrives.at(newSerial).Path;
-
- TPDiskId from = TPDiskId::MinForNode(nodeId);
- TPDiskId to = TPDiskId::MaxForNode(nodeId);
- std::optional<TPDiskId> updatePDiskId;
- PDisks.ForEachInRange(from, to, [&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- if (pdiskInfo.Path == path) {
- updatePDiskId = pdiskId;
- return false;
- }
- return true;
- });
- if (updatePDiskId) {
- // PDisk is defined through HostConfigs, but there may be fictional row in DrivesSerials
- // if row is present - delete it
- if (driveInfo) {
- DrivesSerials.DeleteExistingEntry(newSerial);
- driveInfo = nullptr;
- }
- TPDiskInfo *pdiskInfo = PDisks.FindForUpdate(*updatePDiskId);
- if (pdiskInfo->ExpectedSerial == newSerial) {
- throw TExAlready() << "Device with such serial already exists in BSC database and is defined through "
- << "HostConfigs";
- }
- pdiskInfo->ExpectedSerial = newSerial;
- if (pdiskInfo->BoxId != boxId) {
- throw TExError() << "Drive is defind in host configs, but placed in another box# " << pdiskInfo->BoxId;
- }
- STLOG(PRI_INFO, BS_CONTROLLER_AUDIT, BSCA06, "Set new ExpectedSerial for HostConfigs drive",
- (UniqueId, UniqueId), (Serial, newSerial), (BoxId, boxId), (PDiskId, *updatePDiskId), (Path, path));
- Fit.Boxes.insert(boxId);
- return;
- }
+ auto it = NodeIdByDiskSerialNumber.find(serial);
+ if (it == NodeIdByDiskSerialNumber.end()) {
+ throw TExError() << "Couldn't find node id for disk with serial number" << TErrorParams::DiskSerialNumber(serial);
}
+ auto nodeId = it->second;
- {
- // Additional check, may give false negative if ExpectedSerial for pdisk is unknown
- TMaybe<TPDiskId> from;
- TMaybe<TPDiskId> to;
- if (auto it = NodeForSerial.find(newSerial); it != NodeForSerial.end()) {
- from = TPDiskId::MinForNode(it->second);
- to = TPDiskId::MaxForNode(it->second);
- }
+ const auto& nodes = Nodes.Get();
+ auto nodeIt = nodes.find(nodeId);
+ if (nodeIt == nodes.end()) {
+ throw TExError() << "Couldn't find node by node id" << TErrorParams::NodeId(nodeId) << " for disk with serial number" << TErrorParams::DiskSerialNumber(serial);
+ }
- std::optional<TPDiskId> existingPDisk;
- PDisks.ForEachInRange(from, to, [&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- if (newSerial == pdiskInfo.ExpectedSerial) {
- existingPDisk = pdiskId;
- return false;
- }
- return true;
- });
- if (existingPDisk) {
- throw TExAlready() << "Device with such serial already exists in BSC database and is defined in HostConfigs"
- << " pdiskId# " << *existingPDisk;
- }
+ const auto& nodeInfo = nodeIt->second;
+ auto driveIt = nodeInfo.KnownDrives.find(serial);
+ if (driveIt == nodeInfo.KnownDrives.end()) {
+ throw TExError() << "Couldn't find disk on node" << TErrorParams::NodeId(nodeId) << " by serial number" << TErrorParams::DiskSerialNumber(serial);
}
- // delete existing entry, if any, but keep its GUID
- std::optional<TMaybe<Schema::DriveSerial::Guid::Type>> guid = driveInfo ? std::make_optional(driveInfo->Guid) : std::nullopt;
+ // delete REMOVED entry, if any, but keep its GUID
+ auto guid = driveInfo ? std::make_optional(driveInfo->Guid) : std::nullopt;
if (driveInfo) {
- DrivesSerials.DeleteExistingEntry(newSerial);
+ DrivesSerials.DeleteExistingEntry(serial);
}
- TDriveSerialInfo *driveInfoNew = DrivesSerials.ConstructInplaceNewEntry(newSerial, boxId);
+ auto driveInfoMutable = DrivesSerials.ConstructInplaceNewEntry(serial, boxId);
if (guid) {
- driveInfoNew->Guid = *guid;
+ driveInfoMutable->Guid = *guid;
+ }
+ driveInfoMutable->Kind = cmd.GetKind();
+ if (cmd.GetPDiskType() != NKikimrBlobStorage::UNKNOWN_TYPE) {
+ driveInfoMutable->PDiskType = cmd.GetPDiskType();
+ } else {
+ driveInfoMutable->PDiskType = PDiskTypeToPDiskType(driveIt->second.DeviceType);
}
-
- driveInfoNew->Kind = cmd.GetKind();
- driveInfoNew->PDiskType = cmd.GetPDiskType();
TString config;
- const bool success = cmd.GetPDiskConfig().SerializeToString(&config);
- Y_VERIFY(success);
- driveInfoNew->PDiskConfig = config;
+ if (!cmd.GetPDiskConfig().SerializeToString(&config)) {
+ throw TExError() << "Couldn't serialize PDiskConfig for disk with serial number" << TErrorParams::DiskSerialNumber(serial);
+ }
+ driveInfoMutable->PDiskConfig = config;
+ driveInfoMutable->LifeStage = NKikimrBlobStorage::TDriveLifeStage::ADDED;
+ driveInfoMutable->NodeId = nodeId;
+ driveInfoMutable->Path = driveIt->second.Path;
Fit.Boxes.insert(boxId);
- STLOG(PRI_INFO, BS_CONTROLLER_AUDIT, BSCA00, "AddDriveSerial", (UniqueId, UniqueId), (Serial, newSerial),
+ STLOG(PRI_INFO, BS_CONTROLLER_AUDIT, BSCA00, "AddDriveSerial", (UniqueId, UniqueId), (Serial, serial),
(BoxId, boxId));
}
void TBlobStorageController::TConfigState::ExecuteStep(const NKikimrBlobStorage::TRemoveDriveSerial& cmd,
TStatus& /*status*/) {
- const TString& serial = cmd.GetSerial();
+ const auto& serial = cmd.GetSerial();
- if (const TDriveSerialInfo *driveInfo = DrivesSerials.Find(serial); !driveInfo) {
- // Drive is defined in HostConfigs
- //
-
- // Fast search (works only for online nodes)
- std::optional<TNodeId> nodeId;
- if (auto it = NodeForSerial.find(serial); it != NodeForSerial.end()) {
- nodeId = it->second;
- } else {
- // Slow PDisks fullscan
- PDisks.ForEach([&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- if (pdiskInfo.ExpectedSerial == serial) {
- nodeId = pdiskId.NodeId;
- return false;
- }
- return true;
- });
- }
- if (!nodeId) {
- throw TExError() << "Device with such serial is unknown for BSC";
- }
-
- TPDiskId from = TPDiskId::MinForNode(*nodeId);
- TPDiskId to = TPDiskId::MaxForNode(*nodeId);
- std::optional<TPDiskId> removePDiskId;
- PDisks.ForEachInRange(from, to, [&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- if (pdiskInfo.ExpectedSerial == serial) {
- if (pdiskInfo.NumActiveSlots) {
- throw TExError() << "There are active vdisks on that drive";
- }
- if (removePDiskId) {
- throw TExError() << "has two pdisks defined in HostConfigs with same serial number";
- }
- removePDiskId = pdiskId;
- }
- return true;
- });
- if (!removePDiskId) {
- throw TExError() << "The serial was seen in cluster on node# " << *nodeId
- << " but now there are no pdisks with the serial";
- }
- auto* pdiskUpdate = PDisks.FindForUpdate(*removePDiskId);
- pdiskUpdate->ExpectedSerial = {};
- STLOG(PRI_INFO, BS_CONTROLLER_AUDIT, BSCA08, "Reset ExpectedSerial for HostConfig drive",
- (UniqueId, UniqueId), (Serial, serial), (PDiskId, *removePDiskId));
-
- // create fictional row in DrivesSerials to be able to reply kAlready for already removed disk
- // even if they are defined through HostConfig
- TDriveSerialInfo *driveInfoNew = DrivesSerials.ConstructInplaceNewEntry(serial, pdiskUpdate->BoxId);
- driveInfoNew->Guid = pdiskUpdate->Guid;
- driveInfoNew->Kind = pdiskUpdate->Kind.Kind();
- driveInfoNew->PDiskType = PDiskTypeToPDiskType(pdiskUpdate->Kind.Type());
- driveInfoNew->PDiskConfig = pdiskUpdate->PDiskConfig;
- driveInfoNew->LifeStage = NKikimrBlobStorage::TDriveLifeStage::REMOVED;
-
- Fit.Boxes.insert(pdiskUpdate->BoxId);
- } else {
- if (driveInfo->LifeStage == NKikimrBlobStorage::TDriveLifeStage::REMOVED) {
- throw TExAlready() << "Drive is already removed";
- }
+ auto driveInfo = DrivesSerials.Find(serial);
+ if (!driveInfo) {
+ throw TExError() << "Couldn't find disk with serial number" << TErrorParams::DiskSerialNumber(serial);
+ }
- if (driveInfo->NodeId && driveInfo->PDiskId) {
- TPDiskId pdiskId(*driveInfo->NodeId, *driveInfo->PDiskId);
- if (auto* pdiskInfo = PDisks.Find(pdiskId)) {
- if (pdiskInfo->NumActiveSlots) {
- throw TExError() << "There are active vdisks on that drive";
- } else {
- // PDisk will be deleted automatically in FitPDisks
- }
- }
- }
+ if (driveInfo->LifeStage == NKikimrBlobStorage::TDriveLifeStage::REMOVED) {
+ throw TExError() << "Disk with serial number" << TErrorParams::DiskSerialNumber(serial) << " has already been removed";
+ }
- TDriveSerialInfo *driveInfoMutable = DrivesSerials.FindForUpdate(serial);
- driveInfoMutable->NodeId.Clear();
- driveInfoMutable->PDiskId.Clear();
- driveInfoMutable->LifeStage = NKikimrBlobStorage::TDriveLifeStage::REMOVED;
+ auto driveInfoMutable = DrivesSerials.FindForUpdate(serial);
+ driveInfoMutable->NodeId.Clear();
+ driveInfoMutable->PDiskId.Clear();
+ driveInfoMutable->LifeStage = NKikimrBlobStorage::TDriveLifeStage::REMOVED;
+ driveInfoMutable->Path.Clear();
- Fit.Boxes.insert(driveInfoMutable->BoxId);
+ Fit.Boxes.insert(driveInfo->BoxId);
- STLOG(PRI_INFO, BS_CONTROLLER_AUDIT, BSCA07, "RemoveDriveSerial", (UniqueId, UniqueId), (Serial, serial));
- }
+ STLOG(PRI_INFO, BS_CONTROLLER_AUDIT, BSCA07, "RemoveDriveSerial", (UniqueId, UniqueId), (Serial, serial));
}
void TBlobStorageController::TConfigState::ExecuteStep(const NKikimrBlobStorage::TForgetDriveSerial& cmd,
TStatus& /*status*/) {
- const TString& serial = cmd.GetSerial();
+ const auto& serial = cmd.GetSerial();
- if (const TDriveSerialInfo *driveInfo = DrivesSerials.Find(serial)) {
+ if (auto driveInfo = DrivesSerials.Find(serial)) {
switch (driveInfo->LifeStage) {
case NKikimrBlobStorage::TDriveLifeStage::NOT_SEEN:
[[fallthrough]];
@@ -311,11 +209,17 @@ namespace NKikimr::NBsController {
break;
case NKikimrBlobStorage::TSerialManagementStage::CHECK_SERIAL:
PDisks.ForEach([&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- TString expected = pdiskInfo.ExpectedSerial;
- if (pdiskInfo.Path && (!expected || expected != pdiskInfo.LastSeenSerial)) {
- throw TExError() << "pdisk has not ExpectedSerial or ExpectedSerial not equals to LastSeenSerial"
- << " pdiskId# " << pdiskId << " expected# " << expected.Quote()
- << " lastSeen# " << pdiskInfo.LastSeenSerial;
+ if (pdiskInfo.ExpectedSerial && pdiskInfo.LastSeenSerial && pdiskInfo.ExpectedSerial != pdiskInfo.LastSeenSerial) {
+ throw TExError() << "LastSeenSerial doesn't match ExpectedSerial for pdisk"
+ << TErrorParams::NodeId(pdiskId.NodeId) << TErrorParams::PDiskId(pdiskId.PDiskId);
+ }
+ });
+ break;
+ case NKikimrBlobStorage::TSerialManagementStage::ONLY_SERIAL:
+ PDisks.ForEach([&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
+ if (pdiskInfo.ExpectedSerial != pdiskInfo.LastSeenSerial) {
+ throw TExError() << "LastSeenSerial doesn't match ExpectedSerial for pdisk"
+ << TErrorParams::NodeId(pdiskId.NodeId) << TErrorParams::PDiskId(pdiskId.PDiskId);
}
});
break;
diff --git a/ydb/core/mind/bscontroller/cmds_storage_pool.cpp b/ydb/core/mind/bscontroller/cmds_storage_pool.cpp
index 51275a8227..9c32a3bfa9 100644
--- a/ydb/core/mind/bscontroller/cmds_storage_pool.cpp
+++ b/ydb/core/mind/bscontroller/cmds_storage_pool.cpp
@@ -448,77 +448,103 @@ namespace NKikimr::NBsController {
// settings->AddSerialManagementStage(Self.SerialManagementStage);
}
- void TBlobStorageController::TConfigState::ExecuteStep(const NKikimrBlobStorage::TQueryBaseConfig& /*cmd*/, TStatus& status) {
+ void TBlobStorageController::TConfigState::ExecuteStep(const NKikimrBlobStorage::TQueryBaseConfig& cmd, TStatus& status) {
NKikimrBlobStorage::TBaseConfig *pb = status.MutableBaseConfig();
+
+ const bool virtualGroupsOnly = cmd.GetVirtualGroupsOnly();
+
+ THashSet<TGroupId> groupFilter;
+ THashSet<TVSlotId> vslotFilter;
+ THashSet<TPDiskId> pdiskFilter;
+
+ if (virtualGroupsOnly) {
+ Groups.ForEach([&](TGroupId groupId, const TGroupInfo& groupInfo) {
+ if (groupInfo.VirtualGroupState || groupInfo.DecommitStatus != NKikimrBlobStorage::TGroupDecommitStatus::NONE) {
+ groupFilter.insert(groupId);
+ }
+ });
+ VSlots.ForEach([&](TVSlotId vslotId, const TVSlotInfo& vslotInfo) {
+ if (vslotInfo.Group && groupFilter.contains(vslotInfo.GroupId)) {
+ vslotFilter.insert(vslotId);
+ pdiskFilter.insert(vslotId.ComprisingPDiskId());
+ }
+ });
+ }
+
PDisks.ForEach([&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- Serialize(pb->AddPDisk(), pdiskId, pdiskInfo);
+ if (!virtualGroupsOnly || pdiskFilter.contains(pdiskId)) {
+ Serialize(pb->AddPDisk(), pdiskId, pdiskInfo);
+ }
});
- auto vslotFinder = [this](const TVSlotId& vslotId, const std::function<void(const TVSlotInfo&)>& callback) {
+ const TVSlotFinder vslotFinder{[this](const TVSlotId& vslotId, auto&& callback) {
if (const TVSlotInfo *vslot = VSlots.Find(vslotId)) {
callback(*vslot);
}
- };
- VSlots.ForEach([pb, &vslotFinder](const TVSlotId& /*vslotId*/, const TVSlotInfo& vslotInfo) {
- if (vslotInfo.Group) {
+ }};
+ VSlots.ForEach([&](TVSlotId vslotId, const TVSlotInfo& vslotInfo) {
+ if (vslotInfo.Group && (!virtualGroupsOnly || vslotFilter.contains(vslotId))) {
Serialize(pb->AddVSlot(), vslotInfo, vslotFinder);
}
});
- Groups.ForEach([pb](TGroupId /*groupId*/, const TGroupInfo& groupInfo) {
- Serialize(pb->AddGroup(), groupInfo);
+ Groups.ForEach([&](TGroupId groupId, const TGroupInfo& groupInfo) {
+ if (!virtualGroupsOnly || groupFilter.contains(groupId)) {
+ Serialize(pb->AddGroup(), groupInfo);
+ }
});
- // apply static group
- for (const auto& [pdiskId, pdisk] : StaticPDisks) {
- if (PDisks.Find(pdiskId)) {
- continue; // this pdisk was already reported
- }
- auto *x = pb->AddPDisk();
- x->SetNodeId(pdisk.NodeId);
- x->SetPDiskId(pdisk.PDiskId);
- x->SetPath(pdisk.Path);
- x->SetType(PDiskTypeToPDiskType(pdisk.Category.Type()));
- x->SetKind(pdisk.Category.Kind());
- if (pdisk.PDiskConfig) {
- bool success = x->MutablePDiskConfig()->ParseFromString(pdisk.PDiskConfig);
- Y_VERIFY(success);
- }
- x->SetGuid(pdisk.Guid);
- x->SetNumStaticSlots(pdisk.StaticSlotUsage);
- x->SetDriveStatus(NKikimrBlobStorage::EDriveStatus::ACTIVE);
- x->SetExpectedSlotCount(pdisk.ExpectedSlotCount);
- x->SetDecommitStatus(NKikimrBlobStorage::EDecommitStatus::DECOMMIT_NONE);
- if (pdisk.PDiskMetrics) {
- x->MutablePDiskMetrics()->CopyFrom(*pdisk.PDiskMetrics);
- x->MutablePDiskMetrics()->ClearPDiskId();
+ if (!virtualGroupsOnly) {
+ // apply static group
+ for (const auto& [pdiskId, pdisk] : StaticPDisks) {
+ if (PDisks.Find(pdiskId)) {
+ continue; // this pdisk was already reported
+ }
+ auto *x = pb->AddPDisk();
+ x->SetNodeId(pdisk.NodeId);
+ x->SetPDiskId(pdisk.PDiskId);
+ x->SetPath(pdisk.Path);
+ x->SetType(PDiskTypeToPDiskType(pdisk.Category.Type()));
+ x->SetKind(pdisk.Category.Kind());
+ if (pdisk.PDiskConfig) {
+ bool success = x->MutablePDiskConfig()->ParseFromString(pdisk.PDiskConfig);
+ Y_VERIFY(success);
+ }
+ x->SetGuid(pdisk.Guid);
+ x->SetNumStaticSlots(pdisk.StaticSlotUsage);
+ x->SetDriveStatus(NKikimrBlobStorage::EDriveStatus::ACTIVE);
+ x->SetExpectedSlotCount(pdisk.ExpectedSlotCount);
+ x->SetDecommitStatus(NKikimrBlobStorage::EDecommitStatus::DECOMMIT_NONE);
+ if (pdisk.PDiskMetrics) {
+ x->MutablePDiskMetrics()->CopyFrom(*pdisk.PDiskMetrics);
+ x->MutablePDiskMetrics()->ClearPDiskId();
+ }
}
- }
- for (const auto& [vslotId, vslot] : StaticVSlots) {
- auto *x = pb->AddVSlot();
- vslotId.Serialize(x->MutableVSlotId());
- x->SetGroupId(vslot.VDiskId.GroupID);
- x->SetGroupGeneration(vslot.VDiskId.GroupGeneration);
- x->SetFailRealmIdx(vslot.VDiskId.FailRealm);
- x->SetFailDomainIdx(vslot.VDiskId.FailDomain);
- x->SetVDiskIdx(vslot.VDiskId.VDisk);
- if (vslot.VDiskMetrics) {
- x->SetAllocatedSize(vslot.VDiskMetrics->GetAllocatedSize());
- x->MutableVDiskMetrics()->CopyFrom(*vslot.VDiskMetrics);
- x->MutableVDiskMetrics()->ClearVDiskId();
+ for (const auto& [vslotId, vslot] : StaticVSlots) {
+ auto *x = pb->AddVSlot();
+ vslotId.Serialize(x->MutableVSlotId());
+ x->SetGroupId(vslot.VDiskId.GroupID);
+ x->SetGroupGeneration(vslot.VDiskId.GroupGeneration);
+ x->SetFailRealmIdx(vslot.VDiskId.FailRealm);
+ x->SetFailDomainIdx(vslot.VDiskId.FailDomain);
+ x->SetVDiskIdx(vslot.VDiskId.VDisk);
+ if (vslot.VDiskMetrics) {
+ x->SetAllocatedSize(vslot.VDiskMetrics->GetAllocatedSize());
+ x->MutableVDiskMetrics()->CopyFrom(*vslot.VDiskMetrics);
+ x->MutableVDiskMetrics()->ClearVDiskId();
+ }
+ x->SetStatus(NKikimrBlobStorage::EVDiskStatus_Name(vslot.VDiskStatus));
}
- x->SetStatus(NKikimrBlobStorage::EVDiskStatus_Name(vslot.VDiskStatus));
- }
-
- if (const auto& ss = AppData()->StaticBlobStorageConfig) {
- for (const auto& group : ss->GetGroups()) {
- auto *x = pb->AddGroup();
- x->SetGroupId(group.GetGroupID());
- x->SetGroupGeneration(group.GetGroupGeneration());
- x->SetErasureSpecies(TBlobStorageGroupType::ErasureSpeciesName(group.GetErasureSpecies()));
- for (const auto& realm : group.GetRings()) {
- for (const auto& domain : realm.GetFailDomains()) {
- for (const auto& location : domain.GetVDiskLocations()) {
- const TVSlotId vslotId(location.GetNodeID(), location.GetPDiskID(), location.GetVDiskSlotID());
- vslotId.Serialize(x->AddVSlotId());
+ if (const auto& ss = AppData()->StaticBlobStorageConfig) {
+ for (const auto& group : ss->GetGroups()) {
+ auto *x = pb->AddGroup();
+ x->SetGroupId(group.GetGroupID());
+ x->SetGroupGeneration(group.GetGroupGeneration());
+ x->SetErasureSpecies(TBlobStorageGroupType::ErasureSpeciesName(group.GetErasureSpecies()));
+ for (const auto& realm : group.GetRings()) {
+ for (const auto& domain : realm.GetFailDomains()) {
+ for (const auto& location : domain.GetVDiskLocations()) {
+ const TVSlotId vslotId(location.GetNodeID(), location.GetPDiskID(), location.GetVDiskSlotID());
+ vslotId.Serialize(x->AddVSlotId());
+ }
}
}
}
diff --git a/ydb/core/mind/bscontroller/config.cpp b/ydb/core/mind/bscontroller/config.cpp
index 638a9ffbfb..124027708a 100644
--- a/ydb/core/mind/bscontroller/config.cpp
+++ b/ydb/core/mind/bscontroller/config.cpp
@@ -98,7 +98,7 @@ namespace NKikimr::NBsController {
}
pdisk->SetPDiskGuid(pdiskInfo.Guid);
pdisk->SetPDiskCategory(pdiskInfo.Kind.GetRaw());
- pdisk->SetExpectedSerial(pdiskInfo.ExpectedSerial);
+ //pdisk->SetExpectedSerial(pdiskInfo.ExpectedSerial);
pdisk->SetManagementStage(Self->SerialManagementStage);
if (pdiskInfo.PDiskConfig && !pdisk->MutablePDiskConfig()->ParseFromString(pdiskInfo.PDiskConfig)) {
// TODO(alexvru): report this somehow
@@ -155,7 +155,14 @@ namespace NKikimr::NBsController {
if (const TGroupInfo *group = State.Groups.Find(vslotInfo.GroupId); group && mood != TMood::Delete) {
item.SetStoragePoolName(State.StoragePools.Get().at(group->StoragePoolId).Name);
- SerializeDonors(&item, vslotInfo, *group);
+
+ const TVSlotFinder vslotFinder{[this](TVSlotId vslotId, auto&& callback) {
+ if (const TVSlotInfo *vslot = State.VSlots.Find(vslotId)) {
+ callback(*vslot);
+ }
+ }};
+
+ SerializeDonors(&item, vslotInfo, *group, vslotFinder);
} else {
Y_VERIFY(mood != TMood::Donor);
}
@@ -295,7 +302,7 @@ namespace NKikimr::NBsController {
continue;
}
auto& group = overlay->second;
- if (base->second->Generation != group->Generation || group->MoodChanged) {
+ if ((base->second->Generation != group->Generation || group->MoodChanged) && group->VDisksInGroup) {
// process only groups with changed content; create topology for group
auto& topology = *group->Topology;
// fill in vector of failed disks (that are not fully operational)
@@ -564,7 +571,7 @@ namespace NKikimr::NBsController {
}
}
- void TBlobStorageController::TConfigState::DestroyVSlot(const TVSlotId vslotId) {
+ void TBlobStorageController::TConfigState::DestroyVSlot(const TVSlotId vslotId, const TVSlotInfo *ensureAcceptorSlot) {
// obtain mutable slot pointer
TVSlotInfo *mutableSlot = VSlots.FindForUpdate(vslotId);
Y_VERIFY(mutableSlot);
@@ -575,17 +582,33 @@ namespace NKikimr::NBsController {
if (mutableSlot->Mood == TMood::Donor) {
// this is the donor disk and it is being deleted; here we have to inform the acceptor disk of changed
// donor set by simply removing the donor disk
- TVSlotInfo *mutableAcceptor = VSlots.FindForUpdate(mutableSlot->AcceptorVSlotId);
+ const TGroupInfo *group = Groups.Find(mutableSlot->GroupId);
+ Y_VERIFY(group);
+ const ui32 orderNumber = group->Topology->GetOrderNumber(mutableSlot->GetShortVDiskId());
+ const TVSlotInfo *acceptor = group->VDisksInGroup[orderNumber];
+ Y_VERIFY(acceptor);
+ Y_VERIFY(!acceptor->IsBeingDeleted());
+ Y_VERIFY(acceptor->Mood != TMood::Donor);
+ Y_VERIFY(mutableSlot->GroupId == acceptor->GroupId && mutableSlot->GroupGeneration < acceptor->GroupGeneration &&
+ mutableSlot->GetShortVDiskId() == acceptor->GetShortVDiskId());
+
+ TVSlotInfo *mutableAcceptor = VSlots.FindForUpdate(acceptor->VSlotId);
Y_VERIFY(mutableAcceptor);
+ Y_VERIFY_S(!ensureAcceptorSlot || ensureAcceptorSlot == mutableAcceptor,
+ "EnsureAcceptor# " << ensureAcceptorSlot->VSlotId << ':' << ensureAcceptorSlot->GetVDiskId()
+ << " MutableAcceptor# " << mutableAcceptor->VSlotId << ':' << mutableAcceptor->GetVDiskId()
+ << " Slot# " << mutableSlot->VSlotId << ':' << mutableSlot->GetVDiskId());
+
auto& donors = mutableAcceptor->Donors;
- const auto it = std::find(donors.begin(), donors.end(), std::make_pair(vslotId, mutableSlot->GetVDiskId()));
- Y_VERIFY(it != donors.end());
- donors.erase(it);
+ const size_t numErased = donors.erase(vslotId);
+ Y_VERIFY(numErased == 1);
+ } else {
+ Y_VERIFY(!ensureAcceptorSlot);
}
- for (const auto& [donorVSlotId, donorVDiskId] : std::exchange(mutableSlot->Donors, {})) {
- // this is the acceptor disk and we have to delete all the donors as they are not needed anymore
- DestroyVSlot(donorVSlotId);
+ // this is the acceptor disk and we have to delete all the donors as they are not needed anymore
+ for (auto& donors = mutableSlot->Donors; !donors.empty(); ) {
+ DestroyVSlot(*donors.begin(), mutableSlot);
}
// remove slot info from the PDisk
@@ -623,24 +646,30 @@ namespace NKikimr::NBsController {
const auto it = vslot.PDisk->VSlotsOnPDisk.find(vslotId.VSlotId);
Y_VERIFY(it != vslot.PDisk->VSlotsOnPDisk.end());
Y_VERIFY(it->second == &vslot);
+ const TGroupInfo *group = Groups.Find(vslot.GroupId);
if (!vslot.IsBeingDeleted() && vslot.Mood != TMood::Donor) {
- Y_VERIFY(vslot.Group == Groups.Find(vslot.GroupId));
+ Y_VERIFY(group);
+ Y_VERIFY(vslot.Group == group);
} else {
Y_VERIFY(!vslot.Group);
}
if (vslot.Mood == TMood::Donor) {
- const TVSlotInfo *acceptor = VSlots.Find(vslot.AcceptorVSlotId);
+ Y_VERIFY(vslot.Donors.empty());
+ Y_VERIFY(group);
+ const ui32 orderNumber = group->Topology->GetOrderNumber(vslot.GetShortVDiskId());
+ const TVSlotInfo *acceptor = group->VDisksInGroup[orderNumber];
Y_VERIFY(acceptor);
- auto& donors = acceptor->Donors;
- const auto it = std::find(donors.begin(), donors.end(), std::make_pair(vslotId, vslot.GetVDiskId()));
- Y_VERIFY(it != donors.end());
+ Y_VERIFY(!acceptor->IsBeingDeleted());
+ Y_VERIFY(acceptor->Mood != TMood::Donor);
+ Y_VERIFY(acceptor->Donors.contains(vslotId));
}
- for (const auto& [donorVSlotId, donorVDiskId] : vslot.Donors) {
+ for (const TVSlotId& donorVSlotId : vslot.Donors) {
const TVSlotInfo *donor = VSlots.Find(donorVSlotId);
Y_VERIFY(donor);
- Y_VERIFY(donor->GetVDiskId() == donorVDiskId);
Y_VERIFY(donor->Mood == TMood::Donor);
- Y_VERIFY(donor->AcceptorVSlotId == vslotId);
+ Y_VERIFY(donor->GroupId == vslot.GroupId);
+ Y_VERIFY(donor->GroupGeneration < vslot.GroupGeneration + group->ContentChanged);
+ Y_VERIFY(donor->GetShortVDiskId() == vslot.GetShortVDiskId());
}
});
Groups.ForEach([&](const auto& groupId, const auto& group) {
@@ -823,6 +852,7 @@ namespace NKikimr::NBsController {
pb->SetDecommitStatus(pdisk.DecommitStatus);
pb->MutablePDiskMetrics()->CopyFrom(pdisk.Metrics);
pb->MutablePDiskMetrics()->ClearPDiskId();
+ //pb->SetExpectedSerial(pdisk.ExpectedSerial);
}
void TBlobStorageController::Serialize(NKikimrBlobStorage::TVSlotId *pb, TVSlotId id) {
@@ -855,11 +885,11 @@ namespace NKikimr::NBsController {
pb->MutableVDiskMetrics()->CopyFrom(vslot.Metrics);
pb->MutableVDiskMetrics()->ClearVDiskId();
pb->SetStatus(NKikimrBlobStorage::EVDiskStatus_Name(vslot.Status));
- for (const auto& [vslotId, vdiskId] : vslot.Donors) {
+ for (const TVSlotId& vslotId : vslot.Donors) {
auto *item = pb->AddDonors();
Serialize(item->MutableVSlotId(), vslotId);
- VDiskIDFromVDiskID(vdiskId, item->MutableVDiskId());
finder(vslotId, [item](const TVSlotInfo& vslot) {
+ VDiskIDFromVDiskID(vslot.GetVDiskId(), item->MutableVDiskId());
item->MutableVDiskMetrics()->CopyFrom(vslot.Metrics);
item->MutableVDiskMetrics()->ClearVDiskId();
});
@@ -881,10 +911,27 @@ namespace NKikimr::NBsController {
const auto& status = group.Status;
pb->SetOperatingStatus(status.OperatingStatus);
pb->SetExpectedStatus(status.ExpectedStatus);
+
+ if (group.DecommitStatus != NKikimrBlobStorage::TGroupDecommitStatus::NONE || group.VirtualGroupState) {
+ auto *vgi = pb->MutableVirtualGroupInfo();
+ if (group.VirtualGroupState) {
+ vgi->SetState(*group.VirtualGroupState);
+ }
+ if (group.VirtualGroupName) {
+ vgi->SetName(*group.VirtualGroupName);
+ }
+ if (group.BlobDepotId) {
+ vgi->SetBlobDepotId(*group.BlobDepotId);
+ }
+ if (group.ErrorReason) {
+ vgi->SetErrorReason(*group.ErrorReason);
+ }
+ vgi->SetDecommitStatus(group.DecommitStatus);
+ }
}
void TBlobStorageController::SerializeDonors(NKikimrBlobStorage::TNodeWardenServiceSet::TVDisk *vdisk,
- const TVSlotInfo& vslot, const TGroupInfo& group) {
+ const TVSlotInfo& vslot, const TGroupInfo& group, const TVSlotFinder& finder) {
if (vslot.Mood == TMood::Donor) {
ui32 numFailRealms = 0, numFailDomainsPerFailRealm = 0, numVDisksPerFailDomain = 0;
for (const TVSlotInfo *slot : group.VDisksInGroup) {
@@ -899,10 +946,32 @@ namespace NKikimr::NBsController {
pb->SetNumVDisksPerFailDomain(numVDisksPerFailDomain);
pb->SetErasureSpecies(group.ErasureSpecies);
}
- for (const auto& [vslotId, vdiskId] : vslot.Donors) {
+
+ std::vector<std::pair<TVDiskID, TVSlotId>> donors;
+ for (const TVSlotId& donorVSlotId : vslot.Donors) {
+ std::optional<TVDiskID> vdiskId;
+ finder(donorVSlotId, [&](const TVSlotInfo& donor) {
+ vdiskId.emplace(donor.GetVDiskId());
+ });
+ Y_VERIFY(vdiskId);
+ donors.emplace_back(*vdiskId, donorVSlotId);
+ }
+
+ std::sort(donors.begin(), donors.end());
+ if (!donors.empty()) {
+ for (size_t i = 0; i < donors.size() - 1; ++i) {
+ const auto& x = donors[i].first;
+ const auto& y = donors[i + 1].first;
+ Y_VERIFY(x.GroupID == y.GroupID);
+ Y_VERIFY(x.GroupGeneration < y.GroupGeneration);
+ Y_VERIFY(TVDiskIdShort(x) == TVDiskIdShort(y));
+ }
+ }
+
+ for (const auto& [donorVDiskId, donorVSlotId] : donors) {
auto *pb = vdisk->AddDonors();
- VDiskIDFromVDiskID(vdiskId, pb->MutableVDiskId());
- Serialize(pb->MutableVDiskLocation(), vslotId);
+ VDiskIDFromVDiskID(donorVDiskId, pb->MutableVDiskId());
+ Serialize(pb->MutableVDiskLocation(), donorVSlotId);
}
}
diff --git a/ydb/core/mind/bscontroller/config.h b/ydb/core/mind/bscontroller/config.h
index 23cc993dac..dcfa8b9c4d 100644
--- a/ydb/core/mind/bscontroller/config.h
+++ b/ydb/core/mind/bscontroller/config.h
@@ -105,7 +105,7 @@ namespace NKikimr {
// static pdisk/vdisk states
std::map<TVSlotId, TStaticVSlotInfo>& StaticVSlots;
std::map<TPDiskId, TStaticPDiskInfo>& StaticPDisks;
- const std::map<TString, TNodeId>& NodeForSerial;
+ const std::unordered_map<TString, TNodeId>& NodeIdByDiskSerialNumber;
TCowHolder<Schema::State::SerialManagementStage::Type> SerialManagementStage;
@@ -135,7 +135,7 @@ namespace NKikimr {
, DefaultMaxSlots(controller.DefaultMaxSlots)
, StaticVSlots(controller.StaticVSlots)
, StaticPDisks(controller.StaticPDisks)
- , NodeForSerial(controller.NodeForSerial)
+ , NodeIdByDiskSerialNumber(controller.NodeIdByDiskSerialNumber)
, SerialManagementStage(&controller.SerialManagementStage)
, StoragePoolStat(*controller.StoragePoolStat)
{
@@ -207,7 +207,7 @@ namespace NKikimr {
return res;
}
- void DestroyVSlot(const TVSlotId vslotId);
+ void DestroyVSlot(const TVSlotId vslotId, const TVSlotInfo *ensureAcceptorSlot = nullptr);
void CheckConsistency() const;
diff --git a/ydb/core/mind/bscontroller/config_fit_groups.cpp b/ydb/core/mind/bscontroller/config_fit_groups.cpp
index 802a20554b..a5ec4df6bb 100644
--- a/ydb/core/mind/bscontroller/config_fit_groups.cpp
+++ b/ydb/core/mind/bscontroller/config_fit_groups.cpp
@@ -169,8 +169,6 @@ namespace NKikimr {
// mapping for audit log
TMap<TVDiskIdShort, TVSlotId> replacedSlots;
- TStackVec<std::pair<TVSlotId, bool>, 32> replaceQueue;
- THashMap<TVDiskIdShort, TPDiskId> replacedDisks;
i64 requiredSpace = Min<i64>();
bool sanitizingRequest = (State.SanitizingRequests.find(groupId) != State.SanitizingRequests.end());
@@ -213,9 +211,7 @@ namespace NKikimr {
// get the current PDisk in the desired slot and replace it with the target one; if the target
// PDisk id is zero, then new PDisk will be picked up automatically
g[vslot->RingIdx][vslot->FailDomainIdx][vslot->VDiskIdx] = targetPDiskId;
- replacedSlots.emplace(TVDiskIdShort(vslot->RingIdx, vslot->FailDomainIdx, vslot->VDiskIdx), vslot->VSlotId);
- replaceQueue.emplace_back(vslot->VSlotId, State.SuppressDonorMode.count(vslot->VSlotId));
- replacedDisks.emplace(vslot->GetShortVDiskId(), vslot->VSlotId.ComprisingPDiskId());
+ replacedSlots.emplace(vslot->GetShortVDiskId(), vslot->VSlotId);
} else {
preservedSlots.emplace(vslot->GetVDiskId(), vslot->VSlotId);
auto& m = vslot->Metrics;
@@ -249,16 +245,18 @@ namespace NKikimr {
if (hasMissingSlots || !IgnoreGroupSanityChecks) {
TGroupMapper::TForbiddenPDisks forbid;
for (const auto& vslot : groupInfo->VDisksInGroup) {
- for (const auto& [vslotId, vdiskId] : vslot->Donors) {
+ const TVDiskIdShort vdiskId = vslot->GetShortVDiskId();
+ for (const TVSlotId& vslotId : vslot->Donors) {
if (group[vdiskId.FailRealm][vdiskId.FailDomain][vdiskId.VDisk] == TPDiskId()) {
forbid.insert(vslotId.ComprisingPDiskId());
}
}
}
- if ((replacedDisks.empty() && sanitizingRequest) || (replacedDisks.size() == 1)) {
+ if ((replacedSlots.empty() && sanitizingRequest) ||
+ (State.Self.IsGroupLayoutSanitizerEnabled() && replacedSlots.size() == 1 && hasMissingSlots)) {
auto result = SanitizeGroup(groupId, group, std::move(forbid), requiredSpace, AllowUnusableDisks);
- if (replacedDisks.empty()) {
+ if (replacedSlots.empty()) {
// update information about replaced disks
for (const TVSlotInfo *vslot : groupInfo->VDisksInGroup) {
if (vslot->GetShortVDiskId() == result.first) {
@@ -266,13 +264,15 @@ namespace NKikimr {
Y_VERIFY(it != preservedSlots.end());
preservedSlots.erase(it);
replacedSlots.emplace(result.first, vslot->VSlotId);
- replaceQueue.emplace_back(vslot->VSlotId, State.SuppressDonorMode.count(vslot->VSlotId));
- replacedDisks.emplace(result.first, vslot->VSlotId.ComprisingPDiskId());
break;
}
}
}
} else {
+ THashMap<TVDiskIdShort, TPDiskId> replacedDisks;
+ for (const auto& [vdiskId, vslotId] : replacedSlots) {
+ replacedDisks.emplace(vdiskId, vslotId.ComprisingPDiskId());
+ }
AllocateGroup(groupId, group, replacedDisks, std::move(forbid), requiredSpace, AllowUnusableDisks);
}
if (!IgnoreVSlotQuotaCheck) {
@@ -287,6 +287,26 @@ namespace NKikimr {
}
}
+ // make list of donors and dispose unused slots
+ std::vector<TVSlotId> donors;
+ for (const auto& [vdiskId, vslotId] : replacedSlots) {
+ const bool suppressDonorMode = State.SuppressDonorMode.contains(vslotId);
+ if (State.DonorMode && !suppressDonorMode && !State.UncommittedVSlots.count(vslotId)) {
+ donors.push_back(vslotId);
+ } else {
+ if (adjustSpaceAvailable) {
+ const TVSlotInfo *slot = State.VSlots.Find(vslotId);
+ Y_VERIFY(slot);
+ if (!slot->PDisk->SlotSpaceEnforced(State.Self)) {
+ // mark the space from destroyed slot as available
+ Mapper->AdjustSpaceAvailable(vslotId.ComprisingPDiskId(), slot->Metrics.GetAllocatedSize());
+ }
+ }
+
+ State.DestroyVSlot(vslotId);
+ }
+ }
+
// create slots for the new group
auto newSlots = CreateVSlotsForGroup(groupInfo, group, preservedSlots);
groupInfo->ContentChanged = true;
@@ -346,36 +366,16 @@ namespace NKikimr {
(Replacements, makeReplacements()));
}
- for (const auto& [vslotId, suppressDonorMode] : replaceQueue) {
- if (State.DonorMode && !suppressDonorMode && !State.UncommittedVSlots.count(vslotId)) {
- TVSlotInfo *mutableSlot = State.VSlots.FindForUpdate(vslotId);
- Y_VERIFY(mutableSlot);
- // make slot the donor one for the newly created slot
- const auto it = newSlots.find(mutableSlot->GetShortVDiskId());
- Y_VERIFY(it != newSlots.end());
- mutableSlot->MakeDonorFor(it->second);
- for (const auto& [donorVSlotId, donorVDiskId] : it->second->Donors) {
- TVSlotInfo *mutableDonor = State.VSlots.FindForUpdate(donorVSlotId);
- Y_VERIFY(mutableDonor);
- Y_VERIFY(mutableDonor->Mood == TMood::Donor);
- mutableDonor->AcceptorVSlotId = it->second->VSlotId;
- }
- } else {
- if (adjustSpaceAvailable) {
- const TVSlotInfo *slot = State.VSlots.Find(vslotId);
- Y_VERIFY(slot);
- if (!slot->PDisk->SlotSpaceEnforced(State.Self)) {
- // mark the space from destroyed slot as available
- Mapper->AdjustSpaceAvailable(vslotId.ComprisingPDiskId(), slot->Metrics.GetAllocatedSize());
- }
- }
-
- State.DestroyVSlot(vslotId);
- }
+ for (const TVSlotId& vslotId : donors) {
+ TVSlotInfo *mutableSlot = State.VSlots.FindForUpdate(vslotId);
+ Y_VERIFY(mutableSlot);
+ const auto it = newSlots.find(mutableSlot->GetShortVDiskId());
+ Y_VERIFY(it != newSlots.end());
+ mutableSlot->MakeDonorFor(it->second);
}
- } else {
- Y_VERIFY(replaceQueue.empty());
}
+
+ State.CheckConsistency();
}
private:
diff --git a/ydb/core/mind/bscontroller/config_fit_pdisks.cpp b/ydb/core/mind/bscontroller/config_fit_pdisks.cpp
index d8934d4b40..0137ecae67 100644
--- a/ydb/core/mind/bscontroller/config_fit_pdisks.cpp
+++ b/ydb/core/mind/bscontroller/config_fit_pdisks.cpp
@@ -1,9 +1,54 @@
#include "config.h"
+#include <util/generic/string.h>
+#include <util/system/types.h>
+
namespace NKikimr {
namespace NBsController {
- TPDiskId FindFirstEmptyPDiskId(const TOverlayMap<TPDiskId, TBlobStorageController::TPDiskInfo>& pdisks,
+ struct TDiskId {
+ ui32 NodeId = 0;
+ TString Path;
+
+ bool operator==(const TDiskId& other) const {
+ return NodeId == other.NodeId && Path == other.Path;
+ }
+ };
+
+ struct TDiskInfo {
+ ui32 NodeId = 0;
+ TBlobStorageController::THostId HostId = {};
+ TBoxId BoxId = 0;
+ TString Path;
+ TString LastSeenPath;
+ TString Serial;
+ TString LastSeenSerial;
+ bool SharedWithOs = false;
+ bool ReadCentric = false;
+ TPDiskCategory PDiskCategory = {};
+ TString PDiskConfig;
+
+ TDiskId GetId() const {
+ return {NodeId, Path};
+ }
+ };
+
+ } // NBsController
+} // NKikimr
+
+namespace std {
+ template <>
+ struct hash<NKikimr::NBsController::TDiskId> {
+ size_t operator()(const NKikimr::NBsController::TDiskId& diskId) const {
+ return hash<ui32>()(diskId.NodeId) ^ hash<TString>()(diskId.Path);
+ }
+ };
+}
+
+namespace NKikimr {
+ namespace NBsController {
+
+ static TPDiskId FindFirstEmptyPDiskId(const TOverlayMap<TPDiskId, TBlobStorageController::TPDiskInfo>& pdisks,
TNodeId nodeId) {
Schema::PDisk::PDiskID::Type nextPDiskID = 1000; // start allocation from this number
// generate PDisk id; skip generated one if it already exists (e.g. user has added
@@ -21,179 +66,113 @@ namespace NKikimr {
return proto.ParseFromString(s) ? SingleLineProto(proto) : "<error>";
}
- Schema::PDisk::Guid::Type TBlobStorageController::CheckStaticPDisk(TConfigState &state, TPDiskId pdiskId,
- const TPDiskCategory& category, const TMaybe<Schema::PDisk::PDiskConfig::Type>& pdiskConfig,
- ui32 *staticSlotUsage) {
- const TStaticPDiskInfo& info = state.StaticPDisks.at(pdiskId);
-
- // create new disk entry; the PDisk with this number MUST NOT exist, otherwise we can
- // have a collision
- if (state.PDisks.Find(pdiskId)) {
- throw TExError() << "PDisk from static config collides with dynamic one"
- << " PDiskId# " << pdiskId;
- }
-
- // validate fields
- if (pdiskConfig.GetOrElse(TString()) != info.PDiskConfig) {
- throw TExError() << "PDiskConfig field doesn't match static one"
- << " pdiskConfig# " << (pdiskConfig ? FormatPDiskConfig(*pdiskConfig) : "(empty)")
- << " info.PDiskConfig# " << FormatPDiskConfig(info.PDiskConfig);
- } else if (category != info.Category) {
- throw TExError() << "Type/Kind fields do not match static one";
+ static std::optional<TPDiskId> FindPDisk(const TDiskInfo& disk, const TBlobStorageController::TConfigState& state) {
+ auto id = state.FindPDiskByLocation(disk.NodeId, disk.Path);
+ if (!id) {
+ id = state.FindPDiskByLocation(disk.NodeId, disk.Serial);
}
-
- *staticSlotUsage = info.StaticSlotUsage;
- return info.Guid;
+ return id;
}
- void TBlobStorageController::AllocatePDiskWithSerial(TConfigState& state, ui32 nodeId, const TSerial& serial,
- TDriveSerialInfo *driveInfo) {
- TPDiskId pdiskId = FindFirstEmptyPDiskId(state.PDisks, nodeId);
-
- const TNodeInfo& nodeInfo = state.Nodes.Get().at(nodeId);
- const NPDisk::TDriveData& driveData = nodeInfo.KnownDrives.at(serial.Serial);
- TString fsPath = driveData.Path;
-
- NPDisk::EDeviceType type = PDiskTypeToPDiskType(driveInfo->PDiskType);
- if (type == NPDisk::DEVICE_TYPE_UNKNOWN) {
- type = driveData.DeviceType;
- }
- const TPDiskCategory category(type, driveInfo->Kind);
-
- if (const auto pdiskId = state.FindPDiskByLocation(nodeId, fsPath)) {
- throw TExError() << "PDisk found in PDisks by specific path, fsPath# " << fsPath.Quote()
- << " pdiskId# " << *pdiskId;
- }
-
- ui32 staticSlotUsage = 0;
- auto staticPDiskId = state.FindStaticPDiskByLocation(nodeId, fsPath);
- if (!staticPDiskId) {
- staticPDiskId = state.FindStaticPDiskByLocation(nodeId, serial.Serial);
- }
- if (staticPDiskId) {
- // PDisk is static one, so take it's pdiskId and guid
- // and check that parameters match
- pdiskId = *staticPDiskId;
- driveInfo->Guid = CheckStaticPDisk(state, pdiskId, category, driveInfo->PDiskConfig, &staticSlotUsage);
- }
- // Update FK in DriveSerial table and check for guid
- driveInfo->NodeId = pdiskId.NodeId;
- driveInfo->PDiskId = pdiskId.PDiskId;
- driveInfo->LifeStage = NKikimrBlobStorage::TDriveLifeStage::ALLOCATED;
-
- // if guid is known, reuse it, else generate new
- if (!driveInfo->Guid) {
- driveInfo->Guid = RandomNumber<Schema::PDisk::Guid::Type>();
- }
-
- const auto hostId = state.HostRecords->GetHostId(nodeId);
- if (!hostId) {
- throw TExError() << "Unable to find hostId by nodeId# " << nodeId;
+ static std::optional<TPDiskId> FindStaticPDisk(const TDiskInfo& disk, const TBlobStorageController::TConfigState& state) {
+ auto id = state.FindStaticPDiskByLocation(disk.NodeId, disk.Path);
+ if (!id) {
+ id = state.FindStaticPDiskByLocation(disk.NodeId, disk.Serial);
}
- state.PDisks.ConstructInplaceNewEntry(pdiskId, *hostId, TString(), category.GetRaw(),
- *driveInfo->Guid, false, false, 1000, driveInfo->PDiskConfig.GetOrElse(TString()),
- driveInfo->BoxId, DefaultMaxSlots, NKikimrBlobStorage::EDriveStatus::ACTIVE,
- TInstant::Zero(), NKikimrBlobStorage::EDecommitStatus::DECOMMIT_NONE, serial.Serial,
- TString(), fsPath, staticSlotUsage);
-
- STLOG(PRI_NOTICE, BS_CONTROLLER, BSCFP01, "Create new pdisk", (PDiskId, pdiskId), (Path, fsPath));
+ return id;
}
- void TBlobStorageController::ValidatePDiskWithSerial(TConfigState& state, ui32 nodeId, const TSerial& serial,
- const TDriveSerialInfo& driveInfo, std::function<TDriveSerialInfo*()> getMutableItem) {
- // check existing pdisk
- if (!driveInfo.NodeId || !driveInfo.PDiskId) {
- throw TExError() << "Drive is in ALLOCATED stage but has "
- << " NodeId# " << driveInfo.NodeId
- << " PDiskId# " << driveInfo.PDiskId;
- }
-
- const TPDiskId pdiskId(*driveInfo.NodeId, *driveInfo.PDiskId);
- const TPDiskInfo *pdiskInfo = state.PDisks.Find(pdiskId);
- if (!pdiskInfo) {
- throw TExError() << "Unable to find pdisk# " << pdiskId << " from DriveSerial table";
- } else if (pdiskInfo->Path) {
- throw TExError() << "Going to replace existing pdisk with non-empty path# " << pdiskInfo->Path;
- } else if (pdiskInfo->ExpectedSerial != serial.Serial) {
- throw TExError() << "Going to replace existing pdisk with different serial number"
- << " new sn# " << serial.Serial << " existing serial# " << pdiskInfo->ExpectedSerial;
- } else if (pdiskInfo->Guid != *driveInfo.Guid) {
- throw TExError() << "Going to replace existring pdisk with different guid"
- << " guid from DrivesSerials# " << *driveInfo.Guid
- << " guid from PDisks# " << pdiskInfo->Guid;
- }
-
- const TString& path = serial.Serial;
- if (!state.FindStaticPDiskByLocation(*driveInfo.NodeId, path) && !state.FindPDiskByLocation(*driveInfo.NodeId, path)) {
- throw TExError() << "Drive is in ALLOCATED state and PDisk is created,"
- " but is not found neither in PDisks, nor in StaticPDisks by specific path";
+ static void UpdatePDiskIfNeeded(const TPDiskId& pdiskId, const TDiskInfo& disk, ui32 defaultMaxSlots, TBlobStorageController::TConfigState& state) {
+ auto pdiskInfo = state.PDisks.Find(pdiskId);
+ Y_VERIFY(pdiskInfo != nullptr);
+ if (pdiskInfo->Kind != disk.PDiskCategory ||
+ pdiskInfo->SharedWithOs != disk.SharedWithOs ||
+ pdiskInfo->ReadCentric != disk.ReadCentric ||
+ pdiskInfo->BoxId != disk.BoxId ||
+ pdiskInfo->PDiskConfig != disk.PDiskConfig)
+ {
+ // update PDisk configuration
+ auto pdiskInfo = state.PDisks.FindForUpdate(pdiskId);
+ Y_VERIFY(pdiskInfo != nullptr);
+ pdiskInfo->Kind = disk.PDiskCategory;
+ pdiskInfo->SharedWithOs = disk.SharedWithOs;
+ pdiskInfo->ReadCentric = disk.ReadCentric;
+ pdiskInfo->BoxId = disk.BoxId;
+ if (pdiskInfo->PDiskConfig != disk.PDiskConfig) {
+ // update PDiskConfig only for nonstatic PDisks
+ if (!NKikimr::NBsController::FindStaticPDisk(disk, state)) {
+ pdiskInfo->PDiskConfig = disk.PDiskConfig;
+ } else {
+ throw TExError() << "Skipping PDiskConfig update for static disk" << TErrorParams::NodeId(disk.NodeId) << TErrorParams::Path(disk.Path);
+ }
+ }
+ // run ExtractConfig as the very last step
+ pdiskInfo->ExtractConfig(defaultMaxSlots);
}
+ }
- if (nodeId && nodeId != *driveInfo.NodeId) {
- // Drive was moved from previous node to new
- TDriveSerialInfo *info = getMutableItem();
- info->LifeStage = NKikimrBlobStorage::TDriveLifeStage::ERROR;
+ // return TString not const TString& to make sure we never use dangling reference
+ TString GetDiskPathFromNode(ui32 nodeId, const TString& serialNumber, const TBlobStorageController::TConfigState& state, bool throwOnError = false) {
+ if (auto nodeIt = state.Nodes.Get().find(nodeId); nodeIt != state.Nodes.Get().end()) {
+ for (const auto& [_, driveData] : nodeIt->second.KnownDrives) {
+ if (serialNumber == driveData.SerialNumber) {
+ return driveData.Path;
+ }
+ }
+ if (throwOnError) {
+ throw TExError() << "Couldn't find disk's path by serial number " << TErrorParams::DiskSerialNumber(serialNumber);
+ }
+ } else {
+ if (throwOnError) {
+ throw TExError() << "Unknown node id " << TErrorParams::NodeId(nodeId);
+ }
}
- state.PDisksToRemove.erase(pdiskId);
+ return TString();
}
- void TBlobStorageController::FitPDisksForUserConfig(TConfigState &state) {
- auto pdisksForBoxes = std::exchange(state.Fit.Boxes, {});
- if (pdisksForBoxes.empty()) {
- return;
- }
-
- // re-fill PDisksToRemove set with all PDisks, we will erase remaining ones from this set a bit later
- state.PDisksToRemove.clear();
- state.PDisks.ForEach([&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
- if (pdisksForBoxes.contains(pdiskInfo.BoxId)) {
- state.PDisksToRemove.insert(pdiskId);
+ // return TString not const TString& to make sure we never use dangling reference
+ TString GetDiskSerialNumberFromNode(ui32 nodeId, const TString& path, const TBlobStorageController::TConfigState& state, bool throwOnError = false) {
+ if (auto nodeIt = state.Nodes.Get().find(nodeId); nodeIt != state.Nodes.Get().end()) {
+ for (const auto& [_, driveData] : nodeIt->second.KnownDrives) {
+ if (path == driveData.Path) {
+ return driveData.SerialNumber;
+ }
}
- return true;
- });
-
- // Create new pdisks from DriveSerial table
-
- // Iterate over initial DrivesSerials map since every call to Unshare will invalidate iterators
- state.DrivesSerials.ScanRange({}, {}, [&](const auto& serial, const auto& driveInfo, const auto& getMutableItem) {
- if (!pdisksForBoxes.contains(driveInfo.BoxId)) {
- return true;
+ if (throwOnError) {
+ throw TExError() << "Couldn't find disk's serial number by path " << TErrorParams::Path(path);
}
- if (driveInfo.LifeStage == NKikimrBlobStorage::TDriveLifeStage::NOT_SEEN) {
- // Try to find drive in currently online nodes and create new PDisk
- if (auto nodeIt = NodeForSerial.find(serial.Serial); nodeIt != NodeForSerial.end()) {
- AllocatePDiskWithSerial(state, nodeIt->second, serial, getMutableItem());
- }
- } else if (driveInfo.LifeStage == NKikimrBlobStorage::TDriveLifeStage::ALLOCATED
- || driveInfo.LifeStage == NKikimrBlobStorage::TDriveLifeStage::ERROR) {
- const auto it = NodeForSerial.find(serial.Serial);
- const ui32 nodeId = it != NodeForSerial.end() ? it->second : 0;
- // TODO(alexvru): check where no entry in NodeForSerial is a valid case
- ValidatePDiskWithSerial(state, nodeId, serial, driveInfo, getMutableItem);
+ } else {
+ if (throwOnError) {
+ throw TExError() << "Unknown node id " << TErrorParams::NodeId(nodeId);
}
- return true;
- });
+ }
+
+ return TString();
+ }
+
+ static std::unordered_map<TDiskId, TDiskInfo> GetDisksFromHostConfig(TBlobStorageController::TConfigState& state, std::set<TBoxId>& relevantBoxes) {
+ std::unordered_map<TDiskId, TDiskInfo> disks;
const auto& hostConfigs = state.HostConfigs.Get();
const auto& boxes = state.Boxes.Get();
- for (const TBoxId& boxId : pdisksForBoxes) {
+ for (const TBoxId& boxId : relevantBoxes) {
const auto boxIt = boxes.find(boxId);
if (boxIt == boxes.end()) {
continue; // box was deleted
}
- const TBoxInfo& box = boxIt->second;
+ const auto& box = boxIt->second;
THashSet<TNodeId> usedNodes;
for (const auto& [hostKey, hostValue] : box.Hosts) {
- const THostConfigId &hostConfigId = hostValue.HostConfigId;
+ const auto& hostConfigId = hostValue.HostConfigId;
auto it = hostConfigs.find(hostConfigId);
if (it == hostConfigs.end()) {
throw TExHostConfigNotFound(hostConfigId);
}
- const THostConfigInfo &hostConfig = it->second;
+ const auto& hostConfig = it->second;
- const THostId hostId(hostKey.Fqdn, hostKey.IcPort);
+ const TBlobStorageController::THostId hostId(hostKey.Fqdn, hostKey.IcPort);
const auto& nodeId = state.HostRecords->ResolveNodeId(hostKey, hostValue);
if (!nodeId) {
throw TExHostNotFound(hostKey) << TErrorParams::BoxId(boxId) << TErrorParams::NodeId(*nodeId);
@@ -203,94 +182,178 @@ namespace NKikimr {
}
for (const auto& [drive, driveInfo] : hostConfig.Drives) {
- TPDiskId pdiskId;
- const TPDiskCategory category(PDiskTypeToPDiskType(driveInfo.Type), driveInfo.Kind);
-
- // check if we already have spawned some PDisk at this location
- if (const auto found = state.FindPDiskByLocation(*nodeId, drive.Path)) {
- // yes, we do; find it by id and update some characteristics (that we can update)
- pdiskId = *found;
- const TPDiskInfo *pdisk = state.PDisks.Find(pdiskId);
- Y_VERIFY(pdisk);
- // update PDisk configuration if needed
- if (pdisk->Kind != category || pdisk->SharedWithOs != driveInfo.SharedWithOs ||
- pdisk->ReadCentric != driveInfo.ReadCentric || pdisk->BoxId != boxId ||
- pdisk->PDiskConfig != driveInfo.PDiskConfig.GetOrElse(TString())) {
- TPDiskInfo *pdisk = state.PDisks.FindForUpdate(pdiskId);
- pdisk->Kind = category;
- pdisk->SharedWithOs = driveInfo.SharedWithOs;
- pdisk->ReadCentric = driveInfo.ReadCentric;
- pdisk->BoxId = boxId;
- pdisk->PDiskConfig = driveInfo.PDiskConfig.GetOrElse(TString());
- pdisk->ExtractConfig(DefaultMaxSlots);
- }
- } else {
- Schema::PDisk::Guid::Type guid;
-
- // no, this disk is not in map yet; see if it is mentioned in static configuration
- ui32 staticSlotUsage = 0;
- if (const auto found = state.FindStaticPDiskByLocation(*nodeId, drive.Path)) {
- // yes, take some data from static configuration
- pdiskId = *found;
- guid = CheckStaticPDisk(state, pdiskId, category, driveInfo.PDiskConfig, &staticSlotUsage);
- } else {
- pdiskId = FindFirstEmptyPDiskId(state.PDisks, *nodeId);
- guid = RandomNumber<Schema::PDisk::Guid::Type>();
- }
- TString path = drive.Path;
- // try find current serial number for device
- TString currentSerial;
- if (auto nodeIt = state.Nodes.Get().find(*nodeId); nodeIt != state.Nodes.Get().end()) {
- for (const auto& [serial, driveData] : nodeIt->second.KnownDrives) {
- if (driveData.Path == path) {
- currentSerial = serial;
- break;
- }
- }
- }
-
- // emplace PDisk into set
- state.PDisks.ConstructInplaceNewEntry(pdiskId, hostId, path, category.GetRaw(),
- guid, driveInfo.SharedWithOs, driveInfo.ReadCentric, 1000,
- driveInfo.PDiskConfig.GetOrElse(TString()), boxId, DefaultMaxSlots,
- NKikimrBlobStorage::EDriveStatus::ACTIVE, TInstant::Zero(),
- NKikimrBlobStorage::EDecommitStatus::DECOMMIT_NONE,
- currentSerial, currentSerial, TString(), staticSlotUsage);
-
- // insert PDisk into location map
- STLOG(PRI_NOTICE, BS_CONTROLLER, BSCFP02, "Create new pdisk", (PDiskId, pdiskId),
- (Path, path));
+ auto serial = GetDiskSerialNumberFromNode(*nodeId, drive.Path, state, /* throwOnError */ false);
+
+ TDiskInfo disk;
+ disk.BoxId = boxId;
+ disk.HostId = hostId;
+ disk.LastSeenPath = TString();
+ disk.LastSeenSerial = serial;
+ disk.NodeId = *nodeId;
+ disk.Path = drive.Path;
+ disk.PDiskCategory = TPDiskCategory(PDiskTypeToPDiskType(driveInfo.Type), driveInfo.Kind);
+ disk.PDiskConfig = driveInfo.PDiskConfig.GetOrElse(TString());
+ disk.ReadCentric = driveInfo.ReadCentric;
+ disk.Serial = serial;
+ disk.SharedWithOs = driveInfo.SharedWithOs;
+
+ auto diskId = disk.GetId();
+ auto [_, inserted] = disks.try_emplace(diskId, std::move(disk));
+ if (!inserted) {
+ throw TExError() << "Came across duplicate disk on node: " << TErrorParams::NodeId(diskId.NodeId) << " with path: " << TErrorParams::Path(diskId.Path);
}
+ }
+ }
+ }
+
+ return disks;
+ }
+
+ static std::unordered_map<TDiskId, TDiskInfo> GetDisksFromDrivesSerials(TBlobStorageController::TConfigState& state, std::set<TBoxId>& relevantBoxes) {
+ std::unordered_map<TDiskId, TDiskInfo> disks;
+
+ state.DrivesSerials.ScanRange({}, {}, [&](const auto& serial, const auto& driveInfo, const auto&) {
+ if (!relevantBoxes.contains(driveInfo.BoxId)) {
+ return true;
+ }
+
+ if (serial.Serial.empty()) {
+ STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP04, "Missing disks's serial number");
+ return true;
+ }
+
+ auto nodeId = driveInfo.NodeId;
+ if (!nodeId) {
+ STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP05, "Empty node id for disk with serial number.", (SerialNumber, serial.Serial));
+ return true;
+ }
+ auto hostId = state.HostRecords->GetHostId(*nodeId);
+ if (!hostId) {
+ STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP06, "Couldn't find host id for node.", (NodeId, *nodeId));
+ return true;
+ }
- state.PDisksToRemove.erase(pdiskId);
+ auto path = driveInfo.Path;
+ if (!path) {
+ STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP07, "Couldn't get path for disk with serial number.", (SerialNumber, serial.Serial));
+ return true;
+ }
+
+ TDiskInfo disk;
+ disk.BoxId = driveInfo.BoxId;
+ disk.HostId = *hostId;
+ disk.LastSeenPath = GetDiskPathFromNode(*nodeId, serial, state, /* throwOnError */ false);
+ disk.LastSeenSerial = serial;
+ disk.NodeId = *nodeId;
+ disk.Path = *path;
+ disk.PDiskCategory = TPDiskCategory(PDiskTypeToPDiskType(driveInfo.PDiskType), driveInfo.Kind);
+ disk.PDiskConfig = driveInfo.PDiskConfig.GetOrElse(TString());
+ disk.ReadCentric = false;
+ disk.Serial = serial;
+ disk.SharedWithOs = false;
+
+ auto diskId = disk.GetId();
+ auto [_, inserted] = disks.try_emplace(diskId, std::move(disk));
+ if (!inserted) {
+ throw TExError() << "Came across duplicate disk on node: " << TErrorParams::NodeId(diskId.NodeId) << " with path: " << TErrorParams::Path(diskId.Path);
+ }
+
+ return true;
+ });
+
+ return disks;
+ }
+
+ static std::unordered_map<TDiskId, TDiskInfo> GetDisksFromDrivesSerialsAndHostConfig(TBlobStorageController::TConfigState& state, std::set<TBoxId>& relevantBoxes) {
+ auto disksFromDrivesSerials = GetDisksFromDrivesSerials(state, relevantBoxes);
+ auto disksFromHostConfig = GetDisksFromHostConfig(state, relevantBoxes);
+ disksFromHostConfig.merge(disksFromDrivesSerials);
+ return disksFromHostConfig;
+ }
+
+ Schema::PDisk::Guid::Type TBlobStorageController::CheckStaticPDisk(TConfigState &state, TPDiskId pdiskId,
+ const TPDiskCategory& category, const TMaybe<Schema::PDisk::PDiskConfig::Type>& pdiskConfig,
+ ui32 *staticSlotUsage) {
+ const TStaticPDiskInfo& info = state.StaticPDisks.at(pdiskId);
+
+ // create new disk entry; the PDisk with this number MUST NOT exist, otherwise we can
+ // have a collision
+ if (state.PDisks.Find(pdiskId)) {
+ throw TExError() << "PDisk from static config collides with dynamic one"
+ << " PDiskId# " << pdiskId;
+ }
+
+ // validate fields
+ if (pdiskConfig.GetOrElse(TString()) != info.PDiskConfig) {
+ throw TExError() << "PDiskConfig field doesn't match static one"
+ << " pdiskConfig# " << (pdiskConfig ? FormatPDiskConfig(*pdiskConfig) : "(empty)")
+ << " info.PDiskConfig# " << FormatPDiskConfig(info.PDiskConfig);
+ } else if (category != info.Category) {
+ throw TExError() << "Type/Kind fields do not match static one";
+ }
+
+ *staticSlotUsage = info.StaticSlotUsage;
+ return info.Guid;
+ }
+
+ void TBlobStorageController::FitPDisksForUserConfig(TConfigState &state) {
+ auto relevantBoxes = std::exchange(state.Fit.Boxes, {});
+ if (relevantBoxes.empty()) {
+ return;
+ }
+
+ // re-fill PDisksToRemove set with all PDisks, we will erase remaining ones from this set a bit later
+ state.PDisksToRemove.clear();
+ state.PDisks.ForEach([&](const TPDiskId& pdiskId, const TPDiskInfo& pdiskInfo) {
+ if (relevantBoxes.contains(pdiskInfo.BoxId)) {
+ state.PDisksToRemove.insert(pdiskId);
+ }
+ return true;
+ });
+
+ auto disks = GetDisksFromDrivesSerialsAndHostConfig(state, relevantBoxes);
+ for (const auto& [diskId, disk] : disks) {
+ TPDiskId pdiskId;
+ // check if we already have spawned some PDisk at this location
+ if (auto pdiskIdOptional = NKikimr::NBsController::FindPDisk(disk, state)) {
+ pdiskId = *pdiskIdOptional;
+ // yes, we have; find it by id and update some characteristics (that we can update)
+ UpdatePDiskIfNeeded(pdiskId, disk, DefaultMaxSlots, state);
+ } else {
+ // no, this disk is not in map yet; see if it is mentioned in static configuration
+ Schema::PDisk::Guid::Type guid;
+
+ ui32 staticSlotUsage = 0;
+ if (auto pdiskIdOptional = NKikimr::NBsController::FindStaticPDisk(disk, state)) {
+ // yes, take some data from static configuration
+ pdiskId = *pdiskIdOptional;
+ guid = CheckStaticPDisk(state, pdiskId, disk.PDiskCategory, disk.PDiskConfig, &staticSlotUsage);
+ } else {
+ pdiskId = FindFirstEmptyPDiskId(state.PDisks, disk.NodeId);
+ guid = RandomNumber<Schema::PDisk::Guid::Type>();
}
+
+ // create PDisk
+ state.PDisks.ConstructInplaceNewEntry(pdiskId, disk.HostId, disk.Path,
+ disk.PDiskCategory.GetRaw(), guid, disk.SharedWithOs, disk.ReadCentric,
+ /* nextVslotId */ 1000, disk.PDiskConfig, disk.BoxId, DefaultMaxSlots,
+ NKikimrBlobStorage::EDriveStatus::ACTIVE, /* statusTimestamp */ TInstant::Zero(),
+ NKikimrBlobStorage::EDecommitStatus::DECOMMIT_NONE,
+ disk.Serial, disk.LastSeenSerial, disk.LastSeenPath, staticSlotUsage);
+
+ STLOG(PRI_NOTICE, BS_CONTROLLER, BSCFP02, "Create new pdisk", (PDiskId, pdiskId), (Path, disk.Path));
}
+
+ state.PDisksToRemove.erase(pdiskId);
}
+
for (const auto& pdiskId : state.PDisksToRemove) {
STLOG(PRI_NOTICE, BS_CONTROLLER, BSCFP03, "PDisk to remove:", (PDiskId, pdiskId));
}
state.CheckConsistency();
}
- void TBlobStorageController::FitPDisksForNode(TConfigState& state, ui32 nodeId, const std::vector<TSerial>& serials) {
- for (const auto& serial : serials) {
- if (const TDriveSerialInfo *driveInfo = state.DrivesSerials.Find(serial)) {
- switch (driveInfo->LifeStage) {
- case NKikimrBlobStorage::TDriveLifeStage::NOT_SEEN:
- AllocatePDiskWithSerial(state, nodeId, serial, state.DrivesSerials.FindForUpdate(serial));
- break;
-
- case NKikimrBlobStorage::TDriveLifeStage::ALLOCATED:
- case NKikimrBlobStorage::TDriveLifeStage::ERROR:
- ValidatePDiskWithSerial(state, nodeId, serial, *driveInfo,
- [&] { return state.DrivesSerials.FindForUpdate(serial); });
- break;
-
- default:
- break;
- }
- }
- }
+ void TBlobStorageController::FitPDisksForNode(TConfigState&, ui32, const std::vector<TSerial>&) {
}
} // NBsController
diff --git a/ydb/core/mind/bscontroller/error.h b/ydb/core/mind/bscontroller/error.h
index 9676a5074c..6effcb3fef 100644
--- a/ydb/core/mind/bscontroller/error.h
+++ b/ydb/core/mind/bscontroller/error.h
@@ -36,6 +36,7 @@ namespace NKikimr::NBsController {
P(ItemConfigGenerationExpected, ui64)
P(GroupId, ui32)
P(StoragePoolName, TString)
+ P(DiskSerialNumber, TString)
struct TVDiskIdTraits {
using Type = TVDiskID;
diff --git a/ydb/core/mind/bscontroller/impl.h b/ydb/core/mind/bscontroller/impl.h
index ce9bf37bb1..4bff2705f8 100644
--- a/ydb/core/mind/bscontroller/impl.h
+++ b/ydb/core/mind/bscontroller/impl.h
@@ -97,8 +97,7 @@ public:
Table::VDiskIdx::Type VDiskIdx = 0;
Table::Mood::Type Mood;
TIndirectReferable<TGroupInfo>::TPtr Group; // group to which this VSlot belongs (or nullptr if it doesn't belong to any)
- std::vector<std::pair<TVSlotId, TVDiskID>> Donors; // a set of alive donors for this disk
- TVSlotId AcceptorVSlotId;
+ THashSet<TVSlotId> Donors; // a set of alive donors for this disk (which are not being deleted)
TInstant LastSeenReady;
// volatile state
@@ -214,10 +213,13 @@ public:
void MakeDonorFor(TVSlotInfo *newSlot) {
Y_VERIFY(newSlot);
Y_VERIFY(!IsBeingDeleted());
+ Y_VERIFY(GroupId == newSlot->GroupId);
+ Y_VERIFY(GetShortVDiskId() == newSlot->GetShortVDiskId());
Mood = TMood::Donor;
Group = nullptr; // we are not part of this group anymore
- Donors.emplace_back(VSlotId, GetVDiskId());
- newSlot->Donors = std::exchange(Donors, {});
+ Donors.insert(VSlotId);
+ Donors.swap(newSlot->Donors);
+ Y_VERIFY(Donors.empty());
}
TVDiskID GetVDiskId() const {
@@ -508,7 +510,6 @@ public:
TMaybe<Table::ErrorReason::Type> ErrorReason;
TMaybe<Table::NeedAlter::Type> NeedAlter;
std::optional<NKikimrBlobStorage::TGroupMetrics> GroupMetrics;
- bool CommitInProgress = false;
bool Down = false; // is group are down right now (not selectable)
TVector<TIndirectReferable<TVSlotInfo>::TPtr> VDisksInGroup;
@@ -529,7 +530,7 @@ public:
const ui32 NumVDisksPerFailDomain = 0;
// topology according to the geometry
- const std::shared_ptr<TBlobStorageGroupInfo::TTopology> Topology;
+ std::shared_ptr<TBlobStorageGroupInfo::TTopology> Topology;
struct TGroupStatus {
// status derived from the actual state of VDisks (IsReady() to be exact)
@@ -849,7 +850,7 @@ public:
};
- std::map<TString, TNodeId> NodeForSerial;
+ std::unordered_map<TString, TNodeId> NodeIdByDiskSerialNumber;
TMap<ui32, TSet<ui32>> NodesAwaitingKeysForGroup;
struct THostConfigInfo {
@@ -1285,6 +1286,7 @@ public:
Table::Kind::Type Kind = 0;
Table::PDiskType::Type PDiskType = PDiskTypeToPDiskType(NPDisk::DEVICE_TYPE_UNKNOWN);
TMaybe<Table::PDiskConfig::Type> PDiskConfig;
+ TMaybe<Table::Path::Type> Path;
TDriveSerialInfo() = default;
TDriveSerialInfo(const TDriveSerialInfo&) = default;
@@ -1304,7 +1306,8 @@ public:
Table::LifeStage,
Table::Kind,
Table::PDiskType,
- Table::PDiskConfig
+ Table::PDiskConfig,
+ Table::Path
> adapter(
&TDriveSerialInfo::BoxId,
&TDriveSerialInfo::NodeId,
@@ -1313,7 +1316,8 @@ public:
&TDriveSerialInfo::LifeStage,
&TDriveSerialInfo::Kind,
&TDriveSerialInfo::PDiskType,
- &TDriveSerialInfo::PDiskConfig
+ &TDriveSerialInfo::PDiskConfig,
+ &TDriveSerialInfo::Path
);
callback(&adapter);
}
@@ -1500,6 +1504,17 @@ private:
void ValidateInternalState();
+ const TVSlotInfo* FindAcceptor(const TVSlotInfo& donor) {
+ Y_VERIFY(donor.Mood == TMood::Donor);
+ TGroupInfo *group = FindGroup(donor.GroupId);
+ Y_VERIFY(group);
+ const ui32 orderNumber = group->Topology->GetOrderNumber(donor.GetShortVDiskId());
+ const TVSlotInfo *acceptor = group->VDisksInGroup[orderNumber];
+ Y_VERIFY(donor.GroupId == acceptor->GroupId && donor.GroupGeneration < acceptor->GroupGeneration &&
+ donor.GetShortVDiskId() == acceptor->GetShortVDiskId());
+ return acceptor;
+ }
+
TVSlotInfo* FindVSlot(TVSlotId id) {
auto it = VSlots.find(id);
return it != VSlots.end() ? it->second.Get() : nullptr;
@@ -1646,6 +1661,7 @@ private:
void RenderFooter(IOutputStream& out);
void RenderMonPage(IOutputStream& out);
void RenderInternalTables(IOutputStream& out, const TString& table);
+ void RenderVirtualGroups(IOutputStream& out);
void RenderGroupDetail(IOutputStream &out, TGroupId groupId);
void RenderGroupsInStoragePool(IOutputStream &out, const TBoxStoragePoolId& id);
void RenderVSlotTable(IOutputStream& out, std::function<void()> callback);
@@ -1673,6 +1689,10 @@ public:
// basis). BS_CONTROLLER reports faulty PDisks and all involved groups in a push notification manner.
IActor *CreateSelfHealActor();
+ bool IsGroupLayoutSanitizerEnabled() const {
+ return GroupLayoutSanitizer;
+ }
+
private:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Online state
@@ -2125,7 +2145,7 @@ public:
void OnWardenDisconnected(TNodeId nodeId);
void EraseKnownDrivesOnDisconnected(TNodeInfo *nodeInfo);
- using TVSlotFinder = std::function<void(const TVSlotId&, const std::function<void(const TVSlotInfo&)>&)>;
+ using TVSlotFinder = std::function<void(TVSlotId, const std::function<void(const TVSlotInfo&)>&)>;
static void Serialize(NKikimrBlobStorage::TDefineHostConfig *pb, const THostConfigId &id, const THostConfigInfo &hostConfig);
static void Serialize(NKikimrBlobStorage::TDefineBox *pb, const TBoxId &id, const TBoxInfo &box);
@@ -2138,7 +2158,7 @@ public:
static void Serialize(NKikimrBlobStorage::TBaseConfig::TVSlot *pb, const TVSlotInfo &vslot, const TVSlotFinder& finder);
static void Serialize(NKikimrBlobStorage::TBaseConfig::TGroup *pb, const TGroupInfo &group);
static void SerializeDonors(NKikimrBlobStorage::TNodeWardenServiceSet::TVDisk *vdisk, const TVSlotInfo& vslot,
- const TGroupInfo& group);
+ const TGroupInfo& group, const TVSlotFinder& finder);
static void SerializeGroupInfo(NKikimrBlobStorage::TGroupInfo *group, const TGroupInfo& groupInfo,
const TString& storagePoolName, const TMaybe<TKikimrScopeId>& scopeId);
};
diff --git a/ydb/core/mind/bscontroller/load_everything.cpp b/ydb/core/mind/bscontroller/load_everything.cpp
index a6d75e057f..14c8637aec 100644
--- a/ydb/core/mind/bscontroller/load_everything.cpp
+++ b/ydb/core/mind/bscontroller/load_everything.cpp
@@ -377,28 +377,11 @@ public:
group->FinishVDisksInGroup();
}
- // fixup donors and acceptors
- {
- std::map<TGroupId, std::map<TVDiskIdShort, std::vector<TVSlotInfo*>>> map;
- for (const auto& [vslotId, vslot] : Self->VSlots) {
- if (!vslot->IsBeingDeleted()) {
- map[vslot->GroupId][vslot->GetShortVDiskId()].push_back(vslot.Get());
- }
- }
- for (auto& [groupId, disks] : map) {
- for (auto& [shortVDiskId, array] : disks) {
- auto comp = [](const TVSlotInfo *x, const TVSlotInfo *y) {
- Y_VERIFY(x->GroupGeneration != y->GroupGeneration);
- return x->GroupGeneration < y->GroupGeneration;
- };
- std::sort(array.begin(), array.end(), comp);
- TVSlotInfo *acceptor = array.back();
- for (size_t i = 0; i < array.size() - 1; ++i) {
- Y_VERIFY(array[i]->Mood == TMood::Donor);
- array[i]->AcceptorVSlotId = acceptor->VSlotId;
- acceptor->Donors.emplace_back(array[i]->VSlotId, array[i]->GetVDiskId());
- }
- }
+ // tie donors and acceptors
+ for (const auto& [vslotId, vslot] : Self->VSlots) {
+ if (vslot->Mood == TMood::Donor) {
+ const TVSlotInfo *acceptor = Self->FindAcceptor(*vslot);
+ const_cast<TVSlotInfo&>(*acceptor).Donors.insert(vslotId);
}
}
diff --git a/ydb/core/mind/bscontroller/monitoring.cpp b/ydb/core/mind/bscontroller/monitoring.cpp
index 60645b190a..6c84c19929 100644
--- a/ydb/core/mind/bscontroller/monitoring.cpp
+++ b/ydb/core/mind/bscontroller/monitoring.cpp
@@ -909,6 +909,8 @@ bool TBlobStorageController::OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr e
} else if (page == "InternalTables") {
const TString table = cgi.Has("table") ? cgi.Get("table") : "pdisks";
RenderInternalTables(str, table);
+ } else if (page == "VirtualGroups") {
+ RenderVirtualGroups(str);
} else if (page == "StopGivingGroups") {
StopGivingGroups = true;
str << "OK";
@@ -960,6 +962,7 @@ void TBlobStorageController::RenderMonPage(IOutputStream& out) {
(SelfHealEnable ? "enabled" : "disabled") << ")<br>";
out << "<a href='app?TabletID=" << TabletID() << "&page=HealthEvents'>Health events</a><br>";
out << "<a href='app?TabletID=" << TabletID() << "&page=Scrub'>Scrub state</a><br>";
+ out << "<a href='app?TabletID=" << TabletID() << "&page=VirtualGroups'>Virtual groups</a><br>";
out << "<a href='app?TabletID=" << TabletID() << "&page=InternalTables'>Internal tables</a><br>";
HTML(out) {
@@ -1157,6 +1160,7 @@ void TBlobStorageController::RenderInternalTables(IOutputStream& out, const TStr
TABLEH() { out << "LifeStage"; }
TABLEH() { out << "Kind"; }
TABLEH() { out << "PDiskType"; }
+ TABLEH() { out << "Path"; }
}
}
TABLEBODY() {
@@ -1169,6 +1173,7 @@ void TBlobStorageController::RenderInternalTables(IOutputStream& out, const TStr
TABLED() { out << info->LifeStage; }
TABLED() { out << info->Kind; }
TABLED() { out << info->PDiskType; }
+ TABLED() { out << PrintMaybe(info->Path); }
}
}
}
@@ -1191,7 +1196,7 @@ void TBlobStorageController::RenderGroupDetail(IOutputStream &out, TGroupId grou
std::vector<const TVSlotInfo*> donors;
for (const TVSlotInfo *slot : group->VDisksInGroup) {
RenderVSlotRow(out, *slot);
- for (const auto& [vslotId, vdiskId] : slot->Donors) {
+ for (const TVSlotId& vslotId : slot->Donors) {
if (const auto *x = FindVSlot(vslotId)) {
donors.push_back(x);
}
@@ -1286,17 +1291,16 @@ void TBlobStorageController::RenderVSlotRow(IOutputStream& out, const TVSlotInfo
}
}
TABLED() {
- if (vslot.AcceptorVSlotId != TVSlotId()) {
- if (const auto *x = FindVSlot(vslot.AcceptorVSlotId)) {
- out << "<strong>donor for <a href='#" << x->GetVDiskId() << "'>" << vslot.AcceptorVSlotId << "</a></strong>";
- } else {
- out << "?";
- }
+ if (vslot.Mood == TMood::Donor) {
+ const auto *x = FindAcceptor(vslot);
+ out << "<strong>donor for <a href='#" << x->GetVDiskId() << "'>" << x->VSlotId << "</a></strong>";
} else {
bool first = true;
- for (const auto& [vslotId, vdiskId] : vslot.Donors) {
+ for (const TVSlotId& donorVSlotId : vslot.Donors) {
out << (std::exchange(first, false) ? "" : "<br/>");
- out << "<a href='#" << vdiskId.ToString() << "'>" << vdiskId << "</a> at " << vslotId;
+ const TVSlotInfo *donor = FindVSlot(donorVSlotId);
+ const TVDiskID vdiskId = donor->GetVDiskId();
+ out << "<a href='#" << vdiskId.ToString() << "'>" << vdiskId << "</a> at " << donorVSlotId;
}
}
}
diff --git a/ydb/core/mind/bscontroller/register_node.cpp b/ydb/core/mind/bscontroller/register_node.cpp
index 44ca2510a3..5f8825d0c5 100644
--- a/ydb/core/mind/bscontroller/register_node.cpp
+++ b/ydb/core/mind/bscontroller/register_node.cpp
@@ -36,74 +36,66 @@ class TBlobStorageController::TTxUpdateNodeDrives
STLOG(PRI_DEBUG, BS_CONTROLLER, BSCTXRN05, "Add devicesData from NodeWarden",
(NodeId, nodeId), (Devices, createLog()));
- std::map<TString, TString> serialForPath;
- for (const auto& data : Record.GetDrivesData()) {
- serialForPath[data.GetPath()] = data.GetSerialNumber();
+ std::unordered_map<TString, TString> diskSerialNumberByPath;
+ for (const auto& disk : Record.GetDrivesData()) {
+ diskSerialNumberByPath[disk.GetPath()] = disk.GetSerialNumber();
}
NIceDb::TNiceDb db(txc.DB);
using T = Schema::PDisk;
- TPDiskId minPDiskId = TPDiskId::MinForNode(nodeId);
- for (auto it = Self->PDisks.lower_bound(minPDiskId); it != Self->PDisks.end() && it->first.NodeId == nodeId; ++it) {
- Y_VERIFY(it->second);
- TPDiskInfo& info = *it->second;
- TPDiskId pdiskId = it->first;
+ auto minPDiskId = TPDiskId::MinForNode(nodeId);
+ for (auto pdiskIt = Self->PDisks.lower_bound(minPDiskId); pdiskIt != Self->PDisks.end() && pdiskIt->first.NodeId == nodeId; ++pdiskIt) {
+ Y_VERIFY(pdiskIt->second);
+ auto& pdiskInfo = *pdiskIt->second;
+ auto pdiskId = pdiskIt->first;
- const T::TKey::Type key(pdiskId.GetKey());
+ auto key(pdiskId.GetKey());
TString serial;
- if (auto serialIt = serialForPath.find(info.Path); serialIt != serialForPath.end()) {
+ // update pdisk's ExpectedSerial if necessary
+ if (auto serialIt = diskSerialNumberByPath.find(pdiskInfo.Path); serialIt != diskSerialNumberByPath.end()) {
serial = serialIt->second;
- if (info.ExpectedSerial != serial) {
+ if (pdiskInfo.ExpectedSerial != serial) {
+ // the disk on the node with the same label (path) as pdisk has a different serial number
TStringStream log;
- auto prio = NLog::PRI_NOTICE;
-
- if (!info.ExpectedSerial) {
- if (auto driveIt = Self->DrivesSerials.find(TSerial{serial}); driveIt != Self->DrivesSerials.end()) {
- log << "device is managed by HostConfigs and was removed.";
- if (driveIt->second->LifeStage == NKikimrBlobStorage::TDriveLifeStage::NOT_SEEN) {
- log << " Drive was added while node was offline, so update ExpectedSerial and"
- << " remove fictional row from DriveSerial table";
- info.ExpectedSerial = serial;
- Self->DrivesSerials.erase(driveIt);
- db.Table<Schema::DriveSerial>().Key(TSerial{serial}.GetKey()).Delete();
- } else if (driveIt->second->LifeStage == NKikimrBlobStorage::TDriveLifeStage::REMOVED) {
- log << " Drive is still marked as REMOVED, so do not update ExpectedSerial";
- }
+
+ switch (Self->SerialManagementStage) {
+ case NKikimrBlobStorage::TSerialManagementStage::CHECK_SERIAL:
+ if (!pdiskInfo.ExpectedSerial && serial) {
+ // update ExpectedSerial
+ pdiskInfo.ExpectedSerial = serial;
+ db.Table<T>().Key(key).Update<T::ExpectedSerial>(serial);
+ log << "Set ExpectedSerial for pdisk";
} else {
- // disk has not seen yet
- info.ExpectedSerial = serial;
+ log << "disk's serial reported by the node doesn't match pdisk's serial, don't update anything";
}
- } else if (Self->SerialManagementStage == NKikimrBlobStorage::TSerialManagementStage::CHECK_SERIAL) {
- prio = NLog::PRI_ERROR;
- log << "new serial mismatched stored pdisk's serial";
- } else {
- log << "Set new ExpectedSerial for pdisk";
-
- auto [it, emplaced] = Self->DrivesSerials.emplace(serial, MakeHolder<TDriveSerialInfo>(info.BoxId));
- it->second->Guid = info.Guid;
- it->second->Kind = info.Kind.Kind();
- it->second->PDiskType = PDiskTypeToPDiskType(info.Kind.Type());
- it->second->PDiskConfig = info.PDiskConfig;
- it->second->LifeStage = NKikimrBlobStorage::TDriveLifeStage::REMOVED;
-
- TDriveSerialInfo::Apply(Self, [&, it = it] (auto* adapter) {
- adapter->IssueUpdateRow(txc, TSerial{serial}, *it->second);
- });
-
- info.ExpectedSerial = serial;
- db.Table<T>().Key(key).Update<T::ExpectedSerial>(serial);
+ break;
+ case NKikimrBlobStorage::TSerialManagementStage::ONLY_SERIAL:
+ // don't update ExpectedSerial so that the corresponding PDisk wouldn't be able to start next time
+ log << "disk's serial reported by the node doesn't match pdisk's serial, don't update anything";
+ break;
+ default:
+ if (serial) {
+ // update ExpectedSerial
+ pdiskInfo.ExpectedSerial = serial;
+ db.Table<T>().Key(key).Update<T::ExpectedSerial>(serial);
+ log << "disk's serial reported by the node doesn't match pdisk's serial, update ExpectedSerial for pdisk";
+ }
+ break;
}
- STLOG(prio, BS_CONTROLLER, BSCTXRN06, log.Str(), (PDiskId, pdiskId), (Path, info.Path),
- (OldSerial, info.ExpectedSerial), (NewSerial, serial));
+
+ STLOG(NLog::PRI_ERROR, BS_CONTROLLER, BSCTXRN06, log.Str(), (PDiskId, pdiskId), (Path, pdiskInfo.Path),
+ (OldSerial, pdiskInfo.ExpectedSerial), (NewSerial, serial));
}
}
- if (info.LastSeenSerial != serial) {
- info.LastSeenSerial = serial;
+
+ // update pdisk's LastSeenSerial if necessary
+ if (pdiskInfo.LastSeenSerial != serial) {
+ pdiskInfo.LastSeenSerial = serial;
db.Table<T>().Key(key).Update<T::LastSeenSerial>(serial);
if (serial) {
- Self->ReadPDisk(pdiskId, info, result, NKikimrBlobStorage::RESTART);
+ Self->ReadPDisk(pdiskId, pdiskInfo, result, NKikimrBlobStorage::RESTART);
}
}
}
@@ -111,21 +103,19 @@ class TBlobStorageController::TTxUpdateNodeDrives
TNodeInfo& nodeInfo = Self->GetNode(nodeId);
Self->EraseKnownDrivesOnDisconnected(&nodeInfo);
+ // Update NodeIdByDiskSerialNumber and KnownDrives
for (const auto& data : Record.GetDrivesData()) {
const auto& serial = data.GetSerialNumber();
- if (auto it = Self->NodeForSerial.find(serial); it != Self->NodeForSerial.end() && it->second != nodeId) {
+ if (auto it = Self->NodeIdByDiskSerialNumber.find(serial); it != Self->NodeIdByDiskSerialNumber.end() && it->second != nodeId) {
STLOG(PRI_ERROR, BS_CONTROLLER, BSCTXRN03,
"Received drive from NewNodeId, but drive is reported as placed in OldNodeId",
(NewNodeId, nodeId), (OldNodeId, it->second), (Serial, serial));
} else {
- Self->NodeForSerial[serial] = nodeId;
+ Self->NodeIdByDiskSerialNumber[serial] = nodeId;
}
NPDisk::TDriveData driveData;
DriveDataToDriveData(data, driveData);
- auto [it, emplaced] = nodeInfo.KnownDrives.emplace(serial, driveData);
- if (it->second.DeviceType == NPDisk::DEVICE_TYPE_NVME) {
- it->second.DeviceType = NPDisk::DEVICE_TYPE_SSD;
- }
+ nodeInfo.KnownDrives.emplace(serial, driveData);
}
}
@@ -217,7 +207,7 @@ public:
UpdateNodeDrivesRecord.SetNodeId(nodeId);
for (const auto& data : record.GetDrivesData()) {
- *UpdateNodeDrivesRecord.AddDrivesData() = data;
+ UpdateNodeDrivesRecord.AddDrivesData()->CopyFrom(data);
}
Self->OnRegisterNode(request->Recipient, nodeId);
@@ -387,7 +377,7 @@ void TBlobStorageController::ReadPDisk(const TPDiskId& pdiskId, const TPDiskInfo
(PDiskId, pdiskId.PDiskId));
}
}
- pDisk->SetExpectedSerial(pdisk.ExpectedSerial);
+ //pDisk->SetExpectedSerial(pdisk.ExpectedSerial);
pDisk->SetManagementStage(SerialManagementStage);
pDisk->SetSpaceColorBorder(PDiskSpaceColorBorder);
pDisk->SetEntityStatus(entityStatus);
@@ -411,7 +401,14 @@ void TBlobStorageController::ReadVSlot(const TVSlotInfo& vslot, TEvBlobStorage::
if (TGroupInfo *group = FindGroup(vslot.GroupId)) {
const TStoragePoolInfo& info = StoragePools.at(group->StoragePoolId);
vDisk->SetStoragePoolName(info.Name);
- SerializeDonors(vDisk, vslot, *group);
+
+ const TVSlotFinder vslotFinder{[this](TVSlotId vslotId, auto&& callback) {
+ if (const TVSlotInfo *vslot = FindVSlot(vslotId)) {
+ callback(*vslot);
+ }
+ }};
+
+ SerializeDonors(vDisk, vslot, *group, vslotFinder);
} else {
Y_VERIFY(vslot.Mood != TMood::Donor);
}
@@ -517,7 +514,7 @@ void TBlobStorageController::OnWardenDisconnected(TNodeId nodeId) {
void TBlobStorageController::EraseKnownDrivesOnDisconnected(TNodeInfo *nodeInfo) {
for (const auto& [serial, driveData] : nodeInfo->KnownDrives) {
- NodeForSerial.erase(serial);
+ NodeIdByDiskSerialNumber.erase(serial);
}
nodeInfo->KnownDrives.clear();
}
diff --git a/ydb/core/mind/bscontroller/scheme.h b/ydb/core/mind/bscontroller/scheme.h
index 31a1826042..e97b0df955 100644
--- a/ydb/core/mind/bscontroller/scheme.h
+++ b/ydb/core/mind/bscontroller/scheme.h
@@ -382,11 +382,14 @@ struct Schema : NIceDb::Schema {
struct Kind : Column<7, HostConfigDrive::Kind::ColumnType> {};
struct PDiskType : Column<8, HostConfigDrive::TypeCol::ColumnType> { using Type = NKikimrBlobStorage::EPDiskType; };
struct PDiskConfig : Column<9, NScheme::NTypeIds::String> {};
+ struct Path : Column<10, NScheme::NTypeIds::String> {};
using TKey = TableKey<Serial>;
- using TColumns = TableColumns<Serial, BoxId, NodeId, PDiskId, Guid, LifeStage, Kind, PDiskType, PDiskConfig>;
+ using TColumns = TableColumns<Serial, BoxId, NodeId, PDiskId, Guid, LifeStage, Kind, PDiskType, PDiskConfig, Path>;
};
+ // struct VirtualGroupPool : Table<130> {};
+
using TTables = SchemaTables<
Node,
PDisk,
diff --git a/ydb/core/mind/bscontroller/self_heal.cpp b/ydb/core/mind/bscontroller/self_heal.cpp
index 13c67af6eb..336630a404 100644
--- a/ydb/core/mind/bscontroller/self_heal.cpp
+++ b/ydb/core/mind/bscontroller/self_heal.cpp
@@ -662,7 +662,7 @@ namespace NKikimr::NBsController {
if (slot->Status == NKikimrBlobStorage::EVDiskStatus::READY) {
// we can release donor slots without further notice then the VDisk is completely replicated; we
// intentionally use GetStatus() here instead of IsReady() to prevent waiting
- for (const auto& [donorVSlotId, donorVDiskId] : slot->Donors) {
+ for (const TVSlotId& donorVSlotId : slot->Donors) {
if (!dropDonorEv) {
dropDonorEv.reset(new TEvPrivate::TEvDropDonor);
}
diff --git a/ydb/core/mind/bscontroller/storage_stats_calculator.cpp b/ydb/core/mind/bscontroller/storage_stats_calculator.cpp
index f39d7885d3..5100a024e9 100644
--- a/ydb/core/mind/bscontroller/storage_stats_calculator.cpp
+++ b/ydb/core/mind/bscontroller/storage_stats_calculator.cpp
@@ -34,7 +34,7 @@ public:
const TBlobStorageController::THostRecordMap& hostRecordMap,
ui32 groupReserveMin,
ui32 groupReservePart)
- : TActorCoroImpl(/* stackSize */ 64 * 1024, /* allowUnhandledPoisonPill */ true, /* allowUnhandledDtor */ true)
+ : TActorCoroImpl(/* stackSize */ 640 * 1024, /* allowUnhandledPoisonPill */ true, /* allowUnhandledDtor */ true) // 640 KiB should be enough for anything!
, SystemViewsState(systemViewsState)
, HostRecordMap(hostRecordMap)
, GroupReserveMin(groupReserveMin)
diff --git a/ydb/core/mind/bscontroller/ut_bscontroller/main.cpp b/ydb/core/mind/bscontroller/ut_bscontroller/main.cpp
index 277efd7b66..cee71cfa67 100644
--- a/ydb/core/mind/bscontroller/ut_bscontroller/main.cpp
+++ b/ydb/core/mind/bscontroller/ut_bscontroller/main.cpp
@@ -838,17 +838,10 @@ Y_UNIT_TEST_SUITE(BsControllerConfig) {
pb->SetSerial("SN_123");
pb->SetBoxId(1);
NKikimrBlobStorage::TConfigResponse response = env.Invoke(request);
- if (i == 0) {
- UNIT_ASSERT(response.GetSuccess());
- UNIT_ASSERT(response.StatusSize() == 1);
- UNIT_ASSERT(response.GetStatus(0).GetSuccess());
- } else {
- UNIT_ASSERT(!response.GetSuccess());
- UNIT_ASSERT(response.StatusSize() == 1);
- UNIT_ASSERT(!response.GetStatus(0).GetSuccess());
- UNIT_ASSERT(response.GetStatus(0).GetFailReason()
- == NKikimrBlobStorage::TConfigResponse::TStatus::kAlready);
- }
+ UNIT_ASSERT(!response.GetSuccess());
+ UNIT_ASSERT(response.StatusSize() == 1);
+ UNIT_ASSERT(!response.GetStatus(0).GetSuccess());
+ UNIT_ASSERT(response.GetStatus(0).GetErrorDescription());
}
};
RunTestWithReboots(env.TabletIds, [&] { return env.PrepareInitialEventsFilter(); }, test);
@@ -867,18 +860,20 @@ Y_UNIT_TEST_SUITE(BsControllerConfig) {
pb->SetSerial(TStringBuilder() << "SN_" << i);
pb->SetBoxId(1);
NKikimrBlobStorage::TConfigResponse response = env.Invoke(request);
- UNIT_ASSERT(response.GetSuccess());
+ UNIT_ASSERT(!response.GetSuccess());
UNIT_ASSERT(response.StatusSize() == 1);
- UNIT_ASSERT(response.GetStatus(0).GetSuccess());
+ UNIT_ASSERT(!response.GetStatus(0).GetSuccess());
+ UNIT_ASSERT(response.GetStatus(0).GetErrorDescription());
}
for (size_t i = 0; i < disksCount; ++i) {
NKikimrBlobStorage::TConfigRequest request;
auto pb = request.AddCommand()->MutableRemoveDriveSerial();
pb->SetSerial(TStringBuilder() << "SN_" << i);
NKikimrBlobStorage::TConfigResponse response = env.Invoke(request);
- UNIT_ASSERT(response.GetSuccess());
+ UNIT_ASSERT(!response.GetSuccess());
UNIT_ASSERT(response.StatusSize() == 1);
- UNIT_ASSERT(response.GetStatus(0).GetSuccess());
+ UNIT_ASSERT(!response.GetStatus(0).GetSuccess());
+ UNIT_ASSERT(response.GetStatus(0).GetErrorDescription());
}
};
RunTestWithReboots(env.TabletIds, [&] { return env.PrepareInitialEventsFilter(); }, test);
diff --git a/ydb/core/mind/bscontroller/virtual_group.cpp b/ydb/core/mind/bscontroller/virtual_group.cpp
index 66359ee855..f093eff1b6 100644
--- a/ydb/core/mind/bscontroller/virtual_group.cpp
+++ b/ydb/core/mind/bscontroller/virtual_group.cpp
@@ -107,7 +107,13 @@ namespace NKikimr::NBsController {
if (!group) {
throw TExError() << "group not found" << TErrorParams::GroupId(groupId);
} else if (group->DecommitStatus != NKikimrBlobStorage::TGroupDecommitStatus::NONE) {
- throw TExError() << "group is already being decommitted" << TErrorParams::GroupId(groupId);
+ if (group->HiveId != cmd.GetHiveId()) {
+ throw TExError() << "different hive specified for decommitting group" << TErrorParams::GroupId(groupId);
+ }
+ // group is already being decommitted -- make this operation idempotent
+ continue;
+ } else if (group->VirtualGroupState) {
+ throw TExError() << "group is already virtual" << TErrorParams::GroupId(groupId);
}
group->DecommitStatus = NKikimrBlobStorage::TGroupDecommitStatus::PENDING;
@@ -166,7 +172,7 @@ namespace NKikimr::NBsController {
auto *data = profiles->Add();
data->SetStoragePoolName(storagePoolName);
data->SetChannelKind(NKikimrBlobDepot::TChannelKind::Data);
- data->SetCount(numPhysicalGroups);
+ data->SetCount(Min<ui32>(250, numPhysicalGroups));
}
const bool success = config.SerializeToString(&group->BlobDepotConfig.ConstructInPlace());
@@ -185,64 +191,39 @@ namespace NKikimr::NBsController {
class TTxUpdateGroup : public TTransactionBase<TBlobStorageController> {
TVirtualGroupSetupMachine *Machine;
std::optional<TConfigState> State;
+ std::function<void(TGroupInfo&)> Callback;
public:
- TTxUpdateGroup(TVirtualGroupSetupMachine *machine)
+ TTxType GetTxType() const override { return NBlobStorageController::TXTYPE_UPDATE_GROUP; }
+
+ TTxUpdateGroup(TVirtualGroupSetupMachine *machine, std::function<void(TGroupInfo&)>&& callback)
: TTransactionBase(machine->Self)
, Machine(machine)
+ , Callback(std::move(callback))
{}
bool Execute(TTransactionContext& txc, const TActorContext&) override {
- TGroupInfo *group = GetGroup(true);
- NIceDb::TNiceDb db(txc.DB);
- using T = Schema::Group;
- auto row = db.Table<T>().Key(group->ID);
-#define PARAM(NAME) \
- if (const auto& cell = group->NAME) { \
- row.Update<T::NAME>(*cell); \
- }
- PARAM(VirtualGroupState)
- PARAM(BlobDepotConfig)
- PARAM(BlobDepotId)
- PARAM(ErrorReason)
- PARAM(NeedAlter)
-#undef PARAM
- if (group->SeenOperational) {
- row.Update<T::SeenOperational>(true);
- }
- if (group->VirtualGroupState == NKikimrBlobStorage::EVirtualGroupState::WORKING &&
- group->DecommitStatus == NKikimrBlobStorage::TGroupDecommitStatus::PENDING) {
- State.emplace(*Self, Self->HostRecords, TActivationContext::Now());
- TGroupInfo *group = State->Groups.FindForUpdate(Machine->GroupId);
- Y_VERIFY(group);
- group->DecommitStatus = NKikimrBlobStorage::TGroupDecommitStatus::IN_PROGRESS;
- group->ContentChanged = true;
- TString error;
- if (State->Changed() && !Self->CommitConfigUpdates(*State, false, false, false, txc, &error)) {
- STLOG(PRI_ERROR, BS_CONTROLLER, BSCVG08, "failed to commit update",
- (VirtualGroupId, Machine->GroupId), (Error, error));
- State->Rollback();
- State.reset();
- }
+ State.emplace(*Self, Self->HostRecords, TActivationContext::Now());
+ TGroupInfo *group = State->Groups.FindForUpdate(Machine->GroupId);
+ Y_VERIFY(group);
+ Callback(*group);
+ TString error;
+ if (State->Changed() && !Self->CommitConfigUpdates(*State, false, false, false, txc, &error)) {
+ STLOG(PRI_ERROR, BS_CONTROLLER, BSCVG08, "failed to commit update",
+ (VirtualGroupId, Machine->GroupId), (Error, error));
+ State->Rollback();
+ State.reset();
}
return true;
}
void Complete(const TActorContext&) override {
- TGroupInfo *group = GetGroup(false);
+ TGroupInfo *group = Machine->GetGroup();
Y_VERIFY(group->VirtualGroupSetupMachineId == Machine->SelfId());
- TActivationContext::Send(new IEventHandle(TEvents::TSystem::Bootstrap, 0, Machine->SelfId(), {}, nullptr, 0));
if (State) {
State->ApplyConfigUpdates();
}
- }
-
- private:
- TGroupInfo *GetGroup(bool commitInProgress) {
- TGroupInfo *group = Machine->GetGroup();
- Y_VERIFY(group->CommitInProgress != commitInProgress);
- group->CommitInProgress = commitInProgress;
- return group;
+ TActivationContext::Send(new IEventHandle(TEvents::TSystem::Bootstrap, 0, Machine->SelfId(), {}, nullptr, 0));
}
};
@@ -363,8 +344,10 @@ namespace NKikimr::NBsController {
void OnPipeError(TActorId clientId) {
if (clientId == HivePipeId) {
HivePipeId = {};
+ Bootstrap();
} else if (clientId == BlobDepotPipeId) {
BlobDepotPipeId = {};
+ Bootstrap();
}
}
@@ -382,25 +365,26 @@ namespace NKikimr::NBsController {
STLOG(PRI_INFO, BS_CONTROLLER, BSCVG04, "received TEvCreateTabletReply", (TabletId, Self->TabletID()),
(Msg, ev->Get()->Record));
- TGroupInfo *group = GetGroup();
auto& record = ev->Get()->Record;
if (record.GetStatus() == NKikimrProto::OK || record.GetStatus() == NKikimrProto::ALREADY) {
BlobDepotTabletId = record.GetTabletID();
Y_VERIFY(BlobDepotTabletId);
} else {
- group->VirtualGroupState = NKikimrBlobStorage::EVirtualGroupState::CREATE_FAILED;
- group->ErrorReason = SingleLineProto(record);
- Self->Execute(new TTxUpdateGroup(this));
+ Self->Execute(new TTxUpdateGroup(this, [&](TGroupInfo& group) {
+ group.VirtualGroupState = NKikimrBlobStorage::EVirtualGroupState::CREATE_FAILED;
+ group.ErrorReason = TStringBuilder() << "failed to create BlobDepot tablet"
+ << " Reason# " << NKikimrHive::EErrorReason_Name(record.GetErrorReason())
+ << " Status# " << NKikimrProto::EReplyStatus_Name(record.GetStatus());
+ }));
}
NTabletPipe::CloseAndForgetClient(SelfId(), HivePipeId);
+ ConfigureBlobDepot();
}
void Handle(TEvHive::TEvTabletCreationResult::TPtr ev) {
STLOG(PRI_INFO, BS_CONTROLLER, BSCVG05, "received TEvTabletCreationResult", (TabletId, Self->TabletID()),
(Msg, ev->Get()->Record));
-
- ConfigureBlobDepot();
}
void ConfigureBlobDepot() {
@@ -416,12 +400,17 @@ namespace NKikimr::NBsController {
}
void Handle(TEvBlobDepot::TEvApplyConfigResult::TPtr /*ev*/) {
- TGroupInfo *group = GetGroup();
- group->VirtualGroupState = NKikimrBlobStorage::EVirtualGroupState::WORKING;
- group->BlobDepotId = BlobDepotTabletId;
- group->NeedAlter = false; // race-check
- Self->Execute(new TTxUpdateGroup(this));
NTabletPipe::CloseAndForgetClient(SelfId(), BlobDepotPipeId);
+
+ Self->Execute(new TTxUpdateGroup(this, [&](TGroupInfo& group) {
+ group.VirtualGroupState = NKikimrBlobStorage::EVirtualGroupState::WORKING;
+ group.BlobDepotId = BlobDepotTabletId;
+ group.NeedAlter = false;
+ if (group.DecommitStatus == NKikimrBlobStorage::TGroupDecommitStatus::PENDING) {
+ group.DecommitStatus = NKikimrBlobStorage::TGroupDecommitStatus::IN_PROGRESS;
+ group.ContentChanged = true;
+ }
+ }));
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -516,15 +505,14 @@ namespace NKikimr::NBsController {
, Ev(ev)
{}
-// TTxType GetTxType() const override { return NBlobStorageController::TXTYPE_DROP_DONOR; }
+ TTxType GetTxType() const override { return NBlobStorageController::TXTYPE_DECOMMIT_GROUP; }
bool Execute(TTransactionContext& txc, const TActorContext&) override {
State.emplace(*Self, Self->HostRecords, TActivationContext::Now());
- State->CheckConsistency();
Action(*State);
- State->CheckConsistency();
TString error;
if (State->Changed() && !Self->CommitConfigUpdates(*State, false, false, false, txc, &error)) {
+ STLOG(PRI_INFO, BS_CONTROLLER, BSCVGxx, "failed to commit update", (Error, error));
State->Rollback();
State.reset();
}
@@ -536,7 +524,6 @@ namespace NKikimr::NBsController {
TGroupInfo *group = state.Groups.FindForUpdate(groupId);
if (!group) {
std::tie(Status, ErrorReason) = std::make_tuple(NKikimrProto::ERROR, "group not found");
- return;
} else if (group->DecommitStatus == NKikimrBlobStorage::TGroupDecommitStatus::DONE) {
Status = NKikimrProto::ALREADY;
} else if (group->DecommitStatus != NKikimrBlobStorage::TGroupDecommitStatus::IN_PROGRESS) {
@@ -548,7 +535,11 @@ namespace NKikimr::NBsController {
group->VDisksInGroup.clear();
group->DecommitStatus = NKikimrBlobStorage::TGroupDecommitStatus::DONE;
group->ContentChanged = true;
+ group->Topology = std::make_shared<TBlobStorageGroupInfo::TTopology>(group->Topology->GType, 0, 0, 0);
}
+
+ STLOG(PRI_INFO, BS_CONTROLLER, BSCVGxx, "decommission update processed", (Status, Status),
+ (ErrorReason, ErrorReason));
}
void Complete(const TActorContext&) override {
@@ -559,11 +550,94 @@ namespace NKikimr::NBsController {
if (ErrorReason) {
ev->Record.SetErrorReason(ErrorReason);
}
- Self->Send(Ev->Sender, ev.release(), 0, Ev->Cookie);
+ auto reply = std::make_unique<IEventHandle>(Ev->Sender, Self->SelfId(), ev.release(), 0, Ev->Cookie);
+ if (Ev->InterconnectSession) {
+ reply->Rewrite(TEvInterconnect::EvForward, Ev->InterconnectSession);
+ }
+ TActivationContext::Send(std::move(reply));
}
};
+ STLOG(PRI_INFO, BS_CONTROLLER, BSCVGxx, "TEvControllerGroupDecommittedNotify received", (Msg, ev->Get()->Record));
Execute(new TTxDecommitGroup(this, ev));
}
+ void TBlobStorageController::RenderVirtualGroups(IOutputStream& out) {
+ HTML(out) {
+ DIV_CLASS("panel panel-info") {
+ DIV_CLASS("panel-heading") {
+ out << "Virtual groups";
+ }
+ DIV_CLASS("panel-body") {
+ TABLE_CLASS("table table-condensed") {
+ TABLEHEAD() {
+ TABLER() {
+ TABLEH() { out << "GroupId"; }
+ TABLEH() { out << "StoragePoolName"; }
+ TABLEH() { out << "Name"; }
+ TABLEH() { out << "BlobDepotId"; }
+ TABLEH() { out << "State"; }
+ TABLEH() { out << "HiveId"; }
+ TABLEH() { out << "ErrorReason"; }
+ TABLEH() { out << "DecommitStatus"; }
+ }
+ }
+ TABLEBODY() {
+ for (const auto& [groupId, group] : GroupMap) {
+ if (!group->VirtualGroupState) {
+ continue;
+ }
+
+ TABLER() {
+ TABLED() {
+ out << groupId;
+ }
+ TABLED() {
+ const auto it = StoragePools.find(group->StoragePoolId);
+ Y_VERIFY(it != StoragePools.end());
+ out << it->second.Name;
+ }
+ TABLED() {
+ if (group->VirtualGroupName) {
+ out << *group->VirtualGroupName;
+ } else {
+ out << "<i>null</i>";
+ }
+ }
+ TABLED() {
+ if (group->BlobDepotId) {
+ out << *group->BlobDepotId;
+ } else {
+ out << "<i>null</i>";
+ }
+ }
+ TABLED() {
+ out << NKikimrBlobStorage::EVirtualGroupState_Name(*group->VirtualGroupState);
+ }
+ TABLED() {
+ if (group->HiveId) {
+ out << *group->HiveId;
+ } else {
+ out << "<i>null</i>";
+ }
+ }
+ TABLED() {
+ if (group->ErrorReason) {
+ out << *group->ErrorReason;
+ } else {
+ out << "<i>null</i>";
+ }
+ }
+ TABLED() {
+ out << NKikimrBlobStorage::TGroupDecommitStatus::E_Name(group->DecommitStatus);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
} // NKikimr::NBsController
diff --git a/ydb/core/mind/hive/monitoring.cpp b/ydb/core/mind/hive/monitoring.cpp
index 522487eba8..3afccc647f 100644
--- a/ydb/core/mind/hive/monitoring.cpp
+++ b/ydb/core/mind/hive/monitoring.cpp
@@ -319,8 +319,13 @@ public:
bool Execute(TTransactionContext &txc, const TActorContext& ctx) override {
Y_UNUSED(txc);
TStringStream str;
- RenderHTMLPage(str);
- ctx.Send(Source, new NMon::TEvRemoteHttpInfoRes(str.Str()));
+ if (Event->Cgi().Get("format") == "json") {
+ RenderJsonPageWithExtraData(str);
+ ctx.Send(Source, new NMon::TEvRemoteJsonInfoRes(str.Str()));
+ } else {
+ RenderHTMLPage(str);
+ ctx.Send(Source, new NMon::TEvRemoteHttpInfoRes(str.Str()));
+ }
return true;
}
@@ -363,6 +368,64 @@ public:
out << "</tbody>";
out << "</table>";
}
+
+ void RenderJsonPageWithExtraData(IOutputStream &out) {
+ ui64 nodes = 0;
+ ui64 aliveNodes = 0;
+
+ for (const auto& pr : Self->Nodes) {
+ if (pr.second.IsAlive()) {
+ ++aliveNodes;
+ }
+ if (!pr.second.IsUnknown()) {
+ ++nodes;
+ }
+ }
+
+ NJson::TJsonValue jsonData;
+
+ jsonData["TotalNodes"] = nodes;
+ jsonData["AliveNodes"] = aliveNodes;
+
+ TVector<TNodeInfo*> nodeInfos;
+ nodeInfos.reserve(Self->Nodes.size());
+ for (auto& pr : Self->Nodes) {
+ if (!pr.second.IsUnknown()) {
+ nodeInfos.push_back(&pr.second);
+ }
+ }
+ TInstant aliveLine = TInstant::Now() - TDuration::Minutes(10);
+
+ NJson::TJsonValue& jsonNodes = jsonData["Nodes"];
+ for (TNodeInfo* nodeInfo : nodeInfos) {
+ TNodeInfo& node = *nodeInfo;
+ TNodeId id = node.Id;
+
+ if (!node.IsAlive() && TInstant::MilliSeconds(node.Statistics.GetLastAliveTimestamp()) < aliveLine) {
+ continue;
+ }
+
+ NJson::TJsonValue& jsonNode = jsonNodes.AppendValue(NJson::TJsonValue());
+ TString host;
+ auto it = Self->NodesInfo.find(node.Id);
+ if (it != Self->NodesInfo.end()) {
+ auto &ni = it->second;
+ if (ni.Host.empty()) {
+ host = ni.Address;
+ } else {
+ host = ni.Host;
+ }
+ }
+
+ jsonNode["Id"] = id;
+ jsonNode["Host"] = host;
+
+ jsonNode["Domain"] = node.ServicedDomains.empty() ? "" : Self->GetDomainName(node.GetServicedDomain());
+ jsonNode["Alive"] = node.IsAlive();
+ jsonNode["Down"] = node.Down;
+ }
+ NJson::WriteJson(&out, &jsonData);
+ }
};
class TTxMonEvent_MemStateDomains : public TTransactionBase<THive> {
diff --git a/ydb/core/mind/local.cpp b/ydb/core/mind/local.cpp
index 011a9939b5..715b0133d3 100644
--- a/ydb/core/mind/local.cpp
+++ b/ydb/core/mind/local.cpp
@@ -280,7 +280,7 @@ class TLocalNodeRegistrar : public TActorBootstrapped<TLocalNodeRegistrar> {
TVector<TExecutorThreadStats> statsCopy;
ctx.ExecutorThread.ActorSystem->GetPoolStats(AppData()->UserPoolId, poolStats, statsCopy);
if (!statsCopy.empty()) {
- record.MutableResourceMaximum()->SetCPU((statsCopy.size() - 1) * 1000000);
+ record.MutableResourceMaximum()->SetCPU(poolStats.CurrentThreadCount * 1000000);
}
}
if (!record.GetResourceMaximum().HasMemory()) {
diff --git a/ydb/core/mon/mon.cpp b/ydb/core/mon/mon.cpp
index 5268f93372..b32266d911 100644
--- a/ydb/core/mon/mon.cpp
+++ b/ydb/core/mon/mon.cpp
@@ -55,7 +55,7 @@ NActors::IEventHandle* TMon::DefaultAuthorizer(const NActors::TActorId& owner, N
return new NActors::IEventHandle(
owner,
owner,
- new NKikimr::TEvTicketParser::TEvAuthorizeTicketResult(TString(), token, token->SerializeAsString())
+ new NKikimr::TEvTicketParser::TEvAuthorizeTicketResult(TString(), token)
);
} else {
return nullptr;
diff --git a/ydb/core/node_whiteboard/node_whiteboard.h b/ydb/core/node_whiteboard/node_whiteboard.h
index 05aa018e92..a95ac0d348 100644
--- a/ydb/core/node_whiteboard/node_whiteboard.h
+++ b/ydb/core/node_whiteboard/node_whiteboard.h
@@ -312,6 +312,9 @@ struct TEvWhiteboard{
if (groupInfo->GetEncryptionMode() != TBlobStorageGroupInfo::EEM_NONE) {
Record.SetEncryption(true);
}
+ if (groupInfo->BlobDepotId) {
+ Record.SetBlobDepotId(*groupInfo->BlobDepotId);
+ }
}
};
diff --git a/ydb/core/persqueue/CMakeLists.darwin.txt b/ydb/core/persqueue/CMakeLists.darwin.txt
index 86ca8e4206..239205d78a 100644
--- a/ydb/core/persqueue/CMakeLists.darwin.txt
+++ b/ydb/core/persqueue/CMakeLists.darwin.txt
@@ -24,6 +24,7 @@ target_link_libraries(ydb-core-persqueue PUBLIC
ydb-core-base
core-engine-minikql
ydb-core-keyvalue
+ core-kqp-common
ydb-core-metering
core-persqueue-codecs
core-persqueue-config
@@ -51,12 +52,14 @@ target_sources(ydb-core-persqueue PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_database.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_l2_cache.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/quota_tracker.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/read_balancer.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/read_speed_limiter.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/sourceid.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/subscriber.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/type_codecs_defs.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/user_info.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/utils.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/write_meta.cpp
)
generate_enum_serilization(ydb-core-persqueue
diff --git a/ydb/core/persqueue/CMakeLists.linux-aarch64.txt b/ydb/core/persqueue/CMakeLists.linux-aarch64.txt
index b7fb17167d..8cb6b1403d 100644
--- a/ydb/core/persqueue/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/persqueue/CMakeLists.linux-aarch64.txt
@@ -25,6 +25,7 @@ target_link_libraries(ydb-core-persqueue PUBLIC
ydb-core-base
core-engine-minikql
ydb-core-keyvalue
+ core-kqp-common
ydb-core-metering
core-persqueue-codecs
core-persqueue-config
@@ -52,12 +53,14 @@ target_sources(ydb-core-persqueue PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_database.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_l2_cache.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/quota_tracker.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/read_balancer.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/read_speed_limiter.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/sourceid.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/subscriber.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/type_codecs_defs.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/user_info.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/utils.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/write_meta.cpp
)
generate_enum_serilization(ydb-core-persqueue
diff --git a/ydb/core/persqueue/CMakeLists.linux.txt b/ydb/core/persqueue/CMakeLists.linux.txt
index b7fb17167d..8cb6b1403d 100644
--- a/ydb/core/persqueue/CMakeLists.linux.txt
+++ b/ydb/core/persqueue/CMakeLists.linux.txt
@@ -25,6 +25,7 @@ target_link_libraries(ydb-core-persqueue PUBLIC
ydb-core-base
core-engine-minikql
ydb-core-keyvalue
+ core-kqp-common
ydb-core-metering
core-persqueue-codecs
core-persqueue-config
@@ -52,12 +53,14 @@ target_sources(ydb-core-persqueue PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_database.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/pq_l2_cache.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/quota_tracker.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/read_balancer.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/read_speed_limiter.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/sourceid.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/subscriber.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/type_codecs_defs.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/user_info.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/utils.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/write_meta.cpp
)
generate_enum_serilization(ydb-core-persqueue
diff --git a/ydb/core/persqueue/events/global.h b/ydb/core/persqueue/events/global.h
index 15a7964fd8..2c39ed2375 100644
--- a/ydb/core/persqueue/events/global.h
+++ b/ydb/core/persqueue/events/global.h
@@ -45,6 +45,7 @@ struct TEvPersQueue {
EvProposeTransaction,
EvProposeTransactionResult,
EvCancelTransactionProposal,
+ EvPeriodicTopicStats,
EvResponse = EvRequest + 256,
EvInternalEvents = EvResponse + 256,
EvEnd
@@ -235,5 +236,7 @@ struct TEvPersQueue {
struct TEvCancelTransactionProposal : public TEventPB<TEvCancelTransactionProposal, NKikimrPQ::TEvCancelTransactionProposal, EvCancelTransactionProposal> {
};
+ struct TEvPeriodicTopicStats : public TEventPB<TEvPeriodicTopicStats, NKikimrPQ::TEvPeriodicTopicStats, EvPeriodicTopicStats> {
+ };
};
} //NKikimr
diff --git a/ydb/core/persqueue/events/internal.h b/ydb/core/persqueue/events/internal.h
index bd0b5c7894..0f52212f76 100644
--- a/ydb/core/persqueue/events/internal.h
+++ b/ydb/core/persqueue/events/internal.h
@@ -124,6 +124,8 @@ struct TEvPQ {
EvTxCommitDone,
EvTxRollback,
EvPartitionConfigChanged,
+ EvSubDomainStatus,
+ EvStatsWakeup,
EvEnd
};
@@ -253,7 +255,8 @@ struct TEvPQ {
};
TEvSetClientInfo(const ui64 cookie, const TString& clientId, const ui64 offset, const TString& sessionId,
- const ui32 generation, const ui32 step, ESetClientInfoType type = ESCI_OFFSET, ui64 readRuleGeneration = 0)
+ const ui32 generation, const ui32 step, ESetClientInfoType type = ESCI_OFFSET,
+ ui64 readRuleGeneration = 0, bool strict = false)
: Cookie(cookie)
, ClientId(clientId)
, Offset(offset)
@@ -262,6 +265,7 @@ struct TEvPQ {
, Step(step)
, Type(type)
, ReadRuleGeneration(readRuleGeneration)
+ , Strict(strict)
{
}
@@ -273,6 +277,7 @@ struct TEvPQ {
ui32 Step;
ESetClientInfoType Type;
ui64 ReadRuleGeneration;
+ bool Strict;
};
struct TEvGetClientOffset : public TEventLocal<TEvGetClientOffset, EvGetClientOffset> {
@@ -630,12 +635,12 @@ struct TEvPQ {
TEvInitCredentials()
{}
};
-
+
struct TEvCredentialsCreated : public TEventLocal<TEvCredentialsCreated, EvCredentialsCreated> {
TEvCredentialsCreated(const TString& error)
: Error(error)
{}
-
+
TEvCredentialsCreated(std::shared_ptr<NYdb::ICredentialsProviderFactory> credentials)
: Credentials(credentials)
{}
@@ -741,6 +746,26 @@ struct TEvPQ {
ui64 Step;
ui64 TxId;
};
+
+ struct TEvSubDomainStatus : public TEventPB<TEvSubDomainStatus, NKikimrPQ::TEvSubDomainStatus, EvSubDomainStatus> {
+ TEvSubDomainStatus() {
+ }
+
+ explicit TEvSubDomainStatus(bool subDomainOutOfSpace)
+ {
+ Record.SetSubDomainOutOfSpace(subDomainOutOfSpace);
+ }
+
+ bool SubDomainOutOfSpace() const { return Record.GetSubDomainOutOfSpace(); }
+ };
+
+ struct TEvStatsWakeup : public TEventLocal<TEvStatsWakeup, EvStatsWakeup> {
+ TEvStatsWakeup(ui64 round)
+ : Round(round)
+ {}
+
+ ui64 Round;
+ };
};
} //NKikimr
diff --git a/ydb/core/persqueue/partition.cpp b/ydb/core/persqueue/partition.cpp
index 4d71e2c644..ce29f81c8c 100644
--- a/ydb/core/persqueue/partition.cpp
+++ b/ydb/core/persqueue/partition.cpp
@@ -310,7 +310,7 @@ void TPartition::ReplyOwnerOk(const TActorContext& ctx, const ui64 dst, const TS
void TPartition::ReplyWrite(
const TActorContext& ctx, const ui64 dst, const TString& sourceId, const ui64 seqNo, const ui16 partNo, const ui16 totalParts,
const ui64 offset, const TInstant writeTimestamp, bool already, const ui64 maxSeqNo,
- const ui64 partitionQuotedTime, const TDuration topicQuotedTime, const ui64 queueTime, const ui64 writeTime) {
+ const TDuration partitionQuotedTime, const TDuration topicQuotedTime, const TDuration queueTime, const TDuration writeTime) {
Y_VERIFY(offset <= (ui64)Max<i64>(), "Offset is too big: %" PRIu64, offset);
Y_VERIFY(seqNo <= (ui64)Max<i64>(), "SeqNo is too big: %" PRIu64, seqNo);
@@ -329,10 +329,10 @@ void TPartition::ReplyWrite(
write->SetMaxSeqNo(maxSeqNo);
write->SetOffset(offset);
- write->SetPartitionQuotedTimeMs(partitionQuotedTime);
+ write->SetPartitionQuotedTimeMs(partitionQuotedTime.MilliSeconds());
write->SetTopicQuotedTimeMs(topicQuotedTime.MilliSeconds());
- write->SetTotalTimeInPartitionQueueMs(queueTime);
- write->SetWriteTimeMs(writeTime);
+ write->SetTotalTimeInPartitionQueueMs(queueTime.MilliSeconds());
+ write->SetWriteTimeMs(writeTime.MilliSeconds());
ctx.Send(Tablet, response.Release());
}
@@ -477,7 +477,7 @@ void TPartition::FillReadFromTimestamps(const NKikimrPQ::TPQTabletConfig& config
TPartition::TPartition(ui64 tabletId, ui32 partition, const TActorId& tablet, const TActorId& blobCache,
const NPersQueue::TTopicConverterPtr& topicConverter, bool isLocalDC, TString dcId, bool isServerless,
- const NKikimrPQ::TPQTabletConfig& config, const TTabletCountersBase& counters,
+ const NKikimrPQ::TPQTabletConfig& config, const TTabletCountersBase& counters, bool subDomainOutOfSpace,
bool newPartition,
TVector<TTransaction> distrTxs)
: TabletID(tabletId)
@@ -519,6 +519,7 @@ TPartition::TPartition(ui64 tabletId, ui32 partition, const TActorId& tablet, co
, WriteNewMessages(0)
, WriteNewMessagesInternal(0)
, DiskIsFull(false)
+ , SubDomainOutOfSpace(subDomainOutOfSpace)
, HasDataReqNum(0)
, AvgWriteBytes{{TDuration::Seconds(1), 1000}, {TDuration::Minutes(1), 1000}, {TDuration::Hours(1), 2000}, {TDuration::Days(1), 2000}}
, AvgQuotaBytes{{TDuration::Seconds(1), 1000}, {TDuration::Minutes(1), 1000}, {TDuration::Hours(1), 2000}, {TDuration::Days(1), 2000}}
@@ -562,6 +563,11 @@ void TPartition::HandleMonitoring(TEvPQ::TEvMonRequest::TPtr& ev, const TActorCo
res.push_back(out.Str());
out.Clear();
}
+ if (WaitingForSubDomainQuota(ctx)) {
+ out << "SubDomain is out of space";
+ res.push_back(out.Str());
+ out.Clear();
+ }
out << "StartOffset: " << StartOffset; res.push_back(out.Str()); out.Clear();
out << "EndOffset: " << EndOffset; res.push_back(out.Str()); out.Clear();
out << "CreationTime: " << CreationTime.ToStringLocalUpToSeconds(); res.push_back(out.Str()); out.Clear();
@@ -764,7 +770,7 @@ void TPartition::Bootstrap(const TActorContext& ctx) {
Partition));
}
- UsersInfoStorage.Init(Tablet, SelfId());
+ UsersInfoStorage.Init(Tablet, SelfId(), ctx);
Y_VERIFY(AppData(ctx)->PQConfig.GetMaxBlobsPerLevel() > 0);
ui32 border = LEVEL0;
@@ -810,6 +816,15 @@ void TPartition::Bootstrap(const TActorContext& ctx) {
}
}
+void TPartition::EmplaceResponse(TMessage&& message, const TActorContext& ctx) {
+ Responses.emplace_back(
+ message.Body,
+ WriteQuota->GetQuotedTime(ctx.Now()) - message.QuotedTime,
+ (ctx.Now() - TInstant::Zero()) - message.QueueTime,
+ ctx.Now()
+ );
+}
+
void TPartition::SetupTopicCounters(const TActorContext& ctx) {
auto counters = AppData(ctx)->Counters;
auto labels = NPersQueue::GetLabels(TopicConverter);
@@ -878,7 +893,7 @@ void TPartition::SetupTopicCounters(const TActorContext& ctx) {
void TPartition::SetupStreamCounters(const TActorContext& ctx) {
const auto topicName = TopicConverter->GetModernName();
auto counters = AppData(ctx)->Counters;
- auto labels = NPersQueue::GetLabelsForTopic(TopicConverter, CloudId, DbId, DbPath, FolderId);
+ auto subgroups = NPersQueue::GetSubgroupsForTopic(TopicConverter, CloudId, DbId, DbPath, FolderId);
/*
WriteBufferIsFullCounter.SetCounter(
NPersQueue::GetCountersForTopic(counters, IsServerless),
@@ -892,18 +907,22 @@ void TPartition::SetupStreamCounters(const TActorContext& ctx) {
{"partition", ToString<ui32>(Partition)}},
{"name", "api.grpc.topic.stream_write.buffer_brimmed_milliseconds", true});
*/
+
+ subgroups.push_back({"name", "topic.write.lag_milliseconds"});
+
InputTimeLag = THolder<NKikimr::NPQ::TPercentileCounter>(new NKikimr::NPQ::TPercentileCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels,
- {{"name", "topic.write.lag_milliseconds"}}, "bin",
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {},
+ subgroups, "bin",
TVector<std::pair<ui64, TString>>{
{100, "100"}, {200, "200"}, {500, "500"},
{1000, "1000"}, {2000, "2000"}, {5000, "5000"},
{10'000, "10000"}, {30'000, "30000"}, {60'000, "60000"},
{180'000,"180000"}, {9'999'999, "999999"}}, true));
+ subgroups.back().second = "topic.write.message_size_bytes";
MessageSize = THolder<NKikimr::NPQ::TPercentileCounter>(new NKikimr::NPQ::TPercentileCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels,
- {{"name", "topic.write.message_size_bytes"}}, "bin",
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {},
+ subgroups, "bin",
TVector<std::pair<ui64, TString>>{
{1024, "1024"}, {5120, "5120"}, {10'240, "10240"},
{20'480, "20480"}, {51'200, "51200"}, {102'400, "102400"},
@@ -911,24 +930,25 @@ void TPartition::SetupStreamCounters(const TActorContext& ctx) {
{2'097'152,"2097152"}, {5'242'880, "5242880"}, {10'485'760, "10485760"},
{67'108'864, "67108864"}, {999'999'999, "99999999"}}, true));
+ subgroups.pop_back();
BytesWrittenGrpc = NKikimr::NPQ::TMultiCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels, {},
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {}, subgroups,
{"api.grpc.topic.stream_write.bytes"} , true, "name");
BytesWrittenTotal = NKikimr::NPQ::TMultiCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels, {},
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {}, subgroups,
{"topic.write.bytes"} , true, "name");
MsgsWrittenGrpc = NKikimr::NPQ::TMultiCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels, {},
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {}, subgroups,
{"api.grpc.topic.stream_write.messages"}, true, "name");
MsgsWrittenTotal = NKikimr::NPQ::TMultiCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels, {},
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {}, subgroups,
{"topic.write.messages"}, true, "name");
BytesWrittenUncompressed = NKikimr::NPQ::TMultiCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels, {},
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {}, subgroups,
{"topic.write.uncompressed_bytes"}, true, "name");
TVector<NPersQueue::TPQLabelsInfo> aggr = {{{{"Account", TopicConverter->GetAccount()}}, {"total"}}};
@@ -940,21 +960,23 @@ void TPartition::SetupStreamCounters(const TActorContext& ctx) {
SLIBigLatency = NKikimr::NPQ::TMultiCounter(subGroup, aggr, {}, {"WriteBigLatency"}, true, "name", false);
WritesTotal = NKikimr::NPQ::TMultiCounter(subGroup, aggr, {}, {"WritesTotal"}, true, "name", false);
if (IsQuotingEnabled() && !TopicWriteQuotaResourcePath.empty()) {
+ subgroups.push_back({"name", "api.grpc.topic.stream_write.topic_throttled_milliseconds"});
TopicWriteQuotaWaitCounter = THolder<NKikimr::NPQ::TPercentileCounter>(
new NKikimr::NPQ::TPercentileCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels,
- {{"name", "api.grpc.topic.stream_write.topic_throttled_milliseconds"}}, "bin",
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {},
+ subgroups, "bin",
TVector<std::pair<ui64, TString>>{
{0, "0"}, {1, "1"}, {5, "5"}, {10, "10"},
{20, "20"}, {50, "50"}, {100, "100"}, {500, "500"},
{1000, "1000"}, {2500, "2500"}, {5000, "5000"},
{10'000, "10000"}, {9'999'999, "999999"}}, true));
+ subgroups.pop_back();
}
+ subgroups.push_back({"name", "api.grpc.topic.stream_write.partition_throttled_milliseconds"});
PartitionWriteQuotaWaitCounter = THolder<NKikimr::NPQ::TPercentileCounter>(
new NKikimr::NPQ::TPercentileCounter(
- NPersQueue::GetCountersForTopic(counters, IsServerless), labels,
- {{"name", "api.grpc.topic.stream_write.partition_throttled_milliseconds"}}, "bin",
+ NPersQueue::GetCountersForTopic(counters, IsServerless), {}, subgroups, "bin",
TVector<std::pair<ui64, TString>>{
{0, "0"}, {1, "1"}, {5, "5"}, {10, "10"},
{20, "20"}, {50, "50"}, {100, "100"}, {500, "500"},
@@ -1015,8 +1037,7 @@ void TPartition::UpdateAvailableSize(const TActorContext& ctx) {
WriteQuota->Update(now);
for (auto &c : UsersInfoStorage.GetAll()) {
while (true) {
- c.second.ReadQuota.Update(now);
- if (!c.second.ReadQuota.CanExaust() && !c.second.ReadRequests.empty()) {
+ if (!c.second.ReadQuota.CanExaust(now) && !c.second.ReadRequests.empty()) {
break;
}
if (!c.second.ReadRequests.empty()) {
@@ -1029,7 +1050,6 @@ void TPartition::UpdateAvailableSize(const TActorContext& ctx) {
}
}
ScheduleUpdateAvailableSize(ctx);
- ReportCounters(ctx);
}
void TPartition::HandleOnIdle(TEvPQ::TEvUpdateAvailableSize::TPtr&, const TActorContext& ctx) {
@@ -1041,16 +1061,27 @@ void TPartition::HandleOnWrite(TEvPQ::TEvUpdateAvailableSize::TPtr&, const TActo
UpdateAvailableSize(ctx);
}
+ui64 TPartition::MeteringDataSize(const TActorContext& ctx) const {
+ ui64 size = Size();
+ if (!DataKeysBody.empty()) {
+ size -= DataKeysBody.front().Size;
+ }
+ auto expired = ctx.Now() - TDuration::Seconds(Config.GetPartitionConfig().GetLifetimeSeconds());
+ for(size_t i = 0; i < HeadKeys.size(); ++i) {
+ auto& key = HeadKeys[i];
+ if (expired < key.Timestamp) {
+ break;
+ }
+ size -= key.Size;
+ }
+ Y_VERIFY(size >= 0, "Metering data size must be positive");
+ return size;
+}
ui64 TPartition::GetUsedStorage(const TActorContext& ctx) {
auto duration = ctx.Now() - LastUsedStorageMeterTimestamp;
LastUsedStorageMeterTimestamp = ctx.Now();
- ui64 size = BodySize + Head.PackedSize;
- if (DataKeysBody.size() > 0) {
- size -= DataKeysBody.front().Size;
- } else {
- size = 0;
- }
+ ui64 size = MeteringDataSize(ctx);
return size * duration.MilliSeconds() / 1000 / 1_MB; // mb*seconds
}
@@ -1122,6 +1153,7 @@ void TPartition::AddMetaKey(TEvKeyValue::TEvRequest* request) {
NKikimrPQ::TPartitionMeta meta;
meta.SetStartOffset(StartOffset);
meta.SetEndOffset(Max(NewHead.GetNextOffset(), EndOffset));
+ meta.SetSubDomainOutOfSpace(SubDomainOutOfSpace);
TString out;
Y_PROTOBUF_SUPPRESS_NODISCARD meta.SerializeToString(&out);
@@ -1440,7 +1472,7 @@ void TPartition::HandleMetaRead(const NKikimrClient::TResponse& response, const
};
};
- auto loadMeta = [](const NKikimrClient::TKeyValueResponse::TReadResult& response) {
+ auto loadMeta = [&](const NKikimrClient::TKeyValueResponse::TReadResult& response) {
NKikimrPQ::TPartitionMeta meta;
bool res = meta.ParseFromString(response.GetValue());
Y_VERIFY(res);
@@ -1451,6 +1483,9 @@ void TPartition::HandleMetaRead(const NKikimrClient::TResponse& response, const
NewHead.Offset = Head.Offset = EndOffset;
}
*/
+ if (CurrentStateFunc() == &TThis::StateInit) {
+ SubDomainOutOfSpace = meta.GetSubDomainOutOfSpace();
+ }
};
handleReadResult(response.GetReadResult(0), loadMeta);
@@ -1825,6 +1860,8 @@ void TPartition::InitComplete(const TActorContext& ctx) {
if (Config.GetPartitionConfig().HasMirrorFrom()) {
CreateMirrorerActor();
}
+
+ ReportCounters(ctx);
}
@@ -1844,15 +1881,13 @@ void TPartition::ProcessChangeOwnerRequest(TAutoPtr<TEvPQ::TEvChangeOwner> ev, c
Owners[owner];
it = Owners.find(owner);
}
- WriteQuota->Update(ctx.Now());
if (it->second.NeedResetOwner || ev->Force) { //change owner
Y_VERIFY(ReservedSize >= it->second.ReservedSize);
ReservedSize -= it->second.ReservedSize;
it->second.GenerateCookie(owner, ev->PipeClient, ev->Sender, TopicConverter->GetClientsideName(), Partition, ctx);//will change OwnerCookie
//cookie is generated. but answer will be sent when all inflight writes will be done - they in the same queue 'Requests'
- Requests.emplace_back(TOwnershipMsg{ev->Cookie, it->second.OwnerCookie}, WriteQuota->GetQuotedTime(), ctx.Now().MilliSeconds(), 0);
-
+ EmplaceRequest(TOwnershipMsg{ev->Cookie, it->second.OwnerCookie}, ctx);
TabletCounters.Simple()[COUNTER_PQ_TABLET_RESERVED_BYTES_SIZE].Set(ReservedSize);
UpdateWriteBufferIsFullState(ctx.Now());
ProcessReserveRequests(ctx);
@@ -1877,7 +1912,6 @@ THashMap<TString, NKikimr::NPQ::TOwnerInfo>::iterator TPartition::DropOwner(THas
return jt;
}
-
void TPartition::InitUserInfoForImportantClients(const TActorContext& ctx) {
TSet<TString> important;
for (const auto& importantUser : Config.GetPartitionConfig().GetImportantClientId()) {
@@ -1906,7 +1940,6 @@ void TPartition::InitUserInfoForImportantClients(const TActorContext& ctx) {
}
}
-
void TPartition::Handle(TEvPQ::TEvChangePartitionConfig::TPtr& ev, const TActorContext& ctx) {
AddDistrTx(ev->Release());
@@ -1943,6 +1976,7 @@ void TPartition::Handle(TEvPQ::TEvPipeDisconnected::TPtr& ev, const TActorContex
void TPartition::ProcessReserveRequests(const TActorContext& ctx) {
+ const ui64 maxWriteInflightSize = Config.GetPartitionConfig().GetMaxWriteInflightSize();
while (!ReserveRequests.empty()) {
const TString& ownerCookie = ReserveRequests.front()->OwnerCookie;
@@ -1957,17 +1991,24 @@ void TPartition::ProcessReserveRequests(const TActorContext& ctx) {
ReserveRequests.pop_front();
continue;
}
- if (ReservedSize + WriteInflightSize + WriteCycleSize + size <= Config.GetPartitionConfig().GetMaxWriteInflightSize() || ReservedSize + WriteInflightSize + WriteCycleSize == 0) {
- it->second.AddReserveRequest(size, lastRequest);
- ReservedSize += size;
-
- ReplyOk(ctx, cookie);
- ReserveRequests.pop_front();
+ const ui64 currentSize = ReservedSize + WriteInflightSize + WriteCycleSize;
+ if (currentSize != 0 && currentSize + size > maxWriteInflightSize) {
+ LOG_DEBUG_S(ctx, NKikimrServices::PERSQUEUE, "Reserve processing: maxWriteInflightSize riched");
+ break;
+ }
- continue;
+ if (WaitingForSubDomainQuota(ctx, currentSize)) {
+ LOG_DEBUG_S(ctx, NKikimrServices::PERSQUEUE, "Reserve processing: SubDomainOutOfSpace");
+ break;
}
- break;
+
+ it->second.AddReserveRequest(size, lastRequest);
+ ReservedSize += size;
+
+ ReplyOk(ctx, cookie);
+
+ ReserveRequests.pop_front();
}
UpdateWriteBufferIsFullState(ctx.Now());
TabletCounters.Simple()[COUNTER_PQ_TABLET_RESERVED_BYTES_SIZE].Set(ReservedSize);
@@ -2043,7 +2084,7 @@ void TPartition::HandleOnInit(TEvPQ::TEvPartitionOffsets::TPtr& ev, const TActor
void TPartition::Handle(TEvPQ::TEvPartitionStatus::TPtr& ev, const TActorContext& ctx) {
NKikimrPQ::TStatusResponse::TPartResult result;
result.SetPartition(Partition);
- if (DiskIsFull) {
+ if (DiskIsFull || WaitingForSubDomainQuota(ctx)) {
result.SetStatus(NKikimrPQ::TStatusResponse::STATUS_DISK_IS_FULL);
} else if (EndOffset - StartOffset >= static_cast<ui64>(Config.GetPartitionConfig().GetMaxCountInPartition()) ||
BodySize + Head.PackedSize >= static_cast<ui64>(Config.GetPartitionConfig().GetMaxSizeInPartition())) {
@@ -2134,7 +2175,8 @@ void TPartition::Handle(TEvPQ::TEvPartitionStatus::TPtr& ev, const TActorContext
result.SetReadBytesQuota(maxQuota);
- result.SetPartitionSize(BodySize + Head.PackedSize);
+ result.SetPartitionSize(MeteringDataSize(ctx));
+ result.SetUsedReserveSize(UsedReserveSize(ctx));
result.SetStartOffset(StartOffset);
result.SetEndOffset(EndOffset);
@@ -2143,6 +2185,13 @@ void TPartition::Handle(TEvPQ::TEvPartitionStatus::TPtr& ev, const TActorContext
*result.MutableErrors() = {Errors.begin(), Errors.end()};
+ LOG_DEBUG_S(ctx, NKikimrServices::PERSQUEUE,
+ "Topic PartitionStatus PartitionSize: " << result.GetPartitionSize()
+ << " UsedReserveSize: " << result.GetUsedReserveSize()
+ << " ReserveSize: " << ReserveSize()
+ << " PartitionConfig" << Config.GetPartitionConfig();
+ );
+
ctx.Send(ev->Get()->Sender, new TEvPQ::TEvPartitionStatusResponse(result));
}
@@ -2383,7 +2432,6 @@ void TPartition::Handle(TEvPQ::TEvBlobResponse::TPtr& ev, const TActorContext& c
TabletCounters.Cumulative()[COUNTER_PQ_READ_BYTES].Increment(resp.ByteSize());
}
ctx.Send(info.Destination != 0 ? Tablet : ctx.SelfID, answer.Event.Release());
- ReportCounters(ctx);
OnReadRequestFinished(std::move(info), answer.Size);
}
@@ -2881,12 +2929,14 @@ void TPartition::OnReadRequestFinished(TReadInfo&& info, ui64 answerSize) {
void TPartition::AnswerCurrentWrites(const TActorContext& ctx) {
ui64 offset = EndOffset;
while (!Responses.empty()) {
- const ui64 quotedTime = Responses.front().QuotedTime;
- const ui64 queueTime = Responses.front().QueueTime;
- const ui64 writeTime = ctx.Now().MilliSeconds() - Responses.front().WriteTime;
+ const auto& response = Responses.front();
+
+ const TDuration quotedTime = response.QuotedTime;
+ const TDuration queueTime = response.QueueTime;
+ const TDuration writeTime = ctx.Now() - response.WriteTimeBaseline;
- if (Responses.front().IsWrite()) {
- const auto& writeResponse = Responses.front().GetWrite();
+ if (response.IsWrite()) {
+ const auto& writeResponse = response.GetWrite();
const TString& s = writeResponse.Msg.SourceId;
const ui64& seqNo = writeResponse.Msg.SeqNo;
const ui16& partNo = writeResponse.Msg.PartNo;
@@ -2939,21 +2989,21 @@ void TPartition::AnswerCurrentWrites(const TActorContext& ctx) {
", Offset: " << offset << " is " << (already ? "already written" : "stored on disk")
);
if (PartitionWriteQuotaWaitCounter) {
- PartitionWriteQuotaWaitCounter->IncFor(quotedTime);
+ PartitionWriteQuotaWaitCounter->IncFor(quotedTime.MilliSeconds());
}
if (!already && partNo + 1 == totalParts)
++offset;
- } else if (Responses.front().IsOwnership()) {
- const TString& ownerCookie = Responses.front().GetOwnership().OwnerCookie;
+ } else if (response.IsOwnership()) {
+ const TString& ownerCookie = response.GetOwnership().OwnerCookie;
auto it = Owners.find(TOwnerInfo::GetOwnerFromOwnerCookie(ownerCookie));
if (it != Owners.end() && it->second.OwnerCookie == ownerCookie) {
- ReplyOwnerOk(ctx, Responses.front().GetCookie(), ownerCookie);
+ ReplyOwnerOk(ctx, response.GetCookie(), ownerCookie);
} else {
- ReplyError(ctx, Responses.front().GetCookie(), NPersQueue::NErrorCode::WRONG_COOKIE, "new GetOwnership request is dropped already");
+ ReplyError(ctx, response.GetCookie(), NPersQueue::NErrorCode::WRONG_COOKIE, "new GetOwnership request is dropped already");
}
- } else if (Responses.front().IsRegisterMessageGroup()) {
- const auto& body = Responses.front().GetRegisterMessageGroup().Body;
+ } else if (response.IsRegisterMessageGroup()) {
+ const auto& body = response.GetRegisterMessageGroup().Body;
TMaybe<TPartitionKeyRange> keyRange;
if (body.KeyRange) {
@@ -2962,14 +3012,14 @@ void TPartition::AnswerCurrentWrites(const TActorContext& ctx) {
Y_VERIFY(body.AssignedOffset);
SourceIdStorage.RegisterSourceId(body.SourceId, body.SeqNo, *body.AssignedOffset, CurrentTimestamp, std::move(keyRange));
- ReplyOk(ctx, Responses.front().GetCookie());
- } else if (Responses.front().IsDeregisterMessageGroup()) {
- const auto& body = Responses.front().GetDeregisterMessageGroup().Body;
+ ReplyOk(ctx, response.GetCookie());
+ } else if (response.IsDeregisterMessageGroup()) {
+ const auto& body = response.GetDeregisterMessageGroup().Body;
SourceIdStorage.DeregisterSourceId(body.SourceId);
- ReplyOk(ctx, Responses.front().GetCookie());
- } else if (Responses.front().IsSplitMessageGroup()) {
- const auto& split = Responses.front().GetSplitMessageGroup();
+ ReplyOk(ctx, response.GetCookie());
+ } else if (response.IsSplitMessageGroup()) {
+ const auto& split = response.GetSplitMessageGroup();
for (const auto& body : split.Deregistrations) {
SourceIdStorage.DeregisterSourceId(body.SourceId);
@@ -2985,7 +3035,7 @@ void TPartition::AnswerCurrentWrites(const TActorContext& ctx) {
SourceIdStorage.RegisterSourceId(body.SourceId, body.SeqNo, *body.AssignedOffset, CurrentTimestamp, std::move(keyRange), true);
}
- ReplyOk(ctx, Responses.front().GetCookie());
+ ReplyOk(ctx, response.GetCookie());
} else {
Y_FAIL("Unexpected message");
}
@@ -3024,13 +3074,11 @@ void TPartition::ReadTimestampForOffset(const TString& user, TUserInfo& userInfo
}
TabletCounters.Cumulative()[COUNTER_PQ_WRITE_TIMESTAMP_OFFSET_IS_LOST].Increment(1);
- ReportCounters(ctx);
return;
}
if (userInfo.Offset >= (i64)EndOffset || StartOffset == EndOffset) {
userInfo.ReadScheduled = false;
- ReportCounters(ctx);
return;
}
@@ -3147,7 +3195,6 @@ void TPartition::ProcessTimestampRead(const TActorContext& ctx) {
ReadTimestampForOffset(user, *userInfo, ctx);
}
Y_VERIFY(ReadingTimestamp || UpdateUserInfoTimestamp.empty());
- ReportCounters(ctx);
}
@@ -3384,18 +3431,6 @@ void TPartition::ReportCounters(const TActorContext& ctx) {
userInfo.LabeledCounters->GetCounters()[METRIC_READ_QUOTA_BYTES].Set(speed);
}
- ui64 availSec = userInfo.ReadQuota.GetAvailableAvgSec(ctx.Now());
- if (availSec != userInfo.LabeledCounters->GetCounters()[METRIC_MIN_READ_QUOTA_BYTES_AVAIL_SEC].Get()) {
- haveChanges = true;
- userInfo.LabeledCounters->GetCounters()[METRIC_MIN_READ_QUOTA_BYTES_AVAIL_SEC].Set(availSec);
- }
-
- ui64 availMin = userInfo.ReadQuota.GetAvailableAvgMin(ctx.Now());
- if (availMin != userInfo.LabeledCounters->GetCounters()[METRIC_MIN_READ_QUOTA_BYTES_AVAIL_MIN].Get()) {
- haveChanges = true;
- userInfo.LabeledCounters->GetCounters()[METRIC_MIN_READ_QUOTA_BYTES_AVAIL_MIN].Set(availMin);
- }
-
ui64 readOffsetRewindSum = userInfo.ReadOffsetRewindSum;
if (readOffsetRewindSum != userInfo.LabeledCounters->GetCounters()[METRIC_READ_OFFSET_REWIND_SUM].Get()) {
haveChanges = true;
@@ -3458,18 +3493,6 @@ void TPartition::ReportCounters(const TActorContext& ctx) {
PartitionCountersLabeled->GetCounters()[METRIC_WRITE_QUOTA_BYTES].Set(speed);
}
- ui64 availSec = WriteQuota->GetAvailableAvgSec(ctx.Now());
- if (availSec != PartitionCountersLabeled->GetCounters()[METRIC_MIN_WRITE_QUOTA_BYTES_AVAIL_SEC].Get()) {
- haveChanges = true;
- PartitionCountersLabeled->GetCounters()[METRIC_MIN_WRITE_QUOTA_BYTES_AVAIL_SEC].Set(availSec);
- }
-
- ui64 availMin = WriteQuota->GetAvailableAvgMin(ctx.Now());
- if (availMin != PartitionCountersLabeled->GetCounters()[METRIC_MIN_WRITE_QUOTA_BYTES_AVAIL_MIN].Get()) {
- haveChanges = true;
- PartitionCountersLabeled->GetCounters()[METRIC_MIN_WRITE_QUOTA_BYTES_AVAIL_MIN].Set(availMin);
- }
-
ui32 id = METRIC_TOTAL_WRITE_SPEED_1;
for (ui32 i = 0; i < AvgWriteBytes.size(); ++i) {
ui64 avg = AvgWriteBytes[i].GetValue();
@@ -3608,9 +3631,9 @@ void TPartition::Handle(TEvPQ::TEvHandleWriteResponse::TPtr&, const TActorContex
void TPartition::HandleSetOffsetResponse(ui64 cookie, const TActorContext& ctx) {
Y_VERIFY(cookie == SET_OFFSET_COOKIE);
+
if (ChangeConfig) {
EndChangePartitionConfig(*ChangeConfig, ctx);
- ChangeConfig = nullptr;
}
for (auto& user : AffectedUsers) {
@@ -3623,13 +3646,17 @@ void TPartition::HandleSetOffsetResponse(ui64 cookie, const TActorContext& ctx)
userInfo.Step = actual->Step;
userInfo.Offset = actual->Offset;
userInfo.ReadRuleGeneration = actual->ReadRuleGeneration;
+ userInfo.ReadFromTimestamp = actual->ReadFromTimestamp;
+ userInfo.HasReadRule = true;
- if (PendingHasReadRule.contains(user)) {
- userInfo.HasReadRule = true;
+ if (userInfo.Important != actual->Important) {
+ if (userInfo.LabeledCounters) {
+ ScheduleDropPartitionLabeledCounters(userInfo.LabeledCounters->GetGroup());
+ }
+ userInfo.SetImportant(actual->Important);
}
-
- if (auto p = PendingReadFromTimestamp.find(user); p != PendingReadFromTimestamp.end()) {
- userInfo.ReadFromTimestamp = p->second;
+ if (userInfo.Important && userInfo.Offset < (i64)StartOffset) {
+ userInfo.Offset = StartOffset;
}
if (offsetHasChanged && !userInfo.UpdateTimestampFromCache()) {
@@ -3639,15 +3666,14 @@ void TPartition::HandleSetOffsetResponse(ui64 cookie, const TActorContext& ctx)
TabletCounters.Cumulative()[COUNTER_PQ_WRITE_TIMESTAMP_CACHE_HIT].Increment(1);
}
} else {
+ auto ui = UsersInfoStorage.GetIfExists(user);
+ if (ui && ui->LabeledCounters) {
+ ScheduleDropPartitionLabeledCounters(ui->LabeledCounters->GetGroup());
+ }
UsersInfoStorage.Remove(user, ctx);
}
}
- for (auto& [consumer, important] : PendingSetImportant) {
- if (auto* userInfo = UsersInfoStorage.GetIfExists(consumer); userInfo) {
- userInfo->SetImportant(important);
- }
- }
for (auto& [actor, reply] : Replies) {
ctx.Send(actor, reply.release());
@@ -3656,14 +3682,17 @@ void TPartition::HandleSetOffsetResponse(ui64 cookie, const TActorContext& ctx)
PendingUsersInfo.clear();
Replies.clear();
AffectedUsers.clear();
- PendingReadFromTimestamp.clear();
- PendingSetImportant.clear();
- PendingHasReadRule.clear();
UsersInfoWriteInProgress = false;
TxIdHasChanged = false;
+ if (ChangeConfig) {
+ ReportCounters(ctx);
+ ChangeConfig = nullptr;
+ }
+
+
ProcessTxsAndUserActs(ctx);
}
@@ -3716,7 +3745,7 @@ size_t TPartition::GetUserActCount(const TString& consumer) const
return i->second;
} else {
return 0;
- }
+ }
}
void TPartition::ProcessTxsAndUserActs(const TActorContext& ctx)
@@ -3777,6 +3806,7 @@ void TPartition::ProcessDistrTxs(const TActorContext& ctx)
bool TPartition::BeginTransaction(const TEvPQ::TEvTxCalcPredicate& tx,
const TActorContext& ctx)
{
+ Y_UNUSED(ctx);
bool predicate = true;
for (auto& operation : tx.Operations) {
@@ -3793,7 +3823,7 @@ bool TPartition::BeginTransaction(const TEvPQ::TEvTxCalcPredicate& tx,
}
bool isAffectedConsumer = AffectedUsers.contains(consumer);
- TUserInfo& userInfo = GetOrCreatePendingUser(consumer, ctx);
+ TUserInfoBase& userInfo = GetOrCreatePendingUser(consumer);
if (operation.GetBegin() > operation.GetEnd()) {
// BAD_REQUEST
@@ -3836,7 +3866,7 @@ void TPartition::EndTransaction(const TEvPQ::TEvTxCommit& event,
Y_VERIFY(t.Predicate.Defined() && *t.Predicate);
for (auto& operation : t.Tx->Operations) {
- TUserInfo& userInfo = GetOrCreatePendingUser(operation.GetConsumer(), ctx);
+ TUserInfoBase& userInfo = GetOrCreatePendingUser(operation.GetConsumer());
Y_VERIFY(userInfo.Offset == (i64)operation.GetBegin());
@@ -3882,74 +3912,60 @@ void TPartition::EndTransaction(const TEvPQ::TEvTxRollback& event,
void TPartition::BeginChangePartitionConfig(const TEvPQ::TEvChangePartitionConfig& event,
const TActorContext& ctx)
{
- InitPendingUserInfoForImportantClients(event, ctx);
-
TSet<TString> hasReadRule;
for (auto& [consumer, info] : UsersInfoStorage.GetAll()) {
- PendingReadFromTimestamp[consumer] = TInstant::Zero();
-
hasReadRule.insert(consumer);
}
const NKikimrPQ::TPQTabletConfig& config = event.Config;
+ TSet<TString> important;
+ for (const auto& importantUser : config.GetPartitionConfig().GetImportantClientId()) {
+ important.insert(importantUser);
+ }
+
for (ui32 i = 0; i < config.ReadRulesSize(); ++i) {
const auto& consumer = config.GetReadRules(i);
- auto& userInfo = GetOrCreatePendingUser(consumer, ctx, 0);
+ auto& userInfo = GetOrCreatePendingUser(consumer, 0);
+
+ TInstant ts = i < config.ReadFromTimestampsMsSize() ? TInstant::MilliSeconds(config.GetReadFromTimestampsMs(i)) : TInstant::Zero();
+ if (!ts) {
+ ts += TDuration::MilliSeconds(1);
+ }
+ userInfo.ReadFromTimestamp = ts;
+ userInfo.Important = important.contains(consumer);
ui64 rrGen = i < config.ReadRuleGenerationsSize() ? config.GetReadRuleGenerations(i) : 0;
if (userInfo.ReadRuleGeneration != rrGen) {
TEvPQ::TEvSetClientInfo act(0, consumer, 0, "", 0, 0,
TEvPQ::TEvSetClientInfo::ESCI_INIT_READ_RULE, rrGen);
- userInfo.Session = "";
- userInfo.Offset = 0;
- if (userInfo.Important) {
- userInfo.Offset = StartOffset;
- }
- userInfo.Step = userInfo.Generation = 0;
-
ProcessUserAct(act, ctx);
}
-
- userInfo.HasReadRule = true;
hasReadRule.erase(consumer);
-
- TInstant ts = i < config.ReadFromTimestampsMsSize() ? TInstant::MilliSeconds(config.GetReadFromTimestampsMs(i)) : TInstant::Zero();
- if (!ts) {
- ts += TDuration::MilliSeconds(1);
- }
- if (!userInfo.ReadFromTimestamp || userInfo.ReadFromTimestamp > ts) {
- PendingReadFromTimestamp[consumer] = ts;
- }
-
- PendingHasReadRule.insert(consumer);
}
for (auto& consumer : hasReadRule) {
- auto& userInfo = GetOrCreatePendingUser(consumer, ctx);
+ GetOrCreatePendingUser(consumer);
TEvPQ::TEvSetClientInfo act(0, consumer,
0, "", 0, 0, TEvPQ::TEvSetClientInfo::ESCI_DROP_READ_RULE, 0);
- ScheduleDropPartitionLabeledCounters(userInfo.LabeledCounters->GetGroup());
-
- userInfo.Session = "";
- userInfo.Offset = 0;
- userInfo.Step = userInfo.Generation = 0;
-
ProcessUserAct(act, ctx);
}
}
+
void TPartition::EndChangePartitionConfig(const TEvPQ::TEvChangePartitionConfig& event,
const TActorContext& ctx)
{
+
Config = event.Config;
TopicConverter = event.TopicConverter;
Y_VERIFY(Config.GetPartitionConfig().GetTotalPartitions() > 0);
+
UsersInfoStorage.UpdateConfig(event.Config);
WriteQuota->UpdateConfig(Config.GetPartitionConfig().GetBurstSize(), Config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond());
@@ -3964,10 +3980,6 @@ void TPartition::EndChangePartitionConfig(const TEvPQ::TEvChangePartitionConfig&
userInfo.ReadQuota.UpdateConfig(readQuota.GetBurstSize(), readQuota.GetSpeedInBytesPerSecond());
}
- if (CurrentStateFunc() != &TThis::StateInit) {
- InitUserInfoForImportantClients(ctx);
- }
-
if (Config.GetPartitionConfig().HasMirrorFrom()) {
if (Mirrorer) {
ctx.Send(Mirrorer->Actor, new TEvPQ::TEvChangePartitionConfig(event.TopicConverter,
@@ -3985,42 +3997,6 @@ void TPartition::EndChangePartitionConfig(const TEvPQ::TEvChangePartitionConfig&
SchedulePartitionConfigChanged();
}
-void TPartition::InitPendingUserInfoForImportantClients(const TEvPQ::TEvChangePartitionConfig& event,
- const TActorContext& ctx) {
- const NKikimrPQ::TPQTabletConfig& config = event.Config;
- TSet<TString> important;
-
- for (const auto& consumer : config.GetPartitionConfig().GetImportantClientId()) {
- important.insert(consumer);
-
- TUserInfo* userInfo = GetPendingUserIfExists(consumer);
-
- if (userInfo && !userInfo->Important && userInfo->LabeledCounters) {
- ScheduleDropPartitionLabeledCounters(userInfo->LabeledCounters->GetGroup());
- PendingSetImportant[consumer] = true;
- continue;
- }
-
- if (!userInfo) {
- userInfo = &GetOrCreatePendingUser(consumer, ctx, 0);
- PendingSetImportant[consumer] = true;
- }
-
- if (userInfo->Offset < (i64)StartOffset) {
- userInfo->Offset = StartOffset;
- }
-
- //ReadTimestampForOffset(consumer, *userInfo, ctx);
- }
-
- for (auto& [consumer, userInfo] : UsersInfoStorage.GetAll()) {
- if (!important.contains(consumer) && userInfo.Important && userInfo.LabeledCounters) {
- ScheduleDropPartitionLabeledCounters(userInfo.LabeledCounters->GetGroup());
- PendingSetImportant[consumer] = false;
- }
- }
-}
-
void TPartition::ProcessDistrTx(const TActorContext& ctx)
{
Y_VERIFY(!TxInProgress);
@@ -4062,6 +4038,7 @@ void TPartition::ProcessImmediateTxs(const TActorContext& ctx)
void TPartition::ProcessImmediateTx(const NKikimrPQ::TEvProposeTransaction& tx,
const TActorContext& ctx)
{
+ Y_UNUSED(ctx);
for (auto& operation : tx.GetTxBody().GetOperations()) {
Y_VERIFY(operation.HasBegin() && operation.HasEnd() && operation.HasConsumer());
@@ -4076,7 +4053,7 @@ void TPartition::ProcessImmediateTx(const NKikimrPQ::TEvProposeTransaction& tx,
return;
}
- TUserInfo& userInfo = GetOrCreatePendingUser(user, ctx);
+ TUserInfoBase& userInfo = GetOrCreatePendingUser(user);
if (operation.GetBegin() > operation.GetEnd()) {
ScheduleReplyPropose(tx,
@@ -4121,6 +4098,7 @@ void TPartition::ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
Y_VERIFY(!UsersInfoWriteInProgress);
const TString& user = act.ClientId;
+ const bool strictCommitOffset = (act.Type == TEvPQ::TEvSetClientInfo::ESCI_OFFSET && act.Strict);
if (!PendingUsersInfo.contains(user) && AffectedUsers.contains(user)) {
switch (act.Type) {
@@ -4136,7 +4114,7 @@ void TPartition::ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
}
}
- TUserInfo& userInfo = GetOrCreatePendingUser(user, ctx);
+ TUserInfoBase& userInfo = GetOrCreatePendingUser(user);
if (act.Type == TEvPQ::TEvSetClientInfo::ESCI_DROP_READ_RULE) {
LOG_DEBUG_S(
@@ -4151,7 +4129,8 @@ void TPartition::ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
}
if (act.Type == TEvPQ::TEvSetClientInfo::ESCI_CREATE_SESSION && act.SessionId == userInfo.Session) { //this is retry of current request, answer ok
- auto ts = GetTime(userInfo, userInfo.Offset);
+ auto *ui = UsersInfoStorage.GetIfExists(userInfo.User);
+ auto ts = ui ? GetTime(*ui, userInfo.Offset) : std::make_pair<TInstant, TInstant>(TInstant::Zero(), TInstant::Zero());
ScheduleReplyGetClientOffsetOk(act.Cookie,
userInfo.Offset,
@@ -4180,6 +4159,16 @@ void TPartition::ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
return;
}
+ if (strictCommitOffset && act.Offset < StartOffset) {
+ // strict commit to past, reply error
+ TabletCounters.Cumulative()[COUNTER_PQ_SET_CLIENT_OFFSET_ERROR].Increment(1);
+ ScheduleReplyError(act.Cookie,
+ NPersQueue::NErrorCode::SET_OFFSET_ERROR_COMMIT_TO_PAST,
+ TStringBuilder() << "set offset " << act.Offset << " to past for consumer " << act.ClientId << " actual start offset is " << StartOffset);
+
+ return;
+ }
+
//request in correct session - make it
ui64 offset = (act.Type == TEvPQ::TEvSetClientInfo::ESCI_OFFSET ? act.Offset : userInfo.Offset);
@@ -4198,7 +4187,15 @@ void TPartition::ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
Y_VERIFY(offset <= (ui64)Max<i64>(), "Offset is too big: %" PRIu64, offset);
if (offset > EndOffset) {
- LOG_ERROR_S(
+ if (strictCommitOffset) {
+ TabletCounters.Cumulative()[COUNTER_PQ_SET_CLIENT_OFFSET_ERROR].Increment(1);
+ ScheduleReplyError(act.Cookie,
+ NPersQueue::NErrorCode::SET_OFFSET_ERROR_COMMIT_TO_FUTURE,
+ TStringBuilder() << "strict commit can't set offset " << act.Offset << " to future, consumer " << act.ClientId << ", actual end offset is " << EndOffset);
+
+ return;
+ }
+ LOG_WARN_S(
ctx, NKikimrServices::PERSQUEUE,
"commit to future - topic " << TopicConverter->GetClientsideName() << " partition " << Partition
<< " client " << act.ClientId << " EndOffset " << EndOffset << " offset " << offset
@@ -4218,7 +4215,7 @@ void TPartition::ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
}
void TPartition::EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
- TUserInfo& userInfo,
+ TUserInfoBase& userInfo,
const TActorContext& ctx)
{
const TString& user = act.ClientId;
@@ -4230,6 +4227,7 @@ void TPartition::EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
bool setSession = act.Type == TEvPQ::TEvSetClientInfo::ESCI_CREATE_SESSION;
bool dropSession = act.Type == TEvPQ::TEvSetClientInfo::ESCI_DROP_SESSION;
+ bool strictCommitOffset = (act.Type == TEvPQ::TEvSetClientInfo::ESCI_OFFSET && act.SessionId.empty());
if (act.Type == TEvPQ::TEvSetClientInfo::ESCI_DROP_READ_RULE) {
userInfo.ReadRuleGeneration = 0;
@@ -4242,7 +4240,6 @@ void TPartition::EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
"Topic '" << TopicConverter->GetClientsideName() << "' partition " << Partition << " user " << user
<< " drop done"
);
-
PendingUsersInfo.erase(user);
} else if (act.Type == TEvPQ::TEvSetClientInfo::ESCI_INIT_READ_RULE) {
LOG_DEBUG_S(
@@ -4255,7 +4252,6 @@ void TPartition::EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
userInfo.Session = "";
userInfo.Generation = userInfo.Step = 0;
userInfo.Offset = 0;
- userInfo.ReadScheduled = false;
if (userInfo.Important) {
userInfo.Offset = StartOffset;
@@ -4263,7 +4259,8 @@ void TPartition::EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
} else {
if (setSession || dropSession) {
offset = userInfo.Offset;
- auto ts = GetTime(userInfo, offset);
+ auto *ui = UsersInfoStorage.GetIfExists(userInfo.User);
+ auto ts = ui ? GetTime(*ui, userInfo.Offset) : std::make_pair<TInstant, TInstant>(TInstant::Zero(), TInstant::Zero());
ScheduleReplyGetClientOffsetOk(act.Cookie,
offset,
@@ -4276,7 +4273,7 @@ void TPartition::EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
userInfo.Session = session;
userInfo.Generation = generation;
userInfo.Step = step;
- } else if (dropSession) {
+ } else if (dropSession || strictCommitOffset) {
userInfo.Session = "";
userInfo.Generation = 0;
userInfo.Step = 0;
@@ -4429,11 +4426,12 @@ void TPartition::AddCmdWriteUserInfos(NKikimrClient::TKeyValueRequest& request)
TKeyPrefix ikeyDeprecated(TKeyPrefix::TypeInfo, Partition, TKeyPrefix::MarkUserDeprecated);
ikeyDeprecated.Append(user.c_str(), user.size());
- if (TUserInfo* userInfo = GetPendingUserIfExists(user)) {
+ if (TUserInfoBase* userInfo = GetPendingUserIfExists(user)) {
+ auto *ui = UsersInfoStorage.GetIfExists(user);
AddCmdWrite(request,
ikey, ikeyDeprecated,
userInfo->Offset, userInfo->Generation, userInfo->Step, userInfo->Session,
- userInfo->ReadOffsetRewindSum,
+ ui ? ui->ReadOffsetRewindSum : 0,
userInfo->ReadRuleGeneration);
} else {
AddCmdDeleteRange(request,
@@ -4442,25 +4440,25 @@ void TPartition::AddCmdWriteUserInfos(NKikimrClient::TKeyValueRequest& request)
}
}
-TUserInfo& TPartition::GetOrCreatePendingUser(const TString& user,
- const TActorContext& ctx,
+TUserInfoBase& TPartition::GetOrCreatePendingUser(const TString& user,
TMaybe<ui64> readRuleGeneration)
{
- TUserInfo* userInfo = UsersInfoStorage.GetIfExists(user);
+ TUserInfoBase* userInfo = nullptr;
auto i = PendingUsersInfo.find(user);
if (i == PendingUsersInfo.end()) {
+ auto ui = UsersInfoStorage.GetIfExists(user);
auto [p, _] = PendingUsersInfo.emplace(user, UsersInfoStorage.CreateUserInfo(user,
- ctx,
readRuleGeneration));
- if (userInfo) {
- p->second.Session = userInfo->Session;
- p->second.Generation = userInfo->Generation;
- p->second.Step = userInfo->Step;
- p->second.Offset = userInfo->Offset;
- p->second.ReadRuleGeneration = userInfo->ReadRuleGeneration;
- p->second.ReadScheduled = userInfo->ReadScheduled;
+ if (ui) {
+ p->second.Session = ui->Session;
+ p->second.Generation = ui->Generation;
+ p->second.Step = ui->Step;
+ p->second.Offset = ui->Offset;
+ p->second.ReadRuleGeneration = ui->ReadRuleGeneration;
+ p->second.Important = ui->Important;
+ p->second.ReadFromTimestamp = ui->ReadFromTimestamp;
}
userInfo = &p->second;
@@ -4473,7 +4471,7 @@ TUserInfo& TPartition::GetOrCreatePendingUser(const TString& user,
return *userInfo;
}
-TUserInfo* TPartition::GetPendingUserIfExists(const TString& user)
+TUserInfoBase* TPartition::GetPendingUserIfExists(const TString& user)
{
if (auto i = PendingUsersInfo.find(user); i != PendingUsersInfo.end()) {
return &i->second;
@@ -4550,21 +4548,6 @@ void TPartition::ScheduleUpdateAvailableSize(const TActorContext& ctx) {
ctx.Schedule(UPDATE_AVAIL_SIZE_INTERVAL, new TEvPQ::TEvUpdateAvailableSize());
}
-
-void TQuotaTracker::Update(const TInstant& timestamp) {
- ui64 ms = (timestamp - LastUpdateTime).MilliSeconds();
- LastUpdateTime += TDuration::MilliSeconds(ms);
-
- if (AvailableSize < 0) {
- QuotedTime += ms;
- }
-
- AvailableSize = Min<i64>(AvailableSize + (ui64)SpeedPerSecond * ms / 1000, MaxBurst);
- AvgMin.Update(AvailableSize, timestamp.MilliSeconds());
- AvgSec.Update(AvailableSize, timestamp.MilliSeconds());
-}
-
-
void TPartition::HandleWriteResponse(const TActorContext& ctx) {
Y_VERIFY(CurrentStateFunc() == &TThis::StateWrite);
@@ -4634,8 +4617,6 @@ void TPartition::HandleWriteResponse(const TActorContext& ctx) {
ProcessTimestampsForNewData(prevEndOffset, ctx);
- ReportCounters(ctx);
-
HandleWrites(ctx);
}
@@ -4643,6 +4624,7 @@ void TPartition::HandleOnWrite(TEvPQ::TEvWrite::TPtr& ev, const TActorContext& c
ui32 sz = std::accumulate(ev->Get()->Msgs.begin(), ev->Get()->Msgs.end(), 0u, [](ui32 sum, const TEvPQ::TEvWrite::TMsg& msg){
return sum + msg.Data.size();
});
+
bool mirroredPartition = Config.GetPartitionConfig().HasMirrorFrom();
if (mirroredPartition && !ev->Get()->OwnerCookie.empty()) {
@@ -4739,11 +4721,10 @@ void TPartition::HandleOnWrite(TEvPQ::TEvWrite::TPtr& ev, const TActorContext& c
return;
}
ui64 size = 0;
- WriteQuota->Update(ctx.Now());
for (auto& msg: ev->Get()->Msgs) {
size += msg.Data.size();
bool needToChangeOffset = msg.PartNo + 1 == msg.TotalParts;
- Requests.emplace_back(TWriteMsg{ev->Get()->Cookie, offset, std::move(msg)}, WriteQuota->GetQuotedTime(), ctx.Now().MilliSeconds(), 0);
+ EmplaceRequest(TWriteMsg{ev->Get()->Cookie, offset, std::move(msg)}, ctx);
if (offset && needToChangeOffset)
++*offset;
}
@@ -4789,8 +4770,7 @@ void TPartition::HandleOnWrite(TEvPQ::TEvRegisterMessageGroup::TPtr& ev, const T
"SourceId not found, registration cannot be completed");
}
- WriteQuota->Update(ctx.Now());
- Requests.emplace_back(TRegisterMessageGroupMsg(*ev->Get()), WriteQuota->GetQuotedTime(), ctx.Now().MilliSeconds(), 0);
+ EmplaceRequest(TRegisterMessageGroupMsg(*ev->Get()), ctx);
}
void TPartition::HandleOnIdle(TEvPQ::TEvDeregisterMessageGroup::TPtr& ev, const TActorContext& ctx) {
@@ -4806,9 +4786,8 @@ void TPartition::HandleOnWrite(TEvPQ::TEvDeregisterMessageGroup::TPtr& ev, const
return ReplyError(ctx, ev->Get()->Cookie, NPersQueue::NErrorCode::SOURCEID_DELETED,
"SourceId doesn't exist");
}
-
- WriteQuota->Update(ctx.Now());
- Requests.emplace_back(TDeregisterMessageGroupMsg(*ev->Get()), WriteQuota->GetQuotedTime(), ctx.Now().MilliSeconds(), 0);
+
+ EmplaceRequest(TDeregisterMessageGroupMsg(*ev->Get()), ctx);
}
void TPartition::HandleOnIdle(TEvPQ::TEvSplitMessageGroup::TPtr& ev, const TActorContext& ctx) {
@@ -4846,8 +4825,7 @@ void TPartition::HandleOnWrite(TEvPQ::TEvSplitMessageGroup::TPtr& ev, const TAct
}
}
- WriteQuota->Update(ctx.Now());
- Requests.emplace_back(std::move(msg), WriteQuota->GetQuotedTime(), ctx.Now().MilliSeconds(), 0);
+ EmplaceRequest(std::move(msg), ctx);
}
std::pair<TKey, ui32> TPartition::Compact(const TKey& key, const ui32 size, bool headCleared) {
@@ -4948,8 +4926,6 @@ bool TPartition::AppendHeadWithNewWrites(TEvKeyValue::TEvRequest* request, const
//Process is following: if batch contains already written messages or only one client message part -> unpack it and process as several TClientBlobs
//otherwise write this batch as is to head;
- WriteQuota->Update(ctx.Now());
-
while (!Requests.empty() && WriteCycleSize < MAX_WRITE_CYCLE_SIZE) { //head is not too big
auto pp = Requests.front();
Requests.pop_front();
@@ -4985,10 +4961,7 @@ bool TPartition::AppendHeadWithNewWrites(TEvKeyValue::TEvRequest* request, const
Y_VERIFY(pp.IsOwnership());
}
- pp.QuotedTime = WriteQuota->GetQuotedTime() - pp.QuotedTime; //change to duration
- pp.QueueTime = ctx.Now().MilliSeconds() - pp.QueueTime;
- pp.WriteTime = ctx.Now().MilliSeconds();
- Responses.push_back(pp);
+ EmplaceResponse(std::move(pp), ctx);
continue;
}
@@ -5027,10 +5000,7 @@ bool TPartition::AppendHeadWithNewWrites(TEvKeyValue::TEvRequest* request, const
}
TString().swap(p.Msg.Data);
- pp.QuotedTime = WriteQuota->GetQuotedTime() - pp.QuotedTime; //change to duration
- pp.QueueTime = ctx.Now().MilliSeconds() - pp.QueueTime;
- pp.WriteTime = ctx.Now().MilliSeconds();
- Responses.push_back(pp);
+ EmplaceResponse(std::move(pp), ctx);
continue;
}
@@ -5241,10 +5211,7 @@ bool TPartition::AppendHeadWithNewWrites(TEvKeyValue::TEvRequest* request, const
PartitionedBlob = TPartitionedBlob(Partition, 0, "", 0, 0, 0, Head, NewHead, true, false, MaxBlobSize);
}
TString().swap(p.Msg.Data);
- pp.QuotedTime = WriteQuota->GetQuotedTime() - pp.QuotedTime; //change to duration
- pp.QueueTime = ctx.Now().MilliSeconds() - pp.QueueTime;
- pp.WriteTime = ctx.Now().MilliSeconds();
- Responses.push_back(pp);
+ EmplaceResponse(std::move(pp), ctx);
}
UpdateWriteBufferIsFullState(ctx.Now());
@@ -5422,20 +5389,20 @@ void TPartition::Handle(TEvPQ::TEvQuotaDeadlineCheck::TPtr&, const TActorContext
FilterDeadlinedWrites(ctx);
}
-bool TPartition::ProcessWrites(TEvKeyValue::TEvRequest* request, const TActorContext& ctx) {
+bool TPartition::ProcessWrites(TEvKeyValue::TEvRequest* request, TInstant now, const TActorContext& ctx) {
FilterDeadlinedWrites(ctx);
- if (!WriteQuota->CanExaust()) { // Waiting for partition quota.
+ if (!WriteQuota->CanExaust(now)) { // Waiting for partition quota.
SetDeadlinesForWrites(ctx);
return false;
}
- if (WaitingForPreviousBlobQuota()) { // Waiting for topic quota.
+ if (WaitingForPreviousBlobQuota() || WaitingForSubDomainQuota(ctx)) { // Waiting for topic quota.
SetDeadlinesForWrites(ctx);
if (StartTopicQuotaWaitTimeForCurrentBlob == TInstant::Zero() && !Requests.empty()) {
- StartTopicQuotaWaitTimeForCurrentBlob = TActivationContext::Now();
+ StartTopicQuotaWaitTimeForCurrentBlob = now;
}
return false;
}
@@ -5524,17 +5491,19 @@ void TPartition::HandleWrites(const TActorContext& ctx) {
THolder<TEvKeyValue::TEvRequest> request(new TEvKeyValue::TEvRequest);
Y_VERIFY(Head.PackedSize + NewHead.PackedSize <= 2 * MaxSizeCheck);
-
- WriteCycleStartTime = ctx.Now();
+
+ TInstant now = ctx.Now();
+ WriteCycleStartTime = now;
bool haveData = false;
bool haveCheckDisk = false;
+
if (!Requests.empty() && DiskIsFull) {
CancelAllWritesOnIdle(ctx);
AddCheckDiskRequest(request.Get(), Config.GetPartitionConfig().GetNumChannels());
haveCheckDisk = true;
} else {
- haveData = ProcessWrites(request.Get(), ctx);
+ haveData = ProcessWrites(request.Get(), now, ctx);
}
bool haveDrop = CleanUp(request.Get(), haveData, ctx);
@@ -5542,10 +5511,10 @@ void TPartition::HandleWrites(const TActorContext& ctx) {
if (!haveData && !haveDrop && !haveCheckDisk) { //no data writed/deleted
if (!Requests.empty()) { //there could be change ownership requests that
- bool res = ProcessWrites(request.Get(), ctx);
+ bool res = ProcessWrites(request.Get(), now, ctx);
Y_VERIFY(!res);
}
- Y_VERIFY(Requests.empty() || !WriteQuota->CanExaust() || WaitingForPreviousBlobQuota()); //in this case all writes must be processed or no quota left
+ Y_VERIFY(Requests.empty() || !WriteQuota->CanExaust(now) || WaitingForPreviousBlobQuota() || WaitingForSubDomainQuota(ctx)); //in this case all writes must be processed or no quota left
AnswerCurrentWrites(ctx); //in case if all writes are already done - no answer will be called on kv write, no kv write at all
BecomeIdle(ctx);
return;
@@ -5567,7 +5536,7 @@ void TPartition::ProcessRead(const TActorContext& ctx, TReadInfo&& info, const u
userInfo.ForgetSubscription(ctx.Now());
}
- if (!userInfo.ReadQuota.CanExaust()) {
+ if (!userInfo.ReadQuota.CanExaust(ctx.Now())) {
userInfo.ReadRequests.push_back({std::move(info), cookie});
userInfo.UpdateReadingTimeAndState(ctx.Now());
return;
@@ -5603,7 +5572,6 @@ void TPartition::ProcessRead(const TActorContext& ctx, TReadInfo&& info, const u
TabletCounters.Percentile()[COUNTER_LATENCY_PQ_READ_HEAD_ONLY].IncrementFor((ctx.Now() - info.Timestamp).MilliSeconds());
TabletCounters.Cumulative()[COUNTER_PQ_READ_BYTES].Increment(resp.ByteSize());
ctx.Send(info.Destination != 0 ? Tablet : ctx.SelfID, answer.Event.Release());
- ReportCounters(ctx);
OnReadRequestFinished(std::move(info), answer.Size);
return;
}
@@ -5694,6 +5662,10 @@ bool TPartition::WaitingForPreviousBlobQuota() const {
return TopicQuotaRequestCookie != 0;
}
+bool TPartition::WaitingForSubDomainQuota(const TActorContext& ctx, const ui64 withSize) const {
+ return SubDomainOutOfSpace && AppData()->FeatureFlags.GetEnableTopicDiskSubDomainQuota() && MeteringDataSize(ctx) + withSize > ReserveSize();
+}
+
void TPartition::WriteBlobWithQuota(THolder<TEvKeyValue::TEvRequest>&& request) {
// Request quota and write blob.
// Mirrored topics are not quoted in local dc.
@@ -5731,4 +5703,29 @@ bool TPartition::IsQuotingEnabled() const
IsLocalDC);
}
+void TPartition::Handle(TEvPQ::TEvSubDomainStatus::TPtr& ev, const TActorContext& ctx)
+{
+ const TEvPQ::TEvSubDomainStatus& event = *ev->Get();
+
+ bool statusChanged = SubDomainOutOfSpace != event.SubDomainOutOfSpace();
+ SubDomainOutOfSpace = event.SubDomainOutOfSpace();
+
+ if (statusChanged) {
+ LOG_INFO_S(
+ ctx, NKikimrServices::PERSQUEUE,
+ "SubDomainOutOfSpace was changed." <<
+ " Topic: \"" << TopicConverter->GetClientsideName() << "\"." <<
+ " Partition: " << Partition << "." <<
+ " SubDomainOutOfSpace: " << SubDomainOutOfSpace
+ );
+
+ if (!SubDomainOutOfSpace) {
+ if (CurrentStateFunc() == &TThis::StateIdle) {
+ HandleWrites(ctx);
+ }
+ }
+ }
+}
+
+
} // namespace NKikimr::NPQ
diff --git a/ydb/core/persqueue/partition.h b/ydb/core/persqueue/partition.h
index 815d83f8ee..ad73f4cc97 100644
--- a/ydb/core/persqueue/partition.h
+++ b/ydb/core/persqueue/partition.h
@@ -1,20 +1,24 @@
#pragma once
-#include <util/generic/set.h>
-
-#include <library/cpp/actors/core/actor.h>
-#include <library/cpp/actors/core/hfunc.h>
-#include <library/cpp/actors/core/log.h>
-#include <library/cpp/sliding_window/sliding_window.h>
-#include <ydb/core/keyvalue/keyvalue_events.h>
-#include <ydb/library/persqueue/counter_time_keeper/counter_time_keeper.h>
#include "blob.h"
#include "header.h"
#include "key.h"
#include "partition_types.h"
+#include "quota_tracker.h"
#include "sourceid.h"
#include "subscriber.h"
#include "user_info.h"
+#include "utils.h"
+
+#include <ydb/core/keyvalue/keyvalue_events.h>
+#include <ydb/library/persqueue/counter_time_keeper/counter_time_keeper.h>
+
+#include <library/cpp/actors/core/actor.h>
+#include <library/cpp/actors/core/hfunc.h>
+#include <library/cpp/actors/core/log.h>
+#include <library/cpp/sliding_window/sliding_window.h>
+
+#include <util/generic/set.h>
namespace NKikimr::NPQ {
@@ -73,7 +77,7 @@ private:
void ReplyOk(const TActorContext& ctx, const ui64 dst);
void ReplyOwnerOk(const TActorContext& ctx, const ui64 dst, const TString& ownerCookie);
- void ReplyWrite(const TActorContext& ctx, ui64 dst, const TString& sourceId, ui64 seqNo, ui16 partNo, ui16 totalParts, ui64 offset, TInstant writeTimestamp, bool already, ui64 maxSeqNo, ui64 partitionQuotedTime, TDuration topicQuotedTime, ui64 queueTime, ui64 writeTime);
+ void ReplyWrite(const TActorContext& ctx, ui64 dst, const TString& sourceId, ui64 seqNo, ui16 partNo, ui16 totalParts, ui64 offset, TInstant writeTimestamp, bool already, ui64 maxSeqNo, TDuration partitionQuotedTime, TDuration topicQuotedTime, TDuration queueTime, TDuration writeTime);
void AddNewWriteBlob(std::pair<TKey, ui32>& res, TEvKeyValue::TEvRequest* request, bool headCleared, const TActorContext& ctx);
void AnswerCurrentWrites(const TActorContext& ctx);
@@ -118,6 +122,7 @@ private:
void Handle(TEvPersQueue::TEvReportPartitionError::TPtr& ev, const TActorContext& ctx);
void Handle(TEvQuota::TEvClearance::TPtr& ev, const TActorContext& ctx);
void Handle(TEvents::TEvPoisonPill::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPQ::TEvSubDomainStatus::TPtr& ev, const TActorContext& ctx);
void HandleDataRangeRead(const NKikimrClient::TKeyValueResponse::TReadRangeResult& range, const TActorContext& ctx);
void HandleDataRead(const NKikimrClient::TResponse& range, const TActorContext& ctx);
void HandleGetDiskStatus(const NKikimrClient::TResponse& res, const TActorContext& ctx);
@@ -183,8 +188,9 @@ private:
bool CleanUp(TEvKeyValue::TEvRequest* request, bool hasWrites, const TActorContext& ctx);
bool CleanUpBlobs(TEvKeyValue::TEvRequest *request, bool hasWrites, const TActorContext& ctx);
bool IsQuotingEnabled() const;
- bool ProcessWrites(TEvKeyValue::TEvRequest* request, const TActorContext& ctx);
+ bool ProcessWrites(TEvKeyValue::TEvRequest* request, TInstant now, const TActorContext& ctx);
bool WaitingForPreviousBlobQuota() const;
+ bool WaitingForSubDomainQuota(const TActorContext& ctx, const ui64 withSize = 0) const;
size_t GetQuotaRequestSize(const TEvKeyValue::TEvRequest& request);
std::pair<TInstant, TInstant> GetTime(const TUserInfo& userInfo, ui64 offset) const;
std::pair<TKey, ui32> Compact(const TKey& key, const ui32 size, bool headCleared);
@@ -222,7 +228,7 @@ private:
void ProcessUserAct(TEvPQ::TEvSetClientInfo& act,
const TActorContext& ctx);
void EmulatePostProcessUserAct(const TEvPQ::TEvSetClientInfo& act,
- TUserInfo& userInfo,
+ TUserInfoBase& userInfo,
const TActorContext& ctx);
void ScheduleReplyOk(const ui64 dst);
@@ -248,9 +254,9 @@ private:
void AddCmdWriteUserInfos(NKikimrClient::TKeyValueRequest& request);
void AddCmdDeleteRange(NKikimrClient::TKeyValueRequest& request,
const TKeyPrefix& ikey, const TKeyPrefix& ikeyDeprecated);
-
- TUserInfo& GetOrCreatePendingUser(const TString& user, const TActorContext& ctx, TMaybe<ui64> readRuleGeneration = {});
- TUserInfo* GetPendingUserIfExists(const TString& user);
+
+ TUserInfoBase& GetOrCreatePendingUser(const TString& user, TMaybe<ui64> readRuleGeneration = {});
+ TUserInfoBase* GetPendingUserIfExists(const TString& user);
THolder<TEvPQ::TEvProxyResponse> MakeReplyOk(const ui64 dst);
THolder<TEvPQ::TEvProxyResponse> MakeReplyGetClientOffsetOk(const ui64 dst,
@@ -278,6 +284,12 @@ private:
void InitPendingUserInfoForImportantClients(const TEvPQ::TEvChangePartitionConfig& event,
const TActorContext& ctx);
+ template <typename T>
+ void EmplaceRequest(T&& body, const TActorContext& ctx) {
+ Requests.emplace_back(body, WriteQuota->GetQuotedTime(ctx.Now()), ctx.Now() - TInstant::Zero());
+ }
+ void EmplaceResponse(TMessage&& message, const TActorContext& ctx);
+
public:
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
return NKikimrServices::TActivity::PERSQUEUE_PARTITION_ACTOR;
@@ -285,12 +297,26 @@ public:
TPartition(ui64 tabletId, ui32 partition, const TActorId& tablet, const TActorId& blobCache,
const NPersQueue::TTopicConverterPtr& topicConverter, bool isLocalDC, TString dcId, bool isServerless,
- const NKikimrPQ::TPQTabletConfig& config, const TTabletCountersBase& counters,
+ const NKikimrPQ::TPQTabletConfig& config, const TTabletCountersBase& counters, bool SubDomainOutOfSpace,
bool newPartition = false,
TVector<TTransaction> distrTxs = {});
void Bootstrap(const TActorContext& ctx);
+ ui64 Size() const {
+ return BodySize + Head.PackedSize;
+ }
+
+ ui64 MeteringDataSize(const TActorContext& ctx) const;
+
+ ui64 UsedReserveSize(const TActorContext& ctx) const {
+ return std::min<ui64>(MeteringDataSize(ctx), ReserveSize());
+ }
+
+ ui64 ReserveSize() const {
+ return TopicPartitionReserveSize(Config);
+ }
+
//Bootstrap sends kvRead
//Become StateInit
@@ -336,6 +362,7 @@ private:
HFuncTraced(TEvPQ::TEvMirrorerCounters, Handle);
HFuncTraced(NReadSpeedLimiterEvents::TEvCounters, Handle);
HFuncTraced(TEvPQ::TEvGetPartitionClientInfo, Handle);
+ HFuncTraced(TEvPQ::TEvSubDomainStatus, Handle);
default:
LOG_ERROR_S(ctx, NKikimrServices::PERSQUEUE, "Unexpected " << EventStr("StateInit", ev));
break;
@@ -386,6 +413,7 @@ private:
HFuncTraced(TEvPQ::TEvTxCalcPredicate, Handle);
HFuncTraced(TEvPQ::TEvTxCommit, Handle);
HFuncTraced(TEvPQ::TEvTxRollback, Handle);
+ HFuncTraced(TEvPQ::TEvSubDomainStatus, Handle);
default:
LOG_ERROR_S(ctx, NKikimrServices::PERSQUEUE, "Unexpected " << EventStr("StateIdle", ev));
@@ -438,6 +466,7 @@ private:
HFuncTraced(TEvPQ::TEvTxCalcPredicate, Handle);
HFuncTraced(TEvPQ::TEvTxCommit, Handle);
HFuncTraced(TEvPQ::TEvTxRollback, Handle);
+ HFuncTraced(TEvPQ::TEvSubDomainStatus, Handle);
default:
LOG_ERROR_S(ctx, NKikimrServices::PERSQUEUE, "Unexpected " << EventStr("StateWrite", ev));
@@ -515,10 +544,7 @@ private:
std::deque<TSimpleSharedPtr<TEvPersQueue::TEvProposeTransaction>> ImmediateTxs;
std::deque<TTransaction> DistrTxs;
THashMap<TString, size_t> UserActCount;
- THashMap<TString, TUserInfo> PendingUsersInfo;
- THashMap<TString, TInstant> PendingReadFromTimestamp;
- THashMap<TString, bool> PendingSetImportant;
- THashSet<TString> PendingHasReadRule;
+ THashMap<TString, TUserInfoBase> PendingUsersInfo;
TVector<std::pair<TActorId, std::unique_ptr<IEventBase>>> Replies;
THashSet<TString> AffectedUsers;
bool UsersInfoWriteInProgress = false;
@@ -567,6 +593,7 @@ private:
TInstant CurrentTimestamp;
bool DiskIsFull;
+ bool SubDomainOutOfSpace;
TSet<THasDataReq> HasDataRequests;
TSet<THasDataDeadline> HasDataDeadlines;
diff --git a/ydb/core/persqueue/partition_types.h b/ydb/core/persqueue/partition_types.h
index 9b709c990c..0dbe4d8af7 100644
--- a/ydb/core/persqueue/partition_types.h
+++ b/ydb/core/persqueue/partition_types.h
@@ -68,16 +68,16 @@ struct TMessage {
TSplitMessageGroupMsg
> Body;
- ui64 QuotedTime;
- ui64 QueueTime;
- ui64 WriteTime;
+ TDuration QuotedTime; // baseline for request and duration for response
+ TDuration QueueTime; // baseline for request and duration for response
+ TInstant WriteTimeBaseline;
template <typename T>
- explicit TMessage(T&& body, ui64 quotedTime, ui64 queueTime, ui64 writeTime)
+ explicit TMessage(T&& body, TDuration quotedTime, TDuration queueTime, TInstant writeTimeBaseline = TInstant::Zero())
: Body(std::forward<T>(body))
, QuotedTime(quotedTime)
, QueueTime(queueTime)
- , WriteTime(writeTime)
+ , WriteTimeBaseline(writeTimeBaseline)
{
}
diff --git a/ydb/core/persqueue/pq_impl.cpp b/ydb/core/persqueue/pq_impl.cpp
index 38682b6379..9ef7cc86fe 100644
--- a/ydb/core/persqueue/pq_impl.cpp
+++ b/ydb/core/persqueue/pq_impl.cpp
@@ -179,7 +179,7 @@ private:
if (rr->GetSeqNo() != res.GetResult(i).GetSeqNo() || rr->GetPartNo() + 1 != res.GetResult(i).GetPartNo()) {
LOG_CRIT_S(ctx, NKikimrServices::PERSQUEUE, "Handle TEvRead tablet: " << Tablet
<< " last read pos (seqno/parno): " << rr->GetSeqNo() << "," << rr->GetPartNo() << " readed now "
- << res.GetResult(i).GetSeqNo() << ", " << res.GetResult(i).GetPartNo()
+ << res.GetResult(i).GetSeqNo() << ", " << res.GetResult(i).GetPartNo()
<< " full request(now): " << Request);
}
Y_VERIFY(rr->GetSeqNo() == res.GetResult(i).GetSeqNo());
@@ -375,11 +375,12 @@ public:
return NKikimrServices::TActivity::PERSQUEUE_ANS_ACTOR;
}
- TBuilderProxy(const ui64 tabletId, const TActorId& sender, const ui32 count)
+ TBuilderProxy(const ui64 tabletId, const TActorId& sender, const ui32 count, const ui64 cookie)
: TabletId(tabletId)
, Sender(sender)
, Waiting(count)
, Result()
+ , Cookie(cookie)
{}
void Bootstrap(const TActorContext& ctx)
@@ -405,7 +406,7 @@ private:
for (const auto& p : Result) {
resp.AddPartResult()->CopyFrom(p);
}
- ctx.Send(Sender, res.Release());
+ ctx.Send(Sender, res.Release(), 0, Cookie);
TThis::Die(ctx);
}
@@ -434,6 +435,7 @@ private:
TActorId Sender;
ui32 Waiting;
TVector<typename T2::TPartResult> Result;
+ ui64 Cookie;
};
@@ -441,17 +443,17 @@ TActorId CreateOffsetsProxyActor(const ui64 tabletId, const TActorId& sender, co
{
return ctx.Register(new TBuilderProxy<TEvPQ::TEvPartitionOffsetsResponse,
NKikimrPQ::TOffsetsResponse,
- TEvPersQueue::TEvOffsetsResponse>(tabletId, sender, count));
+ TEvPersQueue::TEvOffsetsResponse>(tabletId, sender, count, 0));
}
/******************************************************* StatusProxy *********************************************************/
-TActorId CreateStatusProxyActor(const ui64 tabletId, const TActorId& sender, const ui32 count, const TActorContext& ctx)
+TActorId CreateStatusProxyActor(const ui64 tabletId, const TActorId& sender, const ui32 count, const ui64 cookie, const TActorContext& ctx)
{
return ctx.Register(new TBuilderProxy<TEvPQ::TEvPartitionStatusResponse,
NKikimrPQ::TStatusResponse,
- TEvPersQueue::TEvStatusResponse>(tabletId, sender, count));
+ TEvPersQueue::TEvStatusResponse>(tabletId, sender, count, cookie));
}
/******************************************************* MonitoringProxy *********************************************************/
@@ -661,7 +663,7 @@ void TPersQueue::ApplyNewConfigAndReply(const TActorContext& ctx)
Partitions.emplace(partitionId, TPartitionInfo(
ctx.Register(new TPartition(TabletID(), partitionId, ctx.SelfID, CacheActor, TopicConverter,
IsLocalDC, DCId, IsServerless, Config, *Counters,
- true)),
+ false, true)),
GetPartitionKeyRange(partition),
true,
*Counters
@@ -780,7 +782,7 @@ void TPersQueue::ReadConfig(const NKikimrClient::TKeyValueResponse::TReadResult&
const auto partitionId = partition.GetPartitionId();
Partitions.emplace(partitionId, TPartitionInfo(
ctx.Register(new TPartition(TabletID(), partitionId, ctx.SelfID, CacheActor, TopicConverter,
- IsLocalDC, DCId, IsServerless, Config, *Counters,
+ IsLocalDC, DCId, IsServerless, Config, *Counters, SubDomainOutOfSpace,
false)),
GetPartitionKeyRange(partition),
false,
@@ -1440,7 +1442,7 @@ void TPersQueue::Handle(TEvPersQueue::TEvStatus::TPtr& ev, const TActorContext&
cnt += p.second.InitDone;
}
- TActorId ans = CreateStatusProxyActor(TabletID(), ev->Sender, cnt, ctx);
+ TActorId ans = CreateStatusProxyActor(TabletID(), ev->Sender, cnt, ev->Cookie, ctx);
for (auto& p : Partitions) {
if (!p.second.InitDone)
continue;
@@ -1538,7 +1540,8 @@ void TPersQueue::HandleSetClientOffsetRequest(const ui64 responseCookie, const T
InitResponseBuilder(responseCookie, 1, COUNTER_LATENCY_PQ_SET_OFFSET);
THolder<TEvPQ::TEvSetClientInfo> event = MakeHolder<TEvPQ::TEvSetClientInfo>(responseCookie, cmd.GetClientId(),
cmd.GetOffset(),
- cmd.HasSessionId() ? cmd.GetSessionId() : "", 0, 0);
+ cmd.HasSessionId() ? cmd.GetSessionId() : "", 0, 0,
+ TEvPQ::TEvSetClientInfo::ESCI_OFFSET, 0, cmd.GetStrict());
ctx.Send(partActor, event.Release());
}
}
@@ -2260,6 +2263,16 @@ void TPersQueue::Handle(TEvPersQueue::TEvProposeTransaction::TPtr& ev, const TAc
}
}
+void TPersQueue::Handle(TEvPQ::TEvSubDomainStatus::TPtr& ev, const TActorContext& ctx)
+{
+ const TEvPQ::TEvSubDomainStatus& event = *ev->Get();
+ SubDomainOutOfSpace = event.SubDomainOutOfSpace();
+
+ for (auto& p : Partitions) {
+ ctx.Send(p.second.Actor, new TEvPQ::TEvSubDomainStatus(event.SubDomainOutOfSpace()));
+ }
+}
+
bool TPersQueue::HandleHook(STFUNC_SIG)
{
SetActivityType(NKikimrServices::TActivity::PERSQUEUE_ACTOR);
@@ -2288,6 +2301,7 @@ bool TPersQueue::HandleHook(STFUNC_SIG)
CFunc(TEvents::TSystem::Wakeup, HandleWakeup);
HFuncTraced(TEvPersQueue::TEvProposeTransaction, Handle);
HFuncTraced(TEvPQ::TEvPartitionConfigChanged, Handle);
+ HFuncTraced(TEvPQ::TEvSubDomainStatus, Handle);
default:
return false;
}
diff --git a/ydb/core/persqueue/pq_impl.h b/ydb/core/persqueue/pq_impl.h
index 407474fca6..3150debc3b 100644
--- a/ydb/core/persqueue/pq_impl.h
+++ b/ydb/core/persqueue/pq_impl.h
@@ -72,6 +72,7 @@ class TPersQueue : public NKeyValue::TKeyValueFlat {
void Handle(TEvPersQueue::TEvDropTablet::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPersQueue::TEvHasDataInfo::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPersQueue::TEvPartitionClientInfo::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPQ::TEvSubDomainStatus::TPtr& ev, const TActorContext& ctx);
bool OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr ev, const TActorContext& ctx) override;
@@ -185,6 +186,8 @@ private:
NMetrics::TResourceMetrics *ResourceMetrics;
TMeteringSink MeteringSink;
+
+ bool SubDomainOutOfSpace = false;
};
diff --git a/ydb/core/persqueue/quota_tracker.cpp b/ydb/core/persqueue/quota_tracker.cpp
new file mode 100644
index 0000000000..9d8d0722cf
--- /dev/null
+++ b/ydb/core/persqueue/quota_tracker.cpp
@@ -0,0 +1,52 @@
+#include "quota_tracker.h"
+
+
+namespace NKikimr::NPQ {
+ TQuotaTracker::TQuotaTracker(const ui64 maxBurst, const ui64 speedPerSecond, const TInstant timestamp)
+ : AvailableSize(maxBurst)
+ , SpeedPerSecond(speedPerSecond)
+ , LastUpdateTime(timestamp)
+ , MaxBurst(maxBurst)
+ {}
+
+ void TQuotaTracker::UpdateConfig(const ui64 maxBurst, const ui64 speedPerSecond) {
+ SpeedPerSecond = speedPerSecond;
+ MaxBurst = maxBurst;
+ AvailableSize = maxBurst;
+ }
+
+ void TQuotaTracker::Update(const TInstant timestamp) {
+ TDuration diff = timestamp - LastUpdateTime;
+ LastUpdateTime = timestamp;
+
+ if (AvailableSize < 0) {
+ QuotedTime += diff;
+ }
+
+ AvailableSize = Min<i64>(AvailableSize + (ui64)SpeedPerSecond * diff.MicroSeconds() / 1000'000, MaxBurst);
+ }
+
+ bool TQuotaTracker::CanExaust(const TInstant timestamp) {
+ Update(timestamp);
+ return AvailableSize > 0;
+ }
+
+ void TQuotaTracker::Exaust(const ui64 size, const TInstant timestamp) {
+ Update(timestamp);
+ AvailableSize -= (i64)size;
+ Update(timestamp);
+ }
+
+ TDuration TQuotaTracker::GetQuotedTime(const TInstant timestamp) {
+ Update(timestamp);
+ return QuotedTime;
+ }
+
+ ui64 TQuotaTracker::GetTotalSpeed() const {
+ return SpeedPerSecond;
+ }
+
+} // NKikimr::NPQ
+
+
+
diff --git a/ydb/core/persqueue/quota_tracker.h b/ydb/core/persqueue/quota_tracker.h
new file mode 100644
index 0000000000..82dcfba9ec
--- /dev/null
+++ b/ydb/core/persqueue/quota_tracker.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <util/datetime/base.h>
+
+
+namespace NKikimr::NPQ {
+ class TQuotaTracker {
+ public:
+ TQuotaTracker(const ui64 maxBurst, const ui64 speedPerSecond, const TInstant timestamp);
+
+ void UpdateConfig(const ui64 maxBurst, const ui64 speedPerSecond);
+ void Update(const TInstant timestamp);
+
+ bool CanExaust(const TInstant timestamp) ;
+ void Exaust(const ui64 size, const TInstant timestamp);
+
+ TDuration GetQuotedTime(const TInstant timestamp);
+ ui64 GetTotalSpeed() const;
+
+ private:
+ i64 AvailableSize;
+ ui64 SpeedPerSecond;
+ TInstant LastUpdateTime;
+ ui64 MaxBurst;
+
+ TDuration QuotedTime;
+ };
+
+} // NKikimr::NPQ
diff --git a/ydb/core/persqueue/read_balancer.cpp b/ydb/core/persqueue/read_balancer.cpp
index 89676eef2e..2491ddc335 100644
--- a/ydb/core/persqueue/read_balancer.cpp
+++ b/ydb/core/persqueue/read_balancer.cpp
@@ -1,4 +1,6 @@
#include "read_balancer.h"
+
+#include <ydb/core/persqueue/events/internal.h>
#include <ydb/core/tablet/tablet_exception.h>
#include <library/cpp/monlib/service/pages/templates.h>
#include <library/cpp/string_utils/base64/base64.h>
@@ -47,6 +49,11 @@ bool TPersQueueReadBalancer::TTxInit::Execute(TTransactionContext& txc, const TA
Self->SchemeShardId = dataRowset.GetValueOrDefault<Schema::Data::SchemeShardId>(0);
Self->NextPartitionId = dataRowset.GetValueOrDefault<Schema::Data::NextPartitionId>(0);
+ ui64 subDomainPathId = dataRowset.GetValueOrDefault<Schema::Data::SubDomainPathId>(0);
+ if (subDomainPathId) {
+ Self->SubDomainPathId.emplace(Self->SchemeShardId, subDomainPathId);
+ }
+
TString config = dataRowset.GetValueOrDefault<Schema::Data::Config>("");
if (!config.empty()) {
bool res = Self->TabletConfig.ParseFromString(config);
@@ -66,6 +73,9 @@ bool TPersQueueReadBalancer::TTxInit::Execute(TTransactionContext& txc, const TA
ui32 part = partsRowset.GetValue<Schema::Partitions::Partition>();
ui64 tabletId = partsRowset.GetValue<Schema::Partitions::TabletId>();
Self->PartitionsInfo[part] = {tabletId, EPartitionState::EPS_FREE, TActorId(), part + 1};
+ Self->AggregatedStats.AggrStats(part, partsRowset.GetValue<Schema::Partitions::DataSize>(),
+ partsRowset.GetValue<Schema::Partitions::UsedReserveSize>());
+
if (!partsRowset.Next())
return false;
}
@@ -134,7 +144,8 @@ bool TPersQueueReadBalancer::TTxWrite::Execute(TTransactionContext& txc, const T
NIceDb::TUpdate<Schema::Data::MaxPartsPerTablet>(Self->MaxPartsPerTablet),
NIceDb::TUpdate<Schema::Data::SchemeShardId>(Self->SchemeShardId),
NIceDb::TUpdate<Schema::Data::NextPartitionId>(Self->NextPartitionId),
- NIceDb::TUpdate<Schema::Data::Config>(config));
+ NIceDb::TUpdate<Schema::Data::Config>(config),
+ NIceDb::TUpdate<Schema::Data::SubDomainPathId>(Self->SubDomainPathId ? Self->SubDomainPathId->LocalPathId : 0));
for (auto& p : DeletedPartitions) {
db.Table<Schema::Partitions>().Key(p).Delete();
}
@@ -174,6 +185,37 @@ void TPersQueueReadBalancer::TTxWrite::Complete(const TActorContext &ctx) {
Self->InitDone(ctx);
}
+struct TPersQueueReadBalancer::TTxWritePartitionStats : public ITransaction {
+ TPersQueueReadBalancer * const Self;
+
+ TTxWritePartitionStats(TPersQueueReadBalancer *self)
+ : Self(self)
+ {}
+
+ bool Execute(TTransactionContext& txc, const TActorContext&) override {
+ Self->TTxWritePartitionStatsScheduled = false;
+
+ NIceDb::TNiceDb db(txc.DB);
+ for (auto& s : Self->AggregatedStats.Stats) {
+ auto partition = s.first;
+ auto& stats = s.second;
+
+ auto it = Self->PartitionsInfo.find(partition);
+ if (it == Self->PartitionsInfo.end()) {
+ continue;
+ }
+
+ db.Table<Schema::Partitions>().Key(partition).Update(
+ NIceDb::TUpdate<Schema::Partitions::DataSize>(stats.DataSize),
+ NIceDb::TUpdate<Schema::Partitions::UsedReserveSize>(stats.UsedReserveSize)
+ );
+ }
+
+ return true;
+ }
+
+ void Complete(const TActorContext&) override {};
+};
bool TPersQueueReadBalancer::OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr ev, const TActorContext& ctx) {
if (!ev) {
@@ -186,6 +228,7 @@ bool TPersQueueReadBalancer::OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr e
}
TString TPersQueueReadBalancer::GenerateStat() {
+ auto& metrics = AggregatedStats.Metrics;
TStringStream str;
HTML(str) {
TAG(TH2) {str << "PersQueueReadBalancer Tablet";}
@@ -195,10 +238,13 @@ TString TPersQueueReadBalancer::GenerateStat() {
TAG(TH3) {str << "ActivePipes: " << PipesInfo.size();}
if (Inited) {
TAG(TH3) {str << "Active partitions: " << NumActiveParts;}
- TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedSec: " << TotalAvgSpeedSec << "/" << MaxAvgSpeedSec << "/" << TotalAvgSpeedSec / NumActiveParts;}
- TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedMin: " << TotalAvgSpeedMin << "/" << MaxAvgSpeedMin << "/" << TotalAvgSpeedMin / NumActiveParts;}
- TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedHour: " << TotalAvgSpeedHour << "/" << MaxAvgSpeedHour << "/" << TotalAvgSpeedHour / NumActiveParts;}
- TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedDay: " << TotalAvgSpeedDay << "/" << MaxAvgSpeedDay << "/" << TotalAvgSpeedDay / NumActiveParts;}
+ TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedSec: " << metrics.TotalAvgWriteSpeedPerSec << "/" << metrics.MaxAvgWriteSpeedPerSec << "/" << metrics.TotalAvgWriteSpeedPerSec / NumActiveParts;}
+ TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedMin: " << metrics.TotalAvgWriteSpeedPerMin << "/" << metrics.MaxAvgWriteSpeedPerMin << "/" << metrics.TotalAvgWriteSpeedPerMin / NumActiveParts;}
+ TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedHour: " << metrics.TotalAvgWriteSpeedPerHour << "/" << metrics.MaxAvgWriteSpeedPerHour << "/" << metrics.TotalAvgWriteSpeedPerHour / NumActiveParts;}
+ TAG(TH3) {str << "[Total/Max/Avg]WriteSpeedDay: " << metrics.TotalAvgWriteSpeedPerDay << "/" << metrics.MaxAvgWriteSpeedPerDay << "/" << metrics.TotalAvgWriteSpeedPerDay / NumActiveParts;}
+ TAG(TH3) {str << "TotalDataSize: " << AggregatedStats.TotalDataSize;}
+ TAG(TH3) {str << "ReserveSize: " << PartitionReserveSize();}
+ TAG(TH3) {str << "TotalUsedReserveSize: " << AggregatedStats.TotalUsedReserveSize;}
}
UL_CLASS("nav nav-tabs") {
@@ -479,6 +525,9 @@ void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvUpdateBalancerConfig::TPtr
ui32 prevNextPartitionId = NextPartitionId;
NextPartitionId = record.HasNextPartitionId() ? record.GetNextPartitionId() : 0;
THashMap<ui32, TPartitionInfo> partitionsInfo;
+ if (record.HasSubDomainPathId()) {
+ SubDomainPathId.emplace(record.GetSchemeShardId(), record.GetSubDomainPathId());
+ }
Consumers.clear();
for (const auto& rr : TabletConfig.GetReadRules()) {
@@ -565,6 +614,10 @@ void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvUpdateBalancerConfig::TPtr
RebuildStructs();
Execute(new TTxWrite(this, std::move(deletedPartitions), std::move(newPartitions), std::move(newTablets), std::move(newGroups), std::move(reallocatedTablets)), ctx);
+
+ if (SubDomainPathId && (!WatchingSubDomainPathId || *WatchingSubDomainPathId != *SubDomainPathId)) {
+ StartWatchingSubDomainPathId();
+ }
}
@@ -624,15 +677,10 @@ void TPersQueueReadBalancer::RestartPipe(const ui64 tabletId, const TActorContex
}
}
-
-void TPersQueueReadBalancer::RequestTabletIfNeeded(const ui64 tabletId, const TActorContext& ctx)
-{
- if ((tabletId == SchemeShardId && !WaitingForACL) ||
- (tabletId != SchemeShardId && !WaitingForStat.contains(tabletId)))
- return;
+TActorId TPersQueueReadBalancer::GetPipeClient(const ui64 tabletId, const TActorContext& ctx) {
+ TActorId pipeClient;
auto it = TabletPipes.find(tabletId);
- TActorId pipeClient;
if (it == TabletPipes.end()) {
NTabletPipe::TClientConfig clientConfig;
pipeClient = ctx.RegisterWithSameMailbox(NTabletPipe::CreateClient(ctx.SelfID, tabletId, clientConfig));
@@ -640,36 +688,99 @@ void TPersQueueReadBalancer::RequestTabletIfNeeded(const ui64 tabletId, const TA
} else {
pipeClient = it->second;
}
+
+ return pipeClient;
+}
+
+void TPersQueueReadBalancer::RequestTabletIfNeeded(const ui64 tabletId, const TActorContext& ctx)
+{
+ if ((tabletId == SchemeShardId && !WaitingForACL) ||
+ (tabletId != SchemeShardId && AggregatedStats.Cookies.contains(tabletId))) {
+ return;
+ }
+
+ TActorId pipeClient = GetPipeClient(tabletId, ctx);
if (tabletId == SchemeShardId) {
NTabletPipe::SendData(ctx, pipeClient, new NSchemeShard::TEvSchemeShard::TEvDescribeScheme(tabletId, PathId));
} else {
- NTabletPipe::SendData(ctx, pipeClient, new TEvPersQueue::TEvStatus());
+ ui64 cookie = ++AggregatedStats.NextCookie;
+ AggregatedStats.Cookies[tabletId] = cookie;
+ NTabletPipe::SendData(ctx, pipeClient, new TEvPersQueue::TEvStatus(), cookie);
+ NTabletPipe::SendData(ctx, pipeClient, new TEvPQ::TEvSubDomainStatus(SubDomainOutOfSpace));
}
}
-void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvStatusResponse::TPtr& ev, const TActorContext& ctx)
-{
+void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvStatusResponse::TPtr& ev, const TActorContext& ctx) {
const auto& record = ev->Get()->Record;
ui64 tabletId = record.GetTabletId();
- bool res = WaitingForStat.erase(tabletId);
- if (!res) //ignore if already processed
+ ui64 cookie = ev->Cookie;
+
+ if ((0 != cookie && cookie != AggregatedStats.Cookies[tabletId]) || (0 == cookie && !AggregatedStats.Cookies.contains(tabletId))) {
return;
+ }
+
+ AggregatedStats.Cookies.erase(tabletId);
+
for (const auto& partRes : record.GetPartResult()) {
- TotalAvgSpeedSec += partRes.GetAvgWriteSpeedPerSec();
- MaxAvgSpeedSec = Max<ui64>(MaxAvgSpeedSec, partRes.GetAvgWriteSpeedPerSec());
- TotalAvgSpeedMin += partRes.GetAvgWriteSpeedPerMin();
- MaxAvgSpeedMin = Max<ui64>(MaxAvgSpeedMin, partRes.GetAvgWriteSpeedPerMin());
- TotalAvgSpeedHour += partRes.GetAvgWriteSpeedPerHour();
- MaxAvgSpeedHour = Max<ui64>(MaxAvgSpeedHour, partRes.GetAvgWriteSpeedPerHour());
- TotalAvgSpeedDay += partRes.GetAvgWriteSpeedPerDay();
- MaxAvgSpeedDay = Max<ui64>(MaxAvgSpeedDay, partRes.GetAvgWriteSpeedPerDay());
- }
- if (WaitingForStat.empty()) {
+ if (!PartitionsInfo.contains(partRes.GetPartition())) {
+ continue;
+ }
+
+ AggregatedStats.AggrStats(partRes.GetPartition(), partRes.GetPartitionSize(), partRes.GetUsedReserveSize());
+ AggregatedStats.AggrStats(partRes.GetAvgWriteSpeedPerSec(), partRes.GetAvgWriteSpeedPerMin(),
+ partRes.GetAvgWriteSpeedPerHour(), partRes.GetAvgWriteSpeedPerDay());
+ }
+ if (AggregatedStats.Cookies.empty()) {
CheckStat(ctx);
}
}
+void TPersQueueReadBalancer::Handle(TEvPQ::TEvStatsWakeup::TPtr& ev, const TActorContext& ctx) {
+ if (AggregatedStats.Round != ev->Get()->Round) {
+ // old message
+ return;
+ }
+
+ if (AggregatedStats.Cookies.empty()) {
+ return;
+ }
+
+ CheckStat(ctx);
+}
+
+void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvStatus::TPtr& ev, const TActorContext&) {
+ Send(ev.Get()->Sender, GetStatsEvent());
+}
+
+void TPersQueueReadBalancer::TAggregatedStats::AggrStats(ui32 partition, ui64 dataSize, ui64 usedReserveSize) {
+ Y_VERIFY(dataSize >= usedReserveSize);
+
+ auto& oldValue = Stats[partition];
+
+ TPartitionStats newValue;
+ newValue.DataSize = dataSize;
+ newValue.UsedReserveSize = usedReserveSize;
+
+ TotalDataSize += (newValue.DataSize - oldValue.DataSize);
+ TotalUsedReserveSize += (newValue.UsedReserveSize - oldValue.UsedReserveSize);
+
+ Y_VERIFY(TotalDataSize >= TotalUsedReserveSize);
+
+ oldValue = newValue;
+}
+
+void TPersQueueReadBalancer::TAggregatedStats::AggrStats(ui64 avgWriteSpeedPerSec, ui64 avgWriteSpeedPerMin, ui64 avgWriteSpeedPerHour, ui64 avgWriteSpeedPerDay) {
+ NewMetrics.TotalAvgWriteSpeedPerSec += avgWriteSpeedPerSec;
+ NewMetrics.MaxAvgWriteSpeedPerSec = Max<ui64>(NewMetrics.MaxAvgWriteSpeedPerSec, avgWriteSpeedPerSec);
+ NewMetrics.TotalAvgWriteSpeedPerMin += avgWriteSpeedPerMin;
+ NewMetrics.MaxAvgWriteSpeedPerMin = Max<ui64>(NewMetrics.MaxAvgWriteSpeedPerMin, avgWriteSpeedPerMin);
+ NewMetrics.TotalAvgWriteSpeedPerHour += avgWriteSpeedPerHour;
+ NewMetrics.MaxAvgWriteSpeedPerHour = Max<ui64>(NewMetrics.MaxAvgWriteSpeedPerHour, avgWriteSpeedPerHour);
+ NewMetrics.TotalAvgWriteSpeedPerDay += avgWriteSpeedPerDay;
+ NewMetrics.MaxAvgWriteSpeedPerDay = Max<ui64>(NewMetrics.MaxAvgWriteSpeedPerDay, avgWriteSpeedPerDay);
+}
+
void TPersQueueReadBalancer::AnswerWaitingRequests(const TActorContext& ctx) {
TVector<TEvPersQueue::TEvCheckACL::TPtr> ww;
ww.swap(WaitingACLRequests);
@@ -682,7 +793,6 @@ void TPersQueueReadBalancer::AnswerWaitingRequests(const TActorContext& ctx) {
for (auto& r : dr) {
Handle(r, ctx);
}
-
}
void TPersQueueReadBalancer::Handle(NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult::TPtr& ev, const TActorContext& ctx) {
@@ -708,22 +818,61 @@ void TPersQueueReadBalancer::CheckStat(const TActorContext& ctx) {
Y_UNUSED(ctx);
//TODO: Deside about changing number of partitions and send request to SchemeShard
//TODO: make AlterTopic request via TX_PROXY
+
+ if (!TTxWritePartitionStatsScheduled) {
+ TTxWritePartitionStatsScheduled = true;
+ Execute(new TTxWritePartitionStats(this));
+ }
+
+ AggregatedStats.Metrics = AggregatedStats.NewMetrics;
+
+ TEvPersQueue::TEvPeriodicTopicStats* ev = GetStatsEvent() ;
+ LOG_DEBUG(ctx, NKikimrServices::PERSQUEUE_READ_BALANCER,
+ TStringBuilder() << "Send TEvPeriodicTopicStats PathId: " << PathId
+ << " Generation: " << Generation
+ << " StatsReportRound: " << StatsReportRound
+ << " DataSize: " << AggregatedStats.TotalDataSize
+ << " UsedReserveSize: " << AggregatedStats.TotalUsedReserveSize);
+
+ NTabletPipe::SendData(ctx, GetPipeClient(SchemeShardId, ctx), ev);
+}
+
+TEvPersQueue::TEvPeriodicTopicStats* TPersQueueReadBalancer::GetStatsEvent() {
+ TEvPersQueue::TEvPeriodicTopicStats* ev = new TEvPersQueue::TEvPeriodicTopicStats();
+ auto& rec = ev->Record;
+ rec.SetPathId(PathId);
+ rec.SetGeneration(Generation);
+ rec.SetRound(++StatsReportRound);
+ rec.SetDataSize(AggregatedStats.TotalDataSize);
+ rec.SetUsedReserveSize(AggregatedStats.TotalUsedReserveSize);
+ rec.SetSubDomainOutOfSpace(SubDomainOutOfSpace);
+
+ return ev;
}
void TPersQueueReadBalancer::GetStat(const TActorContext& ctx) {
- if (!WaitingForStat.empty()) //if there is request infly
- return;
- TotalAvgSpeedSec = MaxAvgSpeedSec = 0;
- TotalAvgSpeedMin = MaxAvgSpeedMin = 0;
- TotalAvgSpeedHour = MaxAvgSpeedHour = 0;
- TotalAvgSpeedDay = MaxAvgSpeedDay = 0;
+ if (!AggregatedStats.Cookies.empty()) {
+ AggregatedStats.Cookies.clear();
+ CheckStat(ctx);
+ }
+
+ TPartitionMetrics newMetrics;
+ AggregatedStats.NewMetrics = newMetrics;
+
for (auto& p : PartitionsInfo) {
const ui64& tabletId = p.second.TabletId;
- bool res = WaitingForStat.insert(tabletId).second;
- if (!res) //already asked stat
+ if (AggregatedStats.Cookies.contains(tabletId)) { //already asked stat
continue;
+ }
RequestTabletIfNeeded(tabletId, ctx);
}
+
+ // TEvStatsWakeup must processed before next TEvWakeup, which send next status request to TPersQueue
+ const auto& config = AppData(ctx)->PQConfig;
+ ui64 delayMs = std::min(config.GetBalancerStatsWakeupIntervalSec() * 1000, config.GetBalancerWakeupIntervalSec() * 500);
+ if (0 < delayMs) {
+ Schedule(TDuration::MilliSeconds(delayMs), new TEvPQ::TEvStatsWakeup(++AggregatedStats.Round));
+ }
}
void TPersQueueReadBalancer::GetACL(const TActorContext& ctx) {
@@ -1197,5 +1346,107 @@ void TPersQueueReadBalancer::TClientGroupInfo::ReleasePartition(const TActorId p
}
+static constexpr TDuration MaxFindSubDomainPathIdDelay = TDuration::Minutes(1);
+
+
+void TPersQueueReadBalancer::StopFindSubDomainPathId() {
+ if (FindSubDomainPathIdActor) {
+ Send(FindSubDomainPathIdActor, new TEvents::TEvPoison);
+ FindSubDomainPathIdActor = { };
+ }
}
+
+
+struct TTxWriteSubDomainPathId : public ITransaction {
+ TPersQueueReadBalancer* const Self;
+
+ TTxWriteSubDomainPathId(TPersQueueReadBalancer* self)
+ : Self(self)
+ {}
+
+ bool Execute(TTransactionContext& txc, const TActorContext&) {
+ NIceDb::TNiceDb db(txc.DB);
+ db.Table<TPersQueueReadBalancer::Schema::Data>().Key(1).Update(
+ NIceDb::TUpdate<TPersQueueReadBalancer::Schema::Data::SubDomainPathId>(Self->SubDomainPathId->LocalPathId));
+ return true;
+ }
+
+ void Complete(const TActorContext&) {
+ }
+};
+
+void TPersQueueReadBalancer::StartFindSubDomainPathId(bool delayFirstRequest) {
+ if (!FindSubDomainPathIdActor &&
+ SchemeShardId != 0 &&
+ (!SubDomainPathId || SubDomainPathId->OwnerId != SchemeShardId))
+ {
+ FindSubDomainPathIdActor = Register(CreateFindSubDomainPathIdActor(SelfId(), TabletID(), SchemeShardId, delayFirstRequest, MaxFindSubDomainPathIdDelay));
+ }
}
+
+void TPersQueueReadBalancer::Handle(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound::TPtr& ev, const TActorContext& ctx) {
+ const auto* msg = ev->Get();
+
+ if (FindSubDomainPathIdActor == ev->Sender) {
+ FindSubDomainPathIdActor = { };
+ }
+
+ if (SchemeShardId == msg->SchemeShardId &&
+ !SubDomainPathId || SubDomainPathId->OwnerId != msg->SchemeShardId)
+ {
+ LOG_DEBUG_S(ctx, NKikimrServices::PERSQUEUE_READ_BALANCER,
+ "Discovered subdomain " << msg->LocalPathId << " at RB " << TabletID());
+
+ SubDomainPathId.emplace(msg->SchemeShardId, msg->LocalPathId);
+ Execute(new TTxWriteSubDomainPathId(this), ctx);
+ StartWatchingSubDomainPathId();
+ }
+}
+
+void TPersQueueReadBalancer::StopWatchingSubDomainPathId() {
+ if (WatchingSubDomainPathId) {
+ Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvWatchRemove());
+ WatchingSubDomainPathId.reset();
+ }
+}
+
+void TPersQueueReadBalancer::StartWatchingSubDomainPathId() {
+ if (!SubDomainPathId || SubDomainPathId->OwnerId != SchemeShardId) {
+ return;
+ }
+
+ if (WatchingSubDomainPathId && *WatchingSubDomainPathId != *SubDomainPathId) {
+ StopWatchingSubDomainPathId();
+ }
+
+ if (!WatchingSubDomainPathId) {
+ Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvWatchPathId(*SubDomainPathId));
+ WatchingSubDomainPathId = *SubDomainPathId;
+ }
+}
+
+void TPersQueueReadBalancer::Handle(TEvTxProxySchemeCache::TEvWatchNotifyUpdated::TPtr& ev, const TActorContext& ctx) {
+ const auto* msg = ev->Get();
+ if (SubDomainPathId && msg->PathId == *SubDomainPathId) {
+ const bool outOfSpace = msg->Result->GetPathDescription()
+ .GetDomainDescription()
+ .GetDomainState()
+ .GetDiskQuotaExceeded();
+
+ LOG_DEBUG_S(ctx, NKikimrServices::PERSQUEUE_READ_BALANCER,
+ "Discovered subdomain " << msg->PathId << " state, outOfSpace = " << outOfSpace
+ << " at RB " << TabletID());
+
+ SubDomainOutOfSpace = outOfSpace;
+
+ for (auto& p : PartitionsInfo) {
+ const ui64& tabletId = p.second.TabletId;
+ TActorId pipeClient = GetPipeClient(tabletId, ctx);
+ NTabletPipe::SendData(ctx, pipeClient, new TEvPQ::TEvSubDomainStatus(outOfSpace));
+ }
+ }
+}
+
+
+} // NPQ
+} // NKikimr
diff --git a/ydb/core/persqueue/read_balancer.h b/ydb/core/persqueue/read_balancer.h
index cd74aa3a8d..c0728debbf 100644
--- a/ydb/core/persqueue/read_balancer.h
+++ b/ydb/core/persqueue/read_balancer.h
@@ -1,5 +1,7 @@
#pragma once
+#include "utils.h"
+
#include <util/system/hp_timer.h>
#include <ydb/core/tablet_flat/tablet_flat_executed.h>
@@ -7,8 +9,10 @@
#include <ydb/core/base/appdata.h>
#include <library/cpp/actors/core/hfunc.h>
#include <ydb/core/persqueue/events/global.h>
+#include <ydb/core/persqueue/events/internal.h>
#include <ydb/core/tablet_flat/flat_dbase_scheme.h>
#include <ydb/core/tablet_flat/flat_cxx_database.h>
+#include <ydb/core/tx/scheme_cache/scheme_cache.h>
#include <ydb/core/tx/schemeshard/schemeshard.h>
#include <ydb/core/engine/minikql/flat_local_tx_factory.h>
#include <ydb/library/persqueue/topic_parser/topic_parser.h>
@@ -58,9 +62,10 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
struct MaxPartsPerTablet : Column<41, NScheme::NTypeIds::Uint32> {};
struct SchemeShardId : Column<42, NScheme::NTypeIds::Uint64> {};
struct NextPartitionId : Column<43, NScheme::NTypeIds::Uint64> {};
+ struct SubDomainPathId : Column<44, NScheme::NTypeIds::Uint64> {};
using TKey = TableKey<Key>;
- using TColumns = TableColumns<Key, PathId, Topic, Path, Version, Config, MaxPartsPerTablet, SchemeShardId, NextPartitionId>;
+ using TColumns = TableColumns<Key, PathId, Topic, Path, Version, Config, MaxPartsPerTablet, SchemeShardId, NextPartitionId, SubDomainPathId>;
};
struct Partitions : Table<33> {
@@ -68,9 +73,11 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
struct TabletId : Column<33, NScheme::NTypeIds::Uint64> {};
struct State : Column<34, NScheme::NTypeIds::Uint32> {};
+ struct DataSize : Column<35, NScheme::NTypeIds::Uint64> {};
+ struct UsedReserveSize : Column<36, NScheme::NTypeIds::Uint64> {};
using TKey = TableKey<Partition>;
- using TColumns = TableColumns<Partition, TabletId, State>;
+ using TColumns = TableColumns<Partition, TabletId, State, DataSize, UsedReserveSize>;
};
struct Groups : Table<34> {
@@ -169,7 +176,6 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
void Complete(const TActorContext &ctx) override;
};
-
friend struct TTxWrite;
void Handle(TEvents::TEvPoisonPill::TPtr&, const TActorContext &ctx) {
@@ -178,9 +184,11 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
}
void HandleWakeup(TEvents::TEvWakeup::TPtr&, const TActorContext &ctx) {
+ LOG_DEBUG(ctx, NKikimrServices::PERSQUEUE_READ_BALANCER, TStringBuilder() << "TPersQueueReadBalancer::HandleWakeup");
+
GetStat(ctx); //TODO: do it only on signals from outerspace right now
- ctx.Schedule(TDuration::Seconds(30), new TEvents::TEvWakeup()); //TODO: remove it
+ ctx.Schedule(TDuration::Seconds(AppData(ctx)->PQConfig.GetBalancerWakeupIntervalSec()), new TEvents::TEvWakeup()); //TODO: remove it
}
void HandleUpdateACL(TEvPersQueue::TEvUpdateACL::TPtr&, const TActorContext &ctx) {
@@ -188,6 +196,9 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
}
void Die(const TActorContext& ctx) override {
+ StopFindSubDomainPathId();
+ StopWatchingSubDomainPathId();
+
for (auto& pipe : TabletPipes) {
NTabletPipe::CloseClient(ctx, pipe.second);
}
@@ -217,6 +228,11 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
}
void InitDone(const TActorContext &ctx) {
+ if (SubDomainPathId) {
+ StartWatchingSubDomainPathId();
+ } else {
+ StartFindSubDomainPathId(true);
+ }
StartPartitionIdForWrite = NextPartitionIdForWrite = rand() % TotalGroups;
@@ -242,7 +258,8 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
}
RegisterEvents.clear();
- ctx.Schedule(TDuration::Seconds(30), new TEvents::TEvWakeup()); //TODO: remove it
+ Y_VERIFY(0 < AppData(ctx)->PQConfig.GetBalancerWakeupIntervalSec());
+ ctx.Schedule(TDuration::Seconds(AppData(ctx)->PQConfig.GetBalancerWakeupIntervalSec()), new TEvents::TEvWakeup()); //TODO: remove it
ctx.Send(ctx.SelfID, new TEvPersQueue::TEvUpdateACL());
}
@@ -268,8 +285,12 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
void Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActorContext&);
void Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext&);
+ void Handle(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvTxProxySchemeCache::TEvWatchNotifyUpdated::TPtr& ev, const TActorContext& ctx);
+
TStringBuilder GetPrefix() const;
+ TActorId GetPipeClient(const ui64 tabletId, const TActorContext&);
void RequestTabletIfNeeded(const ui64 tabletId, const TActorContext&);
void RestartPipe(const ui64 tabletId, const TActorContext&);
void CheckStat(const TActorContext&);
@@ -280,6 +301,7 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
const TActorContext &ctx);
void CheckACL(const TEvPersQueue::TEvCheckACL::TPtr &request, const NACLib::TUserToken& token, const TActorContext &ctx);
void GetStat(const TActorContext&);
+ TEvPersQueue::TEvPeriodicTopicStats* GetStatsEvent();
void GetACL(const TActorContext&);
void AnswerWaitingRequests(const TActorContext& ctx);
@@ -287,12 +309,23 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
void Handle(TEvents::TEvPoisonPill &ev, const TActorContext& ctx);
void Handle(TEvPersQueue::TEvStatusResponse::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPQ::TEvStatsWakeup::TPtr& ev, const TActorContext& ctx);
void Handle(NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPersQueue::TEvStatus::TPtr& ev, const TActorContext& ctx);
void RegisterSession(const TActorId& pipe, const TActorContext& ctx);
struct TPipeInfo;
void UnregisterSession(const TActorId& pipe, const TActorContext& ctx);
void RebuildStructs();
+ ui64 PartitionReserveSize() {
+ return TopicPartitionReserveSize(TabletConfig);
+ }
+
+ void StopFindSubDomainPathId();
+ void StartFindSubDomainPathId(bool delayFirstRequest = true);
+
+ void StopWatchingSubDomainPathId();
+ void StartWatchingSubDomainPathId();
bool Inited;
ui64 PathId;
@@ -421,19 +454,58 @@ class TPersQueueReadBalancer : public TActor<TPersQueueReadBalancer>, public TTa
THashMap<ui64, TActorId> TabletPipes;
- THashSet<ui64> WaitingForStat;
bool WaitingForACL;
- ui64 TotalAvgSpeedSec;
- ui64 MaxAvgSpeedSec;
- ui64 TotalAvgSpeedMin;
- ui64 MaxAvgSpeedMin;
- ui64 TotalAvgSpeedHour;
- ui64 MaxAvgSpeedHour;
- ui64 TotalAvgSpeedDay;
- ui64 MaxAvgSpeedDay;
+
+ struct TPartitionStats {
+ ui64 DataSize = 0;
+ ui64 UsedReserveSize = 0;
+ };
+
+ struct TPartitionMetrics {
+ ui64 TotalAvgWriteSpeedPerSec = 0;
+ ui64 MaxAvgWriteSpeedPerSec = 0;
+ ui64 TotalAvgWriteSpeedPerMin = 0;
+ ui64 MaxAvgWriteSpeedPerMin = 0;
+ ui64 TotalAvgWriteSpeedPerHour = 0;
+ ui64 MaxAvgWriteSpeedPerHour = 0;
+ ui64 TotalAvgWriteSpeedPerDay = 0;
+ ui64 MaxAvgWriteSpeedPerDay = 0;
+ };
+
+ struct TAggregatedStats {
+ THashMap<ui32, TPartitionStats> Stats;
+ THashMap<ui64, ui64> Cookies;
+
+ ui64 TotalDataSize = 0;
+ ui64 TotalUsedReserveSize = 0;
+
+ TPartitionMetrics Metrics;
+ TPartitionMetrics NewMetrics;
+
+ ui64 Round = 0;
+ ui64 NextCookie = 0;
+
+ void AggrStats(ui32 partition, ui64 dataSize, ui64 usedReserveSize);
+ void AggrStats(ui64 avgWriteSpeedPerSec, ui64 avgWriteSpeedPerMin, ui64 avgWriteSpeedPerHour, ui64 avgWriteSpeedPerDay);
+ };
+ TAggregatedStats AggregatedStats;
+
+ struct TTxWritePartitionStats;
+ bool TTxWritePartitionStatsScheduled = false;
+
+ ui64 StatsReportRound;
std::deque<TAutoPtr<TEvPersQueue::TEvRegisterReadSession>> RegisterEvents;
std::deque<TAutoPtr<TEvPersQueue::TEvPersQueue::TEvUpdateBalancerConfig>> UpdateEvents;
+
+ TActorId FindSubDomainPathIdActor;
+
+ std::optional<TPathId> SubDomainPathId;
+ std::optional<TPathId> WatchingSubDomainPathId;
+
+ friend struct TTxWriteSubDomainPathId;
+ bool SubDomainOutOfSpace = false;
+
public:
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
return NKikimrServices::TActivity::PERSQUEUE_READ_BALANCER_ACTOR;
@@ -459,14 +531,7 @@ public:
, NoGroupsInBase(true)
, ResourceMetrics(nullptr)
, WaitingForACL(false)
- , TotalAvgSpeedSec(0)
- , MaxAvgSpeedSec(0)
- , TotalAvgSpeedMin(0)
- , MaxAvgSpeedMin(0)
- , TotalAvgSpeedHour(0)
- , MaxAvgSpeedHour(0)
- , TotalAvgSpeedDay(0)
- , MaxAvgSpeedDay(0)
+ , StatsReportRound(0)
{}
STFUNC(StateInit) {
@@ -483,6 +548,8 @@ public:
HFunc(TEvTabletPipe::TEvServerDisconnected, Handle);
HFunc(TEvPersQueue::TEvCheckACL, Handle);
HFunc(TEvPersQueue::TEvGetPartitionIdForWrite, Handle);
+ HFunc(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound, Handle);
+ HFunc(TEvTxProxySchemeCache::TEvWatchNotifyUpdated, Handle);
default:
StateInitImpl(ev, ctx);
break;
@@ -509,7 +576,11 @@ public:
HFunc(TEvTabletPipe::TEvClientConnected, Handle);
HFunc(TEvTabletPipe::TEvClientDestroyed, Handle);
HFunc(TEvPersQueue::TEvStatusResponse, Handle);
+ HFunc(TEvPQ::TEvStatsWakeup, Handle);
HFunc(NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult, Handle);
+ HFunc(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound, Handle);
+ HFunc(TEvTxProxySchemeCache::TEvWatchNotifyUpdated, Handle);
+ HFunc(TEvPersQueue::TEvStatus, Handle);
default:
HandleDefaultEvents(ev, ctx);
diff --git a/ydb/core/persqueue/type_codecs_defs.h b/ydb/core/persqueue/type_codecs_defs.h
index 90c55d4b89..6b35c2b23b 100644
--- a/ydb/core/persqueue/type_codecs_defs.h
+++ b/ydb/core/persqueue/type_codecs_defs.h
@@ -134,8 +134,8 @@ protected:
virtual void DoAddNull() = 0;
protected:
- ui32 ValuesConsumed;
- size_t ConsumedSize;
+ ui32 ValuesConsumed = 0;
+ size_t ConsumedSize = 0;
};
/***************************************************************************//**
diff --git a/ydb/core/persqueue/type_coders.h b/ydb/core/persqueue/type_coders.h
index 26c2566d32..32569eba8c 100644
--- a/ydb/core/persqueue/type_coders.h
+++ b/ydb/core/persqueue/type_coders.h
@@ -151,7 +151,7 @@ public:
inline size_t Save(TFlatBlobDataOutputStream* output, TType value) {
const auto outValue = static_cast<i64>(value); // TODO: fix out_long(i32)
- char varIntOut[sizeof(outValue) + 1];
+ char varIntOut[sizeof(outValue) + 1] {};
auto bytes = out_long(outValue, varIntOut);
output->Write(varIntOut, bytes);
return bytes;
diff --git a/ydb/core/persqueue/user_info.cpp b/ydb/core/persqueue/user_info.cpp
index 6cdb214c5d..9de8389081 100644
--- a/ydb/core/persqueue/user_info.cpp
+++ b/ydb/core/persqueue/user_info.cpp
@@ -56,16 +56,19 @@ TUsersInfoStorage::TUsersInfoStorage(
Counters.Populate(counters);
}
-void TUsersInfoStorage::Init(TActorId tabletActor, TActorId partitionActor) {
+void TUsersInfoStorage::Init(TActorId tabletActor, TActorId partitionActor, const TActorContext& ctx) {
+ Y_VERIFY(UsersInfo.empty());
Y_VERIFY(!TabletActor);
Y_VERIFY(!PartitionActor);
TabletActor = tabletActor;
PartitionActor = partitionActor;
- for (auto& userInfoPair : UsersInfo) {
- auto& userInfo = userInfoPair.second;
- Y_VERIFY(!userInfo.ReadSpeedLimiter);
- userInfo.ReadSpeedLimiter = CreateReadSpeedLimiter(userInfo.User);
+ if (AppData(ctx)->Counters && AppData()->PQConfig.GetTopicsAreFirstClassCitizen()) {
+ StreamCountersSubgroup = NPersQueue::GetCountersForTopic(AppData(ctx)->Counters, IsServerless);
+ auto subgroups = NPersQueue::GetSubgroupsForTopic(TopicConverter, CloudId, DbId, DbPath, FolderId);
+ for (auto& group : subgroups) {
+ StreamCountersSubgroup = StreamCountersSubgroup->GetSubgroup(group.first, group.second);
+ }
}
}
@@ -180,24 +183,18 @@ TUserInfo TUsersInfoStorage::CreateUserInfo(const TActorContext& ctx,
bool meterRead = userServiceType.empty() || userServiceType == defaultServiceType;
- return {
- ctx, CreateReadSpeedLimiter(user), user, readRuleGeneration, important, TopicConverter, Partition,
- session, gen, step, offset, readOffsetRewindSum, DCId, readFromTimestamp, CloudId, DbId, DbPath, IsServerless, FolderId,
+ return {
+ ctx, StreamCountersSubgroup, CreateReadSpeedLimiter(user), user, readRuleGeneration, important, TopicConverter, Partition,
+ session, gen, step, offset, readOffsetRewindSum, DCId, readFromTimestamp, DbPath,
meterRead, burst, speed
};
}
-TUserInfo TUsersInfoStorage::CreateUserInfo(const TString& user,
- const TActorContext& ctx,
+TUserInfoBase TUsersInfoStorage::CreateUserInfo(const TString& user,
TMaybe<ui64> readRuleGeneration) const
{
- return CreateUserInfo(ctx,
- user,
- readRuleGeneration ? *readRuleGeneration : ++CurReadRuleGeneration,
- false,
- "",
- 0, 0, 0, 0,
- TInstant::Zero());
+ return TUserInfoBase{user, readRuleGeneration ? *readRuleGeneration : ++CurReadRuleGeneration,
+ "", 0, 0, 0, false, {}};
}
TUserInfo& TUsersInfoStorage::Create(
diff --git a/ydb/core/persqueue/user_info.h b/ydb/core/persqueue/user_info.h
index 1d4bfe198f..e86b8c1858 100644
--- a/ydb/core/persqueue/user_info.h
+++ b/ydb/core/persqueue/user_info.h
@@ -3,6 +3,7 @@
#include "working_time_counter.h"
#include "subscriber.h"
#include "percentile_counter.h"
+#include "quota_tracker.h"
#include "read_speed_limiter.h"
#include "metering_sink.h"
@@ -32,111 +33,6 @@ static const TString CLIENTID_WITHOUT_CONSUMER = "$without_consumer";
typedef TProtobufTabletLabeledCounters<EClientLabeledCounters_descriptor> TUserLabeledCounters;
-
-class TQuotaTracker {
-
- class TAvgTracker {
- public:
- TAvgTracker(ui64 duration)
- : Duration(duration)
- , Sum(0)
- {
- Y_VERIFY(duration > 0);
- }
-
- void Update(i64 value, i64 ts)
- {
- Values.push_back(std::make_pair(value, ts));
- i64 newStart = ts - Duration;
- if (Values.size() > 1) {
- Sum += GetSum(Values.size() - 2);
- Y_VERIFY(Values.back().second >= Values.back().second);
- }
- while (Values.size() > 2 && newStart > Values[1].second) {
- Sum -= GetSum(0);
- Values.pop_front();
- }
- }
-
- ui64 GetAvg() {
- return (Values.size() > 1 && Values.back().second > Values.front().second)
- ? Max<i64>(0, Sum / (Values.back().second - Values.front().second))
- : 0;
- }
-
- private:
-
- i64 GetSum(ui32 pos) {
- Y_VERIFY(pos + 1 < Values.size());
- return (Values[pos + 1].first + Values[pos].first) * (Values[pos + 1].second - Values[pos].second) / 2;
- }
-
- private:
- ui64 Duration;
- i64 Sum;
- std::deque<std::pair<i64, i64>> Values;
- };
-
-
-public:
- TQuotaTracker(const ui64 maxBurst, const ui64 speedPerSecond, const TInstant& timestamp)
- : AvailableSize(maxBurst)
- , SpeedPerSecond(speedPerSecond)
- , LastUpdateTime(timestamp)
- , MaxBurst(maxBurst)
- , AvgMin(60'000) //avg avail in bytes per sec for last minute
- , AvgSec(1000) //avg avail in bytes per sec
- , QuotedTime(0)
- {}
-
- ui64 GetQuotedTime() const {
- return QuotedTime;
- }
-
- void UpdateConfig(const ui64 maxBurst, const ui64 speedPerSecond) {
- SpeedPerSecond = speedPerSecond;
- MaxBurst = maxBurst;
- AvailableSize = maxBurst;
- }
-
- void Update(const TInstant& timestamp);
-
- bool CanExaust() const {
- return AvailableSize > 0;
- }
-
- void Exaust(const ui64 size, const TInstant& timestamp) {
- Update(timestamp);
- AvailableSize -= (i64)size;
- Update(timestamp);
- }
-
- ui64 GetAvailableAvgSec(const TInstant& timestamp) {
- Update(timestamp);
- return AvgSec.GetAvg();
- }
-
- ui64 GetAvailableAvgMin(const TInstant& timestamp) {
- Update(timestamp);
- return AvgMin.GetAvg();
- }
-
- ui64 GetTotalSpeed() const {
- return SpeedPerSecond;
- }
-
-private:
- i64 AvailableSize;
- ui64 SpeedPerSecond;
- TInstant LastUpdateTime;
- ui64 MaxBurst;
-
- TAvgTracker AvgMin;
- TAvgTracker AvgSec;
-
- ui64 QuotedTime;
-};
-
struct TReadSpeedLimiterHolder {
TReadSpeedLimiterHolder(const TActorId& actor, const TTabletCountersBase& baseline)
: Actor(actor)
@@ -148,13 +44,22 @@ struct TReadSpeedLimiterHolder {
TTabletCountersBase Baseline;
};
-struct TUserInfo {
- THolder<TReadSpeedLimiterHolder> ReadSpeedLimiter;
+struct TUserInfoBase {
+ TString User;
+ ui64 ReadRuleGeneration = 0;
TString Session = "";
ui32 Generation = 0;
ui32 Step = 0;
i64 Offset = 0;
+
+ bool Important = false;
+ TInstant ReadFromTimestamp;
+};
+
+struct TUserInfo: public TUserInfoBase {
+ THolder<TReadSpeedLimiterHolder> ReadSpeedLimiter;
+
TInstant WriteTimestamp;
TInstant CreateTimestamp;
TInstant ReadTimestamp;
@@ -171,12 +76,8 @@ struct TUserInfo {
//When client will commit to new position, timestamps for this offset could be in cache - not insane client should read data before commit
std::deque<std::pair<ui64, std::pair<TInstant, TInstant>>> Cache;
- bool Important = false;
- TInstant ReadFromTimestamp;
bool HasReadRule = false;
THolder<TUserLabeledCounters> LabeledCounters;
- TString User;
- ui64 ReadRuleGeneration = 0;
NPersQueue::TTopicConverterPtr TopicConverter;
std::deque<std::pair<TReadInfo, ui64>> ReadRequests;
@@ -262,18 +163,16 @@ struct TUserInfo {
}
TUserInfo(
- const TActorContext& ctx, THolder<TReadSpeedLimiterHolder> readSpeedLimiter, const TString& user,
+ const TActorContext& ctx,
+ NMonitoring::TDynamicCounterPtr streamCountersSubgroup, THolder<TReadSpeedLimiterHolder> readSpeedLimiter, const TString& user,
const ui64 readRuleGeneration, const bool important, const NPersQueue::TTopicConverterPtr& topicConverter,
const ui32 partition, const TString &session, ui32 gen, ui32 step, i64 offset,
const ui64 readOffsetRewindSum, const TString& dcId, TInstant readFromTimestamp,
- const TString& cloudId, const TString& dbId, const TString& dbPath, const bool isServerless, const TString& folderId, bool meterRead,
+ const TString& dbPath, bool meterRead,
ui64 burst = 1'000'000'000, ui64 speed = 1'000'000'000
)
- : ReadSpeedLimiter(std::move(readSpeedLimiter))
- , Session(session)
- , Generation(gen)
- , Step(step)
- , Offset(offset)
+ : TUserInfoBase{user, readRuleGeneration, session, gen, step, offset, important, readFromTimestamp}
+ , ReadSpeedLimiter(std::move(readSpeedLimiter))
, WriteTimestamp(TAppData::TimeProvider->Now())
, CreateTimestamp(TAppData::TimeProvider->Now())
, ReadTimestamp(TAppData::TimeProvider->Now())
@@ -283,11 +182,7 @@ struct TUserInfo {
, ReadCreateTimestamp(TAppData::TimeProvider->Now())
, ReadOffsetRewindSum(readOffsetRewindSum)
, ReadScheduled(false)
- , Important(important)
- , ReadFromTimestamp(readFromTimestamp)
, HasReadRule(false)
- , User(user)
- , ReadRuleGeneration(readRuleGeneration)
, TopicConverter(topicConverter)
, ReadQuota(burst, speed, TAppData::TimeProvider->Now())
, Counter(nullptr)
@@ -305,9 +200,7 @@ struct TUserInfo {
LabeledCounters.Reset(new TUserLabeledCounters(
user + "||" + topicConverter->GetClientsideName(), partition, dbPath));
- if (DoInternalRead) {
- SetupStreamCounters(ctx, dcId, ToString<ui32>(partition), cloudId, dbId, dbPath, isServerless, folderId);
- }
+ SetupStreamCounters(streamCountersSubgroup);
} else {
LabeledCounters.Reset(new TUserLabeledCounters(
user + "/" + (important ? "1" : "0") + "/" + topicConverter->GetClientsideName(),
@@ -318,36 +211,29 @@ struct TUserInfo {
}
}
- void SetupStreamCounters(
- const TActorContext& ctx, const TString& dcId, const TString& partition,
- const TString& cloudId, const TString& dbId, const TString& dbPath, const bool isServerless, const TString& folderId
- ) {
- auto subgroup = NPersQueue::GetCountersForTopic(AppData(ctx)->Counters, isServerless);
- auto aggregates =
- NPersQueue::GetLabelsForTopic(TopicConverter, cloudId, dbId, dbPath, folderId);
-
- BytesRead = TMultiCounter(subgroup,
- aggregates, {{"consumer", User}},
- {"api.grpc.topic.stream_read.bytes",
- "topic.read.bytes"}, true, "name");
- MsgsRead = TMultiCounter(subgroup,
- aggregates, {{"consumer", User}},
- {"api.grpc.topic.stream_read.messages",
- "topic.read.messages"}, true, "name");
- Y_UNUSED(dcId);
- Y_UNUSED(partition);
- /*
- Counter.SetCounter(subgroup,
- {{"database", dbPath}, {"cloud_id", cloudId}, {"folder_id", folderId}, {"database_id", dbId},
- {"topic", TopicConverter->GetFederationPath()},
- {"consumer", User}, {"host", dcId}, {"partition", partition}},
- {"name", "topic.read.awaiting_consume_milliseconds", true});
- */
+ void SetupStreamCounters(NMonitoring::TDynamicCounterPtr subgroup) {
+ Y_VERIFY(subgroup);
+ TVector<std::pair<TString, TString>> subgroups;
+ if (DoInternalRead) {
+ subgroups.push_back({"consumer", User});
+
+ BytesRead = TMultiCounter(subgroup, {}, subgroups,
+ {"api.grpc.topic.stream_read.bytes",
+ "topic.read.bytes"}, true, "name");
+ MsgsRead = TMultiCounter(subgroup, {}, subgroups,
+ {"api.grpc.topic.stream_read.messages",
+ "topic.read.messages"}, true, "name");
+ } else {
+ BytesRead = TMultiCounter(subgroup, {}, subgroups,
+ {"topic.read.bytes"}, true, "name");
+ MsgsRead = TMultiCounter(subgroup, {}, subgroups,
+ {"topic.read.messages"}, true, "name");
+ }
+ subgroups.emplace_back("name", "topic.read.lag_milliseconds");
ReadTimeLag.reset(new TPercentileCounter(
- NPersQueue::GetCountersForTopic(AppData(ctx)->Counters, isServerless), aggregates,
- {{"consumer", User}, {"name", "topic.read.lag_milliseconds"}}, "bin",
- TVector<std::pair<ui64, TString>>{{100, "100"}, {200, "200"}, {500, "500"},
+ subgroup, {}, subgroups, "bin",
+ TVector<std::pair<ui64, TString>>{{100, "100"}, {200, "200"}, {500, "500"},
{1000, "1000"}, {2000, "2000"},
{5000, "5000"}, {10'000, "10000"},
{30'000, "30000"}, {60'000, "60000"},
@@ -492,7 +378,7 @@ public:
const TTabletCountersBase& counters, const NKikimrPQ::TPQTabletConfig& config,
const TString& CloudId, const TString& DbId, const TString& DbPath, const bool isServerless, const TString& FolderId);
- void Init(TActorId tabletActor, TActorId partitionActor);
+ void Init(TActorId tabletActor, TActorId partitionActor, const TActorContext& ctx);
void ParseDeprecated(const TString& key, const TString& data, const TActorContext& ctx);
void Parse(const TString& key, const TString& data, const TActorContext& ctx);
@@ -506,8 +392,7 @@ public:
THashMap<TString, TUserInfo>& GetAll();
- TUserInfo CreateUserInfo(const TString& user,
- const TActorContext& ctx,
+ TUserInfoBase CreateUserInfo(const TString& user,
TMaybe<ui64> readRuleGeneration = {}) const;
TUserInfo& Create(
const TActorContext& ctx, const TString& user, const ui64 readRuleGeneration, bool important, const TString &session,
@@ -537,6 +422,7 @@ private:
NPersQueue::TTopicConverterPtr TopicConverter;
const ui32 Partition;
TTabletCountersBase Counters;
+ NMonitoring::TDynamicCounterPtr StreamCountersSubgroup;
TMaybe<TActorId> TabletActor;
TMaybe<TActorId> PartitionActor;
diff --git a/ydb/core/persqueue/ut/CMakeLists.darwin.txt b/ydb/core/persqueue/ut/CMakeLists.darwin.txt
index 7f61cd76b3..b5b6886860 100644
--- a/ydb/core/persqueue/ut/CMakeLists.darwin.txt
+++ b/ydb/core/persqueue/ut/CMakeLists.darwin.txt
@@ -44,6 +44,7 @@ target_sources(ydb-core-persqueue-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/metering_sink_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/mirrorer_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/pq_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/quota_tracker_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/sourceid_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/type_codecs_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/user_info_ut.cpp
diff --git a/ydb/core/persqueue/ut/CMakeLists.linux-aarch64.txt b/ydb/core/persqueue/ut/CMakeLists.linux-aarch64.txt
index d0c5cc9820..27e25f862f 100644
--- a/ydb/core/persqueue/ut/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/persqueue/ut/CMakeLists.linux-aarch64.txt
@@ -47,6 +47,7 @@ target_sources(ydb-core-persqueue-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/metering_sink_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/mirrorer_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/pq_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/quota_tracker_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/sourceid_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/type_codecs_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/user_info_ut.cpp
diff --git a/ydb/core/persqueue/ut/CMakeLists.linux.txt b/ydb/core/persqueue/ut/CMakeLists.linux.txt
index 8874cec170..71f73cd623 100644
--- a/ydb/core/persqueue/ut/CMakeLists.linux.txt
+++ b/ydb/core/persqueue/ut/CMakeLists.linux.txt
@@ -49,6 +49,7 @@ target_sources(ydb-core-persqueue-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/metering_sink_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/mirrorer_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/pq_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/quota_tracker_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/sourceid_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/type_codecs_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/persqueue/ut/user_info_ut.cpp
diff --git a/ydb/core/persqueue/ut/common/pq_ut_common.cpp b/ydb/core/persqueue/ut/common/pq_ut_common.cpp
index 11fc2b18ef..5e7aabd52c 100644
--- a/ydb/core/persqueue/ut/common/pq_ut_common.cpp
+++ b/ydb/core/persqueue/ut/common/pq_ut_common.cpp
@@ -282,7 +282,11 @@ void PQTabletRestart(TTestActorRuntime& runtime, ui64 tabletId, TActorId edge) {
}
TActorId SetOwner(const ui32 partition, TTestContext& tc, const TString& owner, bool force) {
- TActorId pipeClient = tc.Runtime->ConnectToPipe(tc.TabletId, tc.Edge, 0, GetPipeConfigWithRetries());
+ return SetOwner(tc.Runtime.Get(), tc.TabletId, tc.Edge, partition, owner, force);
+}
+
+TActorId SetOwner(TTestActorRuntime* runtime, ui64 tabletId, const TActorId& sender, const ui32 partition, const TString& owner, bool force) {
+ TActorId pipeClient = runtime->ConnectToPipe(tabletId, sender, 0, GetPipeConfigWithRetries());
THolder<TEvPersQueue::TEvRequest> request;
@@ -293,7 +297,7 @@ TActorId SetOwner(const ui32 partition, TTestContext& tc, const TString& owner,
req->MutableCmdGetOwnership()->SetForce(force);
ActorIdToProto(pipeClient, req->MutablePipeClient());
- tc.Runtime->SendToPipe(tc.TabletId, tc.Edge, request.Release(), 0, GetPipeConfigWithRetries(), pipeClient);
+ runtime->SendToPipe(tabletId, sender, request.Release(), 0, GetPipeConfigWithRetries(), pipeClient);
return pipeClient;
}
@@ -376,34 +380,38 @@ void WaitPartition(const TString &session, TTestContext& tc, ui32 partition, con
}
std::pair<TString, TActorId> CmdSetOwner(const ui32 partition, TTestContext& tc, const TString& owner, bool force) {
+ return CmdSetOwner(tc.Runtime.Get(), tc.TabletId, tc.Edge, partition, owner, force);
+}
+
+std::pair<TString, TActorId> CmdSetOwner(TTestActorRuntime* runtime, ui64 tabletId, const TActorId& sender, const ui32 partition, const TString& owner, bool force) {
TAutoPtr<IEventHandle> handle;
TEvPersQueue::TEvResponse *result;
TString cookie;
TActorId pipeClient;
for (i32 retriesLeft = 2; retriesLeft > 0; --retriesLeft) {
try {
- tc.Runtime->ResetScheduledCount();
+ runtime->ResetScheduledCount();
- pipeClient = SetOwner(partition, tc, owner, force);
+ pipeClient = SetOwner(runtime, tabletId, sender, partition, owner, force);
- result = tc.Runtime->GrabEdgeEvent<TEvPersQueue::TEvResponse>(handle);
+ result = runtime->GrabEdgeEvent<TEvPersQueue::TEvResponse>(handle);
UNIT_ASSERT(result);
UNIT_ASSERT(result->Record.HasStatus());
if (result->Record.GetErrorCode() == NPersQueue::NErrorCode::INITIALIZING) {
- tc.Runtime->DispatchEvents(); // Dispatch events so that initialization can make progress
+ runtime->DispatchEvents(); // Dispatch events so that initialization can make progress
retriesLeft = 3;
continue;
}
if (result->Record.GetErrorReason().StartsWith("ownership session is killed by another session with id ")) {
- result = tc.Runtime->GrabEdgeEvent<TEvPersQueue::TEvResponse>(handle);
+ result = runtime->GrabEdgeEvent<TEvPersQueue::TEvResponse>(handle);
UNIT_ASSERT(result);
UNIT_ASSERT(result->Record.HasStatus());
}
if (result->Record.GetErrorCode() == NPersQueue::NErrorCode::INITIALIZING) {
- tc.Runtime->DispatchEvents(); // Dispatch events so that initialization can make progress
+ runtime->DispatchEvents(); // Dispatch events so that initialization can make progress
retriesLeft = 3;
continue;
}
@@ -477,8 +485,13 @@ void WritePartDataWithBigMsg(const ui32 partition, const TString& sourceId, cons
void WriteData(const ui32 partition, const TString& sourceId, const TVector<std::pair<ui64, TString>> data, TTestContext& tc,
const TString& cookie, i32 msgSeqNo, i64 offset, bool disableDeduplication) {
+ WriteData(tc.Runtime.Get(), tc.TabletId, tc.Edge, partition, sourceId, data, cookie, msgSeqNo, offset, disableDeduplication);
+}
+
+void WriteData(TTestActorRuntime* runtime, ui64 tabletId, const TActorId& sender, const ui32 partition, const TString& sourceId,
+ const TVector<std::pair<ui64, TString>> data, const TString& cookie, i32 msgSeqNo, i64 offset, bool disableDeduplication) {
THolder<TEvPersQueue::TEvRequest> request;
- tc.Runtime->ResetScheduledCount();
+ runtime->ResetScheduledCount();
request.Reset(new TEvPersQueue::TEvRequest);
auto req = request->Record.MutablePartitionRequest();
req->SetPartition(partition);
@@ -493,7 +506,7 @@ void WriteData(const ui32 partition, const TString& sourceId, const TVector<std:
write->SetData(p.second);
write->SetDisableDeduplication(disableDeduplication);
}
- tc.Runtime->SendToPipe(tc.TabletId, tc.Edge, request.Release(), 0, GetPipeConfigWithRetries());
+ runtime->SendToPipe(tabletId, sender, request.Release(), 0, GetPipeConfigWithRetries());
}
void CmdWrite(const ui32 partition, const TString& sourceId, const TVector<std::pair<ui64, TString>> data,
@@ -501,16 +514,26 @@ void CmdWrite(const ui32 partition, const TString& sourceId, const TVector<std::
bool isFirst, const TString& ownerCookie, i32 msn, i64 offset,
bool treatWrongCookieAsError, bool treatBadOffsetAsError,
bool disableDeduplication) {
+ CmdWrite(tc.Runtime.Get(), tc.TabletId, tc.Edge, partition, sourceId, tc.MsgSeqNoMap[partition],
+ data, error, alreadyWrittenSeqNo, isFirst, ownerCookie, msn, offset, treatWrongCookieAsError, treatBadOffsetAsError, disableDeduplication);
+
+}
+
+void CmdWrite(TTestActorRuntime* runtime, ui64 tabletId, const TActorId& sender, const ui32 partition,
+ const TString& sourceId, ui32& msgSeqNo, const TVector<std::pair<ui64, TString>> data,
+ bool error, const THashSet<ui32>& alreadyWrittenSeqNo,
+ bool isFirst, const TString& ownerCookie, i32 msn, i64 offset,
+ bool treatWrongCookieAsError, bool treatBadOffsetAsError,
+ bool disableDeduplication) {
TAutoPtr<IEventHandle> handle;
TEvPersQueue::TEvResponse *result;
- ui32& msgSeqNo = tc.MsgSeqNoMap[partition];
if (msn != -1) msgSeqNo = msn;
TString cookie = ownerCookie;
for (i32 retriesLeft = 2; retriesLeft > 0; --retriesLeft) {
try {
- WriteData(partition, sourceId, data, tc, cookie, msgSeqNo, offset, disableDeduplication);
- result = tc.Runtime->GrabEdgeEventIf<TEvPersQueue::TEvResponse>(handle,
+ WriteData(runtime, tabletId, sender, partition, sourceId, data, cookie, msgSeqNo, offset, disableDeduplication);
+ result = runtime->GrabEdgeEventIf<TEvPersQueue::TEvResponse>(handle,
[](const TEvPersQueue::TEvResponse& ev){
if (ev.Record.HasPartitionResponse() &&
ev.Record.GetPartitionResponse().CmdWriteResultSize() > 0 ||
@@ -522,14 +545,14 @@ void CmdWrite(const ui32 partition, const TString& sourceId, const TVector<std::
UNIT_ASSERT(result);
UNIT_ASSERT(result->Record.HasStatus());
if (result->Record.GetErrorCode() == NPersQueue::NErrorCode::INITIALIZING) {
- tc.Runtime->DispatchEvents(); // Dispatch events so that initialization can make progress
+ runtime->DispatchEvents(); // Dispatch events so that initialization can make progress
retriesLeft = 3;
continue;
}
if (!treatWrongCookieAsError &&
result->Record.GetErrorCode() == NPersQueue::NErrorCode::WRONG_COOKIE) {
- cookie = CmdSetOwner(partition, tc).first;
+ cookie = CmdSetOwner(runtime, tabletId, sender, partition).first;
msgSeqNo = 0;
retriesLeft = 3;
continue;
@@ -802,7 +825,7 @@ TVector<TString> CmdSourceIdRead(TTestContext& tc) {
sourceIds.clear();
auto read = request->Record.AddCmdReadRange();
auto range = read->MutableRange();
- NPQ::TKeyPrefix ikeyFrom(NPQ::TKeyPrefix::TypeInfo, 0, NPQ::TKeyPrefix::MarkSourceId);
+ NPQ::TKeyPrefix ikeyFrom(NPQ::TKeyPrefix::TypeInfo, 0, NPQ::TKeyPrefix::MarkProtoSourceId);
range->SetFrom(ikeyFrom.Data(), ikeyFrom.Size());
range->SetIncludeFrom(true);
NPQ::TKeyPrefix ikeyTo(NPQ::TKeyPrefix::TypeInfo, 0, NPQ::TKeyPrefix::MarkUserDeprecated);
@@ -812,6 +835,7 @@ TVector<TString> CmdSourceIdRead(TTestContext& tc) {
tc.Runtime->SendToPipe(tc.TabletId, tc.Edge, request.Release(), 0, GetPipeConfigWithRetries());
result = tc.Runtime->GrabEdgeEvent<TEvKeyValue::TEvResponse>(handle);
UNIT_ASSERT(result);
+ Cout << result->ToString() << Endl;
UNIT_ASSERT(result->Record.HasStatus());
UNIT_ASSERT_EQUAL(result->Record.GetStatus(), NMsgBusProxy::MSTATUS_OK);
for (ui64 idx = 0; idx < result->Record.ReadRangeResultSize(); ++idx) {
@@ -942,4 +966,13 @@ void FillDeprecatedUserInfo(NKikimrClient::TKeyValueRequest_TCmdWrite* write, co
write->SetValue(idataDeprecated.Data(), idataDeprecated.Size());
}
+THolder<TEvPersQueue::TEvPeriodicTopicStats> GetReadBalancerPeriodicTopicStats(TTestActorRuntime& runtime, ui64 balancerId) {
+ runtime.ResetScheduledCount();
+
+ TActorId sender = runtime.AllocateEdgeActor();
+ runtime.SendToPipe(balancerId, sender, new TEvPersQueue::TEvStatus(), 0, GetPipeConfigWithRetries());
+
+ return runtime.GrabEdgeEvent<TEvPersQueue::TEvPeriodicTopicStats>(TDuration::Seconds(2));
+}
+
} // namespace NKikimr::NPQ
diff --git a/ydb/core/persqueue/ut/common/pq_ut_common.h b/ydb/core/persqueue/ut/common/pq_ut_common.h
index 0a13f936ad..76235bffe0 100644
--- a/ydb/core/persqueue/ut/common/pq_ut_common.h
+++ b/ydb/core/persqueue/ut/common/pq_ut_common.h
@@ -274,6 +274,14 @@ TActorId SetOwner(
const TString& owner,
bool force);
+TActorId SetOwner(
+ TTestActorRuntime* runtime,
+ ui64 tabletId,
+ const TActorId& sender,
+ const ui32 partition,
+ const TString& owner,
+ bool force);
+
void FillDeprecatedUserInfo(
NKikimrClient::TKeyValueRequest_TCmdWrite* write,
const TString& client,
@@ -319,6 +327,18 @@ void WriteData(
i64 offset,
bool disableDeduplication = false);
+void WriteData(
+ TTestActorRuntime* runtime,
+ ui64 tabletId,
+ const TActorId& sender,
+ const ui32 partition,
+ const TString& sourceId,
+ const TVector<std::pair<ui64, TString>> data,
+ const TString& cookie,
+ i32 msgSeqNo,
+ i64 offset,
+ bool disableDeduplication = false);
+
void WritePartData(
const ui32 partition,
const TString& sourceId,
@@ -356,6 +376,14 @@ std::pair<TString, TActorId> CmdSetOwner(
const TString& owner = "default",
bool force = true);
+std::pair<TString, TActorId> CmdSetOwner(
+ TTestActorRuntime* runtime,
+ ui64 tabletId,
+ const TActorId& sender,
+ const ui32 partition,
+ const TString& owner = "default",
+ bool force = true);
+
void CmdCreateSession(
const ui32 partition,
const TString& user,
@@ -429,4 +457,24 @@ void CmdWrite(
bool treatBadOffsetAsError = true,
bool disableDeduplication = false);
+void CmdWrite(
+ TTestActorRuntime* runtime,
+ ui64 tabletId,
+ const TActorId& sender,
+ const ui32 partition,
+ const TString& sourceId,
+ ui32& msgSeqNo,
+ const TVector<std::pair<ui64, TString>> data,
+ bool error = false,
+ const THashSet<ui32>& alreadyWrittenSeqNo = {},
+ bool isFirst = false,
+ const TString& ownerCookie = "",
+ i32 msn = -1,
+ i64 offset = -1,
+ bool treatWrongCookieAsError = false,
+ bool treatBadOffsetAsError = true,
+ bool disableDeduplication = false);
+
+THolder<TEvPersQueue::TEvPeriodicTopicStats> GetReadBalancerPeriodicTopicStats(TTestActorRuntime& runtime, ui64 balancerId);
+
} // namespace NKikimr::NPQ
diff --git a/ydb/core/persqueue/ut/counters_ut.cpp b/ydb/core/persqueue/ut/counters_ut.cpp
index 6f10cd85a7..40f69b470a 100644
--- a/ydb/core/persqueue/ut/counters_ut.cpp
+++ b/ydb/core/persqueue/ut/counters_ut.cpp
@@ -145,9 +145,8 @@ void CompareJsons(const TString& inputStr, const TString& referenceStr) {
NJson::TJsonValue inputJson;
UNIT_ASSERT(NJson::ReadJsonTree(TStringBuf(inputStr), &inputJson));
- // Run time of test differs as well as counters below. We check if they are in
- // probable interval [4500; 5500], set it to 5000 and then compare with reference
- // string.
+ // Run time of test differs as well as counters below.
+ // We set it to 5000 and then compare with reference string.
auto getByPath = [](const NJson::TJsonValue& msg, TStringBuf path) {
NJson::TJsonValue ret;
UNIT_ASSERT_C(msg.GetValueByPath(path, ret), path);
@@ -159,13 +158,27 @@ void CompareJsons(const TString& inputStr, const TString& referenceStr) {
(getByPath(sensor, "labels.sensor") == "PQ/TimeSinceLastReadMs" ||
getByPath(sensor, "labels.sensor") == "PQ/PartitionLifeTimeMs" ||
getByPath(sensor, "labels.sensor") == "PQ/WriteTimeLagMsByLastReadOld")) {
- auto value = sensor["value"].GetIntegerSafe();
- UNIT_ASSERT_GT(value, 4500);
- UNIT_ASSERT_LT(value, 5500);
sensor.SetValueByPath("value", 5000);
}
}
- UNIT_ASSERT_VALUES_EQUAL(referenceJson, inputJson);
+
+ Cerr << "Test diff count : " << inputJson["sensors"].GetArraySafe().size()
+ << " " << referenceJson["sensors"].GetArraySafe().size() << Endl;
+
+ ui64 inCount = inputJson["sensors"].GetArraySafe().size();
+ ui64 refCount = referenceJson["sensors"].GetArraySafe().size();
+ for (ui64 i = 0; i < inCount && i < refCount; ++i) {
+ auto& in = inputJson["sensors"].GetArraySafe()[i];
+ auto& ref = referenceJson["sensors"].GetArraySafe()[i];
+ UNIT_ASSERT_VALUES_EQUAL_C(in["labels"], ref["labels"], TStringBuilder() << " at pos #" << i);
+ }
+ if (inCount > refCount) {
+ UNIT_ASSERT_C(false, inputJson["sensors"].GetArraySafe()[refCount].GetStringRobust());
+ } else if (refCount > inCount) {
+ UNIT_ASSERT_C(false, referenceJson["sensors"].GetArraySafe()[inCount].GetStringRobust());
+ }
+
+ //UNIT_ASSERT_VALUES_EQUAL(referenceJson, inputJson);
}
Y_UNIT_TEST(Partition) {
@@ -268,12 +281,15 @@ void CheckLabeledCountersResponse(TTestContext& tc, ui32 count, TVector<TString>
THashSet<TString> groups;
+ Cerr << "NEW ANS:\n";
for (ui32 i = 0; i < result->Record.LabeledCountersByGroupSize(); ++i) {
auto& c = result->Record.GetLabeledCountersByGroup(i);
groups.insert(c.GetGroup());
+ Cerr << "ANS GROUP " << c.GetGroup() << "\n";
}
UNIT_ASSERT_VALUES_EQUAL(groups.size(), count);
for (auto& g : mustHave) {
+ Cerr << "CHECKING GROUP " << g << "\n";
UNIT_ASSERT(groups.contains(g));
}
}
@@ -345,29 +361,21 @@ Y_UNIT_TEST(ImportantFlagSwitching) {
CheckLabeledCountersResponse(tc, 11, MakeTopics({"user/1", "user2/1"}));
PQTabletPrepare({}, {{"user", true}, {"user2", false}}, tc);
- {
- TDispatchOptions options;
- options.FinalEvents.emplace_back(TEvTabletCounters::EvTabletAddLabeledCounters);
- tc.Runtime->DispatchEvents(options);
- }
- {
+ for (ui32 i = 0 ; i < 2; ++i){
TDispatchOptions options;
options.FinalEvents.emplace_back(TEvTabletCounters::EvTabletAddLabeledCounters);
tc.Runtime->DispatchEvents(options);
}
+
CheckLabeledCountersResponse(tc, 12, MakeTopics({"user/1", "user2/0"}));
PQTabletPrepare({}, {{"user", true}}, tc);
- {
- TDispatchOptions options;
- options.FinalEvents.emplace_back(TEvTabletCounters::EvTabletAddLabeledCounters);
- tc.Runtime->DispatchEvents(options);
- }
- {
+ for (ui32 i = 0 ; i < 2; ++i){
TDispatchOptions options;
options.FinalEvents.emplace_back(TEvTabletCounters::EvTabletAddLabeledCounters);
tc.Runtime->DispatchEvents(options);
}
+
CheckLabeledCountersResponse(tc, 8, MakeTopics({"user/1"}));
});
}
diff --git a/ydb/core/persqueue/ut/make_config.cpp b/ydb/core/persqueue/ut/make_config.cpp
new file mode 100644
index 0000000000..ceeed50b44
--- /dev/null
+++ b/ydb/core/persqueue/ut/make_config.cpp
@@ -0,0 +1,38 @@
+#include "make_config.h"
+
+namespace NKikimr::NPQ::NHelpers {
+
+NKikimrPQ::TPQTabletConfig MakeConfig(ui64 version,
+ const TVector<TCreateConsumerParams>& consumers,
+ ui32 partitionsCount)
+{
+ NKikimrPQ::TPQTabletConfig config;
+
+ config.SetVersion(version);
+
+ for (auto& c : consumers) {
+ config.AddReadRules(c.Consumer);
+ config.AddReadRuleGenerations(c.Generation);
+ }
+
+ for (ui32 id = 0; id < partitionsCount; ++id) {
+ config.AddPartitionIds(id);
+ }
+
+ config.SetTopicName("rt3.dc1--account--topic");
+ config.SetTopicPath("/Root/PQ/rt3.dc1--account--topic");
+ config.SetFederationAccount("account");
+ config.SetLocalDC(true);
+ config.SetYdbDatabasePath("");
+
+ config.SetMeteringMode(NKikimrPQ::TPQTabletConfig::METERING_MODE_REQUEST_UNITS);
+
+ return config;
+}
+
+NKikimrPQ::TBootstrapConfig MakeBootstrapConfig()
+{
+ return {};
+}
+
+}
diff --git a/ydb/core/persqueue/ut/partition_ut.cpp b/ydb/core/persqueue/ut/partition_ut.cpp
new file mode 100644
index 0000000000..d1fb281f72
--- /dev/null
+++ b/ydb/core/persqueue/ut/partition_ut.cpp
@@ -0,0 +1,1058 @@
+#include <ydb/core/keyvalue/keyvalue_events.h>
+#include <ydb/core/persqueue/events/internal.h>
+#include <ydb/core/persqueue/partition.h>
+#include <ydb/core/persqueue/ut/common/pq_ut_common.h>
+#include <ydb/core/protos/counters_keyvalue.pb.h>
+#include <ydb/core/protos/pqconfig.pb.h>
+#include <ydb/core/tablet/tablet_counters_protobuf.h>
+#include <ydb/library/persqueue/topic_parser/topic_parser.h>
+#include <ydb/public/api/protos/draft/persqueue_error_codes.pb.h>
+#include <ydb/public/lib/base/msgbus_status.h>
+
+#include <library/cpp/actors/core/actorid.h>
+#include <library/cpp/actors/core/event.h>
+#include <library/cpp/testing/unittest/registar.h>
+
+#include <util/generic/hash.h>
+#include <util/generic/maybe.h>
+#include <util/generic/ptr.h>
+#include <util/generic/string.h>
+#include <util/system/types.h>
+
+#include "make_config.h"
+
+namespace NKikimr::NPQ {
+
+namespace NHelpers {
+
+struct TConfigParams {
+ ui64 Version = 0;
+ TVector<TCreateConsumerParams> Consumers;
+};
+
+struct TCreatePartitionParams {
+ ui32 Partition = 1;
+ ui64 Begin = 0;
+ ui64 End = 0;
+ TMaybe<ui64> PlanStep;
+ TMaybe<ui64> TxId;
+ TVector<TTransaction> Transactions;
+ TConfigParams Config;
+};
+
+}
+
+Y_UNIT_TEST_SUITE(TPartitionTests) {
+
+class TPartitionFixture : public NUnitTest::TBaseFixture {
+protected:
+ struct TUserInfoMatcher {
+ TMaybe<TString> Consumer;
+ TMaybe<TString> Session;
+ TMaybe<ui64> Offset;
+ TMaybe<ui32> Generation;
+ TMaybe<ui32> Step;
+ TMaybe<ui64> ReadRuleGeneration;
+ };
+
+ struct TDeleteRangeMatcher {
+ TMaybe<char> TypeInfo;
+ TMaybe<ui32> Partition;
+ TMaybe<char> Mark;
+ TMaybe<TString> Consumer;
+ };
+
+ struct TCmdWriteMatcher {
+ TMaybe<size_t> Count;
+ TMaybe<ui64> PlanStep;
+ TMaybe<ui64> TxId;
+ THashMap<size_t, TUserInfoMatcher> UserInfos;
+ THashMap<size_t, TDeleteRangeMatcher> DeleteRanges;
+ };
+
+ struct TProxyResponseMatcher {
+ TMaybe<ui64> Cookie;
+ TMaybe<NMsgBusProxy::EResponseStatus> Status;
+ TMaybe<NPersQueue::NErrorCode::EErrorCode> ErrorCode;
+ TMaybe<ui64> Offset;
+ };
+
+ struct TErrorMatcher {
+ TMaybe<ui64> Cookie;
+ TMaybe<NPersQueue::NErrorCode::EErrorCode> ErrorCode;
+ TMaybe<TString> Error;
+ };
+
+ struct TProposeTransactionResponseMatcher {
+ TMaybe<ui64> TxId;
+ TMaybe<NKikimrPQ::TEvProposeTransactionResult::EStatus> Status;
+ };
+
+ struct TCalcPredicateMatcher {
+ TMaybe<ui64> Step;
+ TMaybe<ui64> TxId;
+ TMaybe<ui32> Partition;
+ TMaybe<bool> Predicate;
+ };
+
+ struct TCommitTxDoneMatcher {
+ TMaybe<ui64> Step;
+ TMaybe<ui64> TxId;
+ TMaybe<ui32> Partition;
+ };
+
+ struct TChangePartitionConfigMatcher {
+ TMaybe<ui32> Partition;
+ };
+
+ struct TTxOperationMatcher {
+ TMaybe<ui32> Partition;
+ TMaybe<TString> Consumer;
+ TMaybe<ui64> Begin;
+ TMaybe<ui64> End;
+ };
+
+ struct TCmdWriteTxMatcher {
+ TMaybe<ui64> TxId;
+ TMaybe<NKikimrPQ::TTransaction::EState> State;
+ TVector<ui64> Senders;
+ TVector<ui64> Receivers;
+ TVector<TTxOperationMatcher> TxOps;
+ };
+
+ using TCreatePartitionParams = NHelpers::TCreatePartitionParams;
+ using TCreateConsumerParams = NHelpers::TCreateConsumerParams;
+ using TConfigParams = NHelpers::TConfigParams;
+
+ void SetUp(NUnitTest::TTestContext&) override;
+ void TearDown(NUnitTest::TTestContext&) override;
+
+ void CreatePartitionActor(ui32 partition,
+ const TConfigParams& config,
+ bool newPartition,
+ TVector<TTransaction> txs);
+ void CreatePartition(const TCreatePartitionParams& params = {},
+ const TConfigParams& config = {});
+
+ void CreateSession(const TString& clientId,
+ const TString& sessionId,
+ ui32 generation = 1, ui32 step = 1,
+ ui64 cookie = 1);
+ void SetOffset(const TString& clientId,
+ const TString& sessionId,
+ ui64 offset,
+ TMaybe<ui64> expected = Nothing(),
+ ui64 cookie = 1);
+
+ void SendCreateSession(ui64 cookie,
+ const TString& clientId,
+ const TString& sessionId,
+ ui32 generation,
+ ui32 step);
+ void SendSetOffset(ui64 cookie,
+ const TString& clientId,
+ ui64 offset,
+ const TString& sessionId);
+ void SendGetOffset(ui64 cookie,
+ const TString& clientId);
+ void WaitCmdWrite(const TCmdWriteMatcher& matcher = {});
+ void WaitCmdWriteTx(const TCmdWriteTxMatcher& matcher = {});
+ void SendCmdWriteResponse(NMsgBusProxy::EResponseStatus status);
+ void WaitProxyResponse(const TProxyResponseMatcher &matcher = {});
+ void WaitErrorResponse(const TErrorMatcher& matcher = {});
+
+ void WaitConfigRequest();
+ void SendConfigResponse(const TConfigParams& config);
+ void WaitDiskStatusRequest();
+ void SendDiskStatusResponse();
+ void WaitMetaReadRequest();
+ void SendMetaReadResponse(TMaybe<ui64> step, TMaybe<ui64> txId);
+ void WaitInfoRangeRequest();
+ void SendInfoRangeResponse(ui32 partition,
+ const TVector<TCreateConsumerParams>& consumers);
+ void WaitDataRangeRequest();
+ void SendDataRangeResponse(ui64 begin, ui64 end);
+ void WaitDataReadRequest();
+ void SendDataReadResponse();
+
+ void SendProposeTransactionRequest(ui32 partition,
+ ui64 begin, ui64 end,
+ const TString& client,
+ const TString& topic,
+ bool immediate,
+ ui64 txId);
+ void WaitProposeTransactionResponse(const TProposeTransactionResponseMatcher& matcher = {});
+
+ void SendCalcPredicate(ui64 step,
+ ui64 txId,
+ const TString& consumer,
+ ui64 begin,
+ ui64 end);
+ void WaitCalcPredicateResult(const TCalcPredicateMatcher& matcher = {});
+
+ void SendCommitTx(ui64 step, ui64 txId);
+ void SendRollbackTx(ui64 step, ui64 txId);
+ void WaitCommitTxDone(const TCommitTxDoneMatcher& matcher = {});
+
+ void SendChangePartitionConfig(const TConfigParams& config = {});
+ void WaitPartitionConfigChanged(const TChangePartitionConfigMatcher& matcher = {});
+
+ TTransaction MakeTransaction(ui64 step, ui64 txId,
+ TString consumer,
+ ui64 begin, ui64 end,
+ TMaybe<bool> predicate = Nothing());
+
+ void SendSubDomainStatus(bool subDomainOutOfSpace = false);
+ void SendReserveBytes(const ui64 cookie, const ui32 size, const TString& ownerCookie, const ui64 messageNo, bool lastRequest = false);
+ void SendChangeOwner(const ui64 cookie, const TString& owner, const TActorId& pipeClient, const bool force = true);
+ void SendWrite(const ui64 cookie, const ui64 messageNo, const TString& ownerCookie, const TMaybe<ui64> offset, const TString& data, bool ignoreQuotaDeadline = false);
+
+ TMaybe<TTestContext> Ctx;
+ TMaybe<TFinalizer> Finalizer;
+
+ TActorId ActorId;
+
+ NPersQueue::TTopicConverterPtr TopicConverter;
+ NKikimrPQ::TPQTabletConfig Config;
+
+ TAutoPtr<TTabletCountersBase> TabletCounters;
+};
+
+void TPartitionFixture::SetUp(NUnitTest::TTestContext&)
+{
+ Ctx.ConstructInPlace();
+ Finalizer.ConstructInPlace(*Ctx);
+
+ Ctx->Prepare();
+ Ctx->Runtime->SetScheduledLimit(5'000);
+}
+
+void TPartitionFixture::TearDown(NUnitTest::TTestContext&)
+{
+}
+
+void TPartitionFixture::CreatePartitionActor(ui32 id,
+ const TConfigParams& config,
+ bool newPartition,
+ TVector<TTransaction> txs)
+{
+ using TKeyValueCounters = TProtobufTabletCounters<
+ NKeyValue::ESimpleCounters_descriptor,
+ NKeyValue::ECumulativeCounters_descriptor,
+ NKeyValue::EPercentileCounters_descriptor,
+ NKeyValue::ETxTypes_descriptor
+ >;
+ using TPersQueueCounters = TAppProtobufTabletCounters<
+ NPQ::ESimpleCounters_descriptor,
+ NPQ::ECumulativeCounters_descriptor,
+ NPQ::EPercentileCounters_descriptor
+ >;
+ using TCounters = TProtobufTabletCountersPair<
+ TKeyValueCounters,
+ TPersQueueCounters
+ >;
+
+ TAutoPtr<TCounters> counters(new TCounters());
+ TabletCounters = counters->GetSecondTabletCounters().Release();
+
+ Config = MakeConfig(config.Version,
+ config.Consumers);
+
+ NPersQueue::TTopicNamesConverterFactory factory(true, "/Root/PQ", "dc1");
+ TopicConverter = factory.MakeTopicConverter(Config);
+
+ auto actor = new NPQ::TPartition(Ctx->TabletId,
+ id,
+ Ctx->Edge,
+ Ctx->Edge,
+ TopicConverter,
+ true,
+ "dcId",
+ false,
+ Config,
+ *TabletCounters,
+ false,
+ newPartition,
+ std::move(txs));
+ ActorId = Ctx->Runtime->Register(actor);
+}
+
+void TPartitionFixture::CreatePartition(const TCreatePartitionParams& params,
+ const TConfigParams& config)
+{
+ if ((params.Begin == 0) && (params.End == 0)) {
+ CreatePartitionActor(params.Partition, config, true, {});
+
+ WaitConfigRequest();
+ SendConfigResponse(params.Config);
+ } else {
+ CreatePartitionActor(params.Partition, config, false, params.Transactions);
+
+ WaitConfigRequest();
+ SendConfigResponse(params.Config);
+
+ WaitDiskStatusRequest();
+ SendDiskStatusResponse();
+
+ WaitMetaReadRequest();
+ SendMetaReadResponse(params.PlanStep, params.TxId);
+
+ WaitInfoRangeRequest();
+ SendInfoRangeResponse(params.Partition, params.Config.Consumers);
+
+ WaitDataRangeRequest();
+ SendDataRangeResponse(params.Begin, params.End);
+ }
+}
+
+void TPartitionFixture::CreateSession(const TString& clientId,
+ const TString& sessionId,
+ ui32 generation, ui32 step,
+ ui64 cookie)
+{
+ SendCreateSession(cookie,clientId,sessionId, generation, step);
+ WaitCmdWrite({.Count=2, .UserInfos={{0, {.Session = sessionId, .Offset = 0}}}});
+ SendCmdWriteResponse(NMsgBusProxy::MSTATUS_OK);
+ WaitProxyResponse({.Cookie = cookie});
+}
+
+void TPartitionFixture::SetOffset(const TString& clientId,
+ const TString& sessionId,
+ ui64 offset,
+ TMaybe<ui64> expected,
+ ui64 cookie)
+{
+ SendSetOffset(cookie, clientId, offset, sessionId);
+ WaitCmdWrite({.Count=2, .UserInfos={{0, {.Session = sessionId, .Offset = (expected ? *expected : offset)}}}});
+ SendCmdWriteResponse(NMsgBusProxy::MSTATUS_OK);
+ WaitProxyResponse({.Cookie = cookie});
+}
+
+void TPartitionFixture::SendCreateSession(ui64 cookie,
+ const TString& clientId,
+ const TString& sessionId,
+ ui32 generation,
+ ui32 step)
+{
+ auto event = MakeHolder<TEvPQ::TEvSetClientInfo>(cookie,
+ clientId,
+ 0,
+ sessionId,
+ generation,
+ step,
+ TEvPQ::TEvSetClientInfo::ESCI_CREATE_SESSION);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendSetOffset(ui64 cookie,
+ const TString& clientId,
+ ui64 offset,
+ const TString& sessionId)
+{
+ auto event = MakeHolder<TEvPQ::TEvSetClientInfo>(cookie,
+ clientId,
+ offset,
+ sessionId,
+ 0,
+ 0);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendGetOffset(ui64 cookie,
+ const TString& clientId)
+{
+ auto event = MakeHolder<TEvPQ::TEvGetClientOffset>(cookie,
+ clientId);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitCmdWrite(const TCmdWriteMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.GetCookie(), 1); // SET_OFFSET_COOKIE
+
+ if (matcher.Count.Defined()) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Count,
+ event->Record.CmdWriteSize() + event->Record.CmdDeleteRangeSize());
+ }
+
+ //
+ // TxMeta
+ //
+ if (matcher.PlanStep.Defined()) {
+ NKikimrPQ::TPartitionTxMeta meta;
+ UNIT_ASSERT(meta.ParseFromString(event->Record.GetCmdWrite(0).GetValue()));
+
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.PlanStep, meta.GetPlanStep());
+ }
+ if (matcher.TxId.Defined()) {
+ NKikimrPQ::TPartitionTxMeta meta;
+ UNIT_ASSERT(meta.ParseFromString(event->Record.GetCmdWrite(0).GetValue()));
+
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.TxId, meta.GetTxId());
+ }
+
+ //
+ // CmdWrite
+ //
+ for (auto& [index, userInfo] : matcher.UserInfos) {
+ UNIT_ASSERT(index < event->Record.CmdWriteSize());
+
+ NKikimrPQ::TUserInfo ud;
+ UNIT_ASSERT(ud.ParseFromString(event->Record.GetCmdWrite(index).GetValue()));
+
+ if (userInfo.Session) {
+ UNIT_ASSERT(ud.HasSession());
+ UNIT_ASSERT_VALUES_EQUAL(*userInfo.Session, ud.GetSession());
+ }
+ if (userInfo.Generation) {
+ UNIT_ASSERT(ud.HasGeneration());
+ UNIT_ASSERT_VALUES_EQUAL(*userInfo.Generation, ud.GetGeneration());
+ }
+ if (userInfo.Step) {
+ UNIT_ASSERT(ud.HasStep());
+ UNIT_ASSERT_VALUES_EQUAL(*userInfo.Step, ud.GetStep());
+ }
+ if (userInfo.Offset) {
+ UNIT_ASSERT(ud.HasOffset());
+ UNIT_ASSERT_VALUES_EQUAL(*userInfo.Offset, ud.GetOffset());
+ }
+ if (userInfo.ReadRuleGeneration) {
+ UNIT_ASSERT(ud.HasReadRuleGeneration());
+ UNIT_ASSERT_VALUES_EQUAL(*userInfo.ReadRuleGeneration, ud.GetReadRuleGeneration());
+ }
+ }
+
+ //
+ // CmdDeleteRange
+ //
+ for (auto& [index, deleteRange] : matcher.DeleteRanges) {
+ UNIT_ASSERT(index < event->Record.CmdDeleteRangeSize());
+ UNIT_ASSERT(event->Record.GetCmdDeleteRange(index).HasRange());
+
+ auto& range = event->Record.GetCmdDeleteRange(index).GetRange();
+ TString key = range.GetFrom();
+ UNIT_ASSERT(key.Size() > (1 + 10 + 1)); // type + partition + mark + consumer
+
+ if (deleteRange.Partition.Defined()) {
+ auto partition = FromString<ui32>(key.substr(1, 10));
+ UNIT_ASSERT_VALUES_EQUAL(*deleteRange.Partition, partition);
+ }
+ if (deleteRange.Consumer.Defined()) {
+ TString consumer = key.substr(12);
+ UNIT_ASSERT_VALUES_EQUAL(*deleteRange.Consumer, consumer);
+ }
+ }
+}
+
+void TPartitionFixture::WaitCmdWriteTx(const TCmdWriteTxMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.GetCookie(), 5); // WRITE_TX_PREPARED_COOKIE
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.CmdGetStatusSize(), 1 + matcher.TxOps.size());
+}
+
+void TPartitionFixture::SendCmdWriteResponse(NMsgBusProxy::EResponseStatus status)
+{
+ auto event = MakeHolder<TEvKeyValue::TEvResponse>();
+ event->Record.SetStatus(status);
+ event->Record.SetCookie(1); // SET_OFFSET_COOKIE
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendSubDomainStatus(bool subDomainOutOfSpace)
+{
+ auto event = MakeHolder<TEvPQ::TEvSubDomainStatus>();
+ event->Record.SetSubDomainOutOfSpace(subDomainOutOfSpace);
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendReserveBytes(const ui64 cookie, const ui32 size, const TString& ownerCookie, const ui64 messageNo, bool lastRequest)
+{
+ auto event = MakeHolder<TEvPQ::TEvReserveBytes>(cookie, size, ownerCookie, messageNo, lastRequest);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendWrite(const ui64 cookie, const ui64 messageNo, const TString& ownerCookie, const TMaybe<ui64> offset, const TString& data, bool ignoreQuotaDeadline)
+{
+ TEvPQ::TEvWrite::TMsg msg;
+ msg.SourceId = "SourceId";
+ msg.SeqNo = messageNo;
+ msg.PartNo = 0;
+ msg.TotalParts = 1;
+ msg.TotalSize = data.size();
+ msg.CreateTimestamp = TMonotonic::Now().Seconds();
+ msg.ReceiveTimestamp = TMonotonic::Now().Seconds();
+ msg.DisableDeduplication = false;
+ msg.Data = data;
+ msg.UncompressedSize = data.size();
+ msg.PartitionKey = "PartitionKey";
+ msg.ExplicitHashKey = "ExplicitHashKey";
+ msg.External = false;
+ msg.IgnoreQuotaDeadline = ignoreQuotaDeadline;
+
+ TVector<TEvPQ::TEvWrite::TMsg> msgs;
+ msgs.push_back(msg);
+
+ auto event = MakeHolder<TEvPQ::TEvWrite>(cookie, messageNo, ownerCookie, offset, std::move(msgs), false);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendChangeOwner(const ui64 cookie, const TString& owner, const TActorId& pipeClient, const bool force)
+{
+ auto event = MakeHolder<TEvPQ::TEvChangeOwner>(cookie, owner, pipeClient, Ctx->Edge, force);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitProxyResponse(const TProxyResponseMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvProxyResponse>();
+ UNIT_ASSERT(event != nullptr);
+
+ if (matcher.Cookie) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Cookie, event->Cookie);
+ }
+
+ if (matcher.Status) {
+ UNIT_ASSERT(event->Response.HasStatus());
+ UNIT_ASSERT(*matcher.Status == event->Response.GetStatus());
+ }
+
+ if (matcher.ErrorCode) {
+ UNIT_ASSERT(event->Response.HasErrorCode());
+ UNIT_ASSERT(*matcher.ErrorCode == event->Response.GetErrorCode());
+ }
+
+ if (matcher.Offset) {
+ UNIT_ASSERT(event->Response.HasPartitionResponse());
+ UNIT_ASSERT(event->Response.GetPartitionResponse().HasCmdGetClientOffsetResult());
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Offset, event->Response.GetPartitionResponse().GetCmdGetClientOffsetResult().GetOffset());
+ }
+}
+
+void TPartitionFixture::WaitErrorResponse(const TErrorMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvError>();
+ UNIT_ASSERT(event != nullptr);
+
+ if (matcher.Cookie) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Cookie, event->Cookie);
+ }
+
+ if (matcher.ErrorCode) {
+ UNIT_ASSERT(*matcher.ErrorCode == event->ErrorCode);
+ }
+
+ if (matcher.Error) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Error, event->Error);
+ }
+}
+
+void TPartitionFixture::WaitConfigRequest()
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.CmdReadSize(), 1);
+}
+
+void TPartitionFixture::SendConfigResponse(const TConfigParams& config)
+{
+ auto event = MakeHolder<TEvKeyValue::TEvResponse>();
+ event->Record.SetStatus(NMsgBusProxy::MSTATUS_OK);
+
+ auto read = event->Record.AddReadResult();
+ if (config.Consumers.empty()) {
+ read->SetStatus(NKikimrProto::NODATA);
+ } else {
+ read->SetStatus(NKikimrProto::OK);
+
+ TString out;
+ Y_VERIFY(MakeConfig(config.Version,
+ config.Consumers).SerializeToString(&out));
+
+ read->SetValue(out);
+ }
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitDiskStatusRequest()
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT(event->Record.CmdGetStatusSize() > 0);
+}
+
+void TPartitionFixture::SendDiskStatusResponse()
+{
+ auto event = MakeHolder<TEvKeyValue::TEvResponse>();
+ event->Record.SetStatus(NMsgBusProxy::MSTATUS_OK);
+
+ auto result = event->Record.AddGetStatusResult();
+ result->SetStatus(NKikimrProto::OK);
+ result->SetStatusFlags(NKikimrBlobStorage::StatusIsValid);
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitMetaReadRequest()
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.CmdReadSize(), 2);
+}
+
+void TPartitionFixture::SendMetaReadResponse(TMaybe<ui64> step, TMaybe<ui64> txId)
+{
+ auto event = MakeHolder<TEvKeyValue::TEvResponse>();
+ event->Record.SetStatus(NMsgBusProxy::MSTATUS_OK);
+
+ //
+ // NKikimrPQ::TPartitionMeta
+ //
+ auto read = event->Record.AddReadResult();
+ read->SetStatus(NKikimrProto::NODATA);
+
+ //
+ // NKikimrPQ::TPartitionTxMeta
+ //
+ read = event->Record.AddReadResult();
+ if (step.Defined() || txId.Defined()) {
+ NKikimrPQ::TPartitionTxMeta meta;
+
+ if (step.Defined()) {
+ meta.SetPlanStep(*step);
+ }
+ if (txId.Defined()) {
+ meta.SetTxId(*txId);
+ }
+
+ TString out;
+ Y_PROTOBUF_SUPPRESS_NODISCARD meta.SerializeToString(&out);
+
+ read->SetStatus(NKikimrProto::OK);
+ read->SetValue(out);
+ } else {
+ read->SetStatus(NKikimrProto::NODATA);
+ }
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitInfoRangeRequest()
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.CmdReadRangeSize(), 1);
+}
+
+void TPartitionFixture::SendInfoRangeResponse(ui32 partition,
+ const TVector<TCreateConsumerParams>& consumers)
+{
+ auto event = MakeHolder<TEvKeyValue::TEvResponse>();
+ event->Record.SetStatus(NMsgBusProxy::MSTATUS_OK);
+
+ auto read = event->Record.AddReadRangeResult();
+ if (consumers.empty()) {
+ read->SetStatus(NKikimrProto::NODATA);
+ } else {
+ read->SetStatus(NKikimrProto::OK);
+
+ for (auto& c : consumers) {
+ auto pair = read->AddPair();
+ pair->SetStatus(NKikimrProto::OK);
+
+ NPQ::TKeyPrefix key(NPQ::TKeyPrefix::TypeInfo, partition, NPQ::TKeyPrefix::MarkUser);
+ key.Append(c.Consumer.data(), c.Consumer.size());
+ pair->SetKey(key.Data(), key.Size());
+
+ NKikimrPQ::TUserInfo userInfo;
+ userInfo.SetOffset(c.Offset);
+ userInfo.SetGeneration(c.Generation);
+ userInfo.SetStep(c.Step);
+ userInfo.SetSession(c.Session);
+ userInfo.SetOffsetRewindSum(c.OffsetRewindSum);
+ userInfo.SetReadRuleGeneration(c.ReadRuleGeneration);
+
+ TString out;
+ Y_PROTOBUF_SUPPRESS_NODISCARD userInfo.SerializeToString(&out);
+ pair->SetValue(out);
+ }
+ }
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitDataRangeRequest()
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvKeyValue::TEvRequest>();
+ UNIT_ASSERT(event != nullptr);
+
+ UNIT_ASSERT_VALUES_EQUAL(event->Record.CmdReadRangeSize(), 1);
+}
+
+void TPartitionFixture::SendDataRangeResponse(ui64 begin, ui64 end)
+{
+ Y_VERIFY(begin <= end);
+
+ auto event = MakeHolder<TEvKeyValue::TEvResponse>();
+ event->Record.SetStatus(NMsgBusProxy::MSTATUS_OK);
+
+ auto read = event->Record.AddReadRangeResult();
+ read->SetStatus(NKikimrProto::OK);
+ auto pair = read->AddPair();
+ NPQ::TKey key(NPQ::TKeyPrefix::TypeData, 1, begin, 0, end - begin, 0);
+ pair->SetStatus(NKikimrProto::OK);
+ pair->SetKey(key.ToString());
+ //pair->SetValueSize();
+ pair->SetCreationUnixTime(0);
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendProposeTransactionRequest(ui32 partition,
+ ui64 begin, ui64 end,
+ const TString& client,
+ const TString& topic,
+ bool immediate,
+ ui64 txId)
+{
+ auto event = MakeHolder<TEvPersQueue::TEvProposeTransaction>();
+
+ ActorIdToProto(Ctx->Edge, event->Record.MutableSource());
+ auto* body = event->Record.MutableData();
+ auto* operation = body->MutableOperations()->Add();
+ operation->SetPartitionId(partition);
+ operation->SetBegin(begin);
+ operation->SetEnd(end);
+ operation->SetConsumer(client);
+ operation->SetPath(topic);
+ body->SetImmediate(immediate);
+ event->Record.SetTxId(txId);
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitProposeTransactionResponse(const TProposeTransactionResponseMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvPersQueue::TEvProposeTransactionResult>();
+ UNIT_ASSERT(event != nullptr);
+
+ if (matcher.TxId) {
+ UNIT_ASSERT(event->Record.HasTxId());
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.TxId, event->Record.GetTxId());
+ }
+
+ if (matcher.Status) {
+ UNIT_ASSERT(event->Record.HasStatus());
+ UNIT_ASSERT(*matcher.Status == event->Record.GetStatus());
+ }
+}
+
+void TPartitionFixture::SendCalcPredicate(ui64 step,
+ ui64 txId,
+ const TString& consumer,
+ ui64 begin,
+ ui64 end)
+{
+ auto event = MakeHolder<TEvPQ::TEvTxCalcPredicate>(step, txId);
+ event->AddOperation(consumer, begin, end);
+
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitCalcPredicateResult(const TCalcPredicateMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvTxCalcPredicateResult>();
+ UNIT_ASSERT(event != nullptr);
+
+ if (matcher.Step) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Step, event->Step);
+ }
+ if (matcher.TxId) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.TxId, event->TxId);
+ }
+ if (matcher.Partition) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Partition, event->Partition);
+ }
+ if (matcher.Predicate) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Predicate, event->Predicate);
+ }
+}
+
+void TPartitionFixture::SendCommitTx(ui64 step, ui64 txId)
+{
+ auto event = MakeHolder<TEvPQ::TEvTxCommit>(step, txId);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::SendRollbackTx(ui64 step, ui64 txId)
+{
+ auto event = MakeHolder<TEvPQ::TEvTxRollback>(step, txId);
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitCommitTxDone(const TCommitTxDoneMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvTxCommitDone>();
+ UNIT_ASSERT(event != nullptr);
+
+ if (matcher.Step) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Step, event->Step);
+ }
+ if (matcher.TxId) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.TxId, event->TxId);
+ }
+ if (matcher.Partition) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Partition, event->Partition);
+ }
+}
+
+void TPartitionFixture::SendChangePartitionConfig(const TConfigParams& config)
+{
+ auto event = MakeHolder<TEvPQ::TEvChangePartitionConfig>(TopicConverter, MakeConfig(config.Version,
+ config.Consumers));
+ Ctx->Runtime->SingleSys()->Send(new IEventHandleFat(ActorId, Ctx->Edge, event.Release()));
+}
+
+void TPartitionFixture::WaitPartitionConfigChanged(const TChangePartitionConfigMatcher& matcher)
+{
+ auto event = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvPartitionConfigChanged>();
+ UNIT_ASSERT(event != nullptr);
+
+ if (matcher.Partition) {
+ UNIT_ASSERT_VALUES_EQUAL(*matcher.Partition, event->Partition);
+ }
+}
+
+TTransaction TPartitionFixture::MakeTransaction(ui64 step, ui64 txId,
+ TString consumer,
+ ui64 begin, ui64 end,
+ TMaybe<bool> predicate)
+{
+ auto event = MakeSimpleShared<TEvPQ::TEvTxCalcPredicate>(step, txId);
+ event->AddOperation(std::move(consumer), begin, end);
+
+ return TTransaction(event, predicate);
+}
+
+Y_UNIT_TEST_F(ReserveSubDomainOutOfSpace, TPartitionFixture)
+{
+ Ctx->Runtime->GetAppData().FeatureFlags.SetEnableTopicDiskSubDomainQuota(true);
+
+ CreatePartition({
+ .Partition=1,
+ .Begin=0, .End=10,
+ //
+ // partition configuration
+ //
+ .Config={.Version=1, .Consumers={{.Consumer="client-1", .Offset=3}}}
+ },
+ //
+ // tablet configuration
+ //
+ {.Version=2, .Consumers={{.Consumer="client-1"}}});
+
+ SendSubDomainStatus(true);
+
+ ui64 cookie = 1;
+ ui64 messageNo = 0;
+
+ SendChangeOwner(cookie, "owner1", Ctx->Edge);
+ auto ownerEvent = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvProxyResponse>(TDuration::Seconds(1));
+ UNIT_ASSERT(ownerEvent != nullptr);
+ auto ownerCookie = ownerEvent->Response.GetPartitionResponse().GetCmdGetOwnershipResult().GetOwnerCookie();
+
+ TAutoPtr<IEventHandle> handle;
+ std::function<bool(const TEvPQ::TEvProxyResponse&)> truth = [&](const TEvPQ::TEvProxyResponse& e) { return cookie == e.Cookie; };
+
+ // First message will be processed because used storage 0 and limit 0. That is, the limit is not exceeded.
+ SendReserveBytes(++cookie, 7, ownerCookie, messageNo++);
+
+ // Second message will not be processed because the limit is exceeded.
+ SendReserveBytes(++cookie, 13, ownerCookie, messageNo++);
+ auto reserveEvent = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvProxyResponse>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(reserveEvent == nullptr);
+
+ // SudDomain quota available - second message will be processed..
+ SendSubDomainStatus(false);
+ reserveEvent = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvProxyResponse>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(reserveEvent != nullptr);
+}
+
+Y_UNIT_TEST_F(WriteSubDomainOutOfSpace, TPartitionFixture)
+{
+ Ctx->Runtime->GetAppData().FeatureFlags.SetEnableTopicDiskSubDomainQuota(true);
+ Ctx->Runtime->GetAppData().PQConfig.MutableQuotingConfig()->SetQuotaWaitDurationMs(300);
+
+ CreatePartition({
+ .Partition=1,
+ .Begin=0, .End=10,
+ //
+ // partition configuration
+ //
+ .Config={.Version=1, .Consumers={{.Consumer="client-1", .Offset=3}}}
+ },
+ //
+ // tablet configuration
+ //
+ {.Version=2, .Consumers={{.Consumer="client-1"}}});
+
+ SendSubDomainStatus(true);
+
+ ui64 cookie = 1;
+ ui64 messageNo = 0;
+
+ SendChangeOwner(cookie, "owner1", Ctx->Edge, true);
+ auto ownerEvent = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvProxyResponse>(TDuration::Seconds(1));
+ UNIT_ASSERT(ownerEvent != nullptr);
+ auto ownerCookie = ownerEvent->Response.GetPartitionResponse().GetCmdGetOwnershipResult().GetOwnerCookie();
+
+ TAutoPtr<IEventHandle> handle;
+ std::function<bool(const TEvPQ::TEvError&)> truth = [&](const TEvPQ::TEvError& e) { return cookie == e.Cookie; };
+
+ TString data = "data for write";
+
+ // First message will be processed because used storage 0 and limit 0. That is, the limit is not exceeded.
+ SendWrite(++cookie, messageNo, ownerCookie, (messageNo + 1) * 100, data);
+ messageNo++;
+
+ SendDiskStatusResponse();
+
+ // Second message will not be processed because the limit is exceeded.
+ SendWrite(++cookie, messageNo, ownerCookie, (messageNo + 1) * 100, data);
+ messageNo++;
+
+ SendDiskStatusResponse();
+ auto event = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvError>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(event != nullptr);
+ UNIT_ASSERT_EQUAL(NPersQueue::NErrorCode::OVERLOAD, event->ErrorCode);
+}
+
+Y_UNIT_TEST_F(WriteSubDomainOutOfSpace_DisableExpiration, TPartitionFixture)
+{
+ Ctx->Runtime->GetAppData().FeatureFlags.SetEnableTopicDiskSubDomainQuota(true);
+ // disable write request expiration while thes wait quota
+ Ctx->Runtime->GetAppData().PQConfig.MutableQuotingConfig()->SetQuotaWaitDurationMs(0);
+
+ CreatePartition({
+ .Partition=1,
+ .Begin=0, .End=10,
+ //
+ // partition configuration
+ //
+ .Config={.Version=1, .Consumers={{.Consumer="client-1", .Offset=3}}}
+ },
+ //
+ // tablet configuration
+ //
+ {.Version=2, .Consumers={{.Consumer="client-1"}}});
+
+ SendSubDomainStatus(true);
+
+ ui64 cookie = 1;
+ ui64 messageNo = 0;
+
+ SendChangeOwner(cookie, "owner1", Ctx->Edge, true);
+ auto ownerEvent = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvProxyResponse>(TDuration::Seconds(1));
+ UNIT_ASSERT(ownerEvent != nullptr);
+ auto ownerCookie = ownerEvent->Response.GetPartitionResponse().GetCmdGetOwnershipResult().GetOwnerCookie();
+
+ TAutoPtr<IEventHandle> handle;
+ std::function<bool(const TEvPQ::TEvProxyResponse&)> truth = [&](const TEvPQ::TEvProxyResponse& e) { return cookie == e.Cookie; };
+
+ TString data = "data for write";
+
+ // First message will be processed because used storage 0 and limit 0. That is, the limit is not exceeded.
+ SendWrite(++cookie, messageNo, ownerCookie, (messageNo + 1) * 100, data);
+ messageNo++;
+
+ SendDiskStatusResponse();
+
+ // Second message will not be processed because the limit is exceeded.
+ SendWrite(++cookie, messageNo, ownerCookie, (messageNo + 1) * 100, data);
+ messageNo++;
+
+ SendDiskStatusResponse();
+ auto event = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvProxyResponse>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(event == nullptr);
+
+ // SudDomain quota available - second message will be processed..
+ SendSubDomainStatus(false);
+ SendDiskStatusResponse();
+
+ event = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvProxyResponse>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(event != nullptr);
+ UNIT_ASSERT_EQUAL(NMsgBusProxy::MSTATUS_OK, event->Response.GetStatus());
+}
+
+Y_UNIT_TEST_F(WriteSubDomainOutOfSpace_IgnoreQuotaDeadline, TPartitionFixture)
+{
+ Ctx->Runtime->GetAppData().FeatureFlags.SetEnableTopicDiskSubDomainQuota(true);
+ Ctx->Runtime->GetAppData().PQConfig.MutableQuotingConfig()->SetQuotaWaitDurationMs(300);
+
+ CreatePartition({
+ .Partition=1,
+ .Begin=0, .End=10,
+ //
+ // partition configuration
+ //
+ .Config={.Version=1, .Consumers={{.Consumer="client-1", .Offset=3}}}
+ },
+ //
+ // tablet configuration
+ //
+ {.Version=2, .Consumers={{.Consumer="client-1"}}});
+
+ SendSubDomainStatus(true);
+
+ ui64 cookie = 1;
+ ui64 messageNo = 0;
+
+ SendChangeOwner(cookie, "owner1", Ctx->Edge, true);
+ auto ownerEvent = Ctx->Runtime->GrabEdgeEvent<TEvPQ::TEvProxyResponse>(TDuration::Seconds(1));
+ UNIT_ASSERT(ownerEvent != nullptr);
+ auto ownerCookie = ownerEvent->Response.GetPartitionResponse().GetCmdGetOwnershipResult().GetOwnerCookie();
+
+ TAutoPtr<IEventHandle> handle;
+ std::function<bool(const TEvPQ::TEvProxyResponse&)> truth = [&](const TEvPQ::TEvProxyResponse& e) { return cookie == e.Cookie; };
+
+ TString data = "data for write";
+
+ // First message will be processed because used storage 0 and limit 0. That is, the limit is not exceeded.
+ SendWrite(++cookie, messageNo, ownerCookie, (messageNo + 1) * 100, data, true);
+ messageNo++;
+
+ SendDiskStatusResponse();
+
+ // Second message will not be processed because the limit is exceeded.
+ SendWrite(++cookie, messageNo, ownerCookie, (messageNo + 1) * 100, data, true);
+ messageNo++;
+
+ SendDiskStatusResponse();
+ auto event = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvProxyResponse>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(event == nullptr);
+
+ // SudDomain quota available - second message will be processed..
+ SendSubDomainStatus(false);
+ SendDiskStatusResponse();
+
+ event = Ctx->Runtime->GrabEdgeEventIf<TEvPQ::TEvProxyResponse>(handle, truth, TDuration::Seconds(1));
+ UNIT_ASSERT(event != nullptr);
+ UNIT_ASSERT_EQUAL(NMsgBusProxy::MSTATUS_OK, event->Response.GetStatus());
+}
+
+}
+
+}
diff --git a/ydb/core/persqueue/ut/quota_tracker_ut.cpp b/ydb/core/persqueue/ut/quota_tracker_ut.cpp
new file mode 100644
index 0000000000..48af429385
--- /dev/null
+++ b/ydb/core/persqueue/ut/quota_tracker_ut.cpp
@@ -0,0 +1,54 @@
+#include "quota_tracker.h"
+
+#include <library/cpp/testing/unittest/registar.h>
+
+#include <util/generic/size_literals.h>
+
+namespace NKikimr::NPQ {
+
+Y_UNIT_TEST_SUITE(TQuotaTracker) {
+
+Y_UNIT_TEST(TestSmallMessages) {
+ TInstant ts = TInstant::MilliSeconds(123456789);
+ TQuotaTracker quota(2_MB, 2_MB, ts);
+
+ UNIT_ASSERT(quota.CanExaust(ts));
+
+ quota.Exaust(2_MB - 1, ts);
+ ui64 blobSize = 500;
+ ui64 processedBlobs = 0;
+
+ for (ui32 i = 0; i < 100'000; ++i) { // 10 sec total
+ if (quota.CanExaust(ts)) {
+ quota.Exaust(blobSize, ts);
+ ++processedBlobs;
+ }
+ ts += TDuration::MicroSeconds(100);
+ }
+ Cerr << "processed_blobs=" << processedBlobs << " quoted_time=" << quota.GetQuotedTime(ts) << Endl;
+ UNIT_ASSERT_EQUAL(processedBlobs, 41800);
+ UNIT_ASSERT_EQUAL(quota.GetQuotedTime(ts), TDuration::MilliSeconds(9980));
+}
+
+Y_UNIT_TEST(TestBigMessages) {
+ TInstant ts = TInstant::MilliSeconds(123456789);
+ TQuotaTracker quota(2_MB, 2_MB, ts);
+
+ UNIT_ASSERT(quota.CanExaust(ts));
+
+ auto CannotExaustAfter = [&](TDuration diff) {
+ ts += diff;
+ UNIT_ASSERT_C(!quota.CanExaust(ts), TStringBuilder() << "at " << ts);
+ };
+
+ quota.Exaust(10_MB, ts);
+ CannotExaustAfter(TDuration::Zero());
+ CannotExaustAfter(TDuration::Seconds(4));
+
+ ts += TDuration::MilliSeconds(1);
+ UNIT_ASSERT(quota.CanExaust(ts));
+}
+
+} //Y_UNIT_TEST_SUITE
+
+} // namespace NKikimr::NPQ
diff --git a/ydb/core/persqueue/ut/resources/counters_datastreams.html b/ydb/core/persqueue/ut/resources/counters_datastreams.html
index 64e0064393..bdf68ef1ac 100644
--- a/ydb/core/persqueue/ut/resources/counters_datastreams.html
+++ b/ydb/core/persqueue/ut/resources/counters_datastreams.html
@@ -1,10 +1,10 @@
<pre>
topic=topic:
- name=api.grpc.topic.stream_write.bytes: 3240
- name=api.grpc.topic.stream_write.messages: 180
- name=topic.write.bytes: 3240
- name=topic.write.messages: 180
- name=topic.write.uncompressed_bytes: 1620
+ name=api.grpc.topic.stream_write.bytes: 540
+ name=api.grpc.topic.stream_write.messages: 30
+ name=topic.write.bytes: 540
+ name=topic.write.messages: 30
+ name=topic.write.uncompressed_bytes: 270
consumer=user:
name=api.grpc.topic.stream_read.bytes: 0
@@ -26,7 +26,7 @@ topic=topic:
bin=999999: 0
name=api.grpc.topic.stream_write.partition_throttled_milliseconds:
- bin=0: 180
+ bin=0: 30
bin=1: 0
bin=10: 0
bin=100: 0
@@ -41,7 +41,7 @@ topic=topic:
bin=999999: 0
name=topic.write.lag_milliseconds:
- bin=100: 180
+ bin=100: 30
bin=1000: 0
bin=10000: 0
bin=180000: 0
@@ -54,7 +54,7 @@ topic=topic:
bin=999999: 0
name=topic.write.message_size_bytes:
- bin=1024: 180
+ bin=1024: 30
bin=10240: 0
bin=102400: 0
bin=1048576: 0
diff --git a/ydb/core/persqueue/ut/user_action_processor_ut.cpp b/ydb/core/persqueue/ut/user_action_processor_ut.cpp
index 25f22548a2..f4d90e8986 100644
--- a/ydb/core/persqueue/ut/user_action_processor_ut.cpp
+++ b/ydb/core/persqueue/ut/user_action_processor_ut.cpp
@@ -253,6 +253,7 @@ void TUserActionProcessorFixture::CreatePartitionActor(ui32 id,
false,
Config,
*tabletCounters,
+ false,
newPartition,
std::move(txs));
ActorId = Ctx->Runtime->Register(actor);
diff --git a/ydb/core/persqueue/utils.cpp b/ydb/core/persqueue/utils.cpp
new file mode 100644
index 0000000000..285640ffe6
--- /dev/null
+++ b/ydb/core/persqueue/utils.cpp
@@ -0,0 +1,22 @@
+#include "utils.h"
+
+namespace NKikimr::NPQ {
+
+ui64 TopicPartitionReserveSize(const NKikimrPQ::TPQTabletConfig& config) {
+ if (NKikimrPQ::TPQTabletConfig::METERING_MODE_REQUEST_UNITS == config.GetMeteringMode()) {
+ return 0;
+ }
+ if (config.GetPartitionConfig().HasStorageLimitBytes()) {
+ return config.GetPartitionConfig().GetStorageLimitBytes();
+ }
+ return config.GetPartitionConfig().GetLifetimeSeconds() * config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
+}
+
+ui64 TopicPartitionReserveThroughput(const NKikimrPQ::TPQTabletConfig& config) {
+ if (NKikimrPQ::TPQTabletConfig::METERING_MODE_REQUEST_UNITS == config.GetMeteringMode()) {
+ return 0;
+ }
+ return config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
+}
+
+} // NKikimr::NPQ
diff --git a/ydb/core/persqueue/utils.h b/ydb/core/persqueue/utils.h
new file mode 100644
index 0000000000..806e9950ca
--- /dev/null
+++ b/ydb/core/persqueue/utils.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include <ydb/core/protos/pqconfig.pb.h>
+
+namespace NKikimr::NPQ {
+
+ui64 TopicPartitionReserveSize(const NKikimrPQ::TPQTabletConfig& config);
+ui64 TopicPartitionReserveThroughput(const NKikimrPQ::TPQTabletConfig& config);
+
+} // NKikimr::NPQ
diff --git a/ydb/core/protos/blob_depot.proto b/ydb/core/protos/blob_depot.proto
index 8b0292a03f..c7fe27a8ad 100644
--- a/ydb/core/protos/blob_depot.proto
+++ b/ydb/core/protos/blob_depot.proto
@@ -37,6 +37,7 @@ message TValue {
optional EKeepState KeepState = 3;
optional bool Public = 4;
optional bool GoingToAssimilate = 5;
+ optional uint32 ValueVersion = 6;
}
message TGivenIdRange {
@@ -220,8 +221,15 @@ message TEvResolveResult {
optional bytes Meta = 4;
repeated uint64 Owners = 5;
optional string ErrorReason = 6; // if set, this means value wasn't resolved due to error
+ optional uint32 ValueVersion = 7; // ValueChain version, gets increased every time value is changed
+ optional bool ReliablyWritten = 8; // MustRestoreFirst was either set, or the blob is in local storage
}
optional NKikimrProto.EReplyStatus Status = 1; // OVERRUN means there are more messages on the way
optional string ErrorReason = 2;
repeated TResolvedKey ResolvedKeys = 3;
}
+
+message TEvPushMetrics {
+ optional uint64 BytesRead = 1; // since last update
+ optional uint64 BytesWritten = 2; // since last update
+}
diff --git a/ydb/core/protos/blobstorage.proto b/ydb/core/protos/blobstorage.proto
index 1b05fdf772..78927019eb 100644
--- a/ydb/core/protos/blobstorage.proto
+++ b/ydb/core/protos/blobstorage.proto
@@ -165,15 +165,6 @@ enum EEntityStatus {
RESTART = 4; // entity has changed config or changed environment and should be restarted by warden
}
-message TGroupDecommitStatus {
- enum E {
- NONE = 0; // no decomission
- PENDING = 1; // decommission machinery is starting
- IN_PROGRESS = 2; // decomission underway
- DONE = 3; // group decomission complete
- }
-}
-
message TGroupInfo {
message TFailRealm {
message TFailDomain {
@@ -197,7 +188,7 @@ message TGroupInfo {
optional string StoragePoolName = 13;
optional EPDiskType DeviceType = 14;
optional uint64 BlobDepotId = 15; // if filled, then this is virtual group
- optional TGroupDecommitStatus.E DecommitStatus = 16;
+ optional NKikimrBlobStorage.TGroupDecommitStatus.E DecommitStatus = 16;
}
message TEvVPatchStart {
@@ -596,6 +587,8 @@ message TEvVAssimilate {
optional fixed64 SkipBlocksUpTo = 10; // return keys strictly greater than this; if not set, return since the first one
optional TBarrierKey SkipBarriersUpTo = 11; // the same behaviour
optional NKikimrProto.TLogoBlobID SkipBlobsUpTo = 12; // the same behaviour
+
+ optional bool IgnoreDecommitState = 13 [default = false]; // do not check if VDisk belongs to a being-decommitted group
}
message TEvVAssimilateResult {
diff --git a/ydb/core/protos/blobstorage_config.proto b/ydb/core/protos/blobstorage_config.proto
index cf91ae5218..17a7edfe11 100644
--- a/ydb/core/protos/blobstorage_config.proto
+++ b/ydb/core/protos/blobstorage_config.proto
@@ -23,6 +23,15 @@ enum EVirtualGroupState {
WORKING = 2; // operational
}
+message TGroupDecommitStatus {
+ enum E {
+ NONE = 0; // no decomission
+ PENDING = 1; // decommission machinery is starting
+ IN_PROGRESS = 2; // decomission underway
+ DONE = 3; // group decomission complete
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TYPICAL HOST CONFIGURATIONS
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -221,8 +230,8 @@ message TDriveLifeStage {
enum E {
UNKNOWN = 0; // life stage is unknown (default)
NOT_SEEN = 1; // info about drive is located in BSC db, but drive is not seen in any node
- ALLOCATED = 2; // PDisk is created
- REMOVED = 3; // drive marked as removed
+ ADDED = 2; // PDisk has been added to the DrivesSerials table
+ REMOVED = 3; // PDisk has been removed from the DrivesSerials table
ERROR = 4; // drive was moved between nodes with allocated VDisks
}
}
@@ -254,6 +263,7 @@ message TProposeStoragePools {
}
message TQueryBaseConfig {
+ bool VirtualGroupsOnly = 2;
}
message TReadSettings {
@@ -589,6 +599,7 @@ message TBaseConfig {
NKikimrBlobStorage.TPDiskMetrics PDiskMetrics = 14;
uint64 DriveStatusChangeTimestamp = 15; // TInstant::GetValue()
EDecommitStatus DecommitStatus = 16;
+ string ExpectedSerial = 17;
}
message TVSlot {
message TDonorDisk {
@@ -610,6 +621,13 @@ message TBaseConfig {
repeated TDonorDisk Donors = 11;
bool Ready = 12; // is disk READY in terms of BSC (stable READY status for some period of time)
}
+ message TVirtualGroupInfo {
+ EVirtualGroupState State = 1;
+ string Name = 2;
+ uint64 BlobDepotId = 3;
+ string ErrorReason = 4;
+ TGroupDecommitStatus.E DecommitStatus = 5;
+ }
message TGroup {
uint32 GroupId = 1;
uint32 GroupGeneration = 2;
@@ -620,6 +638,7 @@ message TBaseConfig {
bool SeenOperational = 7;
TGroupStatus.E OperatingStatus = 8; // group status based on latest VDisk reports only
TGroupStatus.E ExpectedStatus = 9; // status based not only on operational report, but on PDisk status and plans too
+ TVirtualGroupInfo VirtualGroupInfo = 10;
}
message TNode {
uint32 NodeId = 1;
@@ -697,6 +716,7 @@ message TConfigResponse {
NKikimrBlobStorage.TVDiskID VDiskId = 12;
NKikimrBlobStorage.TVSlotId VSlotId = 13;
string StoragePoolName = 14;
+ string DiskSerialNumber = 15;
}
}
diff --git a/ydb/core/protos/blockstore_config.proto b/ydb/core/protos/blockstore_config.proto
index d27b620b42..2e4850da90 100644
--- a/ydb/core/protos/blockstore_config.proto
+++ b/ydb/core/protos/blockstore_config.proto
@@ -66,7 +66,12 @@ message TVolumeConfig {
optional uint32 PerformanceProfileMaxWriteIops = 24;
optional uint32 PerformanceProfileBurstPercentage = 25;
+ // Label of base volume.
+ // If set then current volume is called "overlay volume".
optional string BaseDiskId = 26;
+
+ // "base volume checkpoint" overlay volume sits on.
+ // Should not be empty when BaseDiskId is not empty.
optional string BaseDiskCheckpointId = 27;
optional bool SizeDecreaseAllowed = 28;
@@ -113,6 +118,9 @@ message TVolumeConfig {
// Placement partition id.
optional string PlacementPartitionId = 45;
+
+ // Tablet id of base disk.
+ optional uint64 BaseDiskTabletId = 46;
}
message TUpdateVolumeConfig {
diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto
index fb51130cc5..f13cf1ca8a 100644
--- a/ydb/core/protos/config.proto
+++ b/ydb/core/protos/config.proto
@@ -40,6 +40,12 @@ message TAffinity {
}
message TActorSystemConfig {
+ enum ENodeType {
+ STORAGE = 1;
+ COMPUTE = 2;
+ HYBRID = 3;
+ }
+
message TExecutor {
enum EType {
BASIC = 1;
@@ -113,6 +119,13 @@ message TActorSystemConfig {
}
optional TUnitedWorkers UnitedWorkers = 11;
+
+ optional bool UseAutoConfig = 12;
+
+ // Used only with UseAutoConfig;
+ optional uint32 CpuCount = 13;
+ optional ENodeType NodeType = 14 [default = COMPUTE];
+
}
message TStaticNameserviceConfig {
@@ -652,6 +665,11 @@ message TGRpcConfig {
optional uint32 KeepAliveMaxProbeCount = 102 [default = 3]; // TCP_KEEPCNT
optional uint32 KeepAliveProbeIntervalSec = 103 [default = 10]; // TCP_KEEPINTVL
+ optional uint32 WorkersPerCompletionQueue = 104 [default = 2];
+ optional uint32 HandlersPerCompletionQueue = 105 [default = 1];
+
+ optional uint32 GRpcProxyCount = 106 [default = 1];
+
repeated TGRpcConfig ExtEndpoints = 200; // run specific services on separate endpoints
}
@@ -690,7 +708,7 @@ message TFeatureFlags {
optional bool EnableExternalHive = 17 [default = true];
optional bool UseSchemeBoardCacheForSchemeRequests = 18 [default = true]; // deprecated: always true
optional bool CompileMinikqlWithVersion = 19 [default = true]; // deprecated: always true
- optional bool ReadTableWithSnapshot = 20 [default = true];
+ optional bool ReadTableWithSnapshot = 20 [default = true]; // deprecated: always true
optional bool ImportantTabletsUseSystemPool = 21 [default = true];
optional bool EnableOfflineSlaves = 22 [default = true]; // deprecated: always true
optional bool CheckDatabaseAccessPermission = 23 [default = false];
@@ -715,7 +733,7 @@ message TFeatureFlags {
optional bool AllowStreamExecuteYqlScript = 42 [default = true];
optional bool EnableKqpScanOverPersistentSnapshot = 43 [default = true]; // deprecated: always true
optional bool EnableOlapSchemaOperations = 44 [default = true];
- optional bool EnableVPatch = 45 [default = false];
+ optional bool EnableVPatch = 45 [default = true];
optional bool EnableMvccSnapshotReads = 46 [default = true];
optional Tribool EnableMvcc = 47 [default = VALUE_TRUE];
optional bool EnableSchemeTransactionsAtSchemeShard = 48 [default = true];
@@ -733,21 +751,21 @@ message TFeatureFlags {
optional bool EnablePublicApiExternalBlobs = 59 [default = false];
optional bool EnablePublicApiKeepInMemory = 60 [default = false];
optional bool EnableImplicitScanQueryInScripts = 61 [default = true];
- optional bool EnablePredicateExtractForScanQueries = 62 [default = true];
+ reserved 62; // EnablePredicateExtractForScanQueries
optional bool AllowVDiskDefrag = 63 [default = true];
optional bool EnableAsyncHttpMon = 64 [default = true];
optional bool EnableChangefeeds = 65 [default = true];
- optional bool EnableKqpScanQueryStreamLookup = 66 [default = false];
+ reserved 66; // EnableKqpScanQueryStreamLookup
optional bool EnableKqpScanQueryMultipleOlapShardsReads = 67 [default = false];
- optional bool EnablePredicateExtractForDataQueries = 68 [default = true];
+ reserved 68; // EnablePredicateExtractForDataQueries;
reserved 69; // optional bool EnableKqpPatternCacheLiteral = 69 [default = false];
- optional bool EnableMoveIndex = 70 [default = false];
+ optional bool EnableMoveIndex = 70 [default = true];
// enable http handle for self termination
optional bool EnableFailureInjectionTermination = 71 [default = false];
optional bool EnableChunkLocking = 72 [default = false];
optional bool EnableNotNullDataColumns = 73 [default = false];
optional bool EnableGrpcAudit = 74 [default = false];
- optional bool EnableKqpDataQueryStreamLookup = 75 [default = false];
+ reserved 75; // EnableKqpDataQueryStreamLookup
optional bool EnableBorrowedSplitCompaction = 76 [default = true];
optional bool EnableChangefeedInitialScan = 77 [default = false];
reserved 78; // EnableKqpScanQuerySourceRead
@@ -760,6 +778,7 @@ message TFeatureFlags {
reserved 83; // EnableKqpDataQuerySourceRead
optional bool EnableSmallDiskOptimization = 84 [default = true];
optional bool EnableDataShardVolatileTransactions = 85 [default = false];
+ optional bool EnableTopicDiskSubDomainQuota = 89 [default = false];
}
@@ -1072,7 +1091,7 @@ message TTableServiceConfig {
reserved 13;
reserved 14;
optional TShardsScanningPolicy ShardsScanningPolicy = 16;
- optional uint64 KqpPatternCacheCapacityBytes = 17 [default = 104857600]; // 100 MiB, 0 is for disable
+ optional uint64 KqpPatternCacheCapacityBytes = 17 [default = 0]; // 0 is for disable
}
message TSpillingServiceConfig {
@@ -1185,6 +1204,12 @@ message TTableServiceConfig {
optional uint32 LeakyBucketQuotaBucketDurationSeconds = 6 [default = 60];
}
+ message TExecuterRetriesConfig {
+ optional uint32 MinDelayToRetryMs = 1 [default = 10];
+ optional uint32 MaxDelayToRetryMs = 2 [default = 400];
+ optional uint32 MaxRetryNumber = 3 [default = 10];
+ }
+
optional uint32 QueryLimitBytes = 1;
optional uint32 ParametersLimitBytes = 2;
optional uint32 SessionsLimitPerNode = 3;
@@ -1214,6 +1239,14 @@ message TTableServiceConfig {
optional bool EnableKqpScanQuerySourceRead = 26 [default = false];
optional bool EnableKqpDataQuerySourceRead = 27 [default = false];
optional uint64 SessionIdleDurationSeconds = 28 [default = 600];
+ optional bool EnableKqpScanQueryStreamLookup = 30 [default = false];
+ optional bool EnableKqpDataQueryStreamLookup = 31 [default = false];
+ optional TExecuterRetriesConfig ExecuterRetriesConfig = 32;
+ optional bool EnableKqpDataQueryStreamPointLookup = 33 [default = false];
+ optional bool EnablePublishKqpProxyByRM = 34 [default = false];
+ optional bool EnableKqpScanQueryStreamIdxLookupJoin = 35 [default = false];
+ optional bool EnablePredicateExtractForScanQueries = 36 [default = true];
+ optional bool EnablePredicateExtractForDataQueries = 37 [default = false];
};
// Config describes immediate controls and allows
@@ -1394,6 +1427,8 @@ message TImmediateControlsConfig {
message TMeteringConfig {
optional string MeteringFilePath = 1;
repeated string SystemBackupSIDs = 2;
+ optional string LogName = 3;
+ optional bool UnifiedAgentEnable = 4 [default = false];
};
message TAuditConfig {
@@ -1402,10 +1437,23 @@ message TAuditConfig {
TXT = 2;
}
- optional string AuditFilePath = 1;
- optional EFormat Format = 2 [default = JSON];
- optional string LogName = 3;
- optional bool UnifiedAgentEnable = 4 [default = false];
+ message TStderrBackend {
+ optional EFormat Format = 1 [default = JSON];
+ }
+
+ message TFileBackend {
+ optional EFormat Format = 1 [default = JSON];
+ optional string FilePath = 2;
+ }
+
+ message TUnifiedAgentBackend {
+ optional EFormat Format = 1 [default = JSON];
+ optional string LogName = 2;
+ }
+
+ optional TStderrBackend StderrBackend = 1;
+ optional TFileBackend FileBackend = 2;
+ optional TUnifiedAgentBackend UnifiedAgentBackend = 3;
};
message THiveTabletLimit {
@@ -1521,6 +1569,8 @@ message TDataShardConfig {
optional uint64 TtlReadAheadHi = 14 [default = 1048576];
optional uint64 IdleMemCompactionIntervalSeconds = 15 [default = 60];
optional uint64 RestoreReadBufferSizeLimit = 16 [default = 268435456]; // 256 MB
+ optional string CdcInitialScanTaskName = 17 [default = "cdc_initial_scan"];
+ optional uint32 CdcInitialScanTaskPriority = 18 [default = 10];
}
message TSchemeShardConfig {
@@ -1593,6 +1643,9 @@ message TCompactionConfig {
// Compact even if shard has single part and empty memtable
optional bool CompactSinglePartedShards = 10 [default = false];
+
+ // Do not wakeup earlier, than this interval
+ optional uint64 MinWakeupIntervalMs = 11 [default = 10];
}
message TBorrowedCompactionConfig {
@@ -1601,6 +1654,9 @@ message TCompactionConfig {
// After this interval we will try to restart
optional uint64 TimeoutSeconds = 3 [default = 15];
+
+ // Do not wakeup earlier, than this interval
+ optional uint64 MinWakeupIntervalMs = 4 [default = 10];
}
optional TBackgroundCompactionConfig BackgroundCompactionConfig = 1;
diff --git a/ydb/core/protos/counters_bs_controller.proto b/ydb/core/protos/counters_bs_controller.proto
index 3ee52677c3..3979f33442 100644
--- a/ydb/core/protos/counters_bs_controller.proto
+++ b/ydb/core/protos/counters_bs_controller.proto
@@ -217,4 +217,6 @@ enum ETxTypes {
TXTYPE_MON_EVENT_OPERATION_LOG_ENTRY = 23 [(TxTypeOpts) = {Name: "TTxMonEvent_OperationLogEntry"}];
TXTYPE_UPDATE_NODE_DISCONNECT_TIMESTAMP = 24 [(TxTypeOpts) = {Name: "TTxUpdateNodeDisconnectTimestamp"}];
TXTYPE_GROUP_METRICS_EXCHANGE = 25 [(TxTypeOpts) = {Name: "TTxGroupMetricsExchange"}];
+ TXTYPE_DECOMMIT_GROUP = 26 [(TxTypeOpts) = {Name: "TTxDecommitGroup"}];
+ TXTYPE_UPDATE_GROUP = 27 [(TxTypeOpts) = {Name: "TTxUpdateGroup"}];
}
diff --git a/ydb/core/protos/counters_datashard.proto b/ydb/core/protos/counters_datashard.proto
index 3c61ce420d..a43c735c47 100644
--- a/ydb/core/protos/counters_datashard.proto
+++ b/ydb/core/protos/counters_datashard.proto
@@ -23,6 +23,7 @@ enum ESimpleCounters {
COUNTER_CHANGE_QUEUE_SIZE = 13 [(CounterOpts) = {Name: "ChangeQueueSize"}];
COUNTER_READ_ITERATORS_WAITING = 14 [(CounterOpts) = {Name: "ReadIteratorsWaiting"}];
COUNTER_READ_ITERATORS_COUNT = 15 [(CounterOpts) = {Name: "ReadIteratorsCount"}];
+ COUNTER_READ_ITERATORS_EXHAUSTED_COUNT = 16 [(CounterOpts) = {Name: "ReadIteratorsExhaustedCount"}];
}
enum ECumulativeCounters {
@@ -449,4 +450,6 @@ enum ETxTypes {
TXTYPE_REMOVE_LOCK_CHANGE_RECORDS = 72 [(TxTypeOpts) = {Name: "TxRemoveLockChangeRecords"}];
TXTYPE_VOLATILE_TX_COMMIT = 73 [(TxTypeOpts) = {Name: "TxVolatileTxCommit"}];
TXTYPE_VOLATILE_TX_ABORT = 74 [(TxTypeOpts) = {Name: "TxVolatileTxAbort"}];
+ TXTYPE_CDC_STREAM_SCAN_RUN = 75 [(TxTypeOpts) = {Name: "TTxCdcStreamScanRun"}];
+ TXTYPE_CDC_STREAM_SCAN_PROGRESS = 76 [(TxTypeOpts) = {Name: "TTxCdcStreamScanProgress"}];
}
diff --git a/ydb/core/protos/counters_schemeshard.proto b/ydb/core/protos/counters_schemeshard.proto
index ee279130b3..505a8ed6aa 100644
--- a/ydb/core/protos/counters_schemeshard.proto
+++ b/ydb/core/protos/counters_schemeshard.proto
@@ -172,6 +172,19 @@ enum ESimpleCounters {
COUNTER_IN_FLIGHT_OPS_TxCreateCdcStreamAtTableWithInitialScan = 139 [(CounterOpts) = {Name: "InFlightOps/CreateCdcStreamAtTableWithInitialScan"}];
COUNTER_IN_FLIGHT_OPS_TxAlterExtSubDomainCreateHive = 140 [(CounterOpts) = {Name: "InFlightOps/AlterExtSubDomainCreateHive"}];
COUNTER_IN_FLIGHT_OPS_TxAlterCdcStreamAtTableDropSnapshot = 141 [(CounterOpts) = {Name: "InFlightOps/AlterCdcStreamAtTableDropSnapshot"}];
+ COUNTER_IN_FLIGHT_OPS_TxDropCdcStreamAtTableDropSnapshot = 142 [(CounterOpts) = {Name: "InFlightOps/DropCdcStreamAtTableDropSnapshot"}];
+
+ COUNTER_EXTERNAL_TABLE_COUNT = 143 [(CounterOpts) = {Name: "ExternalTableCount"}];
+ COUNTER_IN_FLIGHT_OPS_TxCreateExternalTable = 144 [(CounterOpts) = {Name: "InFlightOps/CreateExternalTable"}];
+ COUNTER_IN_FLIGHT_OPS_TxDropExternalTable = 145 [(CounterOpts) = {Name: "InFlightOps/DropExternalTable"}];
+ COUNTER_IN_FLIGHT_OPS_TxAlterExternalTable = 146 [(CounterOpts) = {Name: "InFlightOps/AlterExternalTable"}];
+
+ COUNTER_EXTERNAL_DATA_SOURCE_COUNT = 147 [(CounterOpts) = {Name: "ExternalDataSourceCount"}];
+ COUNTER_IN_FLIGHT_OPS_TxCreateExternalDataSource = 148 [(CounterOpts) = {Name: "InFlightOps/CreateExternalDataSource"}];
+ COUNTER_IN_FLIGHT_OPS_TxDropExternalDataSource = 149 [(CounterOpts) = {Name: "InFlightOps/DropExternalDataSource"}];
+ COUNTER_IN_FLIGHT_OPS_TxAlterExternalDataSource = 150 [(CounterOpts) = {Name: "InFlightOps/AlterExternalDataSource"}];
+
+ COUNTER_PQ_STATS_QUEUE_SIZE = 151 [(CounterOpts) = {Name: "PQStatsQueueSize"}];
}
enum ECumulativeCounters {
@@ -277,6 +290,17 @@ enum ECumulativeCounters {
COUNTER_FINISHED_OPS_TxCreateCdcStreamAtTableWithInitialScan = 84 [(CounterOpts) = {Name: "FinishedOps/CreateCdcStreamAtTableWithInitialScan"}];
COUNTER_FINISHED_OPS_TxAlterExtSubDomainCreateHive = 85 [(CounterOpts) = {Name: "FinishedOps/AlterExtSubDomainCreateHive"}];
COUNTER_FINISHED_OPS_TxAlterCdcStreamAtTableDropSnapshot = 86 [(CounterOpts) = {Name: "FinishedOps/AlterCdcStreamAtTableDropSnapshot"}];
+ COUNTER_FINISHED_OPS_TxDropCdcStreamAtTableDropSnapshot = 87 [(CounterOpts) = {Name: "FinishedOps/DropCdcStreamAtTableDropSnapshot"}];
+
+ COUNTER_FINISHED_OPS_TxCreateExternalTable = 88 [(CounterOpts) = {Name: "FinishedOps/CreateExternalTable"}];
+ COUNTER_FINISHED_OPS_TxDropExternalTable = 89 [(CounterOpts) = {Name: "FinishedOps/DropExternalTable"}];
+ COUNTER_FINISHED_OPS_TxAlterExternalTable = 90 [(CounterOpts) = {Name: "FinishedOps/AlterExternalTable"}];
+
+ COUNTER_FINISHED_OPS_TxCreateExternalDataSource = 91 [(CounterOpts) = {Name: "FinishedOps/CreateExternalDataSource"}];
+ COUNTER_FINISHED_OPS_TxDropExternalDataSource = 92 [(CounterOpts) = {Name: "FinishedOps/DropExternalDataSource"}];
+ COUNTER_FINISHED_OPS_TxAlterExternalDataSource = 93 [(CounterOpts) = {Name: "FinishedOps/AlterExternalDataSource"}];
+
+ COUNTER_PQ_STATS_WRITTEN = 94 [(CounterOpts) = {Name: "PQStatsWritten"}];
}
enum EPercentileCounters {
@@ -379,6 +403,17 @@ enum EPercentileCounters {
Ranges: { Value: 500000 Name: "500 ms" }
Ranges: { Value: 1000000 Name: "1000 ms" }
}];
+
+ COUNTER_PQ_STATS_BATCH_LATENCY = 6 [(CounterOpts) = {
+ Name: "PQStatsBatchLatency",
+ Ranges: { Value: 1000 Name: "1 ms" }
+ Ranges: { Value: 10000 Name: "10 ms" }
+ Ranges: { Value: 50000 Name: "50 ms" }
+ Ranges: { Value: 100000 Name: "100 ms" }
+ Ranges: { Value: 200000 Name: "200 ms" }
+ Ranges: { Value: 500000 Name: "500 ms" }
+ Ranges: { Value: 1000000 Name: "1000 ms" }
+ }];
}
enum ETxTypes {
@@ -481,4 +516,6 @@ enum ETxTypes {
TXTYPE_BLOB_DEPOT_CONFIG_RESULT = 80 [(TxTypeOpts) = {Name: "TxBlobDepotConfigResult"}];
TXTYPE_ADD_BACKGROUND_TASK_RESULT = 81 [(TxTypeOpts) = {Name: "TxAddBackgroundTaskResult"}];
+
+ TXTYPE_CDC_STREAM_SCAN_PROGRESS = 82 [(TxTypeOpts) = {Name: "TxCdcStreamScanProgress"}];
}
diff --git a/ydb/core/protos/counters_testshard.proto b/ydb/core/protos/counters_testshard.proto
index 9940b5b84f..2d27e4f39d 100644
--- a/ydb/core/protos/counters_testshard.proto
+++ b/ydb/core/protos/counters_testshard.proto
@@ -14,6 +14,7 @@ enum ESimpleCounters {
COUNTER_MODE_WRITE = 0 [(CounterOpts) = {Name: "ModeWrite"}];
COUNTER_MODE_READ_VALIDATE = 1 [(CounterOpts) = {Name: "ModeReadValidate"}];
COUNTER_MODE_STATE_SERVER_CONNECT = 2 [(CounterOpts) = {Name: "StateServerConnect"}];
+ COUNTER_MODE_INITIAL = 3 [(CounterOpts) = {Name: "Initial"}];
}
enum EPercentileCounters {
diff --git a/ydb/core/protos/flat_tx_scheme.proto b/ydb/core/protos/flat_tx_scheme.proto
index 3e22ccf205..4848224b1b 100644
--- a/ydb/core/protos/flat_tx_scheme.proto
+++ b/ydb/core/protos/flat_tx_scheme.proto
@@ -52,6 +52,7 @@ message TEvModifySchemeTransaction {
optional string Owner = 5;
optional bool FailOnExist = 6; // depricated, TModifyScheme.FailOnExist is recomended
optional string UserToken = 7; // serialized NACLib::TUserToken
+ optional string PeerName = 8;
}
message TFetcherCheckUserTieringPermissionsResult {
diff --git a/ydb/core/protos/kqp.proto b/ydb/core/protos/kqp.proto
index 3d7b438be8..06485cb653 100644
--- a/ydb/core/protos/kqp.proto
+++ b/ydb/core/protos/kqp.proto
@@ -223,6 +223,7 @@ message TPreparedQuery {
repeated TParameterDescription Parameters = 4;
optional string Text = 5;
optional NKqpProto.TKqpPhyQuery PhysicalQuery = 6;
+ optional bool EnableLlvm = 7;
};
message TQueryResponse {
@@ -585,9 +586,10 @@ message TEvKillScanTablet {
message TKqpStreamLookupSettings {
optional NKqpProto.TKqpPhyTableId Table = 1;
- repeated string KeyColumns = 2;
- repeated string Columns = 3;
+ repeated TKqpColumnMetadataProto KeyColumns = 2;
+ repeated TKqpColumnMetadataProto Columns = 3;
optional TKqpSnapshot Snapshot = 4;
optional uint64 LockTxId = 5;
optional bool ImmediateTx = 6;
+ repeated string LookupKeyColumns = 7;
}
diff --git a/ydb/core/protos/kqp_stats.proto b/ydb/core/protos/kqp_stats.proto
index c2579c24ff..d13a1a5a39 100644
--- a/ydb/core/protos/kqp_stats.proto
+++ b/ydb/core/protos/kqp_stats.proto
@@ -24,6 +24,11 @@ message TKqpShardTableAggrExtraStats {
NYql.NDqProto.TDqStatsAggr ShardCpuTimeUs = 2;
}
+// aggregated read actor extra stats for table
+message TKqpReadActorTableAggrExtraStats {
+ repeated uint64 AffectedShards = 1;
+}
+
message TKqpScanTableExtraStats {
// IScan stats
uint64 IScanStartTimeMs = 1; // start IScan timestamp
diff --git a/ydb/core/protos/msgbus_pq.proto b/ydb/core/protos/msgbus_pq.proto
index 6cec1d738b..ba7c162d32 100644
--- a/ydb/core/protos/msgbus_pq.proto
+++ b/ydb/core/protos/msgbus_pq.proto
@@ -46,6 +46,7 @@ message TPersQueuePartitionRequest {
optional string SessionId = 4; // if not set, then no checks
optional bool MirrorerRequest = 10 [default = false];
+ optional bool Strict = 11 [default = false];
}
message TCmdGetClientOffset {
diff --git a/ydb/core/protos/node_whiteboard.proto b/ydb/core/protos/node_whiteboard.proto
index 03c9df2e86..82f4b547ca 100644
--- a/ydb/core/protos/node_whiteboard.proto
+++ b/ydb/core/protos/node_whiteboard.proto
@@ -241,6 +241,7 @@ message TBSGroupStateInfo {
optional uint64 WriteThroughput = 18;
optional bool Encryption = 19;
repeated uint32 VDiskNodeIds = 20;
+ optional uint64 BlobDepotId = 21; // if set, then this is virtual group
}
message TEvBSGroupStateRequest {
diff --git a/ydb/core/protos/out/out.cpp b/ydb/core/protos/out/out.cpp
index 6e05ddb6f1..08ba6b3694 100644
--- a/ydb/core/protos/out/out.cpp
+++ b/ydb/core/protos/out/out.cpp
@@ -161,6 +161,10 @@ Y_DECLARE_OUT_SPEC(, NKikimrTxDataShard::TEvCompactTableResult::EStatus, stream,
stream << NKikimrTxDataShard::TEvCompactTableResult::EStatus_Name(value);
}
+Y_DECLARE_OUT_SPEC(, NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus, stream, value) {
+ stream << NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus_Name(value);
+}
+
Y_DECLARE_OUT_SPEC(, NKikimrKqp::EQueryAction, stream, value) {
stream << NKikimrKqp::EQueryAction_Name(value);
}
diff --git a/ydb/core/protos/pqconfig.proto b/ydb/core/protos/pqconfig.proto
index 3a3a35e6c2..fcef4857f8 100644
--- a/ydb/core/protos/pqconfig.proto
+++ b/ydb/core/protos/pqconfig.proto
@@ -18,6 +18,7 @@ option java_package = "ru.yandex.kikimr.proto";
message TPartitionMeta {
optional uint64 StartOffset = 1;
optional uint64 EndOffset = 2;
+ optional bool SubDomainOutOfSpace = 3 [default = false];
}
message TPartitionTxMeta {
@@ -173,10 +174,14 @@ message TPQConfig {
optional bool LBFrontEnabled = 3 [default = true];
optional bool UseLbAccountAlias = 4 [default = true];
optional string LbUserDatabaseRoot = 5 [default = ""];
+ optional bool UseDynNodesMapping = 6 [default = false];
+ optional uint64 NodesMappingRescanIntervalMilliSeconds = 7 [default = 10000];
}
optional TPQDiscoveryConfig PQDiscoveryConfig = 46;
optional uint32 MaxStorageNodePort = 50 [default = 19001];
+ optional uint32 MaxStorageNodeId = 53 [default = 999];
+
message TMoveTopicActorConfig {
repeated string AllowedUserSIDs = 1;
@@ -184,6 +189,8 @@ message TPQConfig {
optional TMoveTopicActorConfig MoveTopicActorConfig = 51;
+ optional uint64 BalancerWakeupIntervalSec = 54 [default = 30];
+ optional uint64 BalancerStatsWakeupIntervalSec = 55 [default = 5];
}
message TChannelProfile {
@@ -384,6 +391,7 @@ message TUpdateBalancerConfig { //for schemeshard use only
}
repeated TTablet Tablets = 10;
+ optional uint64 SubDomainPathId = 13;
}
message TDescribe {
@@ -672,6 +680,8 @@ message TStatusResponse {
repeated TErrorMessage Errors = 29;
repeated TConsumerResult ConsumerResult = 30;
+
+ optional int64 UsedReserveSize = 31;
}
message TConsumerResult {
@@ -825,3 +835,19 @@ message TEvProposeTransactionResult {
message TEvCancelTransactionProposal {
required uint64 TxId = 1;
};
+
+message TEvPeriodicTopicStats {
+ required uint64 PathId = 1;
+
+ required uint64 Generation = 2;
+ required uint64 Round = 3;
+
+ required uint64 DataSize = 4;
+ required uint64 UsedReserveSize = 5;
+
+ optional bool SubDomainOutOfSpace = 6;
+};
+
+message TEvSubDomainStatus {
+ required bool SubDomainOutOfSpace = 1;
+};
diff --git a/ydb/core/protos/services.proto b/ydb/core/protos/services.proto
index f35726ad93..db1238fb52 100644
--- a/ydb/core/protos/services.proto
+++ b/ydb/core/protos/services.proto
@@ -156,6 +156,7 @@ enum EServiceKikimr {
GRPC_PROXY_NO_CONNECT_ACCESS = 417;
READ_TABLE_API = 414; // deprecated, use RPC_REQUEST
RPC_REQUEST = 416;
+ GRPC_LIBRARY = 418;
// KEY VALUE section
KEYVALUE = 420;
@@ -958,5 +959,16 @@ message TActivity {
SCHEMESHARD_SVP_MIGRATOR = 597;
SS_FETCHING_ACTOR = 598;
METADATA_SCHEME_DESCRIPTION_ACTOR = 599;
+ SCHEMESHARD_BACKGROUND_COMPACTION = 600;
+ SCHEMESHARD_BORROWED_COMPACTION = 601;
+ CDC_STREAM_SCAN_ACTOR = 602;
+ SCHEMESHARD_CDC_STREAM_SCAN_FINALIZER = 603;
+ REPLICATION_CONTROLLER_STREAM_REMOVER = 604;
+ REPLICATION_CONTROLLER_DST_REMOVER = 605;
+ REPLICATION_CONTROLLER_TENANT_RESOLVER = 606;
+ DISCOVERY_ACTOR = 607;
+ DISCOVERY_CACHE_ACTOR = 608;
+ REPLICATION_SERVICE = 609;
+ KQP_SOURCE_READ_ACTOR = 610;
};
};
diff --git a/ydb/core/protos/ssa.proto b/ydb/core/protos/ssa.proto
index de4eeabe0a..eaa8891c41 100644
--- a/ydb/core/protos/ssa.proto
+++ b/ydb/core/protos/ssa.proto
@@ -74,6 +74,12 @@ message TProgram {
FUNC_CAST_TO_BINARY = 29;
FUNC_CAST_TO_FIXED_SIZE_BINARY = 30;
FUNC_CAST_TO_TIMESTAMP = 31;
+ FUNC_STR_MATCH_LIKE = 32;
+ FUNC_STR_STARTS_WITH = 33;
+ FUNC_STR_ENDS_WITH = 34;
+ FUNC_STR_MATCH_IGNORE_CASE = 35;
+ FUNC_STR_STARTS_WITH_IGNORE_CASE = 36;
+ FUNC_STR_ENDS_WITH_IGNORE_CASE = 37;
}
message TFunction {
diff --git a/ydb/core/protos/stream.proto b/ydb/core/protos/stream.proto
index 429148ecec..1ec1547ec0 100644
--- a/ydb/core/protos/stream.proto
+++ b/ydb/core/protos/stream.proto
@@ -11,7 +11,7 @@ message TStreamingConfig {
optional uint32 MaxStreamingShards = 5 [default = 5];
// Timeouts used to interrupt inactive streams.
optional uint64 InactiveClientTimeout = 6 [default = 60000000];
- optional uint64 InactiveServerTimeout = 7 [default = 60000000];
+ optional uint64 InactiveServerTimeout = 7 [default = 0];
}
optional bool EnableInputStreams = 1 [default = true];
diff --git a/ydb/core/protos/subdomains.proto b/ydb/core/protos/subdomains.proto
index 5d665ff381..77955cca5b 100644
--- a/ydb/core/protos/subdomains.proto
+++ b/ydb/core/protos/subdomains.proto
@@ -46,7 +46,16 @@ message TDiskSpaceUsage {
optional uint64 IndexSize = 3;
}
+ message TTopics {
+ // in bytes
+ optional uint64 ReserveSize = 1;
+ optional uint64 AccountSize = 2;
+ optional uint64 DataSize = 3;
+ optional uint64 UsedReserveSize = 4;
+ }
+
optional TTables Tables = 1;
+ optional TTopics Topics = 2;
}
message TDomainState {
diff --git a/ydb/core/protos/tx_columnshard.proto b/ydb/core/protos/tx_columnshard.proto
index e503da4984..f30cc488a1 100644
--- a/ydb/core/protos/tx_columnshard.proto
+++ b/ydb/core/protos/tx_columnshard.proto
@@ -55,7 +55,6 @@ message TMetadata {
message TEvictMetadata {
optional string TierName = 1;
- optional uint32 TierVersion = 2;
}
message TEvWrite {
@@ -129,6 +128,12 @@ message TEvProposeTransaction {
optional NKikimrSubDomains.TProcessingParams ProcessingParams = 6;
}
+message TEvCheckPlannedTransaction {
+ optional NActorsProto.TActorId Source = 1;
+ optional uint64 Step = 2;
+ optional uint64 TxId = 3;
+}
+
message TEvProposeTransactionResult {
optional EResultStatus Status = 1;
optional ETransactionKind TxKind = 2;
diff --git a/ydb/core/protos/tx_datashard.proto b/ydb/core/protos/tx_datashard.proto
index 6d25d172da..5d886a2b1a 100644
--- a/ydb/core/protos/tx_datashard.proto
+++ b/ydb/core/protos/tx_datashard.proto
@@ -1,4 +1,3 @@
-
option cc_enable_arenas = true;
import "library/cpp/actors/protos/actors.proto";
@@ -241,6 +240,10 @@ message TKqpTransaction {
optional bool UseGenericReadSets = 7 [default = false];
}
+message TEvKqpInputActorResultInfo {
+ repeated TLock Locks = 1;
+}
+
message TKqpReadRangesSourceSettings {
optional TKqpTransaction.TTableMeta Table = 1;
@@ -252,12 +255,17 @@ message TKqpReadRangesSourceSettings {
repeated TKqpTransaction.TColumnMeta Columns = 4;
optional uint64 ItemsLimit = 5;
optional bool Reverse = 6;
- repeated string SkipNullKeys = 7;
+
repeated uint32 KeyColumnTypes = 8;
+ repeated NKikimrProto.TTypeInfo KeyColumnTypeInfos = 15;
+
optional EScanDataFormat DataFormat = 9;
optional NKikimrProto.TRowVersion Snapshot = 10;
optional uint64 ShardIdHint = 11;
optional bool Sorted = 12;
+
+ optional uint64 LockTxId = 13;
+ optional uint32 LockNodeId = 14;
}
message TKqpTaskInfo {
@@ -418,6 +426,7 @@ message TDropCdcStreamNotice {
optional NKikimrProto.TPathID PathId = 1;
optional uint64 TableSchemaVersion = 2;
optional NKikimrProto.TPathID StreamPathId = 3;
+ optional TSnapshot DropSnapshot = 4;
}
message TAsyncIndexInfo {
@@ -1416,6 +1425,46 @@ message TEvBuildIndexProgressResponse {
optional uint64 RequestSeqNoRound = 13;
}
+message TEvCdcStreamScanRequest {
+ message TLimits {
+ optional uint32 BatchMaxBytes = 1 [default = 512000];
+ optional uint32 BatchMinRows = 2 [default = 10];
+ optional uint32 BatchMaxRows = 3 [default = 1000];
+ };
+
+ optional NKikimrProto.TPathID TablePathId = 1; // which table should be scanned
+ optional uint64 TableSchemaVersion = 2;
+ optional NKikimrProto.TPathID StreamPathId = 3;
+ optional uint64 SnapshotStep = 4;
+ optional uint64 SnapshotTxId = 5;
+ optional TLimits Limits = 6;
+}
+
+message TEvCdcStreamScanResponse {
+ enum EStatus {
+ PENDING = 0;
+ ACCEPTED = 1;
+ IN_PROGRESS = 2;
+ DONE = 3;
+ BAD_REQUEST = 4;
+ SCHEME_ERROR = 5;
+ OVERLOADED = 6;
+ ABORTED = 7;
+ }
+
+ message TStats {
+ optional uint64 RowsProcessed = 1;
+ optional uint64 BytesProcessed = 2;
+ }
+
+ optional uint64 TabletId = 1;
+ optional NKikimrProto.TPathID TablePathId = 2;
+ optional NKikimrProto.TPathID StreamPathId = 3;
+ optional EStatus Status = 4;
+ optional string ErrorDescription = 5;
+ optional TStats Stats = 6;
+}
+
message TEvKqpScan {
optional uint64 TxId = 1;
optional uint64 ScanId = 2;
@@ -1553,7 +1602,12 @@ message TEvRead {
// must not be set
optional TTableId TableId = 2;
- // A list of column ids that are returned in the result set
+ // A list of column ids that are returned in the result set. Empty columns can be used to Count(*) rows.
+ // * In case of CellVec and empty columns: result will
+ // contain an empty CellVec for each read row.
+ // * In case of Arrow and empty Columns: ArrowBatch is a batch with single column of type NullType
+ // and with num_rows equal rowsCount. All values are null.
+ // In all cases RowCount can be checked with GetRowsCount() call (return RowCount field).
repeated uint32 Columns = 3;
// An optional snapshot for point in time queries
@@ -1654,6 +1708,8 @@ message TEvReadResult {
repeated TLock TxLocks = 10;
repeated TLock BrokenTxLocks = 11;
+ optional uint64 RowCount = 12;
+
// Data for the possibly partial result
oneof ReadResult {
TArrowBatch ArrowBatch = 900;
diff --git a/ydb/core/protos/tx_proxy.proto b/ydb/core/protos/tx_proxy.proto
index dedd2f9cbb..a12e51e5fc 100644
--- a/ydb/core/protos/tx_proxy.proto
+++ b/ydb/core/protos/tx_proxy.proto
@@ -194,6 +194,7 @@ message TEvProposeTransaction {
optional uint64 CancelAfterMs = 6;
optional string DatabaseName = 7;
optional string RequestType = 8;
+ optional string PeerName = 9;
}
message TTxProxyTimings {
diff --git a/ydb/core/public_http/CMakeLists.darwin.txt b/ydb/core/public_http/CMakeLists.darwin.txt
index 3fbf28ebbc..b89397cd7f 100644
--- a/ydb/core/public_http/CMakeLists.darwin.txt
+++ b/ydb/core/public_http/CMakeLists.darwin.txt
@@ -28,6 +28,7 @@ target_link_libraries(ydb-core-public_http PUBLIC
core-viewer-json
yq-libs-result_formatter
yql-public-issue
+ cpp-client-ydb_types
)
target_sources(ydb-core-public_http PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/public_http/http_req.cpp
@@ -55,6 +56,7 @@ target_link_libraries(ydb-core-public_http.global PUBLIC
core-viewer-json
yq-libs-result_formatter
yql-public-issue
+ cpp-client-ydb_types
)
target_sources(ydb-core-public_http.global PRIVATE
${CMAKE_BINARY_DIR}/ydb/core/public_http/61d421c52ac59775eb29fb236d3d6f5a.cpp
diff --git a/ydb/core/public_http/CMakeLists.linux-aarch64.txt b/ydb/core/public_http/CMakeLists.linux-aarch64.txt
index ede7bb704d..447e45325e 100644
--- a/ydb/core/public_http/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/public_http/CMakeLists.linux-aarch64.txt
@@ -29,6 +29,7 @@ target_link_libraries(ydb-core-public_http PUBLIC
core-viewer-json
yq-libs-result_formatter
yql-public-issue
+ cpp-client-ydb_types
)
target_sources(ydb-core-public_http PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/public_http/http_req.cpp
@@ -57,6 +58,7 @@ target_link_libraries(ydb-core-public_http.global PUBLIC
core-viewer-json
yq-libs-result_formatter
yql-public-issue
+ cpp-client-ydb_types
)
target_sources(ydb-core-public_http.global PRIVATE
${CMAKE_BINARY_DIR}/ydb/core/public_http/61d421c52ac59775eb29fb236d3d6f5a.cpp
diff --git a/ydb/core/public_http/CMakeLists.linux.txt b/ydb/core/public_http/CMakeLists.linux.txt
index ede7bb704d..447e45325e 100644
--- a/ydb/core/public_http/CMakeLists.linux.txt
+++ b/ydb/core/public_http/CMakeLists.linux.txt
@@ -29,6 +29,7 @@ target_link_libraries(ydb-core-public_http PUBLIC
core-viewer-json
yq-libs-result_formatter
yql-public-issue
+ cpp-client-ydb_types
)
target_sources(ydb-core-public_http PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/public_http/http_req.cpp
@@ -57,6 +58,7 @@ target_link_libraries(ydb-core-public_http.global PUBLIC
core-viewer-json
yq-libs-result_formatter
yql-public-issue
+ cpp-client-ydb_types
)
target_sources(ydb-core-public_http.global PRIVATE
${CMAKE_BINARY_DIR}/ydb/core/public_http/61d421c52ac59775eb29fb236d3d6f5a.cpp
diff --git a/ydb/core/public_http/grpc_request_context_wrapper.h b/ydb/core/public_http/grpc_request_context_wrapper.h
index 9dc718e633..964e33ef3a 100644
--- a/ydb/core/public_http/grpc_request_context_wrapper.h
+++ b/ydb/core/public_http/grpc_request_context_wrapper.h
@@ -46,6 +46,7 @@ public:
virtual void SetNextReplyCallback(TOnNextReply&&) {}
virtual void FinishStreamingOk() {}
virtual TAsyncFinishResult GetFinishFuture() { return {}; }
+ virtual bool IsClientLost() const { return false; }
virtual TString GetPeer() const { return {}; }
virtual bool SslServer() const { return false; }
};
diff --git a/ydb/core/public_http/http_req.cpp b/ydb/core/public_http/http_req.cpp
index a491dfc22d..0ba2bcd84c 100644
--- a/ydb/core/public_http/http_req.cpp
+++ b/ydb/core/public_http/http_req.cpp
@@ -1,6 +1,7 @@
#include "http_req.h"
#include <library/cpp/actors/http/http_proxy.h>
+#include <ydb/public/sdk/cpp/client/ydb_types/status_codes.h>
#include <ydb/core/http_proxy/http_req.h>
#include <util/generic/guid.h>
@@ -12,10 +13,91 @@ namespace NKikimr::NPublicHttp {
constexpr TStringBuf REQUEST_CONTENT_TYPE_HEADER = "content-type";
constexpr TStringBuf REQUEST_FORWARDED_FOR = "x-forwarded-for";
constexpr TStringBuf IDEMPOTENCY_KEY_HEADER = "idempotency-key";
-
+
constexpr TStringBuf APPLICATION_JSON = "application/json";
constexpr TStringBuf TEXT_PLAIN_UTF8 = "text/plain;charset=UTF-8";
+
+ TString StatusToErrorType(NYdb::EStatus status) {
+ switch(status) {
+ case NYdb::EStatus::SUCCESS:
+ return "OK";
+ case NYdb::EStatus::BAD_REQUEST:
+ return "InvalidParameterValueException"; //TODO: bring here issues and parse from them
+ case NYdb::EStatus::CLIENT_UNAUTHENTICATED:
+ case NYdb::EStatus::UNAUTHORIZED:
+ return "AccessDeniedException";
+ case NYdb::EStatus::INTERNAL_ERROR:
+ return "InternalFailureException";
+ case NYdb::EStatus::ABORTED:
+ return "RequestExpiredException"; //TODO: find better code
+ case NYdb::EStatus::UNAVAILABLE:
+ return "ServiceUnavailableException";
+ case NYdb::EStatus::OVERLOADED:
+ return "ThrottlingException";
+ case NYdb::EStatus::SCHEME_ERROR:
+ return "ResourceNotFoundException";
+ case NYdb::EStatus::GENERIC_ERROR:
+ return "InternalFailureException"; //TODO: find better code
+ case NYdb::EStatus::TIMEOUT:
+ return "RequestTimeoutException";
+ case NYdb::EStatus::BAD_SESSION:
+ return "AccessDeniedException";
+ case NYdb::EStatus::PRECONDITION_FAILED:
+ case NYdb::EStatus::ALREADY_EXISTS:
+ return "ValidationErrorException"; //TODO: find better code
+ case NYdb::EStatus::NOT_FOUND:
+ return "ResourceNotFoundException";
+ case NYdb::EStatus::SESSION_EXPIRED:
+ return "AccessDeniedException";
+ case NYdb::EStatus::UNSUPPORTED:
+ return "InvalidActionException";
+ default:
+ return "InternalFailureException";
+ }
+
+ }
+
+ HttpCodes StatusToHttpCode(NYdb::EStatus status) {
+ switch(status) {
+ case NYdb::EStatus::SUCCESS:
+ return HTTP_OK;
+ case NYdb::EStatus::UNSUPPORTED:
+ case NYdb::EStatus::BAD_REQUEST:
+ return HTTP_BAD_REQUEST;
+ case NYdb::EStatus::CLIENT_UNAUTHENTICATED:
+ case NYdb::EStatus::UNAUTHORIZED:
+ return HTTP_FORBIDDEN;
+ case NYdb::EStatus::INTERNAL_ERROR:
+ return HTTP_INTERNAL_SERVER_ERROR;
+ case NYdb::EStatus::ABORTED:
+ return HTTP_CONFLICT;
+ case NYdb::EStatus::UNAVAILABLE:
+ return HTTP_SERVICE_UNAVAILABLE;
+ case NYdb::EStatus::OVERLOADED:
+ return HTTP_BAD_REQUEST;
+ case NYdb::EStatus::SCHEME_ERROR:
+ return HTTP_NOT_FOUND;
+ case NYdb::EStatus::GENERIC_ERROR:
+ return HTTP_BAD_REQUEST;
+ case NYdb::EStatus::TIMEOUT:
+ return HTTP_GATEWAY_TIME_OUT;
+ case NYdb::EStatus::BAD_SESSION:
+ return HTTP_UNAUTHORIZED;
+ case NYdb::EStatus::PRECONDITION_FAILED:
+ return HTTP_PRECONDITION_FAILED;
+ case NYdb::EStatus::ALREADY_EXISTS:
+ return HTTP_CONFLICT;
+ case NYdb::EStatus::NOT_FOUND:
+ return HTTP_NOT_FOUND;
+ case NYdb::EStatus::SESSION_EXPIRED:
+ return HTTP_UNAUTHORIZED;
+ default:
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+ }
+
+
TString GenerateRequestId(const TString& sourceReqId) {
if (sourceReqId.empty()) {
return CreateGuidAsString();
@@ -98,8 +180,8 @@ namespace NKikimr::NPublicHttp {
void THttpRequestContext::DoResponseBadRequest(Ydb::StatusIds::StatusCode status, const TString& errorText, TStringBuf contentType) const {
const NYdb::EStatus ydbStatus = static_cast<NYdb::EStatus>(status);
- const TString httpCodeStr = ToString((int)NKikimr::NHttpProxy::StatusToHttpCode(ydbStatus));
- DoResponse(httpCodeStr, NKikimr::NHttpProxy::StatusToErrorType(ydbStatus), errorText, contentType);
+ const TString httpCodeStr = ToString((int)StatusToHttpCode(ydbStatus));
+ DoResponse(httpCodeStr, StatusToErrorType(ydbStatus), errorText, contentType);
}
void THttpRequestContext::ResponseOK() const {
diff --git a/ydb/core/security/secure_request.h b/ydb/core/security/secure_request.h
index 04e276a897..c18c83d4b0 100644
--- a/ydb/core/security/secure_request.h
+++ b/ydb/core/security/secure_request.h
@@ -102,10 +102,17 @@ public:
return SecurityToken;
}
+ TIntrusiveConstPtr<NACLib::TUserToken> GetParsedToken() const {
+ if (AuthorizeTicketResult) {
+ return AuthorizeTicketResult->Token;
+ }
+ return nullptr;
+ }
+
TString GetSerializedToken() const {
if (AuthorizeTicketResult) {
- if (AuthorizeTicketResult->SerializedToken) {
- return AuthorizeTicketResult->SerializedToken;
+ if (AuthorizeTicketResult->Token) {
+ return AuthorizeTicketResult->Token->GetSerializedToken();
}
}
return TString();
@@ -140,7 +147,7 @@ public:
if (SecurityToken.empty()) {
if (!GetDefaultUserSIDs().empty()) {
TIntrusivePtr<NACLib::TUserToken> userToken = new NACLib::TUserToken(GetDefaultUserSIDs());
- THolder<TEvTicketParser::TEvAuthorizeTicketResult> AuthorizeTicketResult = MakeHolder<TEvTicketParser::TEvAuthorizeTicketResult>(TString(), userToken, userToken->SerializeAsString());
+ THolder<TEvTicketParser::TEvAuthorizeTicketResult> AuthorizeTicketResult = MakeHolder<TEvTicketParser::TEvAuthorizeTicketResult>(TString(), userToken);
ctx.Send(ctx.SelfID, AuthorizeTicketResult.Release());
} else {
return static_cast<TBootstrap*>(this)->Bootstrap(ctx);
diff --git a/ydb/core/security/ticket_parser_impl.h b/ydb/core/security/ticket_parser_impl.h
index 68e1568a45..16d05499a8 100644
--- a/ydb/core/security/ticket_parser_impl.h
+++ b/ydb/core/security/ticket_parser_impl.h
@@ -369,7 +369,7 @@ class TTicketParserImpl : public TActorBootstrapped<TDerived> {
if (record.IsTokenReady()) {
// token already have built
record.AccessTime = now;
- Send(sender, new TEvTicketParser::TEvAuthorizeTicketResult(ev->Get()->Ticket, record.Token, record.SerializedToken), 0, cookie);
+ Send(sender, new TEvTicketParser::TEvAuthorizeTicketResult(ev->Get()->Ticket, record.GetToken()), 0, cookie);
} else if (record.Error) {
// token stores information about previous error
record.AccessTime = now;
@@ -407,7 +407,7 @@ class TTicketParserImpl : public TActorBootstrapped<TDerived> {
}
if (record.IsTokenReady()) {
// offline check ready
- Send(sender, new TEvTicketParser::TEvAuthorizeTicketResult(ev->Get()->Ticket, record.Token, record.SerializedToken), 0, cookie);
+ Send(sender, new TEvTicketParser::TEvAuthorizeTicketResult(ev->Get()->Ticket, record.GetToken()), 0, cookie);
return;
}
record.AuthorizeRequests.emplace_back(ev.Release());
@@ -857,7 +857,10 @@ protected:
return TDerived::ETokenType::Unknown;
}
- struct TTokenRecordBase {
+ class TTokenRecordBase {
+ private:
+ TIntrusiveConstPtr<NACLib::TUserToken> Token;
+ public:
TTokenRecordBase(const TTokenRecordBase&) = delete;
TTokenRecordBase& operator =(const TTokenRecordBase&) = delete;
@@ -867,8 +870,6 @@ protected:
THashMap<TString, TPermissionRecord> Permissions;
TString Subject; // login
TEvTicketParser::TError Error;
- TIntrusivePtr<NACLib::TUserToken> Token;
- TString SerializedToken;
TDeque<THolder<TEventHandle<TEvTicketParser::TEvAuthorizeTicket>>> AuthorizeRequests;
ui64 ResponsesLeft = 0;
TInstant InitTime;
@@ -885,6 +886,20 @@ protected:
: Ticket(ticket)
{}
+ void SetToken(const TIntrusivePtr<NACLib::TUserToken>& token) {
+ // saving serialization info into the token instance.
+ token->SaveSerializationInfo();
+ Token = token;
+ }
+
+ const TIntrusiveConstPtr<NACLib::TUserToken> GetToken() const {
+ return Token;
+ }
+
+ void UnsetToken() {
+ Token = nullptr;
+ }
+
TString GetAttributeValue(const TString& permission, const TString& key) const {
if (auto it = Permissions.find(permission); it != Permissions.end()) {
for (const auto& pr : it->second.Attributes) {
@@ -946,13 +961,13 @@ protected:
}
}
- bool IsOfflineToken() const {
+ bool NeedsRefresh() const {
switch (TokenType) {
case TDerived::ETokenType::Builtin:
case TDerived::ETokenType::Login:
- return true;
- default:
return false;
+ default:
+ return Signature.AccessKeyId.empty();
}
}
@@ -965,13 +980,13 @@ protected:
return key.Before(':');
}
- void EnrichUserTokenWithBuiltins(const TTokenRecordBase& record) {
+ void EnrichUserTokenWithBuiltins(const TTokenRecordBase& record, TIntrusivePtr<NACLib::TUserToken>& token) {
const TString& allAuthenticatedUsers = AppData()->AllAuthenticatedUsers;
if (!allAuthenticatedUsers.empty()) {
- record.Token->AddGroupSID(allAuthenticatedUsers);
+ token->AddGroupSID(allAuthenticatedUsers);
}
for (const TString& sid : record.AdditionalSIDs) {
- record.Token->AddGroupSID(sid);
+ token->AddGroupSID(sid);
}
if (!record.Permissions.empty()) {
TString subject;
@@ -990,7 +1005,7 @@ protected:
}
for (const TString& group : groups) {
- record.Token->AddGroupSID(group);
+ token->AddGroupSID(group);
}
}
}
@@ -1048,19 +1063,18 @@ protected:
void SetToken(const TString& key, TTokenRecord& record, TIntrusivePtr<NACLib::TUserToken> token) {
TInstant now = TlsActivationContext->Now();
record.Error.clear();
- record.Token = token;
- EnrichUserTokenWithBuiltins(record);
+ EnrichUserTokenWithBuiltins(record, token);
+ record.SetToken(token);
if (!token->GetUserSID().empty()) {
record.Subject = token->GetUserSID();
}
- record.SerializedToken = token->SerializeAsString();
if (!record.ExpireTime) {
record.ExpireTime = GetExpireTime(now);
}
- if (record.IsOfflineToken()) {
- record.RefreshTime = record.ExpireTime;
- } else {
+ if (record.NeedsRefresh()) {
record.SetOkRefreshTime(this, now);
+ } else {
+ record.RefreshTime = record.ExpireTime;
}
CounterTicketsSuccess->Inc();
CounterTicketsBuildTime->Collect((now - record.InitTime).MilliSeconds());
@@ -1080,8 +1094,7 @@ protected:
BLOG_D("Ticket " << MaskTicket(record.Ticket) << " ("
<< record.PeerName << ") has now retryable error message '" << error.Message << "'");
} else {
- record.Token = nullptr;
- record.SerializedToken.clear();
+ record.UnsetToken();
record.SetOkRefreshTime(this, now);
CounterTicketsErrorsPermanent->Inc();
BLOG_D("Ticket " << MaskTicket(record.Ticket) << " ("
@@ -1094,7 +1107,7 @@ protected:
void Respond(TTokenRecordBase& record) {
if (record.IsTokenReady()) {
for (const auto& request : record.AuthorizeRequests) {
- Send(request->Sender, new TEvTicketParser::TEvAuthorizeTicketResult(record.Ticket, record.Token, record.SerializedToken), 0, request->Cookie);
+ Send(request->Sender, new TEvTicketParser::TEvAuthorizeTicketResult(record.Ticket, record.GetToken()), 0, request->Cookie);
}
} else {
for (const auto& request : record.AuthorizeRequests) {
@@ -1155,7 +1168,9 @@ protected:
template <typename TTokenRecord>
bool CanRefreshTicket(const TString& key, TTokenRecord& record) {
- if (AccessServiceValidator && (record.TokenType == TDerived::ETokenType::AccessService || record.TokenType == TDerived::ETokenType::Unknown)) {
+ if (AccessServiceValidator
+ && ((record.TokenType == TDerived::ETokenType::AccessService && !record.Signature.AccessKeyId)
+ || record.TokenType == TDerived::ETokenType::Unknown)) {
GetDerived()->ResetTokenRecord(record);
if (record.Permissions) {
RequestAccessServiceAuthorization(key, record);
@@ -1194,9 +1209,9 @@ protected:
html << "<tr><td>Expire Time</td><td>" << record.ExpireTime << "</td></tr>";
html << "<tr><td>Access Time</td><td>" << record.AccessTime << "</td></tr>";
html << "<tr><td>Peer Name</td><td>" << record.PeerName << "</td></tr>";
- if (record.Token != nullptr) {
- html << "<tr><td>User SID</td><td>" << record.Token->GetUserSID() << "</td></tr>";
- for (const TString& group : record.Token->GetGroupSIDs()) {
+ if (record.IsTokenReady()) {
+ html << "<tr><td>User SID</td><td>" << record.GetToken()->GetUserSID() << "</td></tr>";
+ for (const TString& group : record.GetToken()->GetGroupSIDs()) {
html << "<tr><td>Group SID</td><td>" << group << "</td></tr>";
}
}
@@ -1221,7 +1236,7 @@ protected:
html << "<td>" << record.Database << "</td>";
html << "<td>" << record.Subject << "</td>";
html << "<td>" << record.Error << "</td>";
- html << "<td>" << "<a href='ticket_parser?token=" << MD5::Calc(key) << "'>" << HtmlBool(record.Token != nullptr) << "</a>" << "</td>";
+ html << "<td>" << "<a href='ticket_parser?token=" << MD5::Calc(key) << "'>" << HtmlBool(record.IsTokenReady()) << "</a>" << "</td>";
html << "<td>" << record.AuthorizeRequests.size() << "</td>";
html << "<td>" << record.ResponsesLeft << "</td>";
html << "<td>" << record.RefreshTime << "</td>";
@@ -1353,7 +1368,7 @@ public:
NActors::TMon* mon = AppData()->Mon;
if (mon) {
NMonitoring::TIndexMonPage* actorsMonPage = mon->RegisterIndexPage("actors", "Actors");
- mon->RegisterActorPage(actorsMonPage, "ticket_parser", "Ticket Parser", false, TActivationContext::ActorSystem(), TActorId());
+ mon->RegisterActorPage(actorsMonPage, "ticket_parser", "Ticket Parser", false, TActivationContext::ActorSystem(), this->SelfId());
}
Schedule(RefreshPeriod, new NActors::TEvents::TEvWakeup());
diff --git a/ydb/core/sys_view/processor/db_counters.cpp b/ydb/core/sys_view/processor/db_counters.cpp
index 97f38eb4c5..9cb9a63232 100644
--- a/ydb/core/sys_view/processor/db_counters.cpp
+++ b/ydb/core/sys_view/processor/db_counters.cpp
@@ -146,16 +146,27 @@ static void ResetLabeledCounters(NKikimrLabeledCounters::TTabletLabeledCounters*
auto labeledSize = dst->LabeledCounterSize();
auto* to = dst->MutableLabeledCounter();
for (size_t i = 0; i < labeledSize; ++i) {
- auto aggrFunc = (*to)[i].GetAggregateFunc();
+ auto& counter = (*to)[i];
+ TLabeledCounterOptions::ECounterType type(counter.GetType());
+ TLabeledCounterOptions::EAggregateFunc aggrFunc(counter.GetAggregateFunc());
+ const bool switchResetValue = (type == TLabeledCounterOptions::CT_TIMELAG);
switch (aggrFunc) {
- case static_cast<int>(TTabletLabeledCountersBase::EAggregateFunc::EAF_MIN):
- (*to)[i].SetValue(std::numeric_limits<ui64>::max());
+ case TLabeledCounterOptions::EAF_MIN:
+ if (switchResetValue) {
+ counter.SetValue(0);
+ } else {
+ counter.SetValue(std::numeric_limits<ui64>::max());
+ }
break;
- case static_cast<int>(TTabletLabeledCountersBase::EAggregateFunc::EAF_MAX):
- (*to)[i].SetValue(0);
+ case TLabeledCounterOptions::EAF_MAX:
+ if (switchResetValue) {
+ counter.SetValue(std::numeric_limits<ui64>::max());
+ } else {
+ counter.SetValue(0);
+ }
break;
- case static_cast<int>(TTabletLabeledCountersBase::EAggregateFunc::EAF_SUM):
- (*to)[i].SetValue(0);
+ case TLabeledCounterOptions::EAF_SUM:
+ counter.SetValue(0);
break;
default:
Y_FAIL("bad aggrFunc value");
diff --git a/ydb/core/sys_view/service/sysview_service.cpp b/ydb/core/sys_view/service/sysview_service.cpp
index 8514ff6182..c979784fa0 100644
--- a/ydb/core/sys_view/service/sysview_service.cpp
+++ b/ydb/core/sys_view/service/sysview_service.cpp
@@ -322,6 +322,7 @@ public:
, TotalInterval(TDuration::Seconds(processorMode == EProcessorMode::FAST ? 6 : 60))
, CollectInterval(TDuration::Seconds(processorMode == EProcessorMode::FAST ? 3 : 30))
, SendInterval(TDuration::Seconds(processorMode == EProcessorMode::FAST ? 2 : 20))
+ , ProcessLabeledCountersInterval(TDuration::Seconds(processorMode == EProcessorMode::FAST ? 5 : 60))
{}
void Bootstrap(const TActorContext &ctx) {
@@ -1110,6 +1111,7 @@ private:
const TDuration TotalInterval;
const TDuration CollectInterval;
const TDuration SendInterval;
+ const TDuration ProcessLabeledCountersInterval;
template <typename TInterval>
struct TDbWindow {
@@ -1208,7 +1210,6 @@ private:
static constexpr size_t SummaryRetryAttempts = 5;
static constexpr TDuration ProcessCountersInterval = TDuration::Seconds(5);
- static constexpr TDuration ProcessLabeledCountersInterval = TDuration::Minutes(1);
};
THolder<IActor> CreateSysViewService(
diff --git a/ydb/core/sys_view/ut_common.cpp b/ydb/core/sys_view/ut_common.cpp
index 2579cf026d..76f4bedc9e 100644
--- a/ydb/core/sys_view/ut_common.cpp
+++ b/ydb/core/sys_view/ut_common.cpp
@@ -26,7 +26,7 @@ NKikimrSubDomains::TSubDomainSettings GetSubDomainDefaultSettings(const TString
return subdomain;
}
-TTestEnv::TTestEnv(ui32 staticNodes, ui32 dynamicNodes, ui32 storagePools, ui32 pqTabletsN, bool enableSVP) {
+TTestEnv::TTestEnv(ui32 staticNodes, ui32 dynamicNodes, ui32 storagePools, ui32 pqTabletsN, bool enableSVP, bool disableSources) {
auto mbusPort = PortManager.GetPort();
auto grpcPort = PortManager.GetPort();
@@ -51,6 +51,8 @@ TTestEnv::TTestEnv(ui32 staticNodes, ui32 dynamicNodes, ui32 storagePools, ui32
Settings->AddStoragePool(poolName, TString("/Root:") + poolName, 2);
}
+ Settings->AppConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(!disableSources);
+
Server = new Tests::TServer(*Settings);
Server->EnableGRpc(grpcPort);
diff --git a/ydb/core/sys_view/ut_common.h b/ydb/core/sys_view/ut_common.h
index 0c25bfab58..c921d32c20 100644
--- a/ydb/core/sys_view/ut_common.h
+++ b/ydb/core/sys_view/ut_common.h
@@ -18,8 +18,19 @@ NKikimrSubDomains::TSubDomainSettings GetSubDomainDefaultSettings(
class TTestEnv {
public:
+ class TDisableSourcesTag {};
+ static TDisableSourcesTag DisableSourcesTag;
+
+public:
TTestEnv(ui32 staticNodes = 1, ui32 dynamicNodes = 4, ui32 storagePools = 0,
- ui32 pqTabletsN = 0, bool enableSVP = false);
+ ui32 pqTabletsN = 0, bool enableSVP = false, bool disableSources = false);
+
+ template<typename... Args>
+ TTestEnv(TDisableSourcesTag, Args&&... args)
+ : TTestEnv(std::forward<Args>(args)..., false)
+ {
+ }
+
~TTestEnv();
Tests::TServer& GetServer() const {
diff --git a/ydb/core/sys_view/ut_kqp.cpp b/ydb/core/sys_view/ut_kqp.cpp
index 502b9174e4..0e8b0ba845 100644
--- a/ydb/core/sys_view/ut_kqp.cpp
+++ b/ydb/core/sys_view/ut_kqp.cpp
@@ -591,10 +591,12 @@ Y_UNIT_TEST_SUITE(SystemView) {
TYsonFieldChecker check(ysonString, 29);
+ bool iterators = env.GetSettings()->AppConfig.GetTableServiceConfig().GetEnableKqpDataQuerySourceRead();
+
check.Uint64GreaterOrEquals(0); // CPUTime
check.Uint64GreaterOrEquals(0); // CompileCPUTime
check.Int64GreaterOrEquals(0); // CompileDuration
- check.Uint64(1); // ComputeNodesCount
+ check.Uint64(iterators ? 4 : 1); // ComputeNodesCount
check.Uint64(0); // DeleteBytes
check.Uint64(0); // DeleteRows
check.Int64Greater(0); // Duration
@@ -613,7 +615,9 @@ Y_UNIT_TEST_SUITE(SystemView) {
check.Uint64(0); // ReadBytes
check.Uint64(0); // ReadRows
check.Uint64Greater(0); // RequestUnits
- check.Uint64(3); // ShardCount
+
+ // https://a.yandex-team.ru/arcadia/ydb/core/sys_view/query_stats/query_stats.cpp?rev=r9637451#L356
+ check.Uint64(iterators ? 0 : 3); // ShardCount
check.Uint64GreaterOrEquals(0); // SumComputeCPUTime
check.Uint64GreaterOrEquals(0); // SumShardCPUTime
check.String("data"); // Type
@@ -766,7 +770,7 @@ Y_UNIT_TEST_SUITE(SystemView) {
Y_UNIT_TEST(QueryStatsAllTables) {
auto check = [&] (const TString& queryText) {
- TTestEnv env;
+ TTestEnv env{TTestEnv::DisableSourcesTag};
CreateRootTable(env);
TTableClient client(env.GetDriver());
@@ -793,7 +797,7 @@ Y_UNIT_TEST_SUITE(SystemView) {
}
Y_UNIT_TEST(QueryStatsRetries) {
- TTestEnv env;
+ TTestEnv env{TTestEnv::DisableSourcesTag};
CreateRootTable(env);
TString queryText("SELECT * FROM `Root/Table0`");
diff --git a/ydb/core/sys_view/ut_labeled.cpp b/ydb/core/sys_view/ut_labeled.cpp
index 53093bc7ff..5a98089f87 100644
--- a/ydb/core/sys_view/ut_labeled.cpp
+++ b/ydb/core/sys_view/ut_labeled.cpp
@@ -43,6 +43,7 @@ bool CheckCounter(::NMonitoring::TDynamicCounterPtr group, const char* sensorNam
bool CheckLtCounter(::NMonitoring::TDynamicCounterPtr group, const char* sensorName, ui32 refValue,
bool isDerivative) {
auto value = group->GetNamedCounter("name", sensorName, isDerivative)->Val();
+ Cerr << "CHECK COUNTER " << sensorName << " wait less than " << refValue << " got " << value << "\n";
return (value <= refValue);
}
@@ -71,7 +72,7 @@ bool CheckLabeledCounters(::NMonitoring::TDynamicCounterPtr databaseGroup, const
void GetCounters(TTestEnv& env, const TString& databaseName, const TString& databasePath,
std::function<bool(::NMonitoring::TDynamicCounterPtr)> particularCountersCheck) {
- for (size_t iter = 0; iter < 30; ++iter) {
+ for (size_t iter = 0; iter < 35; ++iter) {
Cerr << "iteration " << iter << Endl;
bool checkDb = false;
@@ -91,9 +92,9 @@ void GetCounters(TTestEnv& env, const TString& databaseName, const TString& data
return;
}
- Sleep(TDuration::Seconds(5));
+ Sleep(TDuration::Seconds(10));
}
- UNIT_ASSERT_C(false, "out of iterations");
+ UNIT_ASSERT_C(false, "out of 35 iterations with delay 10s");
}
} // namespace
@@ -108,8 +109,8 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.write_speed_bytes_per_second", 50'000'000, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.write.speed_limit_bytes_per_second", 50'000'000, false);
isGood &= CheckCounter(topicGroup, "topic.producers_count", 0, false);
return isGood;
@@ -118,7 +119,6 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
CreateDatabase(env, databaseName);
NPQ::PQTabletPrepare({.partitions=partitionsN}, {}, *env.GetServer().GetRuntime(),
env.GetPqTabletIds()[0], edge);
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
@@ -142,28 +142,27 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
Cerr << ss.Str() << Endl;
}
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.write_speed_bytes_per_second", 50'000'000, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.write.speed_limit_bytes_per_second", 50'000'000, false);
isGood &= CheckCounter(topicGroup, "topic.producers_count", 0, false);
return isGood;
};
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
+ Sleep(TDuration::Seconds(60));
env.GetServer().GetRuntime()->Register(CreateTabletKiller(env.GetPqTabletIds()[0]));
{
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckLtCounter(topicGroup, "topic.max_partition_uptime_milliseconds",
- TDuration::Minutes(1).MilliSeconds() + 200, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN, false);
+ isGood &= CheckLtCounter(topicGroup, "topic.partition.uptime_milliseconds_min",
+ TDuration::Seconds(60).MilliSeconds() + 200, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN, false);
return isGood;
};
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
}
@@ -175,8 +174,8 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN*2, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.write_speed_bytes_per_second", 50'000'000, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN*2, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.write.speed_limit_bytes_per_second", 50'000'000, false);
isGood &= CheckCounter(topicGroup, "topic.producers_count", 0, false);
return isGood;
@@ -188,7 +187,6 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
tbId, env.GetServer().GetRuntime()->AllocateEdgeActor());
}
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
@@ -207,14 +205,13 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN*2, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.write_speed_bytes_per_second", 50'000'000, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN*2, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.write.speed_limit_bytes_per_second", 50'000'000, false);
isGood &= CheckCounter(topicGroup, "topic.producers_count", 0, false);
return isGood;
};
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
@@ -227,12 +224,11 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN, false);
return isGood;
};
- Sleep(TDuration::Seconds(30));
GetCounters(env, databaseName, databasePath, check);
}
}
@@ -252,77 +248,33 @@ Y_UNIT_TEST_SUITE(LabeledDbCounters) {
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN*2, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.write_speed_bytes_per_second", 50'000'000, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN*2, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.write.speed_limit_bytes_per_second", 50'000'000, false);
isGood &= CheckCounter(topicGroup, "topic.producers_count", 0, false);
return isGood;
};
- Sleep(TDuration::Minutes(1));
- GetCounters(env, databaseName, databasePath, check);
- }
-
- env.GetServer().GetRuntime()->DisconnectNodes(0, 1, false);
- env.GetServer().GetRuntime()->DisconnectNodes(0, 2, false);
-
- {
- auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
- bool isGood{true};
-
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN*2, false);
-
- return isGood;
- };
-
- Sleep(TDuration::Minutes(1));
- GetCounters(env, databaseName, databasePath, check);
- }
- }
-
- Y_UNIT_TEST(TwoTabletsDisconnectOneNodeHardWay) {
- TTestEnv env(1, 2, 0, 2, true);
- const TString databaseName = NPQ::TTabletPreparationParameters().databaseId;
- const TString databasePath = NPQ::TTabletPreparationParameters().databasePath;
- auto edge = env.GetServer().GetRuntime()->AllocateEdgeActor();
- CreateDatabase(env, databaseName);
- for (auto& tbId : env.GetPqTabletIds()) {
- NPQ::PQTabletPrepare({.partitions=partitionsN}, {}, *env.GetServer().GetRuntime(),
- tbId, edge);
- }
-
- {
- auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
- bool isGood{true};
-
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN*2, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.write_speed_bytes_per_second", 50'000'000, false);
- isGood &= CheckCounter(topicGroup, "topic.producers_count", 0, false);
-
- return isGood;
- };
-
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
for (ui32 i = 0; i < env.GetServer().StaticNodes() + env.GetServer().DynamicNodes(); i++) {
env.GetClient().MarkNodeInHive(env.GetServer().GetRuntime(), i, false);
+ if (i > 0) {
+ env.GetServer().GetRuntime()->DisconnectNodes(0, i, false);
+ env.GetServer().GetRuntime()->DisconnectNodes(i, 0, false);
+ }
}
- env.GetServer().GetRuntime()->DisconnectNodes(0, 1, true);
- env.GetServer().GetRuntime()->DisconnectNodes(0, 2, true);
-
{
auto check = [](::NMonitoring::TDynamicCounterPtr topicGroup) {
bool isGood{true};
- isGood &= CheckCounter(topicGroup, "topic.partitions.alive_count", partitionsN, false);
- isGood &= CheckCounter(topicGroup, "topic.partitions.total_count", partitionsN, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.alive_count", partitionsN, false);
+ isGood &= CheckCounter(topicGroup, "topic.partition.total_count", partitionsN, false);
return isGood;
};
- Sleep(TDuration::Minutes(1));
GetCounters(env, databaseName, databasePath, check);
}
}
diff --git a/ydb/core/tablet/labeled_counters_merger.h b/ydb/core/tablet/labeled_counters_merger.h
index 097696b9d2..6e92a4bc79 100644
--- a/ydb/core/tablet/labeled_counters_merger.h
+++ b/ydb/core/tablet/labeled_counters_merger.h
@@ -14,17 +14,17 @@ public:
NKikimrLabeledCounters::TTabletLabeledCounter& target) {
ui64 value(source.GetValue());
TLabeledCounterOptions::ECounterType type(source.GetType());
- NKikimr::TLabeledCounterOptions::EAggregateFunc func(source.GetAggregateFunc());
+ TLabeledCounterOptions::EAggregateFunc func(source.GetAggregateFunc());
if (type == TLabeledCounterOptions::CT_TIMELAG) {
type = TLabeledCounterOptions::CT_SIMPLE;
auto now = TInstant::Now().MilliSeconds();
value = now > value ? now - value : 0;
switch (func) {
- case NKikimr::TLabeledCounterOptions::EAF_MIN:
- func = NKikimr::TLabeledCounterOptions::EAF_MAX;
+ case TLabeledCounterOptions::EAF_MIN:
+ func = TLabeledCounterOptions::EAF_MAX;
break;
- case NKikimr::TLabeledCounterOptions::EAF_MAX:
- func = NKikimr::TLabeledCounterOptions::EAF_MIN;
+ case TLabeledCounterOptions::EAF_MAX:
+ func = TLabeledCounterOptions::EAF_MIN;
break;
default:
break;
@@ -32,13 +32,13 @@ public:
}
if (target.HasValue()) {
switch (func) {
- case NKikimr::TLabeledCounterOptions::EAF_MIN:
+ case TLabeledCounterOptions::EAF_MIN:
target.SetValue(std::min(target.GetValue(), value));
break;
- case NKikimr::TLabeledCounterOptions::EAF_MAX:
+ case TLabeledCounterOptions::EAF_MAX:
target.SetValue(std::max(target.GetValue(), value));
break;
- case NKikimr::TLabeledCounterOptions::EAF_SUM:
+ case TLabeledCounterOptions::EAF_SUM:
target.SetValue(target.GetValue() + value);
break;
}
diff --git a/ydb/core/tablet/private/labeled_db_counters.cpp b/ydb/core/tablet/private/labeled_db_counters.cpp
index feb0d41a1f..0cd1ffba57 100644
--- a/ydb/core/tablet/private/labeled_db_counters.cpp
+++ b/ydb/core/tablet/private/labeled_db_counters.cpp
@@ -10,8 +10,6 @@ namespace NKikimr::NPrivate {
** class TPQCounters
*/
-THashMap<TString, TAutoPtr<TAggregatedLabeledCounters>> TPQCounters::LabeledCountersByGroupReference = {};
-
TPQCounters::TPQCounters(NMonitoring::TDynamicCounterPtr counters) {
Group = counters;
}
@@ -28,12 +26,6 @@ void TPQCounters::Apply(ui64 tabletId, const NKikimr::TTabletLabeledCountersBase
groupNames += '|';
groupNames += labeledCounters->GetGroupName(i);
}
-
- if (!LabeledCountersByGroupReference.contains(groupNames)) {
- LabeledCountersByGroupReference.emplace(groupNames, new TAggregatedLabeledCounters(
- labeledCounters->GetCounters().Size(), labeledCounters->GetAggrFuncs(),
- labeledCounters->GetNames(), labeledCounters->GetTypes(), groupNames));
- }
}
auto& el = LabeledCountersByGroup.InsertIfAbsent(group, new TAggregatedLabeledCounters(
@@ -109,8 +101,8 @@ void TDbLabeledCounters::FromProto(NKikimr::NSysView::TDbServiceCounters& counte
}
const TString groupNamesStr = (groups.size() == 3) ? "client|important|topic" : "topic";
- LabeledCountersByGroupReference[groupNamesStr]->FromProto(countersGroup,
- proto.GetAggregatedPerTablets());
+ LabeledCountersByGroupReference.at(groupNamesStr)->FromProto(countersGroup,
+ proto.GetAggregatedPerTablets());
}
}
diff --git a/ydb/core/tablet/private/labeled_db_counters.h b/ydb/core/tablet/private/labeled_db_counters.h
index 8359381c73..deb8c6e2ec 100644
--- a/ydb/core/tablet/private/labeled_db_counters.h
+++ b/ydb/core/tablet/private/labeled_db_counters.h
@@ -1,7 +1,9 @@
#pragma once
-#include <ydb/core/sys_view/service/db_counters.h>
+#include <ydb/core/protos/counters_pq.pb.h>
#include <ydb/core/tablet/labeled_db_counters.h>
+#include <ydb/core/tablet/tablet_counters_protobuf.h>
+#include <ydb/core/sys_view/service/db_counters.h>
#include <ydb/core/util/concurrent_rw_hash.h>
#include "aggregated_counters.h"
@@ -9,7 +11,6 @@
namespace NKikimr::NPrivate {
-
class TPQCounters : public ILabeledCounters {
protected:
TConcurrentRWHashMap<TString, TAutoPtr<TAggregatedLabeledCounters>, 256> LabeledCountersByGroup;
@@ -23,7 +24,29 @@ public:
void Apply(ui64 tabletID, const NKikimr::TTabletLabeledCountersBase* labeledCounters) override;
void ForgetTablet(ui64 tabletID) override;
- static THashMap<TString, TAutoPtr<TAggregatedLabeledCounters>> LabeledCountersByGroupReference;
+ const TProtobufTabletLabeledCounters<NKikimr::NPQ::EPartitionLabeledCounters_descriptor>
+ PartitionCounters{"topic_name", 1, "/Root/Db"};
+ const TProtobufTabletLabeledCounters<NKikimr::NPQ::EClientLabeledCounters_descriptor>
+ UserCounters{"client_name||topic_name", 1, "/Root/Db"};
+ const THashMap<TString, TAutoPtr<TAggregatedLabeledCounters>> LabeledCountersByGroupReference = {
+ {
+ "topic",
+ new TAggregatedLabeledCounters(PartitionCounters.GetCounters().Size(),
+ PartitionCounters.GetAggrFuncs(),
+ PartitionCounters.GetNames(),
+ PartitionCounters.GetTypes(),
+ "topic")
+ },
+ {
+ "client|important|topic",
+ new TAggregatedLabeledCounters(UserCounters.GetCounters().Size(),
+ UserCounters.GetAggrFuncs(),
+ UserCounters.GetNames(),
+ UserCounters.GetTypes(),
+ "client|important|topic")
+ },
+ {}
+ };
};
class TDbLabeledCounters : public TPQCounters, public NSysView::IDbCounters {
diff --git a/ydb/core/tablet/resource_broker.cpp b/ydb/core/tablet/resource_broker.cpp
index 4ff2abcd09..1124484e95 100644
--- a/ydb/core/tablet/resource_broker.cpp
+++ b/ydb/core/tablet/resource_broker.cpp
@@ -1350,6 +1350,11 @@ NKikimrResourceBroker::TResourceBrokerConfig MakeDefaultConfig()
queue->SetWeight(100);
queue->MutableLimit()->SetCpu(1);
+ queue = config.AddQueues();
+ queue->SetName("queue_cdc_initial_scan");
+ queue->SetWeight(100);
+ queue->MutableLimit()->SetCpu(4);
+
auto task = config.AddTasks();
task->SetName(NLocalDb::UnknownTaskName);
task->SetQueueName(NLocalDb::DefaultQueueName);
@@ -1445,6 +1450,11 @@ NKikimrResourceBroker::TResourceBrokerConfig MakeDefaultConfig()
task->SetQueueName("queue_datashard_build_stats");
task->SetDefaultDuration(TDuration::Seconds(5).GetValue());
+ task = config.AddTasks();
+ task->SetName("cdc_initial_scan");
+ task->SetQueueName("queue_cdc_initial_scan");
+ task->SetDefaultDuration(TDuration::Minutes(10).GetValue());
+
config.MutableResourceLimit()->SetCpu(TotalCPU);
config.MutableResourceLimit()->SetMemory(TotalMemory);
diff --git a/ydb/core/tablet/tablet_pipecache.cpp b/ydb/core/tablet/tablet_pipecache.cpp
index 7cf1ad1581..b21c726d22 100644
--- a/ydb/core/tablet/tablet_pipecache.cpp
+++ b/ydb/core/tablet/tablet_pipecache.cpp
@@ -68,6 +68,8 @@ class TPipePeNodeCache : public TActor<TPipePeNodeCache> {
};
struct TTabletState {
+ bool ForceReconnect = false;
+
THashMap<TActorId, TClientState> ByClient;
THashMap<TActorId, TClientState*> ByPeer;
@@ -207,7 +209,8 @@ class TPipePeNodeCache : public TActor<TPipePeNodeCache> {
TClientState* EnsureClient(TTabletState *tabletState, ui64 tabletId) {
TClientState *clientState = nullptr;
- if (!tabletState->LastClient || Config->PipeRefreshTime && tabletState->ByClient.size() < 2 && Config->PipeRefreshTime < (TActivationContext::Now() - tabletState->LastCreated)) {
+ if (!tabletState->LastClient || tabletState->ForceReconnect || Config->PipeRefreshTime && tabletState->ByClient.size() < 2 && Config->PipeRefreshTime < (TActivationContext::Now() - tabletState->LastCreated)) {
+ tabletState->ForceReconnect = false;
// Remove current client if it is idle
if (tabletState->LastClient) {
clientState = tabletState->FindClient(tabletState->LastClient);
@@ -240,6 +243,13 @@ class TPipePeNodeCache : public TActor<TPipePeNodeCache> {
return clientState;
}
+ void Handle(TEvPipeCache::TEvForcePipeReconnect::TPtr &ev) {
+ const ui64 tablet = ev->Get()->TabletId;
+ if (auto* tabletState = ByTablet.FindPtr(tablet)) {
+ tabletState->ForceReconnect = true;
+ }
+ }
+
void Handle(TEvPipeCache::TEvGetTabletNode::TPtr &ev) {
const ui64 tablet = ev->Get()->TabletId;
@@ -449,6 +459,7 @@ public:
Y_UNUSED(ctx);
switch (ev->GetTypeRewrite()) {
hFunc(TEvPipeCache::TEvGetTabletNode, Handle);
+ hFunc(TEvPipeCache::TEvForcePipeReconnect, Handle);
hFunc(TEvPipeCache::TEvForward, Handle);
hFunc(TEvPipeCache::TEvUnlink, Handle);
hFunc(TEvTabletPipe::TEvClientConnected, Handle);
diff --git a/ydb/core/tablet/tablet_sys.cpp b/ydb/core/tablet/tablet_sys.cpp
index ad2b25b372..3093463924 100644
--- a/ydb/core/tablet/tablet_sys.cpp
+++ b/ydb/core/tablet/tablet_sys.cpp
@@ -367,7 +367,9 @@ void TTablet::HandleByFollower(TEvTabletBase::TEvRebuildGraphResult::TPtr &ev) {
Send(UserTablet,
new TEvTablet::TEvFBoot(TabletID(), FollowerId, 0,
Launcher, msg->DependencyGraph.Get(), Info,
- ResourceProfiles, TxCacheQuota));
+ ResourceProfiles, TxCacheQuota,
+ std::move(msg->GroupReadBytes),
+ std::move(msg->GroupReadOps)));
Send(Launcher, new TEvTablet::TEvRestored(TabletID(), StateStorageInfo.KnownGeneration, UserTablet, true));
BLOG_TRACE("SBoot with rebuilt graph", "TSYS05");
diff --git a/ydb/core/tablet_flat/CMakeLists.darwin.txt b/ydb/core/tablet_flat/CMakeLists.darwin.txt
index 3fe11bbf83..d6cae28497 100644
--- a/ydb/core/tablet_flat/CMakeLists.darwin.txt
+++ b/ydb/core/tablet_flat/CMakeLists.darwin.txt
@@ -11,6 +11,7 @@ add_subdirectory(test)
add_subdirectory(ut)
add_subdirectory(ut_large)
add_subdirectory(ut_pg)
+add_subdirectory(ut_util)
add_library(ydb-core-tablet_flat)
target_compile_options(ydb-core-tablet_flat PRIVATE
diff --git a/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt b/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt
index bc48c31e12..501f8de6b7 100644
--- a/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt
@@ -11,6 +11,7 @@ add_subdirectory(test)
add_subdirectory(ut)
add_subdirectory(ut_large)
add_subdirectory(ut_pg)
+add_subdirectory(ut_util)
add_library(ydb-core-tablet_flat)
target_compile_options(ydb-core-tablet_flat PRIVATE
diff --git a/ydb/core/tablet_flat/CMakeLists.linux.txt b/ydb/core/tablet_flat/CMakeLists.linux.txt
index bc48c31e12..501f8de6b7 100644
--- a/ydb/core/tablet_flat/CMakeLists.linux.txt
+++ b/ydb/core/tablet_flat/CMakeLists.linux.txt
@@ -11,6 +11,7 @@ add_subdirectory(test)
add_subdirectory(ut)
add_subdirectory(ut_large)
add_subdirectory(ut_pg)
+add_subdirectory(ut_util)
add_library(ydb-core-tablet_flat)
target_compile_options(ydb-core-tablet_flat PRIVATE
diff --git a/ydb/core/tablet_flat/flat_cxx_database.h b/ydb/core/tablet_flat/flat_cxx_database.h
index 93f290712a..021a520859 100644
--- a/ydb/core/tablet_flat/flat_cxx_database.h
+++ b/ydb/core/tablet_flat/flat_cxx_database.h
@@ -2132,6 +2132,10 @@ public:
: Database(database)
{}
+ TToughDb& GetDatabase() const {
+ return Database;
+ }
+
template <typename TableType> typename TableType::TKey::template Selector<TableType> Table() { return Database; }
template <typename TableType>
diff --git a/ydb/core/tablet_flat/flat_database.cpp b/ydb/core/tablet_flat/flat_database.cpp
index a2cd6cc329..656a6cbdde 100644
--- a/ydb/core/tablet_flat/flat_database.cpp
+++ b/ydb/core/tablet_flat/flat_database.cpp
@@ -629,6 +629,22 @@ bool TDatabase::HasChanges() const
TDatabase::TProd TDatabase::Commit(TTxStamp stamp, bool commit, TCookieAllocator *cookieAllocator)
{
+ if (commit) {
+ for (auto& callback : OnCommit_) {
+ callback();
+ }
+ } else {
+ auto it = OnRollback_.rbegin();
+ auto end = OnRollback_.rend();
+ while (it != end) {
+ (*it)();
+ ++it;
+ }
+ }
+
+ OnCommit_.clear();
+ OnRollback_.clear();
+
TempIterators.clear();
if (IteratedTables) {
diff --git a/ydb/core/tablet_flat/flat_database.h b/ydb/core/tablet_flat/flat_database.h
index 96b194ac74..6da0eff70e 100644
--- a/ydb/core/tablet_flat/flat_database.h
+++ b/ydb/core/tablet_flat/flat_database.h
@@ -212,6 +212,24 @@ public:
TCompactionStats GetCompactionStats(ui32 table) const;
+ /**
+ * Adds callback, which is called when database changes are committed
+ */
+ template<class TCallback>
+ void OnCommit(TCallback&& callback) {
+ OnCommit_.emplace_back(std::forward<TCallback>(callback));
+ }
+
+ /**
+ * Adds callback, which is called when database changes are rolled back
+ *
+ * @param callback
+ */
+ template<class TCallback>
+ void OnRollback(TCallback&& callback) {
+ OnRollback_.emplace_back(std::forward<TCallback>(callback));
+ }
+
private:
TTable* Require(ui32 tableId) const noexcept;
TTable* RequireForUpdate(ui32 tableId) const noexcept;
@@ -231,6 +249,9 @@ private:
mutable TDeque<TPartSimpleIt> TempIterators; // Keeps the last result of Select() valid
mutable THashSet<ui32> IteratedTables;
+
+ TVector<std::function<void()>> OnCommit_;
+ TVector<std::function<void()>> OnRollback_;
};
diff --git a/ydb/core/tablet_flat/flat_dbase_apply.cpp b/ydb/core/tablet_flat/flat_dbase_apply.cpp
index 32ec4f02df..32e2c05009 100644
--- a/ydb/core/tablet_flat/flat_dbase_apply.cpp
+++ b/ydb/core/tablet_flat/flat_dbase_apply.cpp
@@ -5,6 +5,24 @@
namespace NKikimr {
namespace NTable {
+namespace {
+ class TChanges {
+ public:
+ explicit operator bool() const {
+ return Value;
+ }
+
+ TChanges& operator|=(bool value) {
+ if (value) {
+ Value = true;
+ }
+ return *this;
+ }
+
+ private:
+ bool Value = false;
+ };
+}
TSchemeModifier::TSchemeModifier(TScheme &scheme, TSchemeRollbackState *rollbackState)
: Scheme(scheme)
@@ -17,12 +35,12 @@ bool TSchemeModifier::Apply(const TAlterRecord &delta)
{
const auto table = delta.HasTableId() ? delta.GetTableId() : Max<ui32>();
const auto action = delta.GetDeltaType();
- bool changes = false;
+ TChanges changes;
if (action == TAlterRecord::AddTable) {
- changes = AddTable(delta.GetTableName(), table);
+ changes |= AddTable(delta.GetTableName(), table);
} else if (action == TAlterRecord::DropTable) {
- changes = DropTable(table);
+ changes |= DropTable(table);
} else if (action == TAlterRecord::AddColumn) {
TCell null;
@@ -33,29 +51,29 @@ bool TSchemeModifier::Apply(const TAlterRecord &delta)
}
ui32 pgTypeId = delta.HasColumnTypeInfo() ? delta.GetColumnTypeInfo().GetPgTypeId() : 0;
- changes = AddPgColumn(table, delta.GetColumnName(), delta.GetColumnId(),
+ changes |= AddPgColumn(table, delta.GetColumnName(), delta.GetColumnId(),
delta.GetColumnType(), pgTypeId, delta.GetNotNull(), null);
} else if (action == TAlterRecord::DropColumn) {
- changes = DropColumn(table, delta.GetColumnId());
+ changes |= DropColumn(table, delta.GetColumnId());
} else if (action == TAlterRecord::AddColumnToKey) {
- changes = AddColumnToKey(table, delta.GetColumnId());
+ changes |= AddColumnToKey(table, delta.GetColumnId());
} else if (action == TAlterRecord::AddFamily) {
auto &tableInfo = *Table(table);
if (!tableInfo.Families.contains(delta.GetFamilyId())) {
PreserveTable(table);
- changes = true;
+ changes |= true;
}
auto &family = tableInfo.Families[delta.GetFamilyId()];
const ui32 room = delta.GetRoomId();
- changes = ChangeTableSetting(table, family.Room, room);
+ changes |= ChangeTableSetting(table, family.Room, room);
} else if (action == TAlterRecord::SetFamily) {
auto &tableInfo = *Table(table);
if (!tableInfo.Families.contains(delta.GetFamilyId())) {
PreserveTable(table);
- changes = true;
+ changes |= true;
}
auto &family = tableInfo.Families[delta.GetFamilyId()];
@@ -71,20 +89,18 @@ bool TSchemeModifier::Apply(const TAlterRecord &delta)
ui32 large = delta.HasLarge() ? delta.GetLarge() : family.Large;
Y_VERIFY(ui32(cache) <= 2, "Invalid pages cache policy value");
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
changes |= ChangeTableSetting(table, family.Cache, cache);
changes |= ChangeTableSetting(table, family.Codec, codec);
changes |= ChangeTableSetting(table, family.Small, small);
changes |= ChangeTableSetting(table, family.Large, large);
} else if (action == TAlterRecord::AddColumnToFamily) {
- changes = AddColumnToFamily(table, delta.GetColumnId(), delta.GetFamilyId());
+ changes |= AddColumnToFamily(table, delta.GetColumnId(), delta.GetFamilyId());
} else if (action == TAlterRecord::SetRoom) {
auto &tableInfo = *Table(table);
if (!tableInfo.Rooms.contains(delta.GetRoomId())) {
PreserveTable(table);
- changes = true;
+ changes |= true;
}
auto &room = tableInfo.Rooms[delta.GetRoomId()];
@@ -95,7 +111,6 @@ bool TSchemeModifier::Apply(const TAlterRecord &delta)
changes |= ChangeTableSetting(table, room.Main, main);
changes |= ChangeTableSetting(table, room.Blobs, blobs);
changes |= ChangeTableSetting(table, room.Outer, outer);
-#pragma clang diagnostic pop
} else if (action == TAlterRecord::SetRedo) {
const ui32 annex = delta.HasAnnex() ? delta.GetAnnex() : 0;
@@ -139,14 +154,14 @@ bool TSchemeModifier::Apply(const TAlterRecord &delta)
if (delta.HasExecutorLogFastCommitTactic())
changes |= SetExecutorLogFastCommitTactic(delta.GetExecutorLogFastCommitTactic());
} else if (action == TAlterRecord::SetCompactionPolicy) {
- changes = SetCompactionPolicy(table, delta.GetCompactionPolicy());
+ changes |= SetCompactionPolicy(table, delta.GetCompactionPolicy());
} else {
Y_FAIL("unknown scheme delta record type");
}
if (delta.HasTableId() && changes)
Affects.insert(table);
- return changes;
+ return bool(changes);
}
bool TSchemeModifier::AddColumnToFamily(ui32 tid, ui32 cid, ui32 family)
diff --git a/ydb/core/tablet_flat/flat_executor.cpp b/ydb/core/tablet_flat/flat_executor.cpp
index d88c2c9b9c..18984f03c0 100644
--- a/ydb/core/tablet_flat/flat_executor.cpp
+++ b/ydb/core/tablet_flat/flat_executor.cpp
@@ -313,6 +313,8 @@ void TExecutor::ActivateFollower(const TActorContext &ctx) {
auto loadedState = BootLogic->ExtractState();
BootLogic.Destroy();
+ Y_VERIFY(Counters, "Expected to have Counters initialized during Boot processing");
+
Y_VERIFY(!GcLogic);
Y_VERIFY(!LogicRedo);
Y_VERIFY(!LogicAlter);
@@ -321,11 +323,6 @@ void TExecutor::ActivateFollower(const TActorContext &ctx) {
BorrowLogic = loadedState->Loans;
Y_VERIFY(!CompactionLogic);
- if (!Counters) {
- Counters = MakeHolder<TExecutorCounters>();
- CountersBaseline = MakeHolder<TExecutorCounters>();
- Counters->RememberCurrentStateAsBaseline(*CountersBaseline);
- }
CounterCacheFresh = new NMonitoring::TCounterForPtr;
CounterCacheStaging = new NMonitoring::TCounterForPtr;
@@ -361,7 +358,7 @@ void TExecutor::Active(const TActorContext &ctx) {
auto loadedState = BootLogic->ExtractState();
BootLogic.Destroy();
- Counters = MakeHolder<TExecutorCounters>();
+ Y_VERIFY(Counters, "Expected to have Counters initialized during Boot processing");
CommitManager = loadedState->CommitManager;
Database = loadedState->Database;
@@ -377,8 +374,6 @@ void TExecutor::Active(const TActorContext &ctx) {
CompactionLogic = THolder<TCompactionLogic>(new TCompactionLogic(Logger.Get(), Broker.Get(), this, loadedState->Comp,
Sprintf("tablet-%" PRIu64, Owner->TabletID())));
- CountersBaseline = MakeHolder<TExecutorCounters>();
- Counters->RememberCurrentStateAsBaseline(*CountersBaseline);
LogicRedo->InstallCounters(Counters.Get(), nullptr);
CounterCacheFresh = new NMonitoring::TCounterForPtr;
@@ -631,6 +626,12 @@ void TExecutor::Boot(TEvTablet::TEvBoot::TPtr &ev, const TActorContext &ctx) {
Owner->Info()->TenantPathId, Stats->IsFollower, SelfId());
}
+ if (!Counters) {
+ Counters = MakeHolder<TExecutorCounters>();
+ CountersBaseline = MakeHolder<TExecutorCounters>();
+ Counters->RememberCurrentStateAsBaseline(*CountersBaseline);
+ }
+
RegisterTabletFlatProbes();
Become(&TThis::StateBoot);
@@ -649,20 +650,11 @@ void TExecutor::Boot(TEvTablet::TEvBoot::TPtr &ev, const TActorContext &ctx) {
BootLogic.Reset(new TExecutorBootLogic(this, SelfId(), Owner->Info(), maxBootBytesInFly));
- ui64 totalBytes = 0;
- for (auto& kv : msg->GroupReadBytes) {
- totalBytes += kv.second;
- }
-
- ui64 totalOps = 0;
- for (auto& kv : msg->GroupReadOps) {
- totalOps += kv.second;
- }
-
- Send(SelfId(), new NBlockIO::TEvStat(NBlockIO::EDir::Read, NBlockIO::EPriority::Fast,
- totalBytes, totalOps,
+ ProcessIoStats(
+ NBlockIO::EDir::Read, NBlockIO::EPriority::Fast,
std::move(msg->GroupReadBytes),
- std::move(msg->GroupReadOps)));
+ std::move(msg->GroupReadOps),
+ ctx);
const auto res = BootLogic->ReceiveBoot(ev, std::move(executorCaches));
return TranscriptBootOpResult(res, ctx);
@@ -673,6 +665,12 @@ void TExecutor::FollowerBoot(TEvTablet::TEvFBoot::TPtr &ev, const TActorContext
|| CurrentStateFunc() == &TThis::StateFollowerBoot
|| CurrentStateFunc() == &TThis::StateFollower);
+ if (!Counters) {
+ Counters = MakeHolder<TExecutorCounters>();
+ CountersBaseline = MakeHolder<TExecutorCounters>();
+ Counters->RememberCurrentStateAsBaseline(*CountersBaseline);
+ }
+
RegisterTabletFlatProbes();
Become(&TThis::StateFollowerBoot);
@@ -691,6 +689,13 @@ void TExecutor::FollowerBoot(TEvTablet::TEvFBoot::TPtr &ev, const TActorContext
auto executorCaches = CleanupState();
BootLogic.Reset(new TExecutorBootLogic(this, SelfId(), Owner->Info(), maxBootBytesInFly));
+
+ ProcessIoStats(
+ NBlockIO::EDir::Read, NBlockIO::EPriority::Fast,
+ std::move(msg->GroupReadBytes),
+ std::move(msg->GroupReadOps),
+ ctx);
+
const auto res = BootLogic->ReceiveFollowerBoot(ev, std::move(executorCaches));
return TranscriptFollowerBootOpResult(res, ctx);
}
@@ -942,45 +947,6 @@ void TExecutor::ApplyFollowerAuxUpdate(const TString &auxBody) {
const TString aux = NPageCollection::TSlicer::Lz4()->Decode(auxBody);
TProtoBox<NKikimrExecutorFlat::TFollowerAux> proto(aux);
- for (const auto &x : proto.GetPageCollectionsTouched()) {
- const TLogoBlobID &metaId = LogoBlobIDFromLogoBlobID(x.GetMetaInfoId());
- TPrivatePageCache::TInfo *collectionInfo = PrivatePageCache->Info(metaId);
- if (!collectionInfo)
- continue;
-
- TVector<NTable::TPageId> pages;
-
- for (ui32 pageId : x.GetTouchedPages()) {
- auto* page = collectionInfo->EnsurePage(pageId);
- switch (page->LoadState) {
- case TPrivatePageCache::TPage::LoadStateNo:
- pages.push_back(pageId);
- page->LoadState = TPrivatePageCache::TPage::LoadStateRequestedAsync;
- break;
- case TPrivatePageCache::TPage::LoadStateRequested:
- case TPrivatePageCache::TPage::LoadStateRequestedAsync:
- break;
- case TPrivatePageCache::TPage::LoadStateLoaded:
- PrivatePageCache->Touch(pageId, collectionInfo);
- break;
- default:
- Y_FAIL("unknown ELoadState");
- }
- }
-
- if (auto logl = Logger->Log(ELnLev::Debug)) {
- logl
- << NFmt::Do(*this) << " refresh pageCollection " << metaId
- << " " << pages.size() << " pages of " << x.TouchedPagesSize();
- }
-
- if (pages) {
- auto *req = new NPageCollection::TFetch(0, collectionInfo->PageCollection, std::move(pages));
-
- RequestFromSharedCache(req, NBlockIO::EPriority::Bkgr, EPageCollectionRequest::CacheSync);
- }
- }
-
if (proto.HasUserAuxUpdate())
Owner->OnLeaderUserAuxUpdate(std::move(proto.GetUserAuxUpdate()));
}
@@ -2381,22 +2347,6 @@ void TExecutor::CommitTransactionLog(TAutoPtr<TSeat> seat, TPageCollectionTxEnv
CompactionLogic->UpdateLogUsage(LogicRedo->GrabLogUsage());
}
- if (!Stats->IsFollower && HadFollowerAttached && env.Touches) {
- NKikimrExecutorFlat::TFollowerAux proto;
- proto.MutablePageCollectionsTouched()->Reserve(env.Touches.size());
- for (auto &xpair : env.Touches) {
- auto *px = proto.AddPageCollectionsTouched();
- LogoBlobIDFromLogoBlobID(xpair.first->Id, px->MutableMetaInfoId());
- px->MutableTouchedPages()->Reserve(xpair.second.size());
- for (ui32 blockId : xpair.second)
- px->AddTouchedPages(blockId);
- }
-
- auto coded = NPageCollection::TSlicer::Lz4()->Encode(proto.SerializeAsString());
-
- Send(Owner->Tablet(), new TEvTablet::TEvAux(std::move(coded)));
- }
-
const ui64 bookkeepingTimeuS = ui64(1000000. * (currentBookkeepingTime + bookkeepingTimer.PassedReset()));
const ui64 execTimeuS = ui64(1000000. * currentExecTime);
@@ -2884,20 +2834,11 @@ void TExecutor::Handle(TEvTablet::TEvCommitResult::TPtr &ev, const TActorContext
CheckYellow(std::move(msg->YellowMoveChannels), std::move(msg->YellowStopChannels));
- ui64 totalBytes = 0;
- for (auto& kv : msg->GroupWrittenBytes) {
- totalBytes += kv.second;
- }
-
- ui64 totalOps = 0;
- for (auto& kv : msg->GroupWrittenOps) {
- totalOps += kv.second;
- }
-
- Send(SelfId(), new NBlockIO::TEvStat(NBlockIO::EDir::Write, NBlockIO::EPriority::Fast,
- totalBytes, totalOps,
+ ProcessIoStats(
+ NBlockIO::EDir::Write, NBlockIO::EPriority::Fast,
std::move(msg->GroupWrittenBytes),
- std::move(msg->GroupWrittenOps)));
+ std::move(msg->GroupWrittenOps),
+ ctx);
ActiveTransaction = false;
PlanTransactionActivation();
@@ -3006,48 +2947,87 @@ void TExecutor::StartScan(ui64 task, TResource *cookie) noexcept
}
}
-void TExecutor::Handle(NBlockIO::TEvStat::TPtr &ev, const TActorContext &ctx) {
- auto *msg = ev->Get();
-
+void TExecutor::ProcessIoStats(
+ NBlockIO::EDir dir, NBlockIO::EPriority priority,
+ ui64 bytes, ui64 ops,
+ NBlockIO::TEvStat::TByCnGr&& groupBytes,
+ NBlockIO::TEvStat::TByCnGr&& groupOps,
+ const TActorContext& ctx)
+{
if (auto *metrics = ResourceMetrics.Get()) {
- auto &bandBytes = msg->Dir == NBlockIO::EDir::Read ? metrics->ReadThroughput : metrics->WriteThroughput;
+ auto &bandBytes = dir == NBlockIO::EDir::Read ? metrics->ReadThroughput : metrics->WriteThroughput;
- for (auto &it: msg->GroupBytes)
+ for (auto &it: groupBytes)
bandBytes[it.first].Increment(it.second, Time->Now());
- auto &bandOps = msg->Dir == NBlockIO::EDir::Read ? metrics->ReadIops : metrics->WriteIops;
+ auto &bandOps = dir == NBlockIO::EDir::Read ? metrics->ReadIops : metrics->WriteIops;
- for (auto &it: msg->GroupOps)
+ for (auto &it: groupOps)
bandOps[it.first].Increment(it.second, Time->Now());
metrics->TryUpdate(ctx);
}
- if (msg->Priority == NBlockIO::EPriority::Bulk) {
- switch (msg->Dir) {
+ if (priority == NBlockIO::EPriority::Bulk) {
+ switch (dir) {
case NBlockIO::EDir::Read:
- Counters->Cumulative()[TExecutorCounters::COMP_BYTES_READ].Increment(msg->Bytes);
- Counters->Cumulative()[TExecutorCounters::COMP_BLOBS_READ].Increment(msg->Ops);
+ Counters->Cumulative()[TExecutorCounters::COMP_BYTES_READ].Increment(bytes);
+ Counters->Cumulative()[TExecutorCounters::COMP_BLOBS_READ].Increment(ops);
break;
case NBlockIO::EDir::Write:
- Counters->Cumulative()[TExecutorCounters::COMP_BYTES_WRITTEN].Increment(msg->Bytes);
- Counters->Cumulative()[TExecutorCounters::COMP_BLOBS_WRITTEN].Increment(msg->Ops);
+ Counters->Cumulative()[TExecutorCounters::COMP_BYTES_WRITTEN].Increment(bytes);
+ Counters->Cumulative()[TExecutorCounters::COMP_BLOBS_WRITTEN].Increment(ops);
break;
}
} else {
- switch (msg->Dir) {
+ switch (dir) {
case NBlockIO::EDir::Read:
- Counters->Cumulative()[TExecutorCounters::TABLET_BYTES_READ].Increment(msg->Bytes);
- Counters->Cumulative()[TExecutorCounters::TABLET_BLOBS_READ].Increment(msg->Ops);
+ Counters->Cumulative()[TExecutorCounters::TABLET_BYTES_READ].Increment(bytes);
+ Counters->Cumulative()[TExecutorCounters::TABLET_BLOBS_READ].Increment(ops);
break;
case NBlockIO::EDir::Write:
- Counters->Cumulative()[TExecutorCounters::TABLET_BYTES_WRITTEN].Increment(msg->Bytes);
- Counters->Cumulative()[TExecutorCounters::TABLET_BLOBS_WRITTEN].Increment(msg->Ops);
+ Counters->Cumulative()[TExecutorCounters::TABLET_BYTES_WRITTEN].Increment(bytes);
+ Counters->Cumulative()[TExecutorCounters::TABLET_BLOBS_WRITTEN].Increment(ops);
break;
}
}
}
+void TExecutor::ProcessIoStats(
+ NBlockIO::EDir dir, NBlockIO::EPriority priority,
+ NBlockIO::TEvStat::TByCnGr&& groupBytes,
+ NBlockIO::TEvStat::TByCnGr&& groupOps,
+ const TActorContext& ctx)
+{
+ ui64 totalBytes = 0;
+ for (auto& kv : groupBytes) {
+ totalBytes += kv.second;
+ }
+
+ ui64 totalOps = 0;
+ for (auto& kv : groupOps) {
+ totalOps += kv.second;
+ }
+
+ ProcessIoStats(
+ dir, priority,
+ totalBytes, totalOps,
+ std::move(groupBytes),
+ std::move(groupOps),
+ ctx);
+}
+
+void TExecutor::Handle(NBlockIO::TEvStat::TPtr &ev, const TActorContext &ctx) {
+ auto *msg = ev->Get();
+
+ ProcessIoStats(
+ msg->Dir, msg->Priority,
+ msg->Bytes, msg->Ops,
+ std::move(msg->GroupBytes),
+ std::move(msg->GroupOps),
+ ctx);
+}
+
void TExecutor::UtilizeSubset(const NTable::TSubset &subset,
const NTable::NFwd::TSeen &seen,
THashSet<TLogoBlobID> reusedBundles,
@@ -4206,7 +4186,14 @@ ui64 TExecutor::BeginCompaction(THolder<NTable::TCompactionParams> params)
for (size_t group : xrange(rowScheme->Families.size())) {
auto familyId = rowScheme->Families[group];
- auto* family = tableInfo->Families.FindPtr(familyId);
+ const auto* family = tableInfo->Families.FindPtr(familyId);
+ if (Y_UNLIKELY(!family)) {
+ // FIXME: workaround for KIKIMR-17222
+ // Column families with default settings may be missing in schema,
+ // so we have to use a static variable as a substitute
+ static const NTable::TScheme::TFamily defaultFamilySettings;
+ family = &defaultFamilySettings;
+ }
Y_VERIFY(family, "Cannot find family %" PRIu32 " in table %" PRIu32, familyId, table);
auto roomId = family->Room;
diff --git a/ydb/core/tablet_flat/flat_executor.h b/ydb/core/tablet_flat/flat_executor.h
index a2426e6c4b..0dfe303ce4 100644
--- a/ydb/core/tablet_flat/flat_executor.h
+++ b/ydb/core/tablet_flat/flat_executor.h
@@ -555,6 +555,17 @@ class TExecutor
void Handle(NResourceBroker::TEvResourceBroker::TEvResourceAllocated::TPtr&);
void Handle(NOps::TEvScanStat::TPtr &ev, const TActorContext &ctx);
void Handle(NOps::TEvResult::TPtr &ev);
+ void ProcessIoStats(
+ NBlockIO::EDir dir, NBlockIO::EPriority priority,
+ ui64 bytes, ui64 ops,
+ NBlockIO::TEvStat::TByCnGr&& groupBytes,
+ NBlockIO::TEvStat::TByCnGr&& groupOps,
+ const TActorContext& ctx);
+ void ProcessIoStats(
+ NBlockIO::EDir dir, NBlockIO::EPriority priority,
+ NBlockIO::TEvStat::TByCnGr&& groupBytes,
+ NBlockIO::TEvStat::TByCnGr&& groupOps,
+ const TActorContext& ctx);
void Handle(NBlockIO::TEvStat::TPtr &ev, const TActorContext &ctx);
void Handle(NOps::TEvResult *ops, TProdCompact *msg, bool cancelled);
void Handle(TEvBlobStorage::TEvGetResult::TPtr&, const TActorContext&);
diff --git a/ydb/core/tablet_flat/flat_mem_warm.h b/ydb/core/tablet_flat/flat_mem_warm.h
index 065bf48631..10ceb217d7 100644
--- a/ydb/core/tablet_flat/flat_mem_warm.h
+++ b/ydb/core/tablet_flat/flat_mem_warm.h
@@ -462,7 +462,9 @@ namespace NMem {
void CommitTx(ui64 txId, TRowVersion rowVersion) {
auto it = Committed.find(txId);
- if (it == Committed.end() || it->second > rowVersion) {
+ bool toInsert = (it == Committed.end());
+
+ if (toInsert || it->second > rowVersion) {
if (RollbackState) {
if (it != Committed.end()) {
UndoBuffer.push_back(TUndoOpUpdateCommitted{ txId, it->second });
@@ -471,7 +473,7 @@ namespace NMem {
}
}
Committed[txId] = rowVersion;
- if (it == Committed.end()) {
+ if (toInsert) {
auto itRemoved = Removed.find(txId);
if (itRemoved != Removed.end()) {
if (RollbackState) {
diff --git a/ydb/core/tablet_flat/ut/CMakeLists.darwin.txt b/ydb/core/tablet_flat/ut/CMakeLists.darwin.txt
index 2d562ed938..09f65c7059 100644
--- a/ydb/core/tablet_flat/ut/CMakeLists.darwin.txt
+++ b/ydb/core/tablet_flat/ut/CMakeLists.darwin.txt
@@ -48,7 +48,6 @@ target_sources(ydb-core-tablet_flat-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/flat_table_part_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/flat_test_db.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/shared_handle_ut.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/util_pool_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_self.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_iterator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_memtable.cpp
diff --git a/ydb/core/tablet_flat/ut/CMakeLists.linux-aarch64.txt b/ydb/core/tablet_flat/ut/CMakeLists.linux-aarch64.txt
index 2e105df8ca..6d8788c917 100644
--- a/ydb/core/tablet_flat/ut/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/tablet_flat/ut/CMakeLists.linux-aarch64.txt
@@ -51,7 +51,6 @@ target_sources(ydb-core-tablet_flat-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/flat_table_part_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/flat_test_db.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/shared_handle_ut.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/util_pool_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_self.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_iterator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_memtable.cpp
diff --git a/ydb/core/tablet_flat/ut/CMakeLists.linux.txt b/ydb/core/tablet_flat/ut/CMakeLists.linux.txt
index a81bc4acef..fba2d0c2bd 100644
--- a/ydb/core/tablet_flat/ut/CMakeLists.linux.txt
+++ b/ydb/core/tablet_flat/ut/CMakeLists.linux.txt
@@ -53,7 +53,6 @@ target_sources(ydb-core-tablet_flat-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/flat_table_part_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/flat_test_db.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/shared_handle_ut.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/util_pool_ut.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_self.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_iterator.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/ut/ut_memtable.cpp
diff --git a/ydb/core/tablet_flat/ut_util/CMakeLists.darwin.txt b/ydb/core/tablet_flat/ut_util/CMakeLists.darwin.txt
new file mode 100644
index 0000000000..a998928acc
--- /dev/null
+++ b/ydb/core/tablet_flat/ut_util/CMakeLists.darwin.txt
@@ -0,0 +1,43 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-core-tablet_flat-ut_util)
+target_include_directories(ydb-core-tablet_flat-ut_util PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat
+)
+target_link_libraries(ydb-core-tablet_flat-ut_util PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ ydb-core-tablet_flat
+)
+target_link_options(ydb-core-tablet_flat-ut_util PRIVATE
+ -Wl,-no_deduplicate
+ -Wl,-sdk_version,10.15
+ -fPIC
+ -fPIC
+ -framework
+ CoreFoundation
+)
+target_sources(ydb-core-tablet_flat-ut_util PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/util_pool_ut.cpp
+)
+add_test(
+ NAME
+ ydb-core-tablet_flat-ut_util
+ COMMAND
+ ydb-core-tablet_flat-ut_util
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+vcs_info(ydb-core-tablet_flat-ut_util)
diff --git a/ydb/core/tablet_flat/ut_util/CMakeLists.linux-aarch64.txt b/ydb/core/tablet_flat/ut_util/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..1bf7355881
--- /dev/null
+++ b/ydb/core/tablet_flat/ut_util/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,46 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-core-tablet_flat-ut_util)
+target_include_directories(ydb-core-tablet_flat-ut_util PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat
+)
+target_link_libraries(ydb-core-tablet_flat-ut_util PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ library-cpp-lfalloc
+ cpp-testing-unittest_main
+ ydb-core-tablet_flat
+)
+target_link_options(ydb-core-tablet_flat-ut_util PRIVATE
+ -ldl
+ -lrt
+ -Wl,--no-as-needed
+ -fPIC
+ -fPIC
+ -lpthread
+ -lrt
+ -ldl
+)
+target_sources(ydb-core-tablet_flat-ut_util PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/util_pool_ut.cpp
+)
+add_test(
+ NAME
+ ydb-core-tablet_flat-ut_util
+ COMMAND
+ ydb-core-tablet_flat-ut_util
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+vcs_info(ydb-core-tablet_flat-ut_util)
diff --git a/ydb/core/tablet_flat/ut_util/CMakeLists.linux.txt b/ydb/core/tablet_flat/ut_util/CMakeLists.linux.txt
new file mode 100644
index 0000000000..2eb9ded9eb
--- /dev/null
+++ b/ydb/core/tablet_flat/ut_util/CMakeLists.linux.txt
@@ -0,0 +1,48 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-core-tablet_flat-ut_util)
+target_include_directories(ydb-core-tablet_flat-ut_util PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat
+)
+target_link_libraries(ydb-core-tablet_flat-ut_util PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ ydb-core-tablet_flat
+)
+target_link_options(ydb-core-tablet_flat-ut_util PRIVATE
+ -ldl
+ -lrt
+ -Wl,--no-as-needed
+ -fPIC
+ -fPIC
+ -lpthread
+ -lrt
+ -ldl
+)
+target_sources(ydb-core-tablet_flat-ut_util PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/core/tablet_flat/util_pool_ut.cpp
+)
+add_test(
+ NAME
+ ydb-core-tablet_flat-ut_util
+ COMMAND
+ ydb-core-tablet_flat-ut_util
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+vcs_info(ydb-core-tablet_flat-ut_util)
diff --git a/ydb/core/tablet_flat/ut_util/CMakeLists.txt b/ydb/core/tablet_flat/ut_util/CMakeLists.txt
new file mode 100644
index 0000000000..3e0811fb22
--- /dev/null
+++ b/ydb/core/tablet_flat/ut_util/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (APPLE)
+ include(CMakeLists.darwin.txt)
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux.txt)
+endif()
diff --git a/ydb/core/tablet_flat/util_pool.h b/ydb/core/tablet_flat/util_pool.h
index e3cb17a5ee..db6dbbc410 100644
--- a/ydb/core/tablet_flat/util_pool.h
+++ b/ydb/core/tablet_flat/util_pool.h
@@ -111,7 +111,9 @@ namespace NKikimr::NUtil {
TMemoryPool(size_t initial)
: First(AllocateChunk(Max(initial, TChunk::ChunkHeaderSize() + PLATFORM_DATA_ALIGN)))
, Current(First)
- { }
+ {
+ Total_ = Current->ChunkSize();
+ }
~TMemoryPool() {
TChunk* chunk = First;
@@ -157,6 +159,10 @@ namespace NKikimr::NUtil {
RollbackState_.reset();
}
+ size_t Total() const noexcept {
+ return Total_;
+ }
+
size_t Used() const noexcept {
return Used_ + Current->Used();
}
@@ -190,6 +196,7 @@ namespace NKikimr::NUtil {
Y_VERIFY(!Current->Next);
size_t hint = Max(AlignUp<size_t>(sizeof(TChunk), PLATFORM_DATA_ALIGN) + size, Current->ChunkSize() + 1);
TChunk* next = AllocateChunk(hint);
+ Total_ += next->ChunkSize();
Used_ += Current->Used();
Wasted_ += Current->Wasted();
Current->Next = next;
@@ -214,14 +221,18 @@ namespace NKikimr::NUtil {
void DoRollback(TChunk* target, char* ptr) {
if (target != Current) {
TChunk* chunk = target;
+ size_t nextUsed = chunk->Used();
+ size_t nextWasted = chunk->Wasted();
do {
// Remove previously added stats
- Used_ -= chunk->Used();
- Wasted_ -= chunk->Wasted();
+ Used_ -= nextUsed;
+ Wasted_ -= nextWasted;
// Switch to the next chunk in the chain
chunk = chunk->Next;
Y_VERIFY(chunk, "Rollback cannot find current chunk in the chain");
// Reset chunk and add it to stats as wasted/free space
+ nextUsed = chunk->Used();
+ nextWasted = chunk->Wasted();
chunk->Reset();
Wasted_ += chunk->ChunkSize();
Available_ += chunk->Left;
@@ -260,6 +271,7 @@ namespace NKikimr::NUtil {
private:
TChunk* First;
TChunk* Current;
+ size_t Total_ = 0;
size_t Used_ = 0;
size_t Wasted_ = 0;
size_t Available_ = 0;
diff --git a/ydb/core/tablet_flat/util_pool_ut.cpp b/ydb/core/tablet_flat/util_pool_ut.cpp
index 5f21e7af07..bb7a850216 100644
--- a/ydb/core/tablet_flat/util_pool_ut.cpp
+++ b/ydb/core/tablet_flat/util_pool_ut.cpp
@@ -68,6 +68,25 @@ Y_UNIT_TEST_SUITE(TMemoryPoolTest) {
DoTransactions(16);
}
+ Y_UNIT_TEST(LongRollback) {
+ TMemoryPool pool(1);
+ UNIT_ASSERT_C(pool.Used() == 0, pool.Used());
+ UNIT_ASSERT_C(pool.Used() + pool.Wasted() == pool.Total(), pool.Used() << " + " << pool.Wasted() << " != " << pool.Total());
+ for (int j = 0; j < 2; ++j) {
+ pool.BeginTransaction();
+ for (int i = 0; i < 1000; ++i) {
+ void* ptr = pool.Allocate(3);
+ UNIT_ASSERT(ptr);
+ }
+ UNIT_ASSERT_C(pool.Used() > 0, pool.Used());
+ UNIT_ASSERT_C(pool.Wasted() < pool.Total(), pool.Wasted() << " >= " << pool.Total());
+ UNIT_ASSERT_C(pool.Used() + pool.Wasted() == pool.Total(), pool.Used() << " + " << pool.Wasted() << " != " << pool.Total());
+ pool.RollbackTransaction();
+ UNIT_ASSERT_C(pool.Used() == 0, pool.Used());
+ UNIT_ASSERT_C(pool.Used() + pool.Wasted() == pool.Total(), pool.Used() << " + " << pool.Wasted() << " != " << pool.Total());
+ }
+ }
+
} // Y_UNIT_TEST_SUITE(TMemoryPoolTest)
} // namespace NKikimr::NUtil
diff --git a/ydb/core/test_tablet/load_actor_read_validate.cpp b/ydb/core/test_tablet/load_actor_read_validate.cpp
index aeb50277d6..71634ba4bc 100644
--- a/ydb/core/test_tablet/load_actor_read_validate.cpp
+++ b/ydb/core/test_tablet/load_actor_read_validate.cpp
@@ -198,13 +198,14 @@ namespace NKikimr::NTestShard {
return IssueRead(key);
}
- if (outcome == EReadOutcome::RETRY && RetryCount < 10) {
+ if (outcome == EReadOutcome::RETRY && RetryCount < 32) {
const bool inserted = KeyReadsWaitingForRetry.insert(key).second;
Y_VERIFY(inserted);
STLOG(PRI_ERROR, TEST_SHARD, TS24, "read key failed -- going to retry", (TabletId, TabletId),
(Key, key), (Message, message));
} else {
- Y_VERIFY_S(outcome == EReadOutcome::OK, "Message# " << message << " Key# " << key);
+ Y_VERIFY_S(outcome == EReadOutcome::OK, "Message# " << message << " Key# " << key << " Outcome# "
+ << (int)outcome << " RetryCount# " << RetryCount);
const bool inserted = Keys.try_emplace(key, value.size()).second;
Y_VERIFY(inserted);
diff --git a/ydb/core/test_tablet/test_shard_impl.h b/ydb/core/test_tablet/test_shard_impl.h
index 06d85037e0..d6f68b4378 100644
--- a/ydb/core/test_tablet/test_shard_impl.h
+++ b/ydb/core/test_tablet/test_shard_impl.h
@@ -20,6 +20,7 @@ namespace NKikimr::NTestShard {
WRITE,
READ_VALIDATE,
STATE_SERVER_CONNECT,
+ INITIAL,
};
enum {
@@ -49,6 +50,7 @@ namespace NKikimr::NTestShard {
TProtobufTabletCountersPair<TKeyValueCounters, TTestShardCounters> pair;
State.SetupTabletCounters(pair.GetFirstTabletCounters().Release());
Counters.reset(pair.GetSecondTabletCounters().Release());
+ Counters->Simple()[NTestShard::COUNTER_MODE_INITIAL] = 1;
}
static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
@@ -88,6 +90,7 @@ namespace NKikimr::NTestShard {
s[NTestShard::COUNTER_MODE_WRITE] = mode == EMode::WRITE;
s[NTestShard::COUNTER_MODE_READ_VALIDATE] = mode == EMode::READ_VALIDATE;
s[NTestShard::COUNTER_MODE_STATE_SERVER_CONNECT] = mode == EMode::STATE_SERVER_CONNECT;
+ s[NTestShard::COUNTER_MODE_INITIAL] = mode == EMode::INITIAL;
}
void OnLoadComplete() {
diff --git a/ydb/core/testlib/actors/test_runtime.cpp b/ydb/core/testlib/actors/test_runtime.cpp
index 03688fa00d..482b7b97e6 100644
--- a/ydb/core/testlib/actors/test_runtime.cpp
+++ b/ydb/core/testlib/actors/test_runtime.cpp
@@ -84,6 +84,11 @@ namespace NActors {
CleanupNodes();
}
+ void TTestActorRuntime::AddAppDataInit(std::function<void(ui32, NKikimr::TAppData&)> callback) {
+ Y_VERIFY(!IsInitialized, "Actor system is already initialized");
+ AppDataInit_.push_back(std::move(callback));
+ }
+
void TTestActorRuntime::Initialize(TEgg egg) {
IsInitialized = true;
@@ -147,6 +152,10 @@ namespace NActors {
nodeAppData->KeyConfig.CopyFrom(app0->KeyConfig);
}
+ for (auto& callback : AppDataInit_) {
+ callback(nodeIndex, *nodeAppData);
+ }
+
if (NeedMonitoring && !SingleSysEnv) {
ui16 port = GetPortManager().GetPort();
node->Mon.Reset(new NActors::TSyncHttpMon({
@@ -168,6 +177,8 @@ namespace NActors {
nodeAppData->Mon->Start();
}
}
+
+ AppDataInit_.clear();
}
ui16 TTestActorRuntime::GetMonPort(ui32 nodeIndex) const {
diff --git a/ydb/core/testlib/actors/test_runtime.h b/ydb/core/testlib/actors/test_runtime.h
index c9bb99b006..407970ff25 100644
--- a/ydb/core/testlib/actors/test_runtime.h
+++ b/ydb/core/testlib/actors/test_runtime.h
@@ -52,6 +52,7 @@ namespace NActors {
~TTestActorRuntime();
+ void AddAppDataInit(std::function<void(ui32, NKikimr::TAppData&)> callback);
virtual void Initialize(TEgg);
ui16 GetMonPort(ui32 nodeIndex = 0) const;
@@ -72,6 +73,7 @@ namespace NActors {
}
static bool DefaultScheduledFilterFunc(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event, TDuration delay, TInstant& deadline);
+
private:
void Initialize() override;
TIntrusivePtr<::NMonitoring::TDynamicCounters> GetCountersForComponent(TIntrusivePtr<::NMonitoring::TDynamicCounters> counters, const char* component) override;
@@ -92,5 +94,6 @@ namespace NActors {
THolder<IDestructable> Opaque;
TVector<ui16> MonPorts;
TActorId SleepEdgeActor;
+ TVector<std::function<void(ui32, NKikimr::TAppData&)>> AppDataInit_;
};
} // namespace NActors
diff --git a/ydb/core/testlib/basics/appdata.cpp b/ydb/core/testlib/basics/appdata.cpp
index a940ed2083..1f8c0a2903 100644
--- a/ydb/core/testlib/basics/appdata.cpp
+++ b/ydb/core/testlib/basics/appdata.cpp
@@ -58,13 +58,8 @@ namespace NKikimr {
app->MeteringConfig = MeteringConfig;
app->FeatureFlags = FeatureFlags;
- if (app->FeatureFlags.GetEnableMvcc() && !*app->FeatureFlags.GetEnableMvcc()) {
- // Make sure we don't try to use snapshot isolation without mvcc
- app->FeatureFlags.SetEnableMvccSnapshotReadsForTest(false);
- } else {
- // This is a special setting active in test runtime only
- app->EnableMvccSnapshotWithLegacyDomainRoot = true;
- }
+ // This is a special setting active in test runtime only
+ app->EnableMvccSnapshotWithLegacyDomainRoot = true;
auto tempKeys = std::move(Keys);
auto keyGenerator = [tempKeys] (ui32 node) {
diff --git a/ydb/core/testlib/basics/feature_flags.h b/ydb/core/testlib/basics/feature_flags.h
index 48eeae29cb..9b8a279b1c 100644
--- a/ydb/core/testlib/basics/feature_flags.h
+++ b/ydb/core/testlib/basics/feature_flags.h
@@ -33,10 +33,7 @@ public:
FEATURE_FLAG_SETTER(EnableNotNullColumns)
FEATURE_FLAG_SETTER(EnableBulkUpsertToAsyncIndexedTables)
FEATURE_FLAG_SETTER(EnableChangefeeds)
- FEATURE_FLAG_SETTER(EnableKqpScanQueryStreamLookup)
- FEATURE_FLAG_SETTER(EnableKqpDataQueryStreamLookup)
FEATURE_FLAG_SETTER(EnableMoveIndex)
- FEATURE_FLAG_SETTER(EnablePredicateExtractForDataQueries)
FEATURE_FLAG_SETTER(EnableNotNullDataColumns)
FEATURE_FLAG_SETTER(EnableArrowFormatAtDatashard)
FEATURE_FLAG_SETTER(EnableGrpcAudit)
@@ -45,18 +42,7 @@ public:
FEATURE_FLAG_SETTER(EnableDataShardGenericReadSets)
FEATURE_FLAG_SETTER(EnableAlterDatabaseCreateHiveFirst)
FEATURE_FLAG_SETTER(EnableDataShardVolatileTransactions)
-
- TDerived& SetEnableMvcc(std::optional<bool> value) {
- if (value) {
- if (*value) {
- FeatureFlags.SetEnableMvcc(NKikimrConfig::TFeatureFlags::VALUE_TRUE);
- } else {
- FeatureFlags.SetEnableMvcc(NKikimrConfig::TFeatureFlags::VALUE_FALSE);
- }
- }
-
- return *static_cast<TDerived*>(this);
- }
+ FEATURE_FLAG_SETTER(EnableTopicDiskSubDomainQuota)
#undef FEATURE_FLAG_SETTER
};
diff --git a/ydb/core/testlib/cs_helper.cpp b/ydb/core/testlib/cs_helper.cpp
index b1daae1bc7..42c2969113 100644
--- a/ydb/core/testlib/cs_helper.cpp
+++ b/ydb/core/testlib/cs_helper.cpp
@@ -54,10 +54,9 @@ void THelperSchemaless::CreateTestOlapTable(TActorId sender, TString storeOrDirN
WaitForSchemeOperation(sender, txId);
}
-void THelperSchemaless::SendDataViaActorSystem(TString testTable, ui64 pathIdBegin, ui64 tsBegin, size_t rowCount) {
+void THelperSchemaless::SendDataViaActorSystem(TString testTable, std::shared_ptr<arrow::RecordBatch> batch) {
auto* runtime = Server.GetRuntime();
- auto batch = TestArrowBatch(pathIdBegin, tsBegin, rowCount);
UNIT_ASSERT(batch);
UNIT_ASSERT(batch->num_rows());
auto data = NArrow::SerializeBatchNoCompression(batch);
@@ -94,6 +93,11 @@ void THelperSchemaless::SendDataViaActorSystem(TString testTable, ui64 pathIdBeg
runtime->DispatchEvents(options);
}
+void THelperSchemaless::SendDataViaActorSystem(TString testTable, ui64 pathIdBegin, ui64 tsBegin, size_t rowCount) {
+ auto batch = TestArrowBatch(pathIdBegin, tsBegin, rowCount);
+ SendDataViaActorSystem(testTable, batch);
+}
+
//
std::shared_ptr<arrow::Schema> THelper::GetArrowSchema() {
@@ -141,7 +145,7 @@ std::shared_ptr<arrow::RecordBatch> THelper::TestArrowBatch(ui64 pathIdBegin, ui
return arrow::RecordBatch::Make(schema, rowCount, { a1, a2, a3, a4, a5 });
}
-//
+// Clickbench table
std::shared_ptr<arrow::Schema> TCickBenchHelper::GetArrowSchema() {
return std::make_shared<arrow::Schema>(
@@ -309,4 +313,50 @@ std::shared_ptr<arrow::RecordBatch> TCickBenchHelper::TestArrowBatch(ui64, ui64
return batch;
}
+// Table with NULLs
+
+std::shared_ptr<arrow::Schema> TTableWithNullsHelper::GetArrowSchema() {
+ return std::make_shared<arrow::Schema>(
+ std::vector<std::shared_ptr<arrow::Field>>{
+ arrow::field("id", arrow::int32()),
+ arrow::field("resource_id", arrow::utf8()),
+ arrow::field("level", arrow::int32())
+ });
+}
+
+std::shared_ptr<arrow::RecordBatch> TTableWithNullsHelper::TestArrowBatch() {
+ return TestArrowBatch(0, 0, 10);
+}
+
+std::shared_ptr<arrow::RecordBatch> TTableWithNullsHelper::TestArrowBatch(ui64, ui64, size_t rowCount) {
+ rowCount = 10;
+ std::shared_ptr<arrow::Schema> schema = GetArrowSchema();
+
+ arrow::Int32Builder b1;
+ arrow::StringBuilder b2;
+ arrow::Int32Builder b3;
+
+ for (size_t i = 1; i <= rowCount / 2; ++i) {
+ Y_VERIFY(b1.Append(i).ok());
+ Y_VERIFY(b2.AppendNull().ok());
+ Y_VERIFY(b3.Append(i).ok());
+ }
+
+ for (size_t i = rowCount / 2 + 1; i <= rowCount; ++i) {
+ Y_VERIFY(b1.Append(i).ok());
+ Y_VERIFY(b2.Append(std::to_string(i)).ok());
+ Y_VERIFY(b3.AppendNull().ok());
+ }
+
+ std::shared_ptr<arrow::Int32Array> a1;
+ std::shared_ptr<arrow::StringArray> a2;
+ std::shared_ptr<arrow::Int32Array> a3;
+
+ Y_VERIFY(b1.Finish(&a1).ok());
+ Y_VERIFY(b2.Finish(&a2).ok());
+ Y_VERIFY(b3.Finish(&a3).ok());
+
+ return arrow::RecordBatch::Make(schema, rowCount, { a1, a2, a3 });
+}
+
}
diff --git a/ydb/core/testlib/cs_helper.h b/ydb/core/testlib/cs_helper.h
index 2e8658675f..1e7738c9e1 100644
--- a/ydb/core/testlib/cs_helper.h
+++ b/ydb/core/testlib/cs_helper.h
@@ -15,6 +15,7 @@ public:
void CreateTestOlapStore(TActorId sender, TString scheme);
void CreateTestOlapTable(TActorId sender, TString storeOrDirName, TString scheme);
void SendDataViaActorSystem(TString testTable, ui64 pathIdBegin, ui64 tsBegin, size_t rowCount);
+ void SendDataViaActorSystem(TString testTable, std::shared_ptr<arrow::RecordBatch> batch);
virtual std::shared_ptr<arrow::RecordBatch> TestArrowBatch(ui64 pathIdBegin, ui64 tsBegin, size_t rowCount) = 0;
};
@@ -166,4 +167,23 @@ public:
std::shared_ptr<arrow::RecordBatch> TestArrowBatch(ui64, ui64 begin, size_t rowCount) override;
};
+class TTableWithNullsHelper: public THelperSchemaless {
+private:
+ using TBase = THelperSchemaless;
+
+ std::shared_ptr<arrow::Schema> GetArrowSchema();
+public:
+ using TBase::TBase;
+
+ static constexpr const char * PROTO_SCHEMA = R"(
+ Columns { Name: "id" Type: "Int32" NotNull: true }
+ Columns { Name: "resource_id" Type: "Utf8" }
+ Columns { Name: "level" Type: "Int32" }
+ KeyColumnNames: "id"
+ )";
+
+ std::shared_ptr<arrow::RecordBatch> TestArrowBatch(ui64, ui64, size_t rowCount = 10) override;
+ std::shared_ptr<arrow::RecordBatch> TestArrowBatch();
+};
+
}
diff --git a/ydb/core/testlib/tenant_runtime.cpp b/ydb/core/testlib/tenant_runtime.cpp
index 78d5d2ee45..90d1abfef5 100644
--- a/ydb/core/testlib/tenant_runtime.cpp
+++ b/ydb/core/testlib/tenant_runtime.cpp
@@ -1004,7 +1004,7 @@ void TTenantTestRuntime::Setup(bool createTenantPools)
// Create other local services
for (size_t i = 0; i < Config.Nodes.size(); ++i) {
if (Config.CreateConfigsDispatcher) {
- auto aid = Register(CreateConfigsDispatcher(Extension));
+ auto aid = Register(CreateConfigsDispatcher(Extension, {}));
EnableScheduleForActor(aid, true);
RegisterService(MakeConfigsDispatcherID(GetNodeId(0)), aid, 0);
}
diff --git a/ydb/core/testlib/test_client.cpp b/ydb/core/testlib/test_client.cpp
index 0efb648e4b..dd9a7a90b9 100644
--- a/ydb/core/testlib/test_client.cpp
+++ b/ydb/core/testlib/test_client.cpp
@@ -212,27 +212,33 @@ namespace Tests {
Runtime->SetupMonitoring();
Runtime->SetLogBackend(Settings->LogBackend);
+ Runtime->AddAppDataInit([this](ui32 nodeIdx, NKikimr::TAppData& appData) {
+ Y_UNUSED(nodeIdx);
+
+ appData.AuthConfig.MergeFrom(Settings->AuthConfig);
+ appData.PQConfig.MergeFrom(Settings->PQConfig);
+ appData.PQClusterDiscoveryConfig.MergeFrom(Settings->PQClusterDiscoveryConfig);
+ appData.NetClassifierConfig.MergeFrom(Settings->NetClassifierConfig);
+ appData.StreamingConfig.MergeFrom(Settings->AppConfig.GetGRpcConfig().GetStreamingConfig());
+ appData.EnforceUserTokenRequirement = Settings->AppConfig.GetDomainsConfig().GetSecurityConfig().GetEnforceUserTokenRequirement();
+ appData.DomainsConfig.MergeFrom(Settings->AppConfig.GetDomainsConfig());
+ appData.PersQueueGetReadSessionsInfoWorkerFactory = Settings->PersQueueGetReadSessionsInfoWorkerFactory.get();
+ appData.DataStreamsAuthFactory = Settings->DataStreamsAuthFactory.get();
+ appData.PersQueueMirrorReaderFactory = Settings->PersQueueMirrorReaderFactory.get();
+
+ appData.DynamicNameserviceConfig = new TDynamicNameserviceConfig;
+ auto dnConfig = appData.DynamicNameserviceConfig;
+ dnConfig->MaxStaticNodeId = 1023;
+ dnConfig->MaxDynamicNodeId = 1024 + 100;
+ });
+
const bool mockDisk = (StaticNodes() + DynamicNodes()) == 1 && Settings->EnableMockOnSingleNode;
SetupTabletServices(*Runtime, &app, mockDisk, Settings->CustomDiskParams, Settings->CacheParams);
+ // WARNING: must be careful about modifying app data after actor system starts
+
for (ui32 nodeIdx = 0; nodeIdx < StaticNodes() + DynamicNodes(); ++nodeIdx) {
SetupDomainLocalService(nodeIdx);
- Runtime->GetAppData(nodeIdx).AuthConfig.MergeFrom(Settings->AuthConfig);
- Runtime->GetAppData(nodeIdx).PQConfig.MergeFrom(Settings->PQConfig);
- Runtime->GetAppData(nodeIdx).PQClusterDiscoveryConfig.MergeFrom(Settings->PQClusterDiscoveryConfig);
- Runtime->GetAppData(nodeIdx).NetClassifierConfig.MergeFrom(Settings->NetClassifierConfig);
- Runtime->GetAppData(nodeIdx).StreamingConfig.MergeFrom(Settings->AppConfig.GetGRpcConfig().GetStreamingConfig());
- Runtime->GetAppData(nodeIdx).EnforceUserTokenRequirement = Settings->AppConfig.GetDomainsConfig().GetSecurityConfig().GetEnforceUserTokenRequirement();
- Runtime->GetAppData(nodeIdx).DomainsConfig.MergeFrom(Settings->AppConfig.GetDomainsConfig());
- Runtime->GetAppData(nodeIdx).PersQueueGetReadSessionsInfoWorkerFactory = Settings->PersQueueGetReadSessionsInfoWorkerFactory.get();
- Runtime->GetAppData(nodeIdx).DataStreamsAuthFactory = Settings->DataStreamsAuthFactory.get();
- Runtime->GetAppData(nodeIdx).PersQueueMirrorReaderFactory = Settings->PersQueueMirrorReaderFactory.get();
-
- Runtime->GetAppData(nodeIdx).DynamicNameserviceConfig = new TDynamicNameserviceConfig;
- auto dnConfig = Runtime->GetAppData(nodeIdx).DynamicNameserviceConfig;
- dnConfig->MaxStaticNodeId = 1023;
- dnConfig->MaxDynamicNodeId = 1024 + 100;
-
SetupConfigurators(nodeIdx);
SetupProxies(nodeIdx);
}
@@ -266,9 +272,17 @@ namespace Tests {
auto grpcService = new NGRpcProxy::TGRpcService();
auto system(Runtime->GetAnyNodeActorSystem());
- auto grpcRequestProxy = NGRpcService::CreateGRpcRequestProxy(Settings->AppConfig);
- auto grpcRequestProxyId = system->Register(grpcRequestProxy, TMailboxType::ReadAsFilled);
- system->RegisterLocalService(NGRpcService::CreateGRpcRequestProxyId(), grpcRequestProxyId);
+
+ const size_t proxyCount = Max(ui32{1}, Settings->AppConfig.GetGRpcConfig().GetGRpcProxyCount());
+ TVector<TActorId> grpcRequestProxies;
+ grpcRequestProxies.reserve(proxyCount);
+ for (size_t i = 0; i < proxyCount; ++i) {
+ auto grpcRequestProxy = NGRpcService::CreateGRpcRequestProxy(Settings->AppConfig);
+ auto grpcRequestProxyId = system->Register(grpcRequestProxy, TMailboxType::ReadAsFilled);
+ system->RegisterLocalService(NGRpcService::CreateGRpcRequestProxyId(), grpcRequestProxyId);
+ grpcRequestProxies.push_back(grpcRequestProxyId);
+ }
+
auto grpcMon = system->Register(NGRpcService::CreateGrpcMonService(), TMailboxType::ReadAsFilled);
system->RegisterLocalService(NGRpcService::GrpcMonServiceId(), grpcMon);
@@ -321,39 +335,39 @@ namespace Tests {
future.Subscribe(startCb);
GRpcServer->AddService(grpcService);
- GRpcServer->AddService(new NGRpcService::TGRpcYdbExportService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbImportService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbSchemeService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbTableService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbScriptingService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcOperationService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::V1::TGRpcPersQueueService(system, counters, NMsgBusProxy::CreatePersQueueMetaCacheV2Id(), grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::V1::TGRpcTopicService(system, counters, NMsgBusProxy::CreatePersQueueMetaCacheV2Id(), grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::V1::TGRpcTopicServiceTx(system, counters, grpcRequestProxyId));
- GRpcServer->AddService(new NGRpcService::TGRpcPQClusterDiscoveryService(system, counters, grpcRequestProxyId));
- GRpcServer->AddService(new NKesus::TKesusGRpcService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcCmsService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcDiscoveryService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbClickhouseInternalService(system, counters, appData.InFlightLimiterRegistry, grpcRequestProxyId, true));
- GRpcServer->AddService(new NQuoter::TRateLimiterGRpcService(system, counters, grpcRequestProxyId));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbLongTxService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcDataStreamsService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcMonitoringService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcYdbQueryService(system, counters, grpcRequestProxyId, true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbExportService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbImportService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbSchemeService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbTableService(system, counters, grpcRequestProxies, true, 1));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbScriptingService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcOperationService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::V1::TGRpcPersQueueService(system, counters, NMsgBusProxy::CreatePersQueueMetaCacheV2Id(), grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::V1::TGRpcTopicService(system, counters, NMsgBusProxy::CreatePersQueueMetaCacheV2Id(), grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::V1::TGRpcTopicServiceTx(system, counters, grpcRequestProxies[0]));
+ GRpcServer->AddService(new NGRpcService::TGRpcPQClusterDiscoveryService(system, counters, grpcRequestProxies[0]));
+ GRpcServer->AddService(new NKesus::TKesusGRpcService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcCmsService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcDiscoveryService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbClickhouseInternalService(system, counters, appData.InFlightLimiterRegistry, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NQuoter::TRateLimiterGRpcService(system, counters, grpcRequestProxies[0]));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbLongTxService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcDataStreamsService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcMonitoringService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbQueryService(system, counters, grpcRequestProxies[0], true));
if (Settings->EnableYq) {
- GRpcServer->AddService(new NGRpcService::TGRpcYandexQueryService(system, counters, grpcRequestProxyId));
- GRpcServer->AddService(new NGRpcService::TGRpcFederatedQueryService(system, counters, grpcRequestProxyId));
- GRpcServer->AddService(new NGRpcService::TGRpcFqPrivateTaskService(system, counters, grpcRequestProxyId));
+ GRpcServer->AddService(new NGRpcService::TGRpcYandexQueryService(system, counters, grpcRequestProxies[0]));
+ GRpcServer->AddService(new NGRpcService::TGRpcFederatedQueryService(system, counters, grpcRequestProxies[0]));
+ GRpcServer->AddService(new NGRpcService::TGRpcFqPrivateTaskService(system, counters, grpcRequestProxies[0]));
}
if (const auto& factory = Settings->GrpcServiceFactory) {
// All services enabled by default for ut
static const std::unordered_set<TString> dummy;
- for (const auto& service : factory->Create(dummy, dummy, system, counters, grpcRequestProxyId)) {
+ for (const auto& service : factory->Create(dummy, dummy, system, counters, grpcRequestProxies[0])) {
GRpcServer->AddService(service);
}
}
- GRpcServer->AddService(new NGRpcService::TGRpcYdbLogStoreService(system, counters, grpcRequestProxyId, true));
- GRpcServer->AddService(new NGRpcService::TGRpcAuthService(system, counters, grpcRequestProxyId, true));
+ GRpcServer->AddService(new NGRpcService::TGRpcYdbLogStoreService(system, counters, grpcRequestProxies[0], true));
+ GRpcServer->AddService(new NGRpcService::TGRpcAuthService(system, counters, grpcRequestProxies[0], true));
GRpcServer->Start();
}
@@ -683,7 +697,7 @@ namespace Tests {
TMailboxType::Revolving, 0);
Runtime->RegisterService(MakeTenantPoolRootID(), poolId, nodeIdx);
if (Settings->EnableConfigsDispatcher) {
- auto *dispatcher = NConsole::CreateConfigsDispatcher(Settings->AppConfig);
+ auto *dispatcher = NConsole::CreateConfigsDispatcher(Settings->AppConfig, {});
auto aid = Runtime->Register(dispatcher, nodeIdx, appData.SystemPoolId, TMailboxType::Revolving, 0);
Runtime->RegisterService(NConsole::MakeConfigsDispatcherID(Runtime->GetNodeId(nodeIdx)), aid);
}
@@ -2089,7 +2103,21 @@ namespace Tests {
bool TClient::FlatQuery(const TString &query, TFlatQueryOptions& opts, NKikimrMiniKQL::TResult &result, const NKikimrClient::TResponse& expectedResponse) {
NKikimrClient::TResponse response;
- FlatQueryRaw(query, opts, response);
+ if (expectedResponse.HasStatus() && expectedResponse.GetStatus() == NMsgBusProxy::MSTATUS_OK) {
+ // Client is expecting OK, retry REJECTED replies during restarts and splits
+ for (int i = 0; i < 5; ++i) {
+ if (i != 0) {
+ response.Clear();
+ Cerr << "Retrying rejected query..." << Endl;
+ }
+ FlatQueryRaw(query, opts, response);
+ if (response.GetStatus() != NMsgBusProxy::MSTATUS_REJECTED) {
+ break;
+ }
+ }
+ } else {
+ FlatQueryRaw(query, opts, response);
+ }
if (!response.GetDataShardErrors().empty()) {
Cerr << "DataShardErrors:" << Endl << response.GetDataShardErrors() << Endl;
@@ -2347,7 +2375,7 @@ namespace Tests {
TVector<ui32> followerNodes;
for (const NKikimrHive::TTabletInfo& tablet : res.GetTablets()) {
- if (tablet.GetTabletID() == tabletId && tablet.HasFollowerID()) {
+ if (tablet.GetTabletID() == tabletId && tablet.HasFollowerID() && tablet.GetNodeID() != 0) {
followerNodes.push_back(NodeIdToIndex(runtime, tablet.GetNodeID()));
}
}
diff --git a/ydb/core/testlib/test_client.h b/ydb/core/testlib/test_client.h
index 4bf212ca1d..21de04466e 100644
--- a/ydb/core/testlib/test_client.h
+++ b/ydb/core/testlib/test_client.h
@@ -525,7 +525,7 @@ namespace Tests {
ui32 NodeIdToIndex(TTestActorRuntime* runtime, ui32 id) {
ui32 offset = runtime->GetNodeId(0);
- Y_VERIFY(id >= offset);
+ Y_VERIFY(id >= offset, "NodeId# %" PRIu32 " offset# %" PRIu32, id, offset);
return id - offset;
}
diff --git a/ydb/core/tx/columnshard/blob.h b/ydb/core/tx/columnshard/blob.h
index c0f0e72353..f9fb2b4a69 100644
--- a/ydb/core/tx/columnshard/blob.h
+++ b/ydb/core/tx/columnshard/blob.h
@@ -312,9 +312,20 @@ enum class EEvictState : ui8 {
SELF_CACHED = 2, // source, extern, cached blobs: 11-
EXTERN = 3, // source, extern, cached blobs: -1-
CACHED = 4, // source, extern, cached blobs: -11
- ERASED = 5, // source, extern, cached blobs: ---
+ ERASING = 5, // source, extern, cached blobs: -??
+ //ERASED = 6, // source, extern, cached blobs: ---
};
+inline bool IsExported(EEvictState state) {
+ return state == EEvictState::SELF_CACHED ||
+ state == EEvictState::EXTERN ||
+ state == EEvictState::CACHED;
+}
+
+inline bool IsDeleted(EEvictState state) {
+ return ui8(state) >= ui8(EEvictState::EXTERN); // !EVICTING and !SELF_CACHED
+}
+
struct TEvictedBlob {
EEvictState State = EEvictState::UNKNOWN;
TUnifiedBlobId Blob;
@@ -329,9 +340,20 @@ struct TEvictedBlob {
return Blob.Hash();
}
+ bool IsEvicting() const {
+ return State == EEvictState::EVICTING;
+ }
+
bool IsExternal() const {
return ExternBlob.IsValid();
}
+
+ TString ToString() const {
+ return TStringBuilder() << "state: " << (ui32)State
+ << " blob: " << Blob.ToStringNew()
+ << " extern: " << ExternBlob.ToStringNew()
+ << " cached: " << CachedBlob.ToStringNew();
+ }
};
}
diff --git a/ydb/core/tx/columnshard/blob_cache.cpp b/ydb/core/tx/columnshard/blob_cache.cpp
index e83fded3f2..ccea7fbfc8 100644
--- a/ydb/core/tx/columnshard/blob_cache.cpp
+++ b/ydb/core/tx/columnshard/blob_cache.cpp
@@ -14,25 +14,6 @@
namespace NKikimr::NBlobCache {
-namespace {
- // Blobs with same tagret can be read in a single request
- // (e.g. DS blobs from the same tablet residing on the same DS group, or 2 small blobs from the same tablet)
- std::tuple<ui64, ui32, NKikimrBlobStorage::EGetHandleClass> BlobSource(const TUnifiedBlobId& blobId,
- NKikimrBlobStorage::EGetHandleClass cls) {
- Y_VERIFY(blobId.IsValid());
-
- if (blobId.IsDsBlob()) {
- // Tablet & group restriction
- return {blobId.GetTabletId(), blobId.GetDsGroup(), cls};
- } else if (blobId.IsSmallBlob()) {
- // Tablet restriction, no group restrictions
- return {blobId.GetTabletId(), 0, cls};
- }
-
- return {0, 0, NKikimrBlobStorage::FastRead};
- }
-}
-
using namespace NActors;
class TBlobCache: public TActorBootstrapped<TBlobCache> {
@@ -46,14 +27,59 @@ private:
{}
};
- struct TReadItem {
+ struct TReadItem : public TReadBlobRangeOptions {
+ enum class EReadVariant {
+ FAST = 0,
+ DEFAULT,
+ DEFAULT_NO_DEADLINE,
+ };
+
TBlobRange BlobRange;
- NKikimrBlobStorage::EGetHandleClass ReadClass = NKikimrBlobStorage::FastRead;
- bool PromoteInCache;
- bool Fallback;
+
+ TReadItem(const TReadBlobRangeOptions& opts, const TBlobRange& blobRange)
+ : TReadBlobRangeOptions(opts)
+ , BlobRange(blobRange)
+ {
+ Y_VERIFY(blobRange.BlobId.IsValid());
+ }
+
+ bool PromoteInCache() const {
+ return CacheAfterRead;
+ }
+
+ static NKikimrBlobStorage::EGetHandleClass ReadClass(EReadVariant readVar) {
+ return (readVar == EReadVariant::FAST)
+ ? NKikimrBlobStorage::FastRead
+ : NKikimrBlobStorage::AsyncRead;
+ }
+
+ EReadVariant ReadVariant() const {
+ return IsBackgroud
+ ? (WithDeadline ? EReadVariant::DEFAULT : EReadVariant::DEFAULT_NO_DEADLINE)
+ : EReadVariant::FAST;
+ }
+
+ // Blobs with same tagret can be read in a single request
+ // (e.g. DS blobs from the same tablet residing on the same DS group, or 2 small blobs from the same tablet)
+ std::tuple<ui64, ui32, EReadVariant> BlobSource() const {
+ const TUnifiedBlobId& blobId = BlobRange.BlobId;
+
+ Y_VERIFY(blobId.IsValid());
+
+ if (blobId.IsDsBlob()) {
+ // Tablet & group restriction
+ return {blobId.GetTabletId(), blobId.GetDsGroup(), ReadVariant()};
+ } else if (blobId.IsSmallBlob()) {
+ // Tablet restriction, no group restrictions
+ return {blobId.GetTabletId(), 0, ReadVariant()};
+ }
+
+ return {0, 0, EReadVariant::FAST};
+ }
};
static constexpr i64 MAX_IN_FLIGHT_BYTES = 250ll << 20;
+ static constexpr i64 MAX_IN_FLIGHT_FALLBACK_BYTES = 100ll << 20;
static constexpr i64 MAX_REQUEST_BYTES = 8ll << 20;
static constexpr TDuration DEFAULT_READ_DEADLINE = TDuration::Seconds(30);
static constexpr TDuration FAST_READ_DEADLINE = TDuration::Seconds(10);
@@ -63,8 +89,8 @@ private:
// It is used to remove all blob ranges from cache when
// it gets a notification that a blob has been deleted
TControlWrapper MaxCacheDataSize;
- TControlWrapper MaxCacheExternalDataSize; // Cache size for extern (i.e. S3) blobs
TControlWrapper MaxInFlightDataSize;
+ TControlWrapper MaxFallbackDataSize; // It's expected to be less then MaxInFlightDataSize
i64 CacheDataSize; // Current size of all blobs in cache
ui64 ReadCookie;
THashMap<ui64, std::vector<TBlobRange>> CookieToRange; // All in-flight requests
@@ -72,6 +98,7 @@ private:
TDeque<TReadItem> ReadQueue; // Reads that are waiting to be sent
// TODO: Consider making per-group queues
i64 InFlightDataSize; // Current size of all in-flight blobs
+ i64 FallbackDataSize; // Current size of in-flight fallback blobs
THashMap<ui64, TActorId> ShardPipes; // TabletId -> PipeClient for small blob read requests
THashMap<ui64, THashSet<ui64>> InFlightTabletRequests; // TabletId -> list to read cookies
@@ -104,11 +131,12 @@ public:
: TActorBootstrapped<TBlobCache>()
, Cache(SIZE_MAX)
, MaxCacheDataSize(maxSize, 0, 1ull << 40)
- , MaxCacheExternalDataSize(0, 0, 1ull << 40)
, MaxInFlightDataSize(Min<i64>(MaxCacheDataSize, MAX_IN_FLIGHT_BYTES), 0, 10ull << 30)
+ , MaxFallbackDataSize(Min<i64>(MaxCacheDataSize / 2, MAX_IN_FLIGHT_FALLBACK_BYTES), 0, 5ull << 30)
, CacheDataSize(0)
, ReadCookie(1)
, InFlightDataSize(0)
+ , FallbackDataSize(0)
, SizeBytes(counters->GetCounter("SizeBytes"))
, SizeBlobs(counters->GetCounter("SizeBlobs"))
, Hits(counters->GetCounter("Hits", true))
@@ -130,8 +158,13 @@ public:
void Bootstrap(const TActorContext& ctx) {
auto& icb = AppData(ctx)->Icb;
icb->RegisterSharedControl(MaxCacheDataSize, "BlobCache.MaxCacheDataSize");
- icb->RegisterSharedControl(MaxCacheExternalDataSize, "BlobCache.MaxCacheExternalDataSize");
icb->RegisterSharedControl(MaxInFlightDataSize, "BlobCache.MaxInFlightDataSize");
+ icb->RegisterSharedControl(MaxFallbackDataSize, "BlobCache.MaxFallbackDataSize");
+
+ LOG_S_DEBUG("MaxCacheDataSize: " << (i64)MaxCacheDataSize
+ << " MaxFallbackDataSize: " << (i64)MaxFallbackDataSize
+ << " InFlightDataSize: " << (i64)InFlightDataSize);
+
Become(&TBlobCache::StateFunc);
ScheduleWakeup();
}
@@ -174,18 +207,12 @@ private:
void Handle(TEvBlobCache::TEvReadBlobRange::TPtr& ev, const TActorContext& ctx) {
const TBlobRange& blobRange = ev->Get()->BlobRange;
- const bool promote = ev->Get()->ReadOptions.CacheAfterRead;
- const bool fallback = ev->Get()->ReadOptions.Fallback;
- const bool isBackgroud = ev->Get()->ReadOptions.IsBackgroud;
+ const bool promote = (i64)MaxCacheDataSize && ev->Get()->ReadOptions.CacheAfterRead;
+ const bool fallback = ev->Get()->ReadOptions.ForceFallback;
LOG_S_DEBUG("Read request: " << blobRange << " cache: " << (ui32)promote << " fallback: " << (ui32)fallback);
- TReadItem readItem {
- .BlobRange = blobRange,
- .ReadClass = (isBackgroud ? NKikimrBlobStorage::AsyncRead : NKikimrBlobStorage::FastRead),
- .PromoteInCache = promote,
- .Fallback = fallback
- };
+ TReadItem readItem(ev->Get()->ReadOptions, blobRange);
HandleSingleRangeRead(std::move(readItem), ev->Sender, ctx);
MakeReadRequests(ctx);
@@ -195,7 +222,7 @@ private:
const TBlobRange& blobRange = readItem.BlobRange;
// Is in cache?
- auto it = readItem.PromoteInCache ? Cache.Find(blobRange) : Cache.FindWithoutPromote(blobRange);
+ auto it = readItem.PromoteInCache() ? Cache.Find(blobRange) : Cache.FindWithoutPromote(blobRange);
if (it != Cache.End()) {
Hits->Inc();
HitsBytes->Add(blobRange.Size);
@@ -204,17 +231,21 @@ private:
Misses->Inc();
- // Disable promoting reads for external blobs if MaxCacheExternalDataSize is zero. But keep promoting hits.
- // For now MaxCacheExternalDataSize is just a disabled/enabled flag. TODO: real MaxCacheExternalDataSize
- if (readItem.Fallback && MaxCacheExternalDataSize == 0) {
- readItem.PromoteInCache = false;
+ // Prevent full cache flushing by exported blobs. Decrease propability of caching depending on cache size.
+ // TODO: better cache strategy
+ if (readItem.ForceFallback && readItem.CacheAfterRead) {
+ if (CacheDataSize > (MaxCacheDataSize / 4) * 3) {
+ readItem.CacheAfterRead = !(ReadCookie % 256);
+ } else if (CacheDataSize > (MaxCacheDataSize / 2)) {
+ readItem.CacheAfterRead = !(ReadCookie % 32);
+ }
}
// Is outstanding?
auto readIt = OutstandingReads.find(blobRange);
if (readIt != OutstandingReads.end()) {
readIt->second.Waiting.push_back(sender);
- readIt->second.Cache |= readItem.PromoteInCache;
+ readIt->second.Cache |= readItem.PromoteInCache();
return;
}
@@ -223,18 +254,13 @@ private:
void Handle(TEvBlobCache::TEvReadBlobRangeBatch::TPtr& ev, const TActorContext& ctx) {
const auto& ranges = ev->Get()->BlobRanges;
- const bool promote = ev->Get()->ReadOptions.CacheAfterRead;
- const bool fallback = ev->Get()->ReadOptions.Fallback;
- const bool isBackgroud = ev->Get()->ReadOptions.IsBackgroud;
LOG_S_DEBUG("Batch read request: " << JoinStrings(ranges.begin(), ranges.end(), " "));
+ auto& readOptions = ev->Get()->ReadOptions;
+ readOptions.CacheAfterRead = (i64)MaxCacheDataSize && readOptions.CacheAfterRead;
+
for (const auto& blobRange : ranges) {
- TReadItem readItem {
- .BlobRange = blobRange,
- .ReadClass = (isBackgroud ? NKikimrBlobStorage::AsyncRead : NKikimrBlobStorage::FastRead),
- .PromoteInCache = promote,
- .Fallback = fallback
- };
+ TReadItem readItem(readOptions, blobRange);
HandleSingleRangeRead(std::move(readItem), ev->Sender, ctx);
}
@@ -299,7 +325,7 @@ private:
const auto& blobRange = readItem.BlobRange;
TReadInfo& blobInfo = OutstandingReads[blobRange];
blobInfo.Waiting.push_back(sender);
- blobInfo.Cache = readItem.PromoteInCache;
+ blobInfo.Cache = readItem.PromoteInCache();
LOG_S_DEBUG("Enqueue read range: " << blobRange);
@@ -307,23 +333,9 @@ private:
ReadsInQueue->Set(ReadQueue.size());
}
- void SendBatchReadRequest(const std::vector<TBlobRange>& blobRanges,
- NKikimrBlobStorage::EGetHandleClass readClass, const ui64 cookie, const TActorContext& ctx)
- {
- Y_VERIFY(!blobRanges.empty());
-
- if (blobRanges.front().BlobId.IsSmallBlob()) {
- SendBatchReadRequestToTablet(blobRanges, cookie, ctx);
- } else {
- SendBatchReadRequestToDS(blobRanges, readClass, cookie, ctx);
- }
- }
-
- void SendBatchReadRequestToDS(const std::vector<TBlobRange>& blobRanges,
- NKikimrBlobStorage::EGetHandleClass readClass, const ui64 cookie, const TActorContext& ctx)
+ void SendBatchReadRequestToDS(const std::vector<TBlobRange>& blobRanges, const ui64 cookie,
+ ui32 dsGroup, TReadItem::EReadVariant readVariant, const TActorContext& ctx)
{
- const ui32 dsGroup = blobRanges.front().BlobId.GetDsGroup();
-
LOG_S_DEBUG("Sending read from DS: group: " << dsGroup
<< " ranges: " << JoinStrings(blobRanges.begin(), blobRanges.end(), " ")
<< " cookie: " << cookie);
@@ -334,8 +346,8 @@ private:
queires[i].Set(blobRanges[i].BlobId.GetLogoBlobId(), blobRanges[i].Offset, blobRanges[i].Size);
}
- const TInstant deadline = AppData(ctx)->TimeProvider->Now() +
- ((readClass == NKikimrBlobStorage::FastRead) ? FAST_READ_DEADLINE : DEFAULT_READ_DEADLINE);
+ NKikimrBlobStorage::EGetHandleClass readClass = TReadItem::ReadClass(readVariant);
+ TInstant deadline = ReadDeadline(readVariant);
SendToBSProxy(ctx,
dsGroup,
new TEvBlobStorage::TEvGet(queires, blobRanges.size(), deadline, readClass, false),
@@ -344,32 +356,48 @@ private:
ReadRequests->Inc();
}
- void MakeReadRequests(const TActorContext& ctx) {
- THashMap<std::tuple<ui64, ui32, NKikimrBlobStorage::EGetHandleClass>, std::vector<TBlobRange>> groupedBlobRanges;
- THashMap<TUnifiedBlobId, std::vector<TBlobRange>> fallbackRanges;
+ static TInstant ReadDeadline(TReadItem::EReadVariant variant) {
+ if (variant == TReadItem::EReadVariant::FAST) {
+ return TAppData::TimeProvider->Now() + FAST_READ_DEADLINE;
+ } else if (variant == TReadItem::EReadVariant::DEFAULT) {
+ return TAppData::TimeProvider->Now() + DEFAULT_READ_DEADLINE;
+ }
+ return TInstant::Max(); // EReadVariant::DEFAULT_NO_DEADLINE
+ }
+
+ void MakeReadRequests(const TActorContext& ctx, THashMap<TUnifiedBlobId, std::vector<TBlobRange>>&& fallbackRanges = {}) {
+ THashMap<std::tuple<ui64, ui32, TReadItem::EReadVariant>, std::vector<TBlobRange>> groupedBlobRanges;
while (!ReadQueue.empty()) {
const auto& readItem = ReadQueue.front();
const TBlobRange& blobRange = readItem.BlobRange;
- if (readItem.Fallback) {
- // For now it's always possible to add external read cause we must not block ReadQueue by such reads
- // TODO: separate ReadQueue and InFlightDataSize for external reads
- fallbackRanges[blobRange.BlobId].push_back(blobRange);
- } else {
- // NOTE: if queue is not empty, at least 1 in-flight request is allowed
- if (InFlightDataSize && InFlightDataSize >= MaxInFlightDataSize) {
- break;
- }
- InFlightDataSize += blobRange.Size;
-
- auto blobSrc = BlobSource(blobRange.BlobId, readItem.ReadClass);
- groupedBlobRanges[blobSrc].push_back(blobRange);
+ // NOTE: if queue is not empty, at least 1 in-flight request is allowed
+ if (InFlightDataSize && InFlightDataSize >= MaxInFlightDataSize) {
+ break;
}
-
+ InFlightDataSize += blobRange.Size;
SizeBytesInFlight->Add(blobRange.Size);
SizeBlobsInFlight->Inc();
+ if (readItem.ForceFallback) {
+ Y_VERIFY(blobRange.BlobId.IsDsBlob());
+
+ if (FallbackDataSize && FallbackDataSize >= MaxFallbackDataSize) {
+ // 1. Do not block DS reads by fallbacks (fallback reads form S3 could be much slower then DS ones)
+ // 2. Limit max fallback data in flight
+ // Requires MaxFallbackDataSize < MaxInFlightDataSize
+ ReadQueue.push_back(readItem);
+ } else {
+ // Tablet cannot read different blobs in fallback now. Group reads by blobId.
+ fallbackRanges[blobRange.BlobId].push_back(blobRange);
+ FallbackDataSize += blobRange.Size;
+ }
+ } else {
+ auto blobSrc = readItem.BlobSource();
+ groupedBlobRanges[blobSrc].push_back(blobRange);
+ }
+
ReadQueue.pop_front();
}
@@ -378,15 +406,35 @@ private:
// We might need to free some space to accomodate the results of new reads
Evict(ctx);
+ std::vector<ui64> tabletReads;
+ tabletReads.reserve(groupedBlobRanges.size() + fallbackRanges.size());
+
+ for (auto& [blobId, ranges] : fallbackRanges) {
+ Y_VERIFY(blobId.IsDsBlob());
+
+ ui64 cookie = ++ReadCookie;
+ CookieToRange[cookie] = std::move(ranges);
+ tabletReads.push_back(cookie);
+ }
+
ui64 cookie = ++ReadCookie;
+ // TODO: fix small blobs mix with dsGroup == 0 (it could be zero in tests)
for (auto& [target, rangesGroup] : groupedBlobRanges) {
ui64 requestSize = 0;
- NKikimrBlobStorage::EGetHandleClass readClass = std::get<2>(target);
+ ui32 dsGroup = std::get<1>(target);
+ TReadItem::EReadVariant readVariant = std::get<2>(target);
+ bool isDS = rangesGroup.begin()->BlobId.IsDsBlob();
+
+ std::vector<ui64> dsReads;
for (auto& blobRange : rangesGroup) {
if (requestSize && (requestSize + blobRange.Size > MAX_REQUEST_BYTES)) {
- SendBatchReadRequest(CookieToRange[cookie], readClass, cookie, ctx);
+ if (isDS) {
+ dsReads.push_back(cookie);
+ } else {
+ tabletReads.push_back(cookie);
+ }
cookie = ++ReadCookie;
requestSize = 0;
}
@@ -395,18 +443,21 @@ private:
CookieToRange[cookie].emplace_back(std::move(blobRange));
}
if (requestSize) {
- SendBatchReadRequest(CookieToRange[cookie], readClass, cookie, ctx);
+ if (isDS) {
+ dsReads.push_back(cookie);
+ } else {
+ tabletReads.push_back(cookie);
+ }
cookie = ++ReadCookie;
requestSize = 0;
}
- }
- for (auto& [blobId, ranges] : fallbackRanges) {
- Y_VERIFY(blobId.IsDsBlob());
- Y_VERIFY(!ranges.empty());
+ for (ui64 cookie : dsReads) {
+ SendBatchReadRequestToDS(CookieToRange[cookie], cookie, dsGroup, readVariant, ctx);
+ }
+ }
- cookie = ++ReadCookie;
- CookieToRange[cookie] = std::move(ranges);
+ for (ui64 cookie : tabletReads) {
SendBatchReadRequestToTablet(CookieToRange[cookie], cookie, ctx);
}
}
@@ -441,12 +492,18 @@ private:
Y_VERIFY(blobRanges.size() == ev->Get()->ResponseSz, "Mismatched number of results for read request!");
+ // We could find blob ranges evicted (NODATA). Try to fallback them to tablet.
+ THashMap<TUnifiedBlobId, std::vector<TBlobRange>> fallbackRanges;
for (size_t i = 0; i < ev->Get()->ResponseSz; ++i) {
const auto& res = ev->Get()->Responses[i];
- ProcessSingleRangeResult(blobRanges[i], readCookie, res.Status, res.Buffer, ctx);
+ if (res.Status == NKikimrProto::EReplyStatus::NODATA) {
+ fallbackRanges[blobRanges[i].BlobId].emplace_back(std::move(blobRanges[i]));
+ } else {
+ ProcessSingleRangeResult(blobRanges[i], readCookie, res.Status, res.Buffer, ctx);
+ }
}
- MakeReadRequests(ctx);
+ MakeReadRequests(ctx, std::move(fallbackRanges));
}
void ProcessSingleRangeResult(const TBlobRange& blobRange, const ui64 readCookie,
@@ -512,6 +569,8 @@ private:
InFlightTabletRequests[tabletId].insert(cookie);
NTabletPipe::SendData(ctx, ShardPipes[tabletId], ev.release(), cookie);
+
+ ReadRequests->Inc();
}
// Frogets the pipe to the tablet and fails all in-flight requests to it
@@ -532,7 +591,6 @@ private:
CookieToRange.erase(readCookie);
for (size_t i = 0; i < blobRanges.size(); ++i) {
- Y_VERIFY(blobRanges[i].BlobId.IsSmallBlob());
Y_VERIFY(blobRanges[i].BlobId.GetTabletId() == tabletId);
ProcessSingleRangeResult(blobRanges[i], readCookie, NKikimrProto::EReplyStatus::NOTREADY, {}, ctx);
}
@@ -562,12 +620,11 @@ private:
}
void Handle(TEvColumnShard::TEvReadBlobRangesResult::TPtr& ev, const TActorContext& ctx) {
- ui64 tabletId = ev->Get()->Record.GetTabletId();
+ const auto& record = ev->Get()->Record;
+ ui64 tabletId = record.GetTabletId();
ui64 readCookie = ev->Cookie;
LOG_S_DEBUG("Got read result from tablet: " << tabletId);
- InFlightTabletRequests[tabletId].erase(readCookie);
-
auto cookieIt = CookieToRange.find(readCookie);
if (cookieIt == CookieToRange.end()) {
// This might only happen in case fo race between response and pipe close
@@ -576,19 +633,45 @@ private:
}
std::vector<TBlobRange> blobRanges = std::move(cookieIt->second);
- CookieToRange.erase(readCookie);
- const auto& record = ev->Get()->Record;
+ Y_VERIFY(record.ResultsSize(), "Zero results for read request!");
+ Y_VERIFY(blobRanges.size() >= record.ResultsSize(), "Mismatched number of results for read request");
+
+ if (blobRanges.size() == record.ResultsSize()) {
+ InFlightTabletRequests[tabletId].erase(readCookie);
+ CookieToRange.erase(readCookie);
+ } else {
+ // Extract blobRanges for returned blobId. Keep others ordered.
+ TString strReturnedBlobId = record.GetResults(0).GetBlobRange().GetBlobId();
+ std::vector<TBlobRange> same;
+ std::vector<TBlobRange> others;
+ same.reserve(record.ResultsSize());
+ others.reserve(blobRanges.size() - record.ResultsSize());
+
+ for (auto&& blobRange : blobRanges) {
+ TString strBlobId = blobRange.BlobId.ToStringNew();
+ if (strBlobId == strReturnedBlobId) {
+ same.emplace_back(std::move(blobRange));
+ } else {
+ others.emplace_back(std::move(blobRange));
+ }
+ }
+ blobRanges.swap(same);
- Y_VERIFY(blobRanges.size() == record.ResultsSize(), "Mismatched number of results for read request!");
+ CookieToRange[readCookie] = std::move(others);
+ }
for (size_t i = 0; i < record.ResultsSize(); ++i) {
const auto& res = record.GetResults(i);
+ const auto& blobRange = blobRanges[i];
+ if (!blobRange.BlobId.IsSmallBlob()) {
+ FallbackDataSize -= blobRange.Size;
+ }
- Y_VERIFY(blobRanges[i].BlobId.ToStringNew() == res.GetBlobRange().GetBlobId());
- Y_VERIFY(blobRanges[i].Offset == res.GetBlobRange().GetOffset());
- Y_VERIFY(blobRanges[i].Size == res.GetBlobRange().GetSize());
- ProcessSingleRangeResult(blobRanges[i], readCookie, res.GetStatus(), res.GetData(), ctx);
+ Y_VERIFY(blobRange.BlobId.ToStringNew() == res.GetBlobRange().GetBlobId());
+ Y_VERIFY(blobRange.Offset == res.GetBlobRange().GetOffset());
+ Y_VERIFY(blobRange.Size == res.GetBlobRange().GetSize());
+ ProcessSingleRangeResult(blobRange, readCookie, res.GetStatus(), res.GetData(), ctx);
}
MakeReadRequests(ctx);
@@ -615,7 +698,11 @@ private:
break;
}
- LOG_S_DEBUG("Evict: " << it.Key());
+ LOG_S_DEBUG("Evict: " << it.Key()
+ << " CacheDataSize: " << CacheDataSize
+ << " InFlightDataSize: " << (i64)InFlightDataSize
+ << " MaxCacheDataSize: " << (i64)MaxCacheDataSize
+ << " MaxFallbackDataSize: " << (i64)MaxFallbackDataSize);
{
// Remove the range from list of ranges by blob id
diff --git a/ydb/core/tx/columnshard/blob_cache.h b/ydb/core/tx/columnshard/blob_cache.h
index c7960af556..fb6ab9db2f 100644
--- a/ydb/core/tx/columnshard/blob_cache.h
+++ b/ydb/core/tx/columnshard/blob_cache.h
@@ -22,8 +22,16 @@ using TLogThis = TCtorLogger<NKikimrServices::BLOB_CACHE>;
struct TReadBlobRangeOptions {
bool CacheAfterRead;
- bool Fallback;
+ bool ForceFallback;
bool IsBackgroud;
+ bool WithDeadline = true;
+
+ TString ToString() const {
+ return TStringBuilder() << "cache: " << (ui32)CacheAfterRead
+ << " fallback: " << (ui32)ForceFallback
+ << " background: " << (ui32)IsBackgroud
+ << " dedlined: " << (ui32)WithDeadline;
+ }
};
struct TEvBlobCache {
@@ -59,7 +67,7 @@ struct TEvBlobCache {
: BlobRanges(std::move(blobRanges))
, ReadOptions(std::move(opts))
{
- if (opts.Fallback) {
+ if (opts.ForceFallback) {
for (const auto& blobRange : BlobRanges) {
Y_VERIFY(blobRange.BlobId == BlobRanges[0].BlobId);
}
diff --git a/ydb/core/tx/columnshard/blob_manager.cpp b/ydb/core/tx/columnshard/blob_manager.cpp
index 5d67ee6e56..3f3cfaa47d 100644
--- a/ydb/core/tx/columnshard/blob_manager.cpp
+++ b/ydb/core/tx/columnshard/blob_manager.cpp
@@ -515,7 +515,7 @@ bool TBlobManager::ExportOneToOne(const TUnifiedBlobId& blobId, const NKikimrTxC
.Blob = blobId
};
- if (EvictedBlobs.count(evict)) {
+ if (EvictedBlobs.count(evict) || DroppedEvictedBlobs.count(evict)) {
return false;
}
@@ -564,6 +564,8 @@ bool TBlobManager::UpdateOneToOne(TEvictedBlob&& evict, IBlobManagerDb& db, bool
Y_VERIFY(extracted);
switch (evict.State) {
+ case EEvictState::EVICTING:
+ Y_FAIL();
case EEvictState::SELF_CACHED:
Y_VERIFY(old.State == EEvictState::EVICTING);
break;
@@ -593,7 +595,7 @@ bool TBlobManager::EraseOneToOne(const TEvictedBlob& evict, IBlobManagerDb& db)
return DroppedEvictedBlobs.erase(evict);
}
-bool TBlobManager::LoadOneToOneExport(IBlobManagerDb& db) {
+bool TBlobManager::LoadOneToOneExport(IBlobManagerDb& db, THashSet<TUnifiedBlobId>& droppedEvicting) {
EvictedBlobs.clear();
DroppedEvictedBlobs.clear();
@@ -612,6 +614,10 @@ bool TBlobManager::LoadOneToOneExport(IBlobManagerDb& db) {
}
for (auto& [evict, metadata] : dropped) {
+ if (evict.IsEvicting()) {
+ droppedEvicting.insert(evict.Blob);
+ }
+
NKikimrTxColumnShard::TEvictMetadata meta;
Y_VERIFY(meta.ParseFromString(metadata));
@@ -639,6 +645,19 @@ TEvictedBlob TBlobManager::GetDropped(const TUnifiedBlobId& blobId, TEvictMetada
return {};
}
+void TBlobManager::GetCleanupBlobs(THashSet<TEvictedBlob>& cleanup) const {
+ TString strBlobs;
+ for (auto& [evict, _] : DroppedEvictedBlobs) {
+ if (evict.State != EEvictState::EVICTING) {
+ strBlobs += "'" + evict.Blob.ToStringNew() + "' ";
+ cleanup.insert(evict);
+ }
+ }
+ if (!strBlobs.empty()) {
+ LOG_S_NOTICE("Cleanup evicted blobs " << strBlobs << "at tablet " << TabletInfo->TabletID);
+ }
+}
+
void TBlobManager::DeleteSmallBlob(const TUnifiedBlobId& blobId, IBlobManagerDb& db) {
LOG_S_DEBUG("BlobManager at tablet " << TabletInfo->TabletID << " Delete Small Blob " << blobId);
db.EraseSmallBlob(blobId);
@@ -655,6 +674,10 @@ void TBlobManager::PerformDelayedDeletes(IBlobManagerDb& db) {
SmallBlobsToDelete.clear();
}
+bool TBlobManager::BlobInUse(const NOlap::TUnifiedBlobId& blobId) const {
+ return BlobsUseCount.count(blobId);
+}
+
void TBlobManager::SetBlobInUse(const TUnifiedBlobId& blobId, bool inUse) {
if (inUse) {
BlobsUseCount[blobId]++;
@@ -693,11 +716,6 @@ void TBlobManager::SetBlobInUse(const TUnifiedBlobId& blobId, bool inUse) {
NBlobCache::ForgetBlob(blobId);
}
-bool TBlobManager::IsEvicting(const TUnifiedBlobId& id) {
- TEvictMetadata meta;
- return GetEvicted(id, meta).State == EEvictState::EVICTING;
-}
-
bool TBlobManager::ExtractEvicted(TEvictedBlob& evict, TEvictMetadata& meta, bool fromDropped /*= false*/) {
if (fromDropped) {
if (DroppedEvictedBlobs.count(evict)) {
diff --git a/ydb/core/tx/columnshard/blob_manager.h b/ydb/core/tx/columnshard/blob_manager.h
index f1bd7af5b3..415590d7aa 100644
--- a/ydb/core/tx/columnshard/blob_manager.h
+++ b/ydb/core/tx/columnshard/blob_manager.h
@@ -94,9 +94,10 @@ public:
virtual bool DropOneToOne(const TUnifiedBlobId& blobId, IBlobManagerDb& db) = 0;
virtual bool UpdateOneToOne(TEvictedBlob&& evict, IBlobManagerDb& db, bool& dropped) = 0;
virtual bool EraseOneToOne(const TEvictedBlob& evict, IBlobManagerDb& db) = 0;
- virtual bool LoadOneToOneExport(IBlobManagerDb& db) = 0;
+ virtual bool LoadOneToOneExport(IBlobManagerDb& db, THashSet<TUnifiedBlobId>& droppedEvicting) = 0;
virtual TEvictedBlob GetEvicted(const TUnifiedBlobId& blob, TEvictMetadata& meta) = 0;
virtual TEvictedBlob GetDropped(const TUnifiedBlobId& blobId, TEvictMetadata& meta) = 0;
+ virtual void GetCleanupBlobs(THashSet<TEvictedBlob>& cleanup) const = 0;
virtual bool HasExternBlobs() const = 0;
};
@@ -226,7 +227,6 @@ public:
CountersUpdate = TBlobManagerCounters();
return res;
}
- bool IsEvicting(const TUnifiedBlobId& id);
// Implementation of IBlobManager interface
TBlobBatch StartBlobBatch(ui32 channel = BLOB_CHANNEL) override;
@@ -238,9 +238,10 @@ public:
bool DropOneToOne(const TUnifiedBlobId& blob, IBlobManagerDb& db) override;
bool UpdateOneToOne(TEvictedBlob&& evict, IBlobManagerDb& db, bool& dropped) override;
bool EraseOneToOne(const TEvictedBlob& evict, IBlobManagerDb& db) override;
- bool LoadOneToOneExport(IBlobManagerDb& db) override;
+ bool LoadOneToOneExport(IBlobManagerDb& db, THashSet<TUnifiedBlobId>& droppedEvicting) override;
TEvictedBlob GetEvicted(const TUnifiedBlobId& blobId, TEvictMetadata& meta) override;
TEvictedBlob GetDropped(const TUnifiedBlobId& blobId, TEvictMetadata& meta) override;
+ void GetCleanupBlobs(THashSet<TEvictedBlob>& cleanup) const override;
bool HasExternBlobs() const override {
return EvictedBlobs.size() || DroppedEvictedBlobs.size();
@@ -248,6 +249,7 @@ public:
// Implementation of IBlobInUseTracker
void SetBlobInUse(const TUnifiedBlobId& blobId, bool inUse) override;
+ bool BlobInUse(const NOlap::TUnifiedBlobId& blobId) const override;
private:
TGenStep FindNewGCBarrier();
diff --git a/ydb/core/tx/columnshard/blob_manager_db.cpp b/ydb/core/tx/columnshard/blob_manager_db.cpp
index 05802e328d..049002c1a9 100644
--- a/ydb/core/tx/columnshard/blob_manager_db.cpp
+++ b/ydb/core/tx/columnshard/blob_manager_db.cpp
@@ -123,22 +123,24 @@ bool TBlobManagerDb::LoadEvicted(THashMap<TEvictedBlob, TString>& evicted, THash
while (!rowset.EndOfSet()) {
TString strBlobId = rowset.GetValue<Schema::OneToOneEvictedBlobs::BlobId>();
//ui64 size = rowset.GetValue<Schema::OneToOneEvictedBlobs::Size>();
- ui8 state = rowset.GetValue<Schema::OneToOneEvictedBlobs::State>();
+ EEvictState state = (EEvictState)rowset.GetValue<Schema::OneToOneEvictedBlobs::State>();
bool isDropped = rowset.GetValue<Schema::OneToOneEvictedBlobs::Dropped>();
TString meta = rowset.GetValue<Schema::OneToOneEvictedBlobs::Metadata>();
TString strExternId = rowset.GetValue<Schema::OneToOneEvictedBlobs::ExternBlobId>();
// TODO: CachedBlob
- Y_VERIFY(state != ui8(EEvictState::UNKNOWN));
+ Y_VERIFY(state != EEvictState::UNKNOWN);
TUnifiedBlobId blobId = TUnifiedBlobId::ParseFromString(strBlobId, &dsGroupSelector, error);
Y_VERIFY(blobId.IsValid(), "%s", error.c_str());
TUnifiedBlobId externId = TUnifiedBlobId::ParseFromString(strExternId, nullptr, error);
- Y_VERIFY((state == ui8(EEvictState::EVICTING) || externId.IsValid()), "%s", error.c_str());
+ if (NOlap::IsExported(state)) {
+ Y_VERIFY(externId.IsValid(), "%s", error.c_str());
+ }
TEvictedBlob evict{
- .State = (EEvictState)state,
+ .State = state,
.Blob = std::move(blobId),
.ExternBlob = std::move(externId),
};
@@ -163,6 +165,7 @@ void TBlobManagerDb::UpdateEvictBlob(const TEvictedBlob& evict, const TString& m
switch (evict.State) {
case EEvictState::EVICTING:
+ Y_VERIFY(!meta.empty());
db.Table<Schema::OneToOneEvictedBlobs>().Key(serializedBlobId).Update(
NIceDb::TUpdate<Schema::OneToOneEvictedBlobs::Size>(evict.Blob.BlobSize()),
NIceDb::TUpdate<Schema::OneToOneEvictedBlobs::State>((ui8)evict.State),
@@ -181,7 +184,14 @@ void TBlobManagerDb::UpdateEvictBlob(const TEvictedBlob& evict, const TString& m
);
break;
}
- default:
+ case EEvictState::ERASING:
+ Y_VERIFY(meta.empty());
+ db.Table<Schema::OneToOneEvictedBlobs>().Key(serializedBlobId).Update(
+ NIceDb::TUpdate<Schema::OneToOneEvictedBlobs::State>((ui8)evict.State)
+ );
+ break;
+ case EEvictState::UNKNOWN:
+ case EEvictState::CACHED:
Y_VERIFY(false);
break;
}
diff --git a/ydb/core/tx/columnshard/columnshard.cpp b/ydb/core/tx/columnshard/columnshard.cpp
index 6a6af07b79..44a82e1826 100644
--- a/ydb/core/tx/columnshard/columnshard.cpp
+++ b/ydb/core/tx/columnshard/columnshard.cpp
@@ -29,15 +29,10 @@ void TColumnShard::SwitchToWork(const TActorContext& ctx) {
IndexingActor = ctx.Register(CreateIndexingActor(TabletID(), ctx.SelfID));
CompactionActor = ctx.Register(CreateCompactionActor(TabletID(), ctx.SelfID));
EvictionActor = ctx.Register(CreateEvictionActor(TabletID(), ctx.SelfID));
- ui32 tieringsCount = 0;
for (auto&& i : Tables) {
ActivateTiering(i.first, i.second.TieringUsage);
- tieringsCount += (i.second.TieringUsage ? 1 : 0);
- }
- TieringWaiting = tieringsCount;
- if (!TieringWaiting) {
- SignalTabletActive(ctx);
}
+ SignalTabletActive(ctx);
}
void TColumnShard::OnActivateExecutor(const TActorContext& ctx) {
@@ -192,7 +187,7 @@ void TColumnShard::UpdateInsertTableCounters() {
SetCounter(COUNTER_COMMITTED_RECORDS, committed.Rows);
SetCounter(COUNTER_COMMITTED_BYTES, committed.Bytes);
- LOG_S_DEBUG("InsertTable. Prepared: " << prepared.Bytes << " in " << prepared.Rows
+ LOG_S_INFO("InsertTable. Prepared: " << prepared.Bytes << " in " << prepared.Rows
<< " records, committed: " << committed.Bytes << " in " << committed.Rows
<< " records at tablet " << TabletID());
}
@@ -252,8 +247,15 @@ ui64 TColumnShard::MemoryUsage() const {
PathsToDrop.size() * sizeof(ui64) +
Ttl.PathsCount() * sizeof(TTtl::TDescription) +
SchemaPresets.size() * sizeof(TSchemaPreset) +
+ BasicTxInfo.size() * sizeof(TBasicTxInfo) +
+ DeadlineQueue.size() * sizeof(TDeadlineQueueItem) +
+ (PlanQueue.size() + RunningQueue.size()) * sizeof(TPlanQueueItem) +
+ ScanTxInFlight.size() * (sizeof(ui64) + sizeof(TInstant)) +
AltersInFlight.size() * sizeof(TAlterMeta) +
CommitsInFlight.size() * sizeof(TCommitMeta) +
+ LongTxWrites.size() * (sizeof(TWriteId) + sizeof(TLongTxWriteInfo)) +
+ LongTxWritesByUniqueId.size() * (sizeof(TULID) + sizeof(void*)) +
+ (WaitingReads.size() + WaitingScans.size()) * (sizeof(TRowVersion) + sizeof(void*)) +
TabletCounters->Simple()[COUNTER_PREPARED_RECORDS].Get() * sizeof(NOlap::TInsertedData) +
TabletCounters->Simple()[COUNTER_COMMITTED_RECORDS].Get() * sizeof(NOlap::TInsertedData);
if (PrimaryIndex) {
diff --git a/ydb/core/tx/columnshard/columnshard.h b/ydb/core/tx/columnshard/columnshard.h
index cbfb482f74..f8761c4a8d 100644
--- a/ydb/core/tx/columnshard/columnshard.h
+++ b/ydb/core/tx/columnshard/columnshard.h
@@ -15,6 +15,36 @@ namespace NKikimr {
namespace NColumnShard {
class TBlobGroupSelector;
+
+inline Ydb::StatusIds::StatusCode ConvertToYdbStatus(NKikimrTxColumnShard::EResultStatus columnShardStatus) {
+ switch (columnShardStatus) {
+ case NKikimrTxColumnShard::UNSPECIFIED:
+ return Ydb::StatusIds::STATUS_CODE_UNSPECIFIED;
+
+ case NKikimrTxColumnShard::PREPARED:
+ case NKikimrTxColumnShard::SUCCESS:
+ return Ydb::StatusIds::SUCCESS;
+
+ case NKikimrTxColumnShard::ABORTED:
+ return Ydb::StatusIds::ABORTED;
+
+ case NKikimrTxColumnShard::ERROR:
+ return Ydb::StatusIds::GENERIC_ERROR;
+
+ case NKikimrTxColumnShard::TIMEOUT:
+ return Ydb::StatusIds::TIMEOUT;
+
+ case NKikimrTxColumnShard::SCHEMA_ERROR:
+ case NKikimrTxColumnShard::SCHEMA_CHANGED:
+ return Ydb::StatusIds::SCHEME_ERROR;
+
+ case NKikimrTxColumnShard::OVERLOADED:
+ return Ydb::StatusIds::OVERLOADED;
+
+ default:
+ return Ydb::StatusIds::GENERIC_ERROR;
+ }
+}
}
struct TEvColumnShard {
@@ -26,6 +56,7 @@ struct TEvColumnShard {
EvNotifyTxCompletionResult,
EvReadBlobRanges,
EvReadBlobRangesResult,
+ EvCheckPlannedTransaction,
EvWrite = EvProposeTransaction + 256,
EvRead,
@@ -74,6 +105,24 @@ struct TEvColumnShard {
}
};
+ struct TEvCheckPlannedTransaction
+ : public TEventPB<TEvCheckPlannedTransaction,
+ NKikimrTxColumnShard::TEvCheckPlannedTransaction,
+ EvCheckPlannedTransaction>
+ {
+ TEvCheckPlannedTransaction() = default;
+
+ TEvCheckPlannedTransaction(const TActorId& source, ui64 planStep, ui64 txId) {
+ ActorIdToProto(source, Record.MutableSource());
+ Record.SetStep(planStep);
+ Record.SetTxId(txId);
+ }
+
+ TActorId GetSource() const {
+ return ActorIdFromProto(Record.GetSource());
+ }
+ };
+
struct TEvCancelTransactionProposal
: public TEventPB<TEvCancelTransactionProposal,
NKikimrTxColumnShard::TEvCancelTransactionProposal,
@@ -275,6 +324,10 @@ inline auto& Proto(TEvColumnShard::TEvProposeTransaction* ev) {
return ev->Record;
}
+inline auto& Proto(TEvColumnShard::TEvCheckPlannedTransaction* ev) {
+ return ev->Record;
+}
+
inline auto& Proto(TEvColumnShard::TEvProposeTransactionResult* ev) {
return ev->Record;
}
diff --git a/ydb/core/tx/columnshard/columnshard__export.cpp b/ydb/core/tx/columnshard/columnshard__export.cpp
index 2caf42183a..92ee25ad99 100644
--- a/ydb/core/tx/columnshard/columnshard__export.cpp
+++ b/ydb/core/tx/columnshard/columnshard__export.cpp
@@ -19,7 +19,7 @@ public:
private:
TEvPrivate::TEvExport::TPtr Ev;
- std::vector<NOlap::TEvictedBlob> BlobsToForget;
+ THashSet<NOlap::TEvictedBlob> BlobsToForget;
};
@@ -33,7 +33,7 @@ bool TTxExportFinish::Execute(TTransactionContext& txc, const TActorContext&) {
auto& msg = *Ev->Get();
auto status = msg.Status;
- if (status == NKikimrProto::OK) {
+ {
TBlobManagerDb blobManagerDb(txc.DB);
for (auto& [blob, externId] : msg.SrcToDstBlobs) {
@@ -42,6 +42,11 @@ bool TTxExportFinish::Execute(TTransactionContext& txc, const TActorContext&) {
Y_VERIFY(externId.IsS3Blob());
bool dropped = false;
+ if (!msg.Blobs.count(blobId)) {
+ Y_VERIFY(!msg.ErrorStrings.empty());
+ continue; // not exported
+ }
+
#if 0 // TODO: SELF_CACHED logic
NOlap::TEvictedBlob evict{
.State = EEvictState::SELF_CACHED,
@@ -59,32 +64,28 @@ bool TTxExportFinish::Execute(TTransactionContext& txc, const TActorContext&) {
// Delayed erase of evicted blob. Blob could be already deleted.
if (present && !dropped) {
- LOG_S_DEBUG("Delete exported blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
+ LOG_S_NOTICE("Blob exported '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
Self->BlobManager->DeleteBlob(blobId, blobManagerDb);
Self->IncCounter(COUNTER_BLOBS_ERASED);
Self->IncCounter(COUNTER_BYTES_ERASED, blobId.BlobSize());
- } else if (present) {
- LOG_S_DEBUG("Stale exported blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
+ } else if (present && dropped) {
+ LOG_S_NOTICE("Stale blob exported '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
TEvictMetadata meta;
evict = Self->BlobManager->GetDropped(blobId, meta);
Y_VERIFY(evict.State == EEvictState::EXTERN);
- if (Self->DelayedForgetBlobs.count(blobId)) {
- Self->DelayedForgetBlobs.erase(blobId);
- BlobsToForget.emplace_back(std::move(evict));
- } else {
- LOG_S_ERROR("No delayed forget for stale exported blob '"
- << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
- }
+ BlobsToForget.emplace(std::move(evict));
} else {
- LOG_S_ERROR("Exported but unknown blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
+ LOG_S_ERROR("Unknown blob exported '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
}
// TODO: delete not present in S3 for sure (avoid race between export and forget)
#endif
}
+ }
+ if (status == NKikimrProto::OK) {
Self->IncCounter(COUNTER_EXPORT_SUCCESS);
} else {
Self->IncCounter(COUNTER_EXPORT_FAIL);
@@ -97,39 +98,41 @@ void TTxExportFinish::Complete(const TActorContext& ctx) {
Y_VERIFY(Ev);
LOG_S_DEBUG("TTxExportFinish.Complete at tablet " << Self->TabletID());
- auto& msg = *Ev->Get();
- Y_VERIFY(!msg.TierName.empty());
- Self->ActiveEviction = false;
if (!BlobsToForget.empty()) {
- Self->ForgetBlobs(ctx, msg.TierName, std::move(BlobsToForget));
+ Self->ForgetBlobs(ctx, BlobsToForget);
}
+
+ Y_VERIFY(Self->ActiveEvictions, "Unexpected active evictions count at tablet %lu", Self->TabletID());
+ --Self->ActiveEvictions;
}
void TColumnShard::Handle(TEvPrivate::TEvExport::TPtr& ev, const TActorContext& ctx) {
- auto status = ev->Get()->Status;
+ auto& msg = *ev->Get();
+ auto status = msg.Status;
- Y_VERIFY(!ActiveTtl, "TTL already in progress at tablet %lu", TabletID());
- Y_VERIFY(!ActiveEviction || status != NKikimrProto::UNKNOWN, "Eviction in progress at tablet %lu", TabletID());
- ui64 exportNo = ev->Get()->ExportNo;
- auto& tierName = ev->Get()->TierName;
+ Y_VERIFY(ActiveEvictions, "Unexpected active evictions count at tablet %lu", TabletID());
+ ui64 exportNo = msg.ExportNo;
+ auto& tierName = msg.TierName;
+ ui64 pathId = msg.PathId;
- if (status == NKikimrProto::ERROR) {
- LOG_S_WARN("Export (fail): " << exportNo << " tier '" << tierName << "' error: "
+ if (status == NKikimrProto::UNKNOWN) {
+ LOG_S_DEBUG("Export (write): id " << exportNo << " tier '" << tierName << "' at tablet " << TabletID());
+ ExportBlobs(ctx, exportNo, tierName, pathId, std::move(msg.Blobs));
+ } else if (status == NKikimrProto::ERROR && msg.Blobs.empty()) {
+ LOG_S_WARN("Export (fail): id " << exportNo << " tier '" << tierName << "' error: "
<< ev->Get()->SerializeErrorsToString() << "' at tablet " << TabletID());
- ActiveEviction = false;
- } else if (status == NKikimrProto::UNKNOWN) {
- LOG_S_DEBUG("Export (write): " << exportNo << " tier '" << tierName << "' at tablet " << TabletID());
- auto& tierBlobs = ev->Get()->Blobs;
- Y_VERIFY(tierBlobs.size());
- ExportBlobs(ctx, exportNo, tierName, std::move(tierBlobs));
- } else if (status == NKikimrProto::OK) {
- LOG_S_DEBUG("Export (apply): " << exportNo << " tier '" << tierName << "' at tablet " << TabletID());
- Execute(new TTxExportFinish(this, ev), ctx);
+ --ActiveEvictions;
} else {
- Y_VERIFY(false);
+ // There's no atomicity needed here. Allow partial export
+ if (status == NKikimrProto::ERROR) {
+ LOG_S_WARN("Export (partial): id " << exportNo << " tier '" << tierName << "' error: "
+ << ev->Get()->SerializeErrorsToString() << "' at tablet " << TabletID());
+ } else {
+ LOG_S_DEBUG("Export (apply): id " << exportNo << " tier '" << tierName << "' at tablet " << TabletID());
+ }
+ Execute(new TTxExportFinish(this, ev), ctx);
}
- ActiveEviction = true;
}
}
diff --git a/ydb/core/tx/columnshard/columnshard__forget.cpp b/ydb/core/tx/columnshard/columnshard__forget.cpp
index 89c5838d37..02cdbfb25b 100644
--- a/ydb/core/tx/columnshard/columnshard__forget.cpp
+++ b/ydb/core/tx/columnshard/columnshard__forget.cpp
@@ -34,12 +34,16 @@ bool TTxForget::Execute(TTransactionContext& txc, const TActorContext&) {
if (status == NKikimrProto::OK) {
TBlobManagerDb blobManagerDb(txc.DB);
+ TString strBlobs;
for (auto& evict : msg.Evicted) {
bool erased = Self->BlobManager->EraseOneToOne(evict, blobManagerDb);
- if (!erased) {
+ if (erased) {
+ strBlobs += "'" + evict.Blob.ToStringNew() + "' ";
+ } else {
LOG_S_ERROR("Forget unknown blob " << evict.Blob << " at tablet " << Self->TabletID());
}
}
+ LOG_S_NOTICE("Forget evicted blobs " << strBlobs << "at tablet " << Self->TabletID());
Self->IncCounter(COUNTER_FORGET_SUCCESS);
} else {
diff --git a/ydb/core/tx/columnshard/columnshard__init.cpp b/ydb/core/tx/columnshard/columnshard__init.cpp
index 705b13dad6..51f5b23cd6 100644
--- a/ydb/core/tx/columnshard/columnshard__init.cpp
+++ b/ydb/core/tx/columnshard/columnshard__init.cpp
@@ -294,25 +294,53 @@ bool TTxInit::ReadEverything(TTransactionContext& txc, const TActorContext& ctx)
}
}
+ // There could be extern blobs that are evicting & dropped.
+ // Load info from export tables and check if we have such blobs in index to find them
+ THashSet<TUnifiedBlobId> lostEvictions;
+ TBlobManagerDb blobManagerDb(txc.DB);
+
+ // Initialize the BlobManager
+ {
+ if (!Self->BlobManager->LoadState(blobManagerDb)) {
+ return false;
+ }
+ if (!Self->BlobManager->LoadOneToOneExport(blobManagerDb, lostEvictions)) {
+ return false;
+ }
+ }
+
// Load primary index
if (Self->PrimaryIndex) {
TBlobGroupSelector dsGroupSelector(Self->Info());
NOlap::TDbWrapper idxDB(txc.DB, &dsGroupSelector);
- if (!Self->PrimaryIndex->Load(idxDB, Self->PathsToDrop)) {
+ if (!Self->PrimaryIndex->Load(idxDB, lostEvictions, Self->PathsToDrop)) {
return false;
}
}
- // Initialize the BlobManager
- {
- TBlobManagerDb blobManagerDb(txc.DB);
- if (!Self->BlobManager->LoadState(blobManagerDb)) {
- return false;
+ // Set dropped evicting records to be erased in future cleanups
+ TString strBlobs;
+ for (auto& blobId : lostEvictions) {
+ TEvictMetadata meta;
+ auto evict = Self->BlobManager->GetDropped(blobId, meta);
+ Y_VERIFY(evict.State == EEvictState::EVICTING);
+ evict.State = EEvictState::ERASING;
+
+ if (meta.GetTierName().empty()) {
+ LOG_S_ERROR("Blob " << evict.Blob << " eviction with empty tier name at tablet " << Self->TabletID());
}
- if (!Self->BlobManager->LoadOneToOneExport(blobManagerDb)) {
- return false;
+
+ bool dropped;
+ bool present = Self->BlobManager->UpdateOneToOne(std::move(evict), blobManagerDb, dropped);
+ if (present) {
+ strBlobs += "'" + evict.Blob.ToStringNew() + "' ";
+ } else {
+ LOG_S_ERROR("Unknown dropped evicting blob " << evict.Blob << " at tablet " << Self->TabletID());
}
}
+ if (!strBlobs.empty()) {
+ LOG_S_NOTICE("Erasing potentially exported blobs " << strBlobs << "at tablet " << Self->TabletID());
+ }
Self->UpdateInsertTableCounters();
Self->UpdateIndexCounters();
diff --git a/ydb/core/tx/columnshard/columnshard__progress_tx.cpp b/ydb/core/tx/columnshard/columnshard__progress_tx.cpp
index 2c4a184244..9202384453 100644
--- a/ydb/core/tx/columnshard/columnshard__progress_tx.cpp
+++ b/ydb/core/tx/columnshard/columnshard__progress_tx.cpp
@@ -17,6 +17,29 @@ private:
{ }
};
+ struct TResultEvent {
+ TBasicTxInfo TxInfo;
+ NKikimrTxColumnShard::EResultStatus Status;
+
+ TResultEvent(TBasicTxInfo&& txInfo, NKikimrTxColumnShard::EResultStatus status)
+ : TxInfo(std::move(txInfo))
+ , Status(status)
+ {}
+
+ THolder<IEventBase> MakeEvent(ui64 tabletId) const {
+ auto result = MakeHolder<TEvColumnShard::TEvProposeTransactionResult>(
+ tabletId, TxInfo.TxKind, TxInfo.TxId, Status);
+ result->Record.SetStep(TxInfo.PlanStep);
+ return result;
+ }
+ };
+
+ enum class ETriggerActivities {
+ NONE,
+ POST_INSERT,
+ POST_SCHEMA
+ };
+
public:
TTxProgressTx(TColumnShard* self)
: TTransactionBase(self)
@@ -55,14 +78,15 @@ public:
}
// Process a single transaction at the front of the queue
- if (Self->PlanQueue) {
+ if (!Self->PlanQueue.empty()) {
ui64 step;
ui64 txId;
{
- auto it = Self->PlanQueue.begin();
- step = it->Step;
- txId = it->TxId;
- Self->PlanQueue.erase(it);
+ auto node = Self->PlanQueue.extract(Self->PlanQueue.begin());
+ auto& item = node.value();
+ step = item.Step;
+ txId = item.TxId;
+ Self->RunningQueue.emplace(std::move(item));
}
auto& txInfo = Self->BasicTxInfo.at(txId);
@@ -76,6 +100,7 @@ public:
MakeHolder<TEvColumnShard::TEvNotifyTxCompletionResult>(Self->TabletID(), txId));
}
Self->AltersInFlight.erase(txId);
+ Trigger = ETriggerActivities::POST_SCHEMA;
break;
}
case NKikimrTxColumnShard::TX_KIND_COMMIT: {
@@ -107,7 +132,7 @@ public:
}
Self->CommitsInFlight.erase(txId);
Self->UpdateInsertTableCounters();
- StartBackgroundActivities = true;
+ Trigger = ETriggerActivities::POST_INSERT;
break;
}
default: {
@@ -116,11 +141,8 @@ public:
}
// Currently transactions never fail and there are no dependencies between them
- auto txKind = txInfo.TxKind;
- auto status = NKikimrTxColumnShard::SUCCESS;
- auto result = MakeHolder<TEvColumnShard::TEvProposeTransactionResult>(Self->TabletID(), txKind, txId, status);
- result->Record.SetStep(step);
- TxEvents.emplace_back(txInfo.Source, txInfo.Cookie, std::move(result));
+ txInfo.PlanStep = step;
+ TxResults.emplace_back(TResultEvent(std::move(txInfo), NKikimrTxColumnShard::SUCCESS));
Self->BasicTxInfo.erase(txId);
Schema::EraseTxInfo(db, txId);
@@ -129,7 +151,7 @@ public:
}
Self->ProgressTxInFlight = false;
- if (Self->PlanQueue) {
+ if (!Self->PlanQueue.empty()) {
Self->EnqueueProgressTx(ctx);
}
return true;
@@ -142,19 +164,36 @@ public:
ctx.Send(rec.Target, rec.Event.Release(), 0, rec.Cookie);
}
+ for (auto& res : TxResults) {
+ TPlanQueueItem txItem(res.TxInfo.PlanStep, res.TxInfo.TxId);
+ Self->RunningQueue.erase(txItem);
+
+ auto event = res.MakeEvent(Self->TabletID());
+ ctx.Send(res.TxInfo.Source, event.Release(), 0, res.TxInfo.Cookie);
+ }
+
Self->UpdateBlobMangerCounters();
if (Self->BlobManager->CanCollectGarbage()) {
Self->Execute(Self->CreateTxRunGc(), ctx);
}
- if (StartBackgroundActivities) {
- Self->EnqueueBackgroundActivities(false, true);
+ switch (Trigger) {
+ case ETriggerActivities::POST_INSERT:
+ Self->EnqueueBackgroundActivities(false, true);
+ break;
+ case ETriggerActivities::POST_SCHEMA:
+ Self->EnqueueBackgroundActivities();
+ break;
+ case ETriggerActivities::NONE:
+ default:
+ break;
}
}
private:
- TVector<TEvent> TxEvents;
- bool StartBackgroundActivities{false};
+ std::vector<TResultEvent> TxResults;
+ std::vector<TEvent> TxEvents;
+ ETriggerActivities Trigger{ETriggerActivities::NONE};
};
void TColumnShard::EnqueueProgressTx(const TActorContext& ctx) {
@@ -164,4 +203,30 @@ void TColumnShard::EnqueueProgressTx(const TActorContext& ctx) {
}
}
+void TColumnShard::Handle(TEvColumnShard::TEvCheckPlannedTransaction::TPtr& ev, const TActorContext& ctx) {
+ auto& record = Proto(ev->Get());
+ ui64 step = record.GetStep();
+ ui64 txId = record.GetTxId();
+ LOG_S_DEBUG("CheckTransaction planStep " << step << " txId " << txId << " at tablet " << TabletID());
+
+ TPlanQueueItem frontTx(LastPlannedStep, 0);
+ if (!RunningQueue.empty()) {
+ frontTx = TPlanQueueItem(RunningQueue.begin()->Step, RunningQueue.begin()->TxId);
+ } else if (!PlanQueue.empty()) {
+ frontTx = TPlanQueueItem(PlanQueue.begin()->Step, PlanQueue.begin()->TxId);
+ }
+
+ bool finished = step < frontTx.Step || (step == frontTx.Step && txId < frontTx.TxId);
+ if (finished) {
+ auto txKind = NKikimrTxColumnShard::ETransactionKind::TX_KIND_COMMIT;
+ auto status = NKikimrTxColumnShard::SUCCESS;
+ auto result = MakeHolder<TEvColumnShard::TEvProposeTransactionResult>(TabletID(), txKind, txId, status);
+ result->Record.SetStep(step);
+
+ ctx.Send(ev->Get()->GetSource(), result.Release());
+ }
+
+ // For now do not return result for not finished tx. It would be sent in TTxProgressTx::Complete()
+}
+
}
diff --git a/ydb/core/tx/columnshard/columnshard__propose_transaction.cpp b/ydb/core/tx/columnshard/columnshard__propose_transaction.cpp
index 5fa3c2c49f..25dd4cec7f 100644
--- a/ydb/core/tx/columnshard/columnshard__propose_transaction.cpp
+++ b/ydb/core/tx/columnshard/columnshard__propose_transaction.cpp
@@ -115,8 +115,20 @@ bool TTxProposeTransaction::Execute(TTransactionContext& txc, const TActorContex
}
case NKikimrTxColumnShard::TX_KIND_COMMIT: {
if (Self->CommitsInFlight.contains(txId)) {
- statusMessage = TStringBuilder()
- << "Commit TxId# " << txId << " has already been proposed";
+ LOG_S_DEBUG("TTxProposeTransaction CommitTx (retry) TxId " << txId << " at tablet " << Self->TabletID());
+
+ Y_VERIFY(Self->BasicTxInfo.contains(txId));
+ const auto& txInfo = Self->BasicTxInfo[txId];
+
+ if (txInfo.Source != Ev->Get()->GetSource() || txInfo.Cookie != Ev->Cookie) {
+ statusMessage = TStringBuilder()
+ << "Another commit TxId# " << txId << " has already been proposed";
+ break;
+ }
+
+ maxStep = txInfo.MaxStep;
+ minStep = maxStep - Self->MaxCommitTxDelay.MilliSeconds(); // TODO: improve this code
+ status = NKikimrTxColumnShard::EResultStatus::PREPARED;
break;
}
@@ -243,7 +255,7 @@ bool TTxProposeTransaction::Execute(TTransactionContext& txc, const TActorContex
if (statusMessage.empty()) {
if (auto event = Self->SetupTtl(pathTtls, true)) {
- if (event->NeedWrites()) {
+ if (event->NeedDataReadWrite()) {
ctx.Send(Self->EvictionActor, event.release());
} else {
ctx.Send(Self->SelfId(), event->TxEvent.release());
diff --git a/ydb/core/tx/columnshard/columnshard__read_blob_ranges.cpp b/ydb/core/tx/columnshard/columnshard__read_blob_ranges.cpp
index 5f9e061545..9eef2df27b 100644
--- a/ydb/core/tx/columnshard/columnshard__read_blob_ranges.cpp
+++ b/ydb/core/tx/columnshard/columnshard__read_blob_ranges.cpp
@@ -169,21 +169,25 @@ void TColumnShard::Handle(TEvColumnShard::TEvReadBlobRanges::TPtr& ev, const TAc
} else if (isFallback) {
Y_VERIFY(evictedBlobId->IsValid());
- ui32 status = NKikimrProto::EReplyStatus::ERROR;
-
NKikimrTxColumnShard::TEvictMetadata meta;
auto evicted = BlobManager->GetEvicted(*evictedBlobId, meta);
+ if (!evicted.Blob.IsValid()) {
+ evicted = BlobManager->GetDropped(*evictedBlobId, meta);
+ }
+
if (!evicted.Blob.IsValid() || !evicted.ExternBlob.IsValid()) {
- auto result = MakeErrorResponse(msg, TabletID(), status);
+ LOG_S_NOTICE("No data for blobId " << evictedBlobId->ToStringNew() << " at tablet " << TabletID());
+ auto result = MakeErrorResponse(msg, TabletID(), NKikimrProto::EReplyStatus::NODATA);
ctx.Send(ev->Sender, result.release(), 0, ev->Cookie);
+ return;
}
TString tierName = meta.GetTierName();
- Y_VERIFY(!tierName.empty());
+ Y_VERIFY_S(!tierName.empty(), evicted.ToString());
if (!GetExportedBlob(ctx, ev->Sender, ev->Cookie, tierName, std::move(evicted), std::move(msg.BlobRanges))) {
- auto result = MakeErrorResponse(msg, TabletID(), status);
+ auto result = MakeErrorResponse(msg, TabletID(), NKikimrProto::EReplyStatus::ERROR);
ctx.Send(ev->Sender, result.release(), 0, ev->Cookie);
}
}
diff --git a/ydb/core/tx/columnshard/columnshard__scan.cpp b/ydb/core/tx/columnshard/columnshard__scan.cpp
index 0d7f305880..4aa46c16a5 100644
--- a/ydb/core/tx/columnshard/columnshard__scan.cpp
+++ b/ydb/core/tx/columnshard/columnshard__scan.cpp
@@ -111,7 +111,7 @@ private:
NBlobCache::TReadBlobRangeOptions readOpts {
.CacheAfterRead = true,
- .Fallback = fallback,
+ .ForceFallback = fallback,
.IsBackgroud = false
};
Send(BlobCacheActorId, new NBlobCache::TEvBlobCache::TEvReadBlobRange(blobRange, std::move(readOpts)));
@@ -177,6 +177,7 @@ private:
// Returns true if it was able to produce new batch
bool ProduceResults() {
Y_VERIFY(!Finished);
+ Y_VERIFY(ScanIterator);
if (ScanIterator->Finished()) {
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_COLUMNSHARD_SCAN,
@@ -210,6 +211,13 @@ private:
auto& batch = result.ResultBatch;
int numRows = batch->num_rows();
int numColumns = batch->num_columns();
+ if (!numRows) {
+ LOG_TRACE_S(*TlsActivationContext, NKikimrServices::TX_COLUMNSHARD_SCAN,
+ "Scan " << ScanActorId << " producing result: got empty batch"
+ << " txId: " << TxId << " scanId: " << ScanId << " gen: " << ScanGen << " tablet: " << TabletId);
+ return true;
+ }
+
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_COLUMNSHARD_SCAN,
"Scan " << ScanActorId << " producing result: got ready result"
<< " txId: " << TxId << " scanId: " << ScanId << " gen: " << ScanGen << " tablet: " << TabletId
@@ -264,7 +272,7 @@ private:
// Send new results if there is available capacity
i64 MAX_SCANDATA_MESSAGES_IN_FLIGHT = 2;
while (InFlightScanDataMessages < MAX_SCANDATA_MESSAGES_IN_FLIGHT) {
- if (!ProduceResults()) {
+ if (!ScanIterator || !ProduceResults()) {
break;
}
}
diff --git a/ydb/core/tx/columnshard/columnshard__write.cpp b/ydb/core/tx/columnshard/columnshard__write.cpp
index b4a339c8a0..d73a747f8a 100644
--- a/ydb/core/tx/columnshard/columnshard__write.cpp
+++ b/ydb/core/tx/columnshard/columnshard__write.cpp
@@ -45,11 +45,13 @@ bool TTxWrite::Execute(TTransactionContext& txc, const TActorContext&) {
ui32 status = NKikimrTxColumnShard::EResultStatus::SUCCESS;
auto& logoBlobId = Ev->Get()->BlobId;
auto putStatus = Ev->Get()->PutStatus;
+ Y_VERIFY(putStatus == NKikimrProto::OK);
+ Y_VERIFY(logoBlobId.IsValid());
bool ok = false;
if (!Self->PrimaryIndex || !Self->IsTableWritable(tableId)) {
status = NKikimrTxColumnShard::EResultStatus::SCHEMA_ERROR;
- } else if (putStatus == NKikimrProto::OK && logoBlobId.IsValid()) {
+ } else {
if (record.HasLongTxId()) {
Y_VERIFY(metaShard == 0);
auto longTxId = NLongTxService::TLongTxId::FromProto(record.GetLongTxId());
@@ -97,15 +99,11 @@ bool TTxWrite::Execute(TTransactionContext& txc, const TActorContext&) {
Self->BlobManager->SaveBlobBatch(std::move(Ev->Get()->BlobBatch), blobManagerDb);
} else {
+ LOG_S_DEBUG("TTxWrite duplicate writeId " << writeId << " at tablet " << Self->TabletID());
+
// Return EResultStatus::SUCCESS for dups
Self->IncCounter(COUNTER_WRITE_DUPLICATE);
}
- } else if (putStatus == NKikimrProto::TIMEOUT) {
- status = NKikimrTxColumnShard::EResultStatus::TIMEOUT;
- } else if (putStatus == NKikimrProto::TRYLATER) {
- status = NKikimrTxColumnShard::EResultStatus::OVERLOADED;
- } else {
- status = NKikimrTxColumnShard::EResultStatus::ERROR;
}
if (status != NKikimrTxColumnShard::EResultStatus::SUCCESS) {
@@ -138,15 +136,16 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
ui64 metaShard = record.GetTxInitiator();
ui64 writeId = record.GetWriteId();
TString dedupId = record.GetDedupId();
+ auto putStatus = ev->Get()->PutStatus;
bool isWritable = IsTableWritable(tableId);
bool error = data.empty() || data.size() > TLimits::MAX_BLOB_SIZE || !PrimaryIndex || !isWritable;
- bool errorReturned = (ev->Get()->PutStatus != NKikimrProto::OK) && (ev->Get()->PutStatus != NKikimrProto::UNKNOWN);
+ bool errorReturned = (putStatus != NKikimrProto::OK) && (putStatus != NKikimrProto::UNKNOWN);
bool isOutOfSpace = IsAnyChannelYellowStop();
if (error || errorReturned) {
- LOG_S_WARN("Write (fail) " << data.size() << " bytes into pathId " << tableId
- << ", status " << ev->Get()->PutStatus
+ LOG_S_NOTICE("Write (fail) " << data.size() << " bytes into pathId " << tableId
+ << ", status " << putStatus
<< (PrimaryIndex? "": ", no index") << (isWritable? "": ", ro")
<< " at tablet " << TabletID());
@@ -154,8 +153,10 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
auto errCode = NKikimrTxColumnShard::EResultStatus::ERROR;
if (errorReturned) {
- if (ev->Get()->PutStatus == NKikimrProto::TIMEOUT) {
+ if (putStatus == NKikimrProto::TIMEOUT || putStatus == NKikimrProto::DEADLINE) {
errCode = NKikimrTxColumnShard::EResultStatus::TIMEOUT;
+ } else if (putStatus == NKikimrProto::TRYLATER || putStatus == NKikimrProto::OUT_OF_SPACE) {
+ errCode = NKikimrTxColumnShard::EResultStatus::OVERLOADED;
}
--WritesInFly; // write failed
}
@@ -169,6 +170,7 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
<< (writeId? (" writeId " + ToString(writeId)).c_str() : "") << " at tablet " << TabletID());
--WritesInFly; // write successed
+ Y_VERIFY(putStatus == NKikimrProto::OK);
Execute(new TTxWrite(this, ev), ctx);
} else if (isOutOfSpace || InsertTable->IsOverloaded(tableId) || ShardOverloaded()) {
IncCounter(COUNTER_WRITE_FAIL);
@@ -193,6 +195,23 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
TabletID(), metaShard, writeId, tableId, dedupId, NKikimrTxColumnShard::EResultStatus::OVERLOADED);
ctx.Send(ev->Get()->GetSource(), result.release());
} else {
+ if (record.HasLongTxId()) {
+ // TODO: multiple blobs in one longTx ({longTxId, dedupId} -> writeId)
+ auto longTxId = NLongTxService::TLongTxId::FromProto(record.GetLongTxId());
+ if (ui64 writeId = (ui64)HasLongTxWrite(longTxId)) {
+ LOG_S_DEBUG("Write (duplicate) into pathId " << tableId
+ << " longTx " << longTxId.ToString()
+ << " at tablet " << TabletID());
+
+ IncCounter(COUNTER_WRITE_DUPLICATE);
+
+ auto result = std::make_unique<TEvColumnShard::TEvWriteResult>(
+ TabletID(), metaShard, writeId, tableId, dedupId, NKikimrTxColumnShard::EResultStatus::SUCCESS);
+ ctx.Send(ev->Get()->GetSource(), result.release());
+ return;
+ }
+ }
+
LOG_S_DEBUG("Write (blob) " << data.size() << " bytes into pathId " << tableId
<< (writeId? (" writeId " + ToString(writeId)).c_str() : "")
<< " at tablet " << TabletID());
diff --git a/ydb/core/tx/columnshard/columnshard__write_index.cpp b/ydb/core/tx/columnshard/columnshard__write_index.cpp
index 109507625b..2a24c2fcf0 100644
--- a/ydb/core/tx/columnshard/columnshard__write_index.cpp
+++ b/ydb/core/tx/columnshard/columnshard__write_index.cpp
@@ -24,7 +24,7 @@ public:
private:
struct TPathIdBlobs {
- THashSet<TUnifiedBlobId> Blobs;
+ THashMap<TUnifiedBlobId, TString> Blobs;
ui64 PathId;
TPathIdBlobs(const ui64 pathId)
: PathId(pathId) {
@@ -33,9 +33,8 @@ private:
};
TEvPrivate::TEvWriteIndex::TPtr Ev;
- THashMap<TUnifiedBlobId, NOlap::TPortionEvictionFeatures> BlobsToExport;
THashMap<TString, TPathIdBlobs> ExportTierBlobs;
- THashMap<TString, std::vector<NOlap::TEvictedBlob>> TierBlobsToForget;
+ THashSet<NOlap::TEvictedBlob> BlobsToForget;
ui64 ExportNo = 0;
};
@@ -49,6 +48,7 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
ui64 blobsWritten = 0;
ui64 bytesWritten = 0;
+ THashMap<TUnifiedBlobId, NOlap::TPortionEvictionFeatures> blobsToExport;
auto changes = Ev->Get()->IndexChanges;
Y_VERIFY(changes);
@@ -129,43 +129,59 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
}
}
+ THashSet<TUnifiedBlobId> protectedBlobs;
+
Self->IncCounter(COUNTER_EVICTION_PORTIONS_WRITTEN, changes->PortionsToEvict.size());
for (auto& [portionInfo, evictionFeatures] : changes->PortionsToEvict) {
- auto& tierName = portionInfo.TierName;
- if (tierName.empty()) {
- continue;
- }
-
// Mark exported blobs
- auto& tManager = Self->GetTierManagerVerified(tierName);
- if (tManager.NeedExport()) {
+ if (evictionFeatures.NeedExport) {
+ auto& tierName = portionInfo.TierName;
+ Y_VERIFY(!tierName.empty());
+
for (auto& rec : portionInfo.Records) {
auto& blobId = rec.BlobRange.BlobId;
- if (!BlobsToExport.count(blobId)) {
- BlobsToExport.emplace(blobId, evictionFeatures);
-
+ if (!blobsToExport.count(blobId)) {
NKikimrTxColumnShard::TEvictMetadata meta;
meta.SetTierName(tierName);
- Self->BlobManager->ExportOneToOne(blobId, meta, blobManagerDb);
+ if (Self->BlobManager->ExportOneToOne(blobId, meta, blobManagerDb)) {
+ blobsToExport.emplace(blobId, evictionFeatures);
+ } else {
+ // TODO: support S3 -> S3 eviction
+ LOG_S_ERROR("Prevent evict evicted blob '" << blobId.ToStringNew()
+ << "' at tablet " << Self->TabletID());
+ protectedBlobs.insert(blobId);
+ }
}
}
}
}
- const auto& portionsToDrop = changes->PortionsToDrop;
+ // Note: RAW_BYTES_ERASED and BYTES_ERASED counters are not in sync for evicted data
THashSet<TUnifiedBlobId> blobsToDrop;
- Self->IncCounter(COUNTER_PORTIONS_ERASED, portionsToDrop.size());
- for (const auto& portionInfo : portionsToDrop) {
- for (const auto& rec : portionInfo.Records) {
- blobsToDrop.insert(rec.BlobRange.BlobId);
+ for (const auto& rec : changes->EvictedRecords) {
+ const auto& blobId = rec.BlobRange.BlobId;
+ if (blobsToExport.count(blobId)) {
+ // Eviction to S3. TTxExportFinish will delete src blob when dst blob get EEvictState::EXTERN state.
+ } else if (!protectedBlobs.count(blobId)) {
+ // We could drop the blob immediately
+ if (!blobsToDrop.count(blobId)) {
+ LOG_S_TRACE("Delete evicted blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
+ blobsToDrop.insert(blobId);
+ }
+
}
- Self->IncCounter(COUNTER_RAW_BYTES_ERASED, portionInfo.RawBytesSum());
}
- // Note: RAW_BYTES_ERASED and BYTES_ERASED counters are not in sync for evicted data
- THashSet<TUnifiedBlobId> blobsToEvict;
- for (const auto& rec : changes->EvictedRecords) {
- blobsToEvict.insert(rec.BlobRange.BlobId);
+ Self->IncCounter(COUNTER_PORTIONS_ERASED, changes->PortionsToDrop.size());
+ for (const auto& portionInfo : changes->PortionsToDrop) {
+ for (const auto& rec : portionInfo.Records) {
+ const auto& blobId = rec.BlobRange.BlobId;
+ if (!blobsToDrop.count(blobId)) {
+ LOG_S_TRACE("Delete blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
+ blobsToDrop.insert(blobId);
+ }
+ }
+ Self->IncCounter(COUNTER_RAW_BYTES_ERASED, portionInfo.RawBytesSum());
}
for (const auto& blobId : blobsToDrop) {
@@ -174,32 +190,13 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
auto evict = Self->BlobManager->GetDropped(blobId, meta);
Y_VERIFY(evict.State != EEvictState::UNKNOWN);
- bool exported = ui8(evict.State) == ui8(EEvictState::SELF_CACHED) ||
- ui8(evict.State) == ui8(EEvictState::EXTERN);
- if (exported) {
- LOG_S_DEBUG("Forget blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
- TierBlobsToForget[meta.GetTierName()].emplace_back(std::move(evict));
- } else {
- LOG_S_DEBUG("Deleyed forget blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
- Self->DelayedForgetBlobs.insert(blobId);
- }
+ BlobsToForget.emplace(std::move(evict));
- bool deleted = ui8(evict.State) >= ui8(EEvictState::EXTERN); // !EVICTING and !SELF_CACHED
- if (deleted) {
+ if (NOlap::IsDeleted(evict.State)) {
+ LOG_S_DEBUG("Skip delete blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
continue;
}
}
- LOG_S_TRACE("Delete blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
- Self->BlobManager->DeleteBlob(blobId, blobManagerDb);
- Self->IncCounter(COUNTER_BLOBS_ERASED);
- Self->IncCounter(COUNTER_BYTES_ERASED, blobId.BlobSize());
- }
- for (const auto& blobId : blobsToEvict) {
- if (BlobsToExport.count(blobId)) {
- // DS to S3 eviction. Keep source blob in DS till EEvictState::EXTERN state.
- continue;
- }
- LOG_S_TRACE("Delete evicted blob '" << blobId.ToStringNew() << "' at tablet " << Self->TabletID());
Self->BlobManager->DeleteBlob(blobId, blobManagerDb);
Self->IncCounter(COUNTER_BLOBS_ERASED);
Self->IncCounter(COUNTER_BYTES_ERASED, blobId.BlobSize());
@@ -213,7 +210,7 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
Self->UpdateIndexCounters();
} else {
- LOG_S_INFO("TTxWriteIndex (" << changes->TypeString()
+ LOG_S_NOTICE("TTxWriteIndex (" << changes->TypeString()
<< ") cannot apply changes: " << *changes << " at tablet " << Self->TabletID());
// TODO: delayed insert
@@ -223,16 +220,16 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
<< ") cannot write index blobs at tablet " << Self->TabletID());
}
- if (BlobsToExport.size()) {
- size_t numBlobs = BlobsToExport.size();
- for (auto& [blobId, evFeatures] : BlobsToExport) {
+ if (blobsToExport.size()) {
+ size_t numBlobs = blobsToExport.size();
+ for (auto& [blobId, evFeatures] : blobsToExport) {
auto it = ExportTierBlobs.find(evFeatures.TargetTierName);
if (it == ExportTierBlobs.end()) {
it = ExportTierBlobs.emplace(evFeatures.TargetTierName, TPathIdBlobs(evFeatures.PathId)).first;
}
- it->second.Blobs.emplace(blobId);
+ it->second.Blobs.emplace(blobId, TString());
}
- BlobsToExport.clear();
+ blobsToExport.clear();
ExportNo = Self->LastExportNo + 1;
Self->LastExportNo += ExportTierBlobs.size();
@@ -244,6 +241,8 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
Schema::SaveSpecialValue(db, Schema::EValueIds::LastExportNumber, Self->LastExportNo);
}
+ Self->PrimaryIndex->FreeLocks(changes);
+
if (changes->IsInsert()) {
Self->ActiveIndexingOrCompaction = false;
@@ -270,10 +269,16 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
} else if (changes->IsCleanup()) {
Self->ActiveCleanup = false;
+ Self->BlobManager->GetCleanupBlobs(BlobsToForget);
+
Self->IncCounter(ok ? COUNTER_CLEANUP_SUCCESS : COUNTER_CLEANUP_FAIL);
} else if (changes->IsTtl()) {
Self->ActiveTtl = false;
+ // Do not start new TTL till we evict current PortionsToEvict. We could evict them twice otherwise
+ Y_VERIFY(!Self->ActiveEvictions, "Unexpected active evictions count at tablet %lu", Self->TabletID());
+ Self->ActiveEvictions = ExportTierBlobs.size();
+
Self->IncCounter(ok ? COUNTER_TTL_SUCCESS : COUNTER_TTL_FAIL);
Self->IncCounter(COUNTER_EVICTION_BLOBS_WRITTEN, blobsWritten);
Self->IncCounter(COUNTER_EVICTION_BYTES_WRITTEN, bytesWritten);
@@ -293,23 +298,16 @@ void TTxWriteIndex::Complete(const TActorContext& ctx) {
Self->EnqueueBackgroundActivities();
}
- for (auto& [tierName, blobIds] : ExportTierBlobs) {
+ for (auto& [tierName, pathBlobs] : ExportTierBlobs) {
Y_VERIFY(ExportNo);
+ Y_VERIFY(pathBlobs.PathId);
- TEvPrivate::TEvExport::TBlobDataMap blobsData;
- for (auto&& i : blobIds.Blobs) {
- TEvPrivate::TEvExport::TExportBlobInfo info(blobIds.PathId);
- info.Evicting = Self->BlobManager->IsEvicting(i);
- blobsData.emplace(i, std::move(info));
- }
-
- ctx.Send(Self->SelfId(), new TEvPrivate::TEvExport(ExportNo, tierName, std::move(blobsData)));
+ ctx.Send(Self->SelfId(),
+ new TEvPrivate::TEvExport(ExportNo, tierName, pathBlobs.PathId, std::move(pathBlobs.Blobs)));
++ExportNo;
}
- for (auto& [tierName, blobs] : TierBlobsToForget) {
- Self->ForgetBlobs(ctx, tierName, std::move(blobs));
- }
+ Self->ForgetBlobs(ctx, BlobsToForget);
}
diff --git a/ydb/core/tx/columnshard/columnshard_common.cpp b/ydb/core/tx/columnshard/columnshard_common.cpp
index f4c74b4d5c..b49a536e20 100644
--- a/ydb/core/tx/columnshard/columnshard_common.cpp
+++ b/ydb/core/tx/columnshard/columnshard_common.cpp
@@ -46,6 +46,7 @@ TString FromCells(const TConstArrayRef<TCell>& cells, const TVector<std::pair<TS
struct TContext {
const IColumnResolver& ColumnResolver;
mutable THashMap<ui32, TString> Sources;
+ mutable THashMap<TString, std::shared_ptr<arrow::Scalar>> Constants;
explicit TContext(const IColumnResolver& columnResolver)
: ColumnResolver(columnResolver)
@@ -89,6 +90,19 @@ TAssign MakeFunction(const TContext& info, const std::string& name,
return castOpts;
};
+ auto mkLikeOptions = [&](bool ignoreCase) {
+ if (arguments.size() != 2 || !info.Constants.count(arguments[1])) {
+ return std::shared_ptr<arrow::compute::MatchSubstringOptions>();
+ }
+ auto patternScalar = info.Constants[arguments[1]];
+ if (!arrow::is_base_binary_like(patternScalar->type->id())) {
+ return std::shared_ptr<arrow::compute::MatchSubstringOptions>();
+ }
+ arguments.resize(1);
+ auto& pattern = static_cast<arrow::BaseBinaryScalar&>(*patternScalar).value;
+ return std::make_shared<arrow::compute::MatchSubstringOptions>(pattern->ToString(), ignoreCase);
+ };
+
switch (func.GetId()) {
case TId::FUNC_CMP_EQUAL:
return TAssign(name, EOperation::Equal, std::move(arguments));
@@ -106,8 +120,48 @@ TAssign MakeFunction(const TContext& info, const std::string& name,
return TAssign(name, EOperation::IsNull, std::move(arguments));
case TId::FUNC_STR_LENGTH:
return TAssign(name, EOperation::BinaryLength, std::move(arguments));
- case TId::FUNC_STR_MATCH:
- return TAssign(name, EOperation::MatchSubstring, std::move(arguments));
+ case TId::FUNC_STR_MATCH: {
+ if (auto opts = mkLikeOptions(false)) {
+ return TAssign(name, EOperation::MatchSubstring, std::move(arguments), opts);
+ }
+ break;
+ }
+ case TId::FUNC_STR_MATCH_LIKE: {
+ if (auto opts = mkLikeOptions(false)) {
+ return TAssign(name, EOperation::MatchLike, std::move(arguments), opts);
+ }
+ break;
+ }
+ case TId::FUNC_STR_STARTS_WITH: {
+ if (auto opts = mkLikeOptions(false)) {
+ return TAssign(name, EOperation::StartsWith, std::move(arguments), opts);
+ }
+ break;
+ }
+ case TId::FUNC_STR_ENDS_WITH: {
+ if (auto opts = mkLikeOptions(false)) {
+ return TAssign(name, EOperation::EndsWith, std::move(arguments), opts);
+ }
+ break;
+ }
+ case TId::FUNC_STR_MATCH_IGNORE_CASE: {
+ if (auto opts = mkLikeOptions(true)) {
+ return TAssign(name, EOperation::MatchSubstring, std::move(arguments), opts);
+ }
+ break;
+ }
+ case TId::FUNC_STR_STARTS_WITH_IGNORE_CASE: {
+ if (auto opts = mkLikeOptions(true)) {
+ return TAssign(name, EOperation::StartsWith, std::move(arguments), opts);
+ }
+ break;
+ }
+ case TId::FUNC_STR_ENDS_WITH_IGNORE_CASE: {
+ if (auto opts = mkLikeOptions(true)) {
+ return TAssign(name, EOperation::EndsWith, std::move(arguments), opts);
+ }
+ break;
+ }
case TId::FUNC_BINARY_NOT:
return TAssign(name, EOperation::Invert, std::move(arguments));
case TId::FUNC_BINARY_AND:
@@ -277,6 +331,7 @@ bool ExtractAssign(const TContext& info, NSsa::TProgramStep& step, const NKikimr
if (!cnst.IsConstant()) {
return false;
}
+ info.Constants[columnName] = cnst.GetConstant();
step.Assignes.emplace_back(std::move(cnst));
break;
}
diff --git a/ydb/core/tx/columnshard/columnshard_impl.cpp b/ydb/core/tx/columnshard/columnshard_impl.cpp
index e3c3eca148..51ce6b4f08 100644
--- a/ydb/core/tx/columnshard/columnshard_impl.cpp
+++ b/ydb/core/tx/columnshard/columnshard_impl.cpp
@@ -205,7 +205,7 @@ void TColumnShard::RescheduleWaitingReads() {
}
TRowVersion TColumnShard::GetMaxReadVersion() const {
- if (PlanQueue) {
+ if (!PlanQueue.empty()) {
// We may only read just before the first transaction in the queue
auto it = PlanQueue.begin();
return TRowVersion(it->Step, it->TxId).Prev();
@@ -247,6 +247,14 @@ bool TColumnShard::HaveOutdatedTxs() const {
return it->MaxStep <= step;
}
+TWriteId TColumnShard::HasLongTxWrite(const NLongTxService::TLongTxId& longTxId) {
+ auto it = LongTxWritesByUniqueId.find(longTxId.UniqueId);
+ if (it != LongTxWritesByUniqueId.end()) {
+ return (TWriteId)it->second->WriteId;
+ }
+ return (TWriteId)0;
+}
+
TWriteId TColumnShard::GetLongTxWrite(NIceDb::TNiceDb& db, const NLongTxService::TLongTxId& longTxId) {
auto it = LongTxWritesByUniqueId.find(longTxId.UniqueId);
if (it != LongTxWritesByUniqueId.end()) {
@@ -704,10 +712,15 @@ void TColumnShard::EnqueueBackgroundActivities(bool periodic, bool insertOnly) {
if (auto event = SetupCleanup()) {
ctx.Send(SelfId(), event.release());
+ } else {
+ // Small cleanup (no index changes)
+ THashSet<NOlap::TEvictedBlob> blobsToForget;
+ BlobManager->GetCleanupBlobs(blobsToForget);
+ ForgetBlobs(ctx, blobsToForget);
}
if (auto event = SetupTtl()) {
- if (event->NeedWrites()) {
+ if (event->NeedDataReadWrite()) {
ctx.Send(EvictionActor, event.release());
} else {
ctx.Send(SelfId(), event->TxEvent.release());
@@ -861,6 +874,10 @@ std::unique_ptr<TEvPrivate::TEvEviction> TColumnShard::SetupTtl(const THashMap<u
LOG_S_DEBUG("TTL already in progress at tablet " << TabletID());
return {};
}
+ if (ActiveEvictions) {
+ LOG_S_DEBUG("Do not start TTL while eviction is in progress at tablet " << TabletID());
+ return {};
+ }
if (!PrimaryIndex) {
LOG_S_NOTICE("TTL not started. No index for TTL at tablet " << TabletID());
return {};
@@ -894,7 +911,7 @@ std::unique_ptr<TEvPrivate::TEvEviction> TColumnShard::SetupTtl(const THashMap<u
actualIndexInfo.SetPathTiering(std::move(eviction));
if (!indexChanges) {
- LOG_S_NOTICE("Cannot prepare TTL at tablet " << TabletID());
+ LOG_S_DEBUG("Cannot prepare TTL at tablet " << TabletID());
return {};
}
if (indexChanges->NeedRepeat) {
@@ -920,7 +937,7 @@ std::unique_ptr<TEvPrivate::TEvWriteIndex> TColumnShard::SetupCleanup() {
NOlap::TSnapshot cleanupSnapshot{GetMinReadStep(), 0};
- auto changes = PrimaryIndex->StartCleanup(cleanupSnapshot, PathsToDrop);
+ auto changes = PrimaryIndex->StartCleanup(cleanupSnapshot, PathsToDrop, TLimits::MAX_TX_RECORDS);
if (!changes) {
LOG_S_NOTICE("Cannot prepare cleanup at tablet " << TabletID());
return {};
@@ -930,7 +947,6 @@ std::unique_ptr<TEvPrivate::TEvWriteIndex> TColumnShard::SetupCleanup() {
Y_VERIFY(changes->DataToIndex.empty());
Y_VERIFY(changes->AppendedPortions.empty());
- // TODO: limit PortionsToDrop total size. Delete them in small portions.
// Filter PortionsToDrop
TVector<NOlap::TPortionInfo> portionsCanBedropped;
THashSet<ui64> excludedPortions;
@@ -1012,30 +1028,39 @@ void TColumnShard::MapExternBlobs(const TActorContext& /*ctx*/, NOlap::TReadMeta
}
}
- THashMap<TUnifiedBlobId, TUnifiedBlobId> extMap;
+ auto exported = std::make_shared<THashSet<TUnifiedBlobId>>();
for (auto& blobId : uniqBlobs) {
TEvictMetadata meta;
auto evicted = BlobManager->GetEvicted(blobId, meta);
- if (evicted.ExternBlob.IsValid()) {
- extMap[blobId] = evicted.ExternBlob;
+ if (evicted.IsExternal()) {
+ exported->insert(blobId);
}
}
- if (!extMap.empty()) {
- metadata.ExternBlobs = std::make_shared<const THashMap<TUnifiedBlobId, TUnifiedBlobId>>(std::move(extMap));
+ if (!exported->empty()) {
+ metadata.ExternBlobs = exported;
}
}
-void TColumnShard::ExportBlobs(const TActorContext& ctx, ui64 exportNo, const TString& tierName,
- TEvPrivate::TEvExport::TBlobDataMap&& blobsInfo) const {
+void TColumnShard::ExportBlobs(const TActorContext& ctx, ui64 exportNo, const TString& tierName, ui64 pathId,
+ TEvPrivate::TEvExport::TBlobDataMap&& blobsInfo) const {
+ Y_VERIFY(blobsInfo.size());
+
+ TString strBlobs;
+ for (auto& [blobId, _] : blobsInfo) {
+ strBlobs += "'" + blobId.ToStringNew() + "' ";
+ }
+ LOG_S_NOTICE("Export blobs " << strBlobs << "at tablet " << TabletID());
+
if (auto s3 = GetS3ActorForTier(tierName)) {
- auto event = std::make_unique<TEvPrivate::TEvExport>(exportNo, tierName, s3, std::move(blobsInfo));
+ auto event = std::make_unique<TEvPrivate::TEvExport>(exportNo, tierName, pathId, s3, std::move(blobsInfo));
ctx.Register(CreateExportActor(TabletID(), ctx.SelfID, event.release()));
}
}
-void TColumnShard::ForgetBlobs(const TActorContext& ctx, const TString& tierName, std::vector<NOlap::TEvictedBlob>&& blobs) const {
+// It should be called from ForgetBlobs() only to log all S3 activity
+void TColumnShard::ForgetTierBlobs(const TActorContext& ctx, const TString& tierName, std::vector<NOlap::TEvictedBlob>&& blobs) const {
if (auto s3 = GetS3ActorForTier(tierName)) {
auto forget = std::make_unique<TEvPrivate::TEvForget>();
forget->Evicted = std::move(blobs);
@@ -1043,6 +1068,47 @@ void TColumnShard::ForgetBlobs(const TActorContext& ctx, const TString& tierName
}
}
+void TColumnShard::ForgetBlobs(const TActorContext& ctx, const THashSet<NOlap::TEvictedBlob>& evictedBlobs) {
+ THashMap<TString, std::vector<NOlap::TEvictedBlob>> tierBlobs;
+
+ TString strBlobs;
+ TString strBlobsDelayed;
+
+ for (const auto& ev : evictedBlobs) {
+ auto& blobId = ev.Blob;
+ if (BlobManager->BlobInUse(blobId)) {
+ LOG_S_DEBUG("Blob '" << blobId.ToStringNew() << "' in use at tablet " << TabletID());
+ strBlobsDelayed += "'" + blobId.ToStringNew() + "' ";
+ continue;
+ }
+
+ TEvictMetadata meta;
+ auto evict = BlobManager->GetDropped(blobId, meta);
+
+ if (evict.State == EEvictState::UNKNOWN) {
+ LOG_S_ERROR("Forget unknown blob '" << blobId.ToStringNew() << "' at tablet " << TabletID());
+ } else if (NOlap::IsExported(evict.State)) {
+ Y_VERIFY(evict.Blob == blobId);
+ strBlobs += "'" + blobId.ToStringNew() + "' ";
+ tierBlobs[meta.GetTierName()].emplace_back(std::move(evict));
+ } else {
+ Y_VERIFY(evict.Blob == blobId);
+ strBlobsDelayed += "'" + blobId.ToStringNew() + "' ";
+ }
+ }
+
+ if (strBlobs.size()) {
+ LOG_S_NOTICE("Forget blobs " << strBlobs << "at tablet " << TabletID());
+ }
+ if (strBlobsDelayed.size()) {
+ LOG_S_NOTICE("Forget blobs (deleyed) " << strBlobsDelayed << "at tablet " << TabletID());
+ }
+
+ for (auto& [tierName, blobs] : tierBlobs) {
+ ForgetTierBlobs(ctx, tierName, std::move(blobs));
+ }
+}
+
bool TColumnShard::GetExportedBlob(const TActorContext& ctx, TActorId dst, ui64 cookie, const TString& tierName,
NOlap::TEvictedBlob&& evicted, std::vector<NOlap::TBlobRange>&& ranges) {
if (auto s3 = GetS3ActorForTier(tierName)) {
@@ -1074,18 +1140,10 @@ TActorId TColumnShard::GetS3ActorForTier(const TString& tierId) const {
return Tiers->GetStorageActorId(tierId);
}
-void TColumnShard::Handle(NTiers::TEvTiersManagerReadyForUsage::TPtr& /*ev*/) {
- Y_VERIFY(Tiers);
- Y_VERIFY(Tiers->IsReadyForUsage());
- if (TieringWaiting) {
- TieringWaiting = false;
- SignalTabletActive(TActivationContext::AsActorContext());
- }
-}
-
void TColumnShard::Handle(NMetadata::NProvider::TEvRefreshSubscriberData::TPtr& ev) {
Y_VERIFY(Tiers);
- ALS_INFO(NKikimrServices::TX_COLUMNSHARD) << "test handle NMetadata::NProvider::TEvRefreshSubscriberData" << ev->Get()->GetSnapshot()->SerializeToString();
+ ALS_INFO(NKikimrServices::TX_COLUMNSHARD) << "test handle NMetadata::NProvider::TEvRefreshSubscriberData"
+ << ev->Get()->GetSnapshot()->SerializeToString();
Tiers->TakeConfigs(ev->Get()->GetSnapshot(), nullptr);
}
diff --git a/ydb/core/tx/columnshard/columnshard_impl.h b/ydb/core/tx/columnshard/columnshard_impl.h
index dfbd8700d2..ab0b1af3f0 100644
--- a/ydb/core/tx/columnshard/columnshard_impl.h
+++ b/ydb/core/tx/columnshard/columnshard_impl.h
@@ -109,6 +109,7 @@ class TColumnShard
void Handle(TEvTabletPipe::TEvServerConnected::TPtr& ev, const TActorContext& ctx);
void Handle(TEvTabletPipe::TEvServerDisconnected::TPtr& ev, const TActorContext& ctx);
void Handle(TEvColumnShard::TEvProposeTransaction::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvColumnShard::TEvCheckPlannedTransaction::TPtr& ev, const TActorContext& ctx);
void Handle(TEvColumnShard::TEvCancelTransactionProposal::TPtr& ev, const TActorContext& ctx);
void Handle(TEvColumnShard::TEvNotifyTxCompletion::TPtr& ev, const TActorContext& ctx);
void Handle(TEvTxProcessing::TEvPlanStep::TPtr& ev, const TActorContext& ctx);
@@ -126,7 +127,6 @@ class TColumnShard
void Handle(TEvPrivate::TEvForget::TPtr& ev, const TActorContext& ctx);
void Handle(TEvBlobStorage::TEvCollectGarbageResult::TPtr& ev, const TActorContext& ctx);
void Handle(NMetadata::NProvider::TEvRefreshSubscriberData::TPtr& ev);
- void Handle(NTiers::TEvTiersManagerReadyForUsage::TPtr& ev);
ITransaction* CreateTxInitSchema();
@@ -213,6 +213,7 @@ protected:
HFunc(TEvTabletPipe::TEvServerConnected, Handle);
HFunc(TEvTabletPipe::TEvServerDisconnected, Handle);
HFunc(TEvColumnShard::TEvProposeTransaction, Handle);
+ HFunc(TEvColumnShard::TEvCheckPlannedTransaction, Handle);
HFunc(TEvColumnShard::TEvCancelTransactionProposal, Handle);
HFunc(TEvColumnShard::TEvNotifyTxCompletion, Handle);
HFunc(TEvColumnShard::TEvScan, Handle);
@@ -229,7 +230,6 @@ protected:
HFunc(TEvPrivate::TEvScanStats, Handle);
HFunc(TEvPrivate::TEvReadFinished, Handle);
HFunc(TEvPrivate::TEvPeriodicWakeup, Handle);
- hFunc(NTiers::TEvTiersManagerReadyForUsage, Handle);
default:
if (!HandleDefaultEvents(ev, ctx)) {
LOG_S_WARN("TColumnShard.StateWork at " << TabletID()
@@ -360,7 +360,6 @@ private:
TActorId EvictionActor;
TActorId StatsReportPipe;
- bool TieringWaiting = false;
std::shared_ptr<TTiersManager> Tiers;
std::unique_ptr<TTabletCountersBase> TabletCountersPtr;
TTabletCountersBase* TabletCounters;
@@ -368,15 +367,14 @@ private:
std::unique_ptr<NOlap::TInsertTable> InsertTable;
std::unique_ptr<NOlap::IColumnEngine> PrimaryIndex;
TBatchCache BatchCache;
- THashSet<NOlap::TUnifiedBlobId> DelayedForgetBlobs;
TTtl Ttl;
THashMap<ui64, TBasicTxInfo> BasicTxInfo;
TSet<TDeadlineQueueItem> DeadlineQueue;
- TSet<TPlanQueueItem> PlanQueue;
+ std::set<TPlanQueueItem> PlanQueue;
+ std::set<TPlanQueueItem> RunningQueue;
bool ProgressTxInFlight = false;
THashMap<ui64, TInstant> ScanTxInFlight;
-
THashMap<ui64, TAlterMeta> AltersInFlight;
THashMap<ui64, TCommitMeta> CommitsInFlight; // key is TxId from propose
THashMap<ui32, TSchemaPreset> SchemaPresets;
@@ -389,7 +387,7 @@ private:
bool ActiveIndexingOrCompaction = false;
bool ActiveCleanup = false;
bool ActiveTtl = false;
- bool ActiveEviction = false;
+ ui32 ActiveEvictions = 0;
std::unique_ptr<TBlobManager> BlobManager;
TInFlightReadsTracker InFlightReadsTracker;
TSettings Settings;
@@ -423,6 +421,7 @@ private:
return PrimaryIndex && PrimaryIndex->HasOverloadedGranules();
}
+ TWriteId HasLongTxWrite(const NLongTxService::TLongTxId& longTxId);
TWriteId GetLongTxWrite(NIceDb::TNiceDb& db, const NLongTxService::TLongTxId& longTxId);
void AddLongTxWrite(TWriteId writeId, ui64 txId);
void LoadLongTxWrite(TWriteId writeId, const NLongTxService::TLongTxId& longTxId);
@@ -454,9 +453,10 @@ private:
NOlap::TIndexInfo ConvertSchema(const NKikimrSchemeOp::TColumnTableSchema& schema);
void MapExternBlobs(const TActorContext& ctx, NOlap::TReadMetadata& metadata);
TActorId GetS3ActorForTier(const TString& tierId) const;
- void ExportBlobs(const TActorContext& ctx, ui64 exportNo, const TString& tierName,
+ void ExportBlobs(const TActorContext& ctx, ui64 exportNo, const TString& tierName, ui64 pathId,
TEvPrivate::TEvExport::TBlobDataMap&& blobsInfo) const;
- void ForgetBlobs(const TActorContext& ctx, const TString& tierName, std::vector<NOlap::TEvictedBlob>&& blobs) const;
+ void ForgetTierBlobs(const TActorContext& ctx, const TString& tierName, std::vector<NOlap::TEvictedBlob>&& blobs) const;
+ void ForgetBlobs(const TActorContext& ctx, const THashSet<NOlap::TEvictedBlob>& blobs);
bool GetExportedBlob(const TActorContext& ctx, TActorId dst, ui64 cookie, const TString& tierName,
NOlap::TEvictedBlob&& evicted, std::vector<NOlap::TBlobRange>&& ranges);
diff --git a/ydb/core/tx/columnshard/columnshard_private_events.h b/ydb/core/tx/columnshard/columnshard_private_events.h
index 380e1dd4ff..b614ca9d7a 100644
--- a/ydb/core/tx/columnshard/columnshard_private_events.h
+++ b/ydb/core/tx/columnshard/columnshard_private_events.h
@@ -110,7 +110,7 @@ struct TEvPrivate {
}
}
- bool NeedWrites() const {
+ bool NeedDataReadWrite() const {
return (TxEvent->PutStatus != NKikimrProto::OK);
}
};
@@ -124,48 +124,60 @@ struct TEvPrivate {
};
struct TEvExport : public TEventLocal<TEvExport, EvExport> {
- struct TExportBlobInfo {
- const ui64 PathId = 0;
- TString Data;
- bool Evicting = false;
- TExportBlobInfo(const ui64 pathId)
- : PathId(pathId)
- {
-
- }
- };
- using TBlobDataMap = THashMap<TUnifiedBlobId, TExportBlobInfo>;
+ using TBlobDataMap = THashMap<TUnifiedBlobId, TString>;
NKikimrProto::EReplyStatus Status = NKikimrProto::UNKNOWN;
ui64 ExportNo = 0;
TString TierName;
+ ui64 PathId = 0;
TActorId DstActor;
- TBlobDataMap Blobs;
+ TBlobDataMap Blobs; // src: blobId -> data map; dst: exported blobIds set
THashMap<TUnifiedBlobId, TUnifiedBlobId> SrcToDstBlobs;
TMap<TString, TString> ErrorStrings;
- explicit TEvExport(ui64 exportNo, const TString& tierName, TBlobDataMap&& tierBlobs)
+ explicit TEvExport(ui64 exportNo, const TString& tierName, ui64 pathId, TBlobDataMap&& tierBlobs)
: ExportNo(exportNo)
, TierName(tierName)
+ , PathId(pathId)
, Blobs(std::move(tierBlobs))
{
Y_VERIFY(ExportNo);
Y_VERIFY(!TierName.empty());
+ Y_VERIFY(PathId);
Y_VERIFY(!Blobs.empty());
}
- TEvExport(ui64 exportNo, const TString& tierName, TActorId dstActor, TBlobDataMap&& blobs)
+ TEvExport(ui64 exportNo, const TString& tierName, ui64 pathId, TActorId dstActor, TBlobDataMap&& blobs)
: ExportNo(exportNo)
, TierName(tierName)
+ , PathId(pathId)
, DstActor(dstActor)
, Blobs(std::move(blobs))
{
Y_VERIFY(ExportNo);
Y_VERIFY(!TierName.empty());
+ Y_VERIFY(PathId);
Y_VERIFY(DstActor);
Y_VERIFY(!Blobs.empty());
}
+ void AddResult(const TUnifiedBlobId& blobId, const TString& key, const bool hasError, const TString& errStr) {
+ if (hasError) {
+ Status = NKikimrProto::ERROR;
+ Y_VERIFY(ErrorStrings.emplace(key, errStr).second, "%s", key.data());
+ Blobs.erase(blobId);
+ } else if (!ErrorStrings.count(key)) { // (OK + !OK) == !OK
+ Y_VERIFY(Blobs.count(blobId));
+ if (Status == NKikimrProto::UNKNOWN) {
+ Status = NKikimrProto::OK;
+ }
+ }
+ }
+
+ bool Finished() const {
+ return (Blobs.size() + ErrorStrings.size()) == SrcToDstBlobs.size();
+ }
+
TString SerializeErrorsToString() const {
TStringBuilder sb;
for (auto&& i : ErrorStrings) {
diff --git a/ydb/core/tx/columnshard/columnshard_ut_common.h b/ydb/core/tx/columnshard/columnshard_ut_common.h
index afb459a5de..4325849b9f 100644
--- a/ydb/core/tx/columnshard/columnshard_ut_common.h
+++ b/ydb/core/tx/columnshard/columnshard_ut_common.h
@@ -2,6 +2,7 @@
#include "columnshard.h"
#include "columnshard_impl.h"
+#include "blob_cache.h"
#include <ydb/core/formats/arrow_batch_builder.h>
#include <ydb/core/scheme/scheme_tabledefs.h>
@@ -13,6 +14,16 @@
namespace NKikimr::NTxUT {
+// Private events of different actors reuse the same ES_PRIVATE range
+// So in order to capture the right private event we need to check its type via dynamic_cast
+template <class TPrivateEvent>
+inline TPrivateEvent* TryGetPrivateEvent(TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() != TPrivateEvent::EventType) {
+ return nullptr;
+ }
+ return dynamic_cast<TPrivateEvent*>(ev->GetBase());
+}
+
class TTester : public TNonCopyable {
public:
static constexpr const ui64 FAKE_SCHEMESHARD_TABLET_ID = 4200;
diff --git a/ydb/core/tx/columnshard/compaction_actor.cpp b/ydb/core/tx/columnshard/compaction_actor.cpp
index 1b5d26ff40..6602884915 100644
--- a/ydb/core/tx/columnshard/compaction_actor.cpp
+++ b/ydb/core/tx/columnshard/compaction_actor.cpp
@@ -109,7 +109,7 @@ private:
NBlobCache::TReadBlobRangeOptions readOpts {
.CacheAfterRead = false,
- .Fallback = isExternal,
+ .ForceFallback = isExternal,
.IsBackgroud = true
};
Send(BlobCacheActorId,
diff --git a/ydb/core/tx/columnshard/defs.h b/ydb/core/tx/columnshard/defs.h
index b8193e2992..633d7ca2e9 100644
--- a/ydb/core/tx/columnshard/defs.h
+++ b/ydb/core/tx/columnshard/defs.h
@@ -16,6 +16,7 @@ struct TLimits {
static constexpr const ui32 MIN_SMALL_BLOBS_TO_INSERT = 200;
static constexpr const ui32 MIN_BYTES_TO_INSERT = 4 * 1024 * 1024;
static constexpr const ui64 MAX_BYTES_TO_INSERT = 16 * 1024 * 1024;
+ static constexpr const ui32 MAX_TX_RECORDS = 100000;
TControlWrapper MinInsertBytes;
TControlWrapper MaxInsertBytes;
diff --git a/ydb/core/tx/columnshard/engines/column_engine.h b/ydb/core/tx/columnshard/engines/column_engine.h
index f7e9260dfe..9a6b973d67 100644
--- a/ydb/core/tx/columnshard/engines/column_engine.h
+++ b/ydb/core/tx/columnshard/engines/column_engine.h
@@ -17,6 +17,7 @@ struct TPredicate;
struct TCompactionLimits {
static constexpr const ui32 MIN_GOOD_BLOB_SIZE = 256 * 1024; // some BlobStorage constant
static constexpr const ui32 MAX_BLOB_SIZE = 8 * 1024 * 1024; // some BlobStorage constant
+ static constexpr const ui64 EVICT_HOT_PORTION_BYTES = 1 * 1024 * 1024;
static constexpr const ui64 DEFAULT_EVICTION_BYTES = 64 * 1024 * 1024;
static constexpr const ui64 MAX_BLOBS_TO_DELETE = 10000;
@@ -63,11 +64,13 @@ struct TCompactionInfo {
struct TPortionEvictionFeatures {
const TString TargetTierName;
const ui64 PathId; // portion path id for cold-storage-key construct
+ bool NeedExport = false;
bool DataChanges = true;
- TPortionEvictionFeatures(const TString& targetTierName, const ui64 pathId)
+ TPortionEvictionFeatures(const TString& targetTierName, const ui64 pathId, bool needExport)
: TargetTierName(targetTierName)
, PathId(pathId)
+ , NeedExport(needExport)
{}
};
@@ -309,7 +312,7 @@ public:
virtual TString SerializeMark(const std::shared_ptr<arrow::Scalar>& scalar) const = 0;
virtual std::shared_ptr<arrow::Scalar> DeserializeMark(const TString& key) const = 0;
- virtual bool Load(IDbWrapper& db, const THashSet<ui64>& pathsToDrop = {}) = 0;
+ virtual bool Load(IDbWrapper& db, THashSet<TUnifiedBlobId>& lostBlobs, const THashSet<ui64>& pathsToDrop = {}) = 0;
virtual std::shared_ptr<TSelectInfo> Select(ui64 pathId, TSnapshot snapshot,
const THashSet<ui32>& columnIds,
@@ -319,11 +322,12 @@ public:
virtual std::shared_ptr<TColumnEngineChanges> StartInsert(TVector<TInsertedData>&& dataToIndex) = 0;
virtual std::shared_ptr<TColumnEngineChanges> StartCompaction(std::unique_ptr<TCompactionInfo>&& compactionInfo,
const TSnapshot& outdatedSnapshot) = 0;
- virtual std::shared_ptr<TColumnEngineChanges> StartCleanup(const TSnapshot& snapshot,
- THashSet<ui64>& pathsToDrop) = 0;
+ virtual std::shared_ptr<TColumnEngineChanges> StartCleanup(const TSnapshot& snapshot, THashSet<ui64>& pathsToDrop,
+ ui32 maxRecords) = 0;
virtual std::shared_ptr<TColumnEngineChanges> StartTtl(const THashMap<ui64, TTiering>& pathEviction,
ui64 maxBytesToEvict = TCompactionLimits::DEFAULT_EVICTION_BYTES) = 0;
virtual bool ApplyChanges(IDbWrapper& db, std::shared_ptr<TColumnEngineChanges> changes, const TSnapshot& snapshot) = 0;
+ virtual void FreeLocks(std::shared_ptr<TColumnEngineChanges> changes) = 0;
virtual void UpdateDefaultSchema(const TSnapshot& snapshot, TIndexInfo&& info) = 0;
//virtual void UpdateTableSchema(ui64 pathId, const TSnapshot& snapshot, TIndexInfo&& info) = 0; // TODO
virtual void UpdateCompactionLimits(const TCompactionLimits& limits) = 0;
diff --git a/ydb/core/tx/columnshard/engines/column_engine_logs.cpp b/ydb/core/tx/columnshard/engines/column_engine_logs.cpp
index 1350f74b9b..f829ae8a34 100644
--- a/ydb/core/tx/columnshard/engines/column_engine_logs.cpp
+++ b/ydb/core/tx/columnshard/engines/column_engine_logs.cpp
@@ -78,6 +78,8 @@ bool UpdateEvictedPortion(TPortionInfo& portionInfo, const TIndexInfo& indexInfo
return true;
}
+ Y_VERIFY(!evictFeatures.NeedExport);
+
auto schema = indexInfo.ArrowSchemaWithSpecials();
auto batch = portionInfo.AssembleInBatch(indexInfo, schema, srcBlobs);
auto writeOptions = WriteOptions(*compression);
@@ -440,8 +442,8 @@ const TColumnEngineStats& TColumnEngineForLogs::GetTotalStats() {
return Counters;
}
-void TColumnEngineForLogs::UpdatePortionStats(const TPortionInfo& portionInfo, bool isErase, bool isLoad) {
- UpdatePortionStats(Counters, portionInfo, isErase, isLoad);
+void TColumnEngineForLogs::UpdatePortionStats(const TPortionInfo& portionInfo, EStatsUpdateType updateType) {
+ UpdatePortionStats(Counters, portionInfo, updateType);
ui64 granule = portionInfo.Granule();
Y_VERIFY(granule);
@@ -453,11 +455,11 @@ void TColumnEngineForLogs::UpdatePortionStats(const TPortionInfo& portionInfo, b
stats = std::make_shared<TColumnEngineStats>();
stats->Tables = 1;
}
- UpdatePortionStats(*PathStats[pathId], portionInfo, isErase, isLoad);
+ UpdatePortionStats(*PathStats[pathId], portionInfo, updateType);
}
void TColumnEngineForLogs::UpdatePortionStats(TColumnEngineStats& engineStats, const TPortionInfo& portionInfo,
- bool isErase, bool isLoad) const {
+ EStatsUpdateType updateType) const {
ui64 columnRecords = portionInfo.Records.size();
ui64 metadataBytes = 0;
THashSet<TUnifiedBlobId> blobs;
@@ -494,7 +496,13 @@ void TColumnEngineForLogs::UpdatePortionStats(TColumnEngineStats& engineStats, c
break;
}
Y_VERIFY(srcStats);
- auto* stats = portionInfo.IsActive() ? srcStats : &engineStats.Inactive;
+ auto* stats = (updateType == EStatsUpdateType::EVICT)
+ ? &engineStats.Evicted
+ : (portionInfo.IsActive() ? srcStats : &engineStats.Inactive);
+
+ bool isErase = updateType == EStatsUpdateType::ERASE;
+ bool isLoad = updateType == EStatsUpdateType::LOAD;
+ bool isAppended = portionInfo.IsActive() && (updateType != EStatsUpdateType::EVICT);
if (isErase) { // PortionsToDrop
engineStats.ColumnRecords -= columnRecords;
@@ -505,7 +513,7 @@ void TColumnEngineForLogs::UpdatePortionStats(TColumnEngineStats& engineStats, c
stats->Rows -= rows;
stats->Bytes -= bytes;
stats->RawBytes -= rawBytes;
- } else if (isLoad || portionInfo.IsActive()) { // AppendedPortions
+ } else if (isLoad || isAppended) { // AppendedPortions
engineStats.ColumnRecords += columnRecords;
engineStats.ColumnMetadataBytes += metadataBytes;
@@ -514,7 +522,7 @@ void TColumnEngineForLogs::UpdatePortionStats(TColumnEngineStats& engineStats, c
stats->Rows += rows;
stats->Bytes += bytes;
stats->RawBytes += rawBytes;
- } else { // SwitchedPortions
+ } else { // SwitchedPortions || PortionsToEvict
--srcStats->Portions;
srcStats->Blobs -= blobs.size();
srcStats->Rows -= rows;
@@ -537,13 +545,13 @@ void TColumnEngineForLogs::UpdateDefaultSchema(const TSnapshot& snapshot, TIndex
IndexInfo.SetAllKeys();
}
-bool TColumnEngineForLogs::Load(IDbWrapper& db, const THashSet<ui64>& pathsToDrop) {
+bool TColumnEngineForLogs::Load(IDbWrapper& db, THashSet<TUnifiedBlobId>& lostBlobs, const THashSet<ui64>& pathsToDrop) {
ClearIndex();
if (!LoadGranules(db)) {
return false;
}
- if (!LoadColumns(db)) {
+ if (!LoadColumns(db, lostBlobs)) {
return false;
}
if (!LoadCounters(db)) {
@@ -576,7 +584,7 @@ bool TColumnEngineForLogs::Load(IDbWrapper& db, const THashSet<ui64>& pathsToDro
CleanupGranules.insert(granule);
}
for (auto& [_, portionInfo] : spg->Portions) {
- UpdatePortionStats(portionInfo, false, true);
+ UpdatePortionStats(portionInfo, EStatsUpdateType::LOAD);
}
}
@@ -616,8 +624,9 @@ bool TColumnEngineForLogs::LoadGranules(IDbWrapper& db) {
return GranulesTable->Load(db, callback);
}
-bool TColumnEngineForLogs::LoadColumns(IDbWrapper& db) {
+bool TColumnEngineForLogs::LoadColumns(IDbWrapper& db, THashSet<TUnifiedBlobId>& lostBlobs) {
auto callback = [&](TColumnRecord&& row) {
+ lostBlobs.erase(row.BlobRange.BlobId); // We have such a blob in index. It isn't lost.
AddColumnRecord(row);
};
@@ -740,14 +749,17 @@ std::shared_ptr<TColumnEngineChanges> TColumnEngineForLogs::StartCompaction(std:
}
std::shared_ptr<TColumnEngineChanges> TColumnEngineForLogs::StartCleanup(const TSnapshot& snapshot,
- THashSet<ui64>& pathsToDrop) {
+ THashSet<ui64>& pathsToDrop,
+ ui32 maxRecords) {
auto changes = std::make_shared<TChanges>(*this, snapshot, Limits);
+ ui32 affectedRecords = 0;
// Add all portions from dropped paths
THashSet<ui64> dropPortions;
- THashSet<ui64> activePathsToDrop;
+ THashSet<ui64> emptyPaths;
for (ui64 pathId : pathsToDrop) {
if (!PathGranules.count(pathId)) {
+ emptyPaths.insert(pathId);
continue;
}
@@ -756,13 +768,23 @@ std::shared_ptr<TColumnEngineChanges> TColumnEngineForLogs::StartCleanup(const T
auto spg = Granules[granule];
Y_VERIFY(spg);
for (auto& [portion, info] : spg->Portions) {
+ affectedRecords += info.NumRecords();
changes->PortionsToDrop.push_back(info);
dropPortions.insert(portion);
- activePathsToDrop.insert(pathId);
}
}
+
+ if (affectedRecords > maxRecords) {
+ break;
+ }
+ }
+ for (ui64 pathId : emptyPaths) {
+ pathsToDrop.erase(pathId);
+ }
+
+ if (affectedRecords > maxRecords) {
+ return changes;
}
- pathsToDrop.swap(activePathsToDrop);
// Add stale portions of alive paths
THashSet<ui64> activeCleanupGranules;
@@ -777,10 +799,15 @@ std::shared_ptr<TColumnEngineChanges> TColumnEngineForLogs::StartCleanup(const T
if (!info.IsActive()) {
activeCleanupGranules.insert(granule);
if (info.XSnapshot() < snapshot) {
+ affectedRecords += info.NumRecords();
changes->PortionsToDrop.push_back(info);
}
}
}
+
+ if (affectedRecords > maxRecords) {
+ break;
+ }
}
CleanupGranules.swap(activeCleanupGranules);
@@ -823,11 +850,13 @@ std::shared_ptr<TColumnEngineChanges> TColumnEngineForLogs::StartTtl(const THash
allowEviction = (evicttionSize <= maxEvictBytes);
allowDrop = (dropBlobs <= TCompactionLimits::MAX_BLOBS_TO_DELETE);
+ bool tryEvictPortion = allowEviction && ttl.HasTiers()
+ && info.EvictReady(TCompactionLimits::EVICT_HOT_PORTION_BYTES);
if (auto max = info.MaxValue(ttlColumnId)) {
bool keep = NArrow::ScalarLess(expireTimestamp, max);
- if (keep && allowEviction) {
+ if (keep && tryEvictPortion) {
TString tierName;
for (auto& tierRef : ttl.OrderedTiers) { // TODO: lower/upper_bound + move into TEviction
auto& tierInfo = tierRef.Get();
@@ -842,7 +871,9 @@ std::shared_ptr<TColumnEngineChanges> TColumnEngineForLogs::StartTtl(const THash
}
if (info.TierName != tierName) {
evicttionSize += info.BlobsSizes().first;
- changes->PortionsToEvict.emplace_back(info, TPortionEvictionFeatures(tierName, pathId));
+ bool needExport = ttl.NeedExport(tierName);
+ changes->PortionsToEvict.emplace_back(
+ info, TPortionEvictionFeatures(tierName, pathId, needExport));
}
}
if (!keep && allowDrop) {
@@ -952,11 +983,6 @@ bool TColumnEngineForLogs::ApplyChanges(IDbWrapper& db, std::shared_ptr<TColumnE
// Set x-snapshot to switched portions
if (changes->IsCompaction()) {
- Y_VERIFY(changes->SrcGranule);
-
- /// @warning set granule not in split even if tx would be aborted later
- GranulesInSplit.erase(changes->SrcGranule->Granule);
-
Y_VERIFY(changes->CompactionInfo);
for (auto& portionInfo : changes->SwitchedPortions) {
Y_VERIFY(portionInfo.IsActive());
@@ -1116,7 +1142,10 @@ bool TColumnEngineForLogs::ApplyChanges(IDbWrapper& db, const TChanges& changes,
}
Y_VERIFY(portionInfo.TierName != oldInfo.TierName);
- // TODO: update stats
+ if (apply) {
+ UpdatePortionStats(oldInfo, EStatsUpdateType::EVICT);
+ }
+
if (!UpsertPortion(portionInfo, apply, false)) {
LOG_S_ERROR("Cannot evict portion " << portionInfo << " at tablet " << TabletId);
return false;
@@ -1227,6 +1256,16 @@ bool TColumnEngineForLogs::ApplyChanges(IDbWrapper& db, const TChanges& changes,
return true;
}
+void TColumnEngineForLogs::FreeLocks(std::shared_ptr<TColumnEngineChanges> indexChanges) {
+ auto changes = std::static_pointer_cast<TChanges>(indexChanges);
+
+ if (changes->IsCompaction()) {
+ // Set granule not in split. Do not block writes in it.
+ Y_VERIFY(changes->SrcGranule);
+ GranulesInSplit.erase(changes->SrcGranule->Granule);
+ }
+}
+
bool TColumnEngineForLogs::SetGranule(const TGranuleRecord& rec, bool apply) {
TMark mark(rec.Mark);
@@ -1254,11 +1293,11 @@ void TColumnEngineForLogs::EraseGranule(ui64 pathId, ui64 granule, const TMark&
Granules.erase(granule);
EmptyGranules.erase(granule);
+ CompactionGranules.erase(granule);
PathGranules[pathId].erase(mark);
}
bool TColumnEngineForLogs::UpsertPortion(const TPortionInfo& portionInfo, bool apply, bool updateStats) {
- Y_VERIFY(portionInfo.Valid());
ui64 granule = portionInfo.Granule();
if (!apply) {
@@ -1270,6 +1309,7 @@ bool TColumnEngineForLogs::UpsertPortion(const TPortionInfo& portionInfo, bool a
return true;
}
+ Y_VERIFY(portionInfo.Valid());
ui64 portion = portionInfo.Portion();
auto& spg = Granules[granule];
Y_VERIFY(spg);
@@ -1296,7 +1336,7 @@ bool TColumnEngineForLogs::ErasePortion(const TPortionInfo& portionInfo, bool ap
Y_VERIFY(spg);
if (spg->Portions.count(portion)) {
if (updateStats) {
- UpdatePortionStats(spg->Portions[portion], true);
+ UpdatePortionStats(spg->Portions[portion], EStatsUpdateType::ERASE);
}
spg->Portions.erase(portion);
} else {
@@ -1419,6 +1459,7 @@ std::shared_ptr<TSelectInfo> TColumnEngineForLogs::Select(ui64 pathId, TSnapshot
auto& portionInfo = portions.find(portion)->second;
TPortionInfo outPortion;
+ outPortion.Meta = portionInfo.Meta;
outPortion.Records.reserve(columnIds.size());
for (auto& rec : portionInfo.Records) {
@@ -1427,6 +1468,7 @@ std::shared_ptr<TSelectInfo> TColumnEngineForLogs::Select(ui64 pathId, TSnapshot
outPortion.Records.push_back(rec);
}
}
+ Y_VERIFY(outPortion.Produced());
out->Portions.emplace_back(std::move(outPortion));
granuleHasDataForSnaphsot = true;
}
diff --git a/ydb/core/tx/columnshard/engines/column_engine_logs.h b/ydb/core/tx/columnshard/engines/column_engine_logs.h
index 7e328c4050..c1ce56e267 100644
--- a/ydb/core/tx/columnshard/engines/column_engine_logs.h
+++ b/ydb/core/tx/columnshard/engines/column_engine_logs.h
@@ -215,6 +215,13 @@ public:
LAST_TX_ID,
};
+ enum class EStatsUpdateType {
+ DEFAULT = 0,
+ ERASE,
+ LOAD,
+ EVICT
+ };
+
TColumnEngineForLogs(TIndexInfo&& info, ui64 tabletId, const TCompactionLimits& limits = {});
const TIndexInfo& GetIndexInfo() const override { return IndexInfo; }
@@ -241,16 +248,17 @@ public:
return MarkType;
}
- bool Load(IDbWrapper& db, const THashSet<ui64>& pathsToDrop = {}) override;
+ bool Load(IDbWrapper& db, THashSet<TUnifiedBlobId>& lostBlobs, const THashSet<ui64>& pathsToDrop = {}) override;
std::shared_ptr<TColumnEngineChanges> StartInsert(TVector<TInsertedData>&& dataToIndex) override;
std::shared_ptr<TColumnEngineChanges> StartCompaction(std::unique_ptr<TCompactionInfo>&& compactionInfo,
const TSnapshot& outdatedSnapshot) override;
- std::shared_ptr<TColumnEngineChanges> StartCleanup(const TSnapshot& snapshot,
- THashSet<ui64>& pathsToDrop) override;
+ std::shared_ptr<TColumnEngineChanges> StartCleanup(const TSnapshot& snapshot, THashSet<ui64>& pathsToDrop,
+ ui32 maxRecords) override;
std::shared_ptr<TColumnEngineChanges> StartTtl(const THashMap<ui64, TTiering>& pathEviction,
ui64 maxEvictBytes = TCompactionLimits::DEFAULT_EVICTION_BYTES) override;
bool ApplyChanges(IDbWrapper& db, std::shared_ptr<TColumnEngineChanges> indexChanges,
const TSnapshot& snapshot) override;
+ void FreeLocks(std::shared_ptr<TColumnEngineChanges> changes) override;
void UpdateDefaultSchema(const TSnapshot& snapshot, TIndexInfo&& info) override;
void UpdateCompactionLimits(const TCompactionLimits& limits) override { Limits = limits; }
const TMap<ui64, std::shared_ptr<TColumnEngineStats>>& GetStats() const override;
@@ -334,7 +342,7 @@ private:
}
bool LoadGranules(IDbWrapper& db);
- bool LoadColumns(IDbWrapper& db);
+ bool LoadColumns(IDbWrapper& db, THashSet<TUnifiedBlobId>& lostBlobs);
bool LoadCounters(IDbWrapper& db);
bool ApplyChanges(IDbWrapper& db, const TChanges& changes, const TSnapshot& snapshot, bool apply);
@@ -343,9 +351,9 @@ private:
bool UpsertPortion(const TPortionInfo& portionInfo, bool apply, bool updateStats = true);
bool ErasePortion(const TPortionInfo& portionInfo, bool apply, bool updateStats = true);
void AddColumnRecord(const TColumnRecord& row);
- void UpdatePortionStats(const TPortionInfo& portionInfo, bool isErase = false, bool isLoad = false);
+ void UpdatePortionStats(const TPortionInfo& portionInfo, EStatsUpdateType updateType = EStatsUpdateType::DEFAULT);
void UpdatePortionStats(TColumnEngineStats& engineStats, const TPortionInfo& portionInfo,
- bool isErase = false, bool isLoad = false) const;
+ EStatsUpdateType updateType) const;
bool CanInsert(const TChanges& changes, const TSnapshot& commitSnap) const;
TMap<TSnapshot, TVector<ui64>> GetOrderedPortions(ui64 granule, const TSnapshot& snapshot = TSnapshot::Max()) const;
diff --git a/ydb/core/tx/columnshard/engines/index_info.cpp b/ydb/core/tx/columnshard/engines/index_info.cpp
index 37ce40d1ea..187ad5d0f7 100644
--- a/ydb/core/tx/columnshard/engines/index_info.cpp
+++ b/ydb/core/tx/columnshard/engines/index_info.cpp
@@ -265,6 +265,10 @@ void TIndexInfo::UpdatePathTiering(THashMap<ui64, NOlap::TTiering>& pathTiering)
if (!tierInfo->EvictColumn) {
tierInfo->EvictColumn = schema->GetFieldByName(tierInfo->EvictColumnName);
}
+ // TODO: eviction with recompression is not supported yet
+ if (tierInfo->NeedExport) {
+ tierInfo->Compression = {};
+ }
}
if (tiering.Ttl && !tiering.Ttl->EvictColumn) {
tiering.Ttl->EvictColumn = schema->GetFieldByName(tiering.Ttl->EvictColumnName);
diff --git a/ydb/core/tx/columnshard/engines/indexed_read_data.cpp b/ydb/core/tx/columnshard/engines/indexed_read_data.cpp
index 323bd54bb4..b72a518ca4 100644
--- a/ydb/core/tx/columnshard/engines/indexed_read_data.cpp
+++ b/ydb/core/tx/columnshard/engines/indexed_read_data.cpp
@@ -19,6 +19,11 @@ void SliceBatch(const std::shared_ptr<arrow::RecordBatch>& batch,
const int64_t maxRowsInBatch,
std::vector<std::shared_ptr<arrow::RecordBatch>>& result)
{
+ if (batch->num_rows() <= maxRowsInBatch) {
+ result.push_back(batch);
+ return;
+ }
+
int64_t offset = 0;
while (offset < batch->num_rows()) {
int64_t rows = std::min<int64_t>(maxRowsInBatch, batch->num_rows() - offset);
@@ -27,43 +32,12 @@ void SliceBatch(const std::shared_ptr<arrow::RecordBatch>& batch,
}
};
-std::vector<std::shared_ptr<arrow::RecordBatch>> SpecialMergeSorted(const std::vector<std::shared_ptr<arrow::RecordBatch>>& src,
- const TIndexInfo& indexInfo,
- const std::shared_ptr<NArrow::TSortDescription>& description,
- const int64_t maxRowsInBatch) {
- std::vector<std::shared_ptr<arrow::RecordBatch>> batches;
- batches.reserve(src.size());
- ui64 size = 0;
- for (auto& batch : src) {
- if (!batch->num_rows()) {
- continue;
- }
- Y_VERIFY_DEBUG(NArrow::IsSorted(batch, description->ReplaceKey));
-
- size += batch->num_rows();
- batches.push_back(batch);
- }
- if (batches.empty()) {
- return {};
- }
-
-#if 1 // Optimization [remove portion's dups]
- if (batches.size() == 1) {
- if (NArrow::IsSortedAndUnique(batches[0], description->ReplaceKey)) {
- std::vector<std::shared_ptr<arrow::RecordBatch>> out;
- SliceBatch(batches[0], maxRowsInBatch, out);
- return out;
- } else {
- return NArrow::MergeSortedBatches(batches, description, size);
- }
- }
-#endif
-
-#if 1 // Optimization [special merge], requires [remove portion's dups]
- TVector<TVector<std::shared_ptr<arrow::RecordBatch>>> rangesSlices; // rangesSlices[rangeNo][sliceNo]
+std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>>
+GroupInKeyRanges(const std::vector<std::shared_ptr<arrow::RecordBatch>>& batches, const TIndexInfo& indexInfo) {
+ std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>> rangesSlices; // rangesSlices[rangeNo][sliceNo]
rangesSlices.reserve(batches.size());
{
- TMap<TMark, TVector<std::shared_ptr<arrow::RecordBatch>>> points;
+ TMap<TMark, std::vector<std::shared_ptr<arrow::RecordBatch>>> points;
for (auto& batch : batches) {
std::shared_ptr<arrow::Array> keyColumn = GetFirstPKColumn(indexInfo, batch);
@@ -93,6 +67,14 @@ std::vector<std::shared_ptr<arrow::RecordBatch>> SpecialMergeSorted(const std::v
}
}
}
+ return rangesSlices;
+}
+
+std::vector<std::shared_ptr<arrow::RecordBatch>> SpecialMergeSorted(const std::vector<std::shared_ptr<arrow::RecordBatch>>& batches,
+ const TIndexInfo& indexInfo,
+ const std::shared_ptr<NArrow::TSortDescription>& description,
+ const THashSet<const void*> batchesToDedup) {
+ auto rangesSlices = GroupInKeyRanges(batches, indexInfo);
// Merge slices in ranges
std::vector<std::shared_ptr<arrow::RecordBatch>> out;
@@ -104,23 +86,23 @@ std::vector<std::shared_ptr<arrow::RecordBatch>> SpecialMergeSorted(const std::v
// The core of optimization: do not merge slice if it's alone in its key range
if (slices.size() == 1) {
- if (NArrow::IsSortedAndUnique(slices[0], description->ReplaceKey)) {
- // Split big batch into smaller batches if needed
- SliceBatch(slices[0], maxRowsInBatch, out);
- continue;
+ auto batch = slices[0];
+ if (batchesToDedup.count(batch.get())) {
+ if (!NArrow::IsSortedAndUnique(batch, description->ReplaceKey)) {
+ batch = NArrow::CombineSortedBatches({batch}, description);
+ Y_VERIFY(batch);
+ }
}
+ Y_VERIFY_DEBUG(NArrow::IsSortedAndUnique(batch, description->ReplaceKey));
+ out.push_back(batch);
+ continue;
}
- auto merged = NArrow::MergeSortedBatches(slices, description, maxRowsInBatch);
- Y_VERIFY(merged.size() >= 1);
- out.insert(out.end(), merged.begin(), merged.end());
+ auto batch = NArrow::CombineSortedBatches(slices, description);
+ out.push_back(batch);
}
return out;
-#else
- Y_UNUSED(indexInfo);
- return NArrow::MergeSortedBatches(batches, description, size);
-#endif
}
}
@@ -174,9 +156,10 @@ THashMap<TBlobRange, ui64> TIndexedReadData::InitRead(ui32 inputBatch, bool inGr
++GranuleWaits[granule];
}
- // If no PK dups in portions we could use optimized version of merge
+ // If there's no PK dups in granule we could use optimized version of merge
if (portionInfo.CanHaveDups()) {
- PortionsWithSelfDups.emplace(granule);
+ GranulesWithDups.emplace(granule);
+ PortionsWithDups.emplace(portion);
}
for (const NOlap::TColumnRecord& rec : portionInfo.Records) {
@@ -246,9 +229,14 @@ void TIndexedReadData::AddIndexed(const TBlobRange& blobRange, const TString& co
std::shared_ptr<arrow::RecordBatch> TIndexedReadData::AssembleIndexedBatch(ui32 batchNo) {
auto& portionInfo = Portion(batchNo);
+ Y_VERIFY(portionInfo.Produced());
auto portion = portionInfo.Assemble(ReadMetadata->IndexInfo, ReadMetadata->LoadSchema, Data);
Y_VERIFY(portion);
+
+ /// @warning The replace logic is correct only in assumption that predicate is applyed over a part of ReplaceKey.
+ /// It's not OK to apply predicate before replacing key duplicates otherwise.
+ /// Assumption: dup(A, B) <=> PK(A) = PK(B) => Predicate(A) = Predicate(B) => all or no dups for PK(A) here
auto batch = NOlap::FilterPortion(portion, *ReadMetadata);
Y_VERIFY(batch);
@@ -321,6 +309,8 @@ TIndexedReadData::MakeNotIndexedBatch(const std::shared_ptr<arrow::RecordBatch>&
}
TVector<TPartialReadResult> TIndexedReadData::GetReadyResults(const int64_t maxRowsInBatch) {
+ Y_VERIFY(SortReplaceDescription);
+
if (NotIndexed.size() != ReadyNotIndexed) {
// Wait till we have all not indexed data so we could replace keys in granules
return {};
@@ -329,7 +319,11 @@ TVector<TPartialReadResult> TIndexedReadData::GetReadyResults(const int64_t maxR
// First time extract OutNotIndexed data
if (NotIndexed.size()) {
/// @note not indexed data could contain data out of indexed granules
- OutNotIndexed = SplitByGranules(std::move(NotIndexed));
+ Y_VERIFY(!TsGranules.empty());
+ auto mergedBatch = MergeNotIndexed(std::move(NotIndexed)); // merged has no dups
+ if (mergedBatch) {
+ OutNotIndexed = SliceIntoGranules(mergedBatch, TsGranules, IndexInfo());
+ }
NotIndexed.clear();
ReadyNotIndexed = 0;
}
@@ -340,16 +334,16 @@ TVector<TPartialReadResult> TIndexedReadData::GetReadyResults(const int64_t maxR
ui64 granule = BatchGranule(batchNo);
if (ReadyGranules.count(granule)) {
Y_VERIFY(batch);
- ui64 portion = BatchPortion[batchNo];
-#if 1 // Optimization [remove portion's dups]
- // There could be PK self dups if portion is result of insert (same PK, different snapshot). Remove them.
- if (batch->num_rows() && PortionsWithSelfDups.count(portion)) {
- auto merged = NArrow::MergeSortedBatches({batch}, SortReplaceDescription, batch->num_rows());
- Y_VERIFY(merged.size() == 1);
- batch = merged[0];
+ if (batch->num_rows()) {
+ ui64 portion = BatchPortion[batchNo];
+ if (PortionsWithDups.count(portion)) {
+ Y_VERIFY(GranulesWithDups.count(granule));
+ BatchesToDedup.insert(batch.get());
+ } else {
+ Y_VERIFY_DEBUG(NArrow::IsSortedAndUnique(batch, IndexInfo().GetReplaceKey(), false));
+ }
+ ReadyGranules[granule].push_back(batch);
}
-#endif
- ReadyGranules[granule].emplace(portion, batch);
ready.push_back(batchNo);
}
}
@@ -371,8 +365,8 @@ TVector<TPartialReadResult> TIndexedReadData::GetReadyResults(const int64_t maxR
}
template <typename TCont>
-static TVector<ui64> GetReadyInOrder(const TCont& ready, TDeque<ui64>& order) {
- TVector<ui64> out;
+static std::vector<ui64> GetReadyInOrder(const TCont& ready, TDeque<ui64>& order) {
+ std::vector<ui64> out;
out.reserve(ready.size());
if (order.empty()) {
@@ -394,8 +388,10 @@ static TVector<ui64> GetReadyInOrder(const TCont& ready, TDeque<ui64>& order) {
}
/// @return batches that are not blocked by others
-TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>> TIndexedReadData::ReadyToOut() {
- TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>> out;
+std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>> TIndexedReadData::ReadyToOut() {
+ Y_VERIFY(SortReplaceDescription);
+
+ std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>> out;
out.reserve(ReadyGranules.size() + 1);
// Prepend not indexed data (less then first granule) before granules for ASC sorting
@@ -405,33 +401,41 @@ TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>> TIndexedReadData::Read
OutNotIndexed.erase(0);
}
- TVector<ui64> ready = GetReadyInOrder(ReadyGranules, GranulesOutOrder);
+ std::vector<ui64> ready = GetReadyInOrder(ReadyGranules, GranulesOutOrder);
for (ui64 granule : ready) {
- auto& map = ReadyGranules[granule];
- std::vector<std::shared_ptr<arrow::RecordBatch>> inGranule;
-
- // Add indexed granule data
- for (auto& [portion, batch] : map) {
- // batch could be empty cause of prefiltration
- if (batch->num_rows()) {
- inGranule.push_back(batch);
- }
- }
+ std::vector<std::shared_ptr<arrow::RecordBatch>> inGranule = std::move(ReadyGranules[granule]);
+ ReadyGranules.erase(granule);
+ bool canHaveDups = GranulesWithDups.count(granule);
// Append not indexed data to granules
if (OutNotIndexed.count(granule)) {
auto batch = OutNotIndexed[granule];
- if (batch->num_rows()) { // TODO: check why it could be empty
+ if (batch && batch->num_rows()) { // TODO: check why it could be empty
inGranule.push_back(batch);
+ canHaveDups = true;
}
OutNotIndexed.erase(granule);
}
if (inGranule.empty()) {
- inGranule.push_back(NArrow::MakeEmptyBatch(ReadMetadata->ResultSchema));
+ continue;
+ }
+
+ if (canHaveDups) {
+ for (auto& batch : inGranule) {
+ Y_VERIFY(batch->num_rows());
+ Y_VERIFY_DEBUG(NArrow::IsSorted(batch, SortReplaceDescription->ReplaceKey));
+ }
+#if 1 // optimization
+ auto deduped = SpecialMergeSorted(inGranule, IndexInfo(), SortReplaceDescription, BatchesToDedup);
+ out.emplace_back(std::move(deduped));
+#else
+ out.push_back();
+ out.back().emplace_back(CombineSortedBatches(inGranule, SortReplaceDescription));
+#endif
+ } else {
+ out.emplace_back(std::move(inGranule));
}
- out.push_back(std::move(inGranule));
- ReadyGranules.erase(granule);
}
// Append not indexed data (less then first granule) after granules for DESC sorting
@@ -444,8 +448,8 @@ TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>> TIndexedReadData::Read
return out;
}
-THashMap<ui64, std::shared_ptr<arrow::RecordBatch>>
-TIndexedReadData::SplitByGranules(std::vector<std::shared_ptr<arrow::RecordBatch>>&& batches) const {
+std::shared_ptr<arrow::RecordBatch>
+TIndexedReadData::MergeNotIndexed(std::vector<std::shared_ptr<arrow::RecordBatch>>&& batches) const {
Y_VERIFY(ReadMetadata->IsSorted());
Y_VERIFY(IndexInfo().GetSortingKey());
@@ -471,17 +475,12 @@ TIndexedReadData::SplitByGranules(std::vector<std::shared_ptr<arrow::RecordBatch
auto merged = NArrow::CombineSortedBatches(batches, indexInfo.SortReplaceDescription());
Y_VERIFY(merged);
Y_VERIFY_DEBUG(NArrow::IsSortedAndUnique(merged, indexInfo.GetReplaceKey()));
-
- Y_VERIFY(!TsGranules.empty());
- return SliceIntoGranules(merged, TsGranules, indexInfo);
+ return merged;
}
TVector<TPartialReadResult>
-TIndexedReadData::MakeResult(TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>>&& granules, const int64_t maxRowsInBatch) const {
- /// @warning The replace logic is correct only in assumption that predicate is applyed over a part of ReplaceKey.
- /// It's not OK to apply predicate before replacing key duplicates otherwise.
- /// Assumption: dup(A, B) <=> PK(A) = PK(B) => Predicate(A) = Predicate(B) => all or no dups for PK(A) here
-
+TIndexedReadData::MakeResult(std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>>&& granules,
+ int64_t maxRowsInBatch) const {
Y_VERIFY(ReadMetadata->IsSorted());
Y_VERIFY(SortReplaceDescription);
@@ -489,14 +488,22 @@ TIndexedReadData::MakeResult(TVector<std::vector<std::shared_ptr<arrow::RecordBa
bool isDesc = ReadMetadata->IsDescSorted();
- for (auto& vec : granules) {
- auto batches = SpecialMergeSorted(vec, IndexInfo(), SortReplaceDescription, maxRowsInBatch);
+ for (auto& batches : granules) {
if (batches.empty()) {
continue;
}
+ {
+ std::vector<std::shared_ptr<arrow::RecordBatch>> splitted;
+ splitted.reserve(batches.size());
+ for (auto& batch : batches) {
+ SliceBatch(batch, maxRowsInBatch, splitted);
+ }
+ batches.swap(splitted);
+ }
+
if (isDesc) {
- TVector<std::shared_ptr<arrow::RecordBatch>> reversed;
+ std::vector<std::shared_ptr<arrow::RecordBatch>> reversed;
reversed.reserve(batches.size());
for (int i = batches.size() - 1; i >= 0; --i) {
auto& batch = batches[i];
diff --git a/ydb/core/tx/columnshard/engines/indexed_read_data.h b/ydb/core/tx/columnshard/engines/indexed_read_data.h
index 54cc70ac9c..ab167ef694 100644
--- a/ydb/core/tx/columnshard/engines/indexed_read_data.h
+++ b/ydb/core/tx/columnshard/engines/indexed_read_data.h
@@ -48,7 +48,7 @@ struct TReadMetadataBase {
std::shared_ptr<arrow::Schema> LoadSchema; // ResultSchema + required for intermediate operations
std::shared_ptr<arrow::Schema> ResultSchema; // TODO: add Program modifications
std::shared_ptr<NSsa::TProgram> Program;
- std::shared_ptr<const THashMap<TUnifiedBlobId, TUnifiedBlobId>> ExternBlobs; // DS -> S3 map TODO: move out of base
+ std::shared_ptr<const THashSet<TUnifiedBlobId>> ExternBlobs;
ESorting Sorting{ESorting::ASC}; // Sorting inside returned batches
ui64 Limit{0}; // TODO
@@ -221,14 +221,16 @@ private:
THashMap<TBlobRange, ui32> IndexedBlobs; // blobId -> batchNo
ui32 ReadyNotIndexed{0};
THashMap<ui64, std::shared_ptr<arrow::RecordBatch>> OutNotIndexed; // granule -> not indexed to append
- THashMap<ui64, TMap<ui64, std::shared_ptr<arrow::RecordBatch>>> ReadyGranules; // granule -> portions
+ THashMap<ui64, std::vector<std::shared_ptr<arrow::RecordBatch>>> ReadyGranules; // granule -> portions data
THashMap<ui64, ui32> PortionBatch; // portion -> batch
TVector<ui64> BatchPortion; // batch -> portion
THashMap<ui64, ui64> PortionGranule; // portion -> granule
THashMap<ui64, ui32> GranuleWaits; // granule -> num portions to wait
TDeque<ui64> GranulesOutOrder;
TMap<TColumnEngineForLogs::TMark, ui64> TsGranules; // ts (key) -> granule
- THashSet<ui64> PortionsWithSelfDups;
+ THashSet<ui64> GranulesWithDups;
+ THashSet<ui64> PortionsWithDups;
+ THashSet<const void*> BatchesToDedup;
std::shared_ptr<NArrow::TSortDescription> SortReplaceDescription;
const TIndexInfo& IndexInfo() const {
@@ -251,12 +253,11 @@ private:
const std::shared_ptr<arrow::RecordBatch>& batch, ui64 planStep, ui64 txId) const;
std::shared_ptr<arrow::RecordBatch> AssembleIndexedBatch(ui32 batchNo);
void UpdateGranuleWaits(ui32 batchNo);
- THashMap<ui64, std::shared_ptr<arrow::RecordBatch>> SplitByGranules(
+ std::shared_ptr<arrow::RecordBatch> MergeNotIndexed(
std::vector<std::shared_ptr<arrow::RecordBatch>>&& batches) const;
- TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>> ReadyToOut();
+ std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>> ReadyToOut();
TVector<TPartialReadResult> MakeResult(
- TVector<std::vector<std::shared_ptr<arrow::RecordBatch>>>&& granules,
- const int64_t maxRowsInBatch) const;
+ std::vector<std::vector<std::shared_ptr<arrow::RecordBatch>>>&& granules, int64_t maxRowsInBatch) const;
};
}
diff --git a/ydb/core/tx/columnshard/engines/portion_info.h b/ydb/core/tx/columnshard/engines/portion_info.h
index dcb45573c5..c8ca2c419e 100644
--- a/ydb/core/tx/columnshard/engines/portion_info.h
+++ b/ydb/core/tx/columnshard/engines/portion_info.h
@@ -51,10 +51,18 @@ struct TPortionInfo {
TString TierName;
bool Empty() const { return Records.empty(); }
- bool Valid() const { return !Empty() && Meta.Produced != TPortionMeta::UNSPECIFIED && HasMinMax(FirstPkColumn); }
+ bool Produced() const { return Meta.Produced != TPortionMeta::UNSPECIFIED; }
+ bool Valid() const { return !Empty() && Produced() && HasMinMax(FirstPkColumn); }
bool IsInserted() const { return Meta.Produced == TPortionMeta::INSERTED; }
bool CanHaveDups() const { return !Valid() || IsInserted(); }
- ui32 NumRecords() const { return Records.size(); }
+ size_t NumRecords() const { return Records.size(); }
+
+ bool EvictReady(size_t hotSize) const {
+ return Meta.Produced == TPortionMeta::COMPACTED
+ || Meta.Produced == TPortionMeta::SPLIT_COMPACTED
+ || Meta.Produced == TPortionMeta::EVICTED
+ || (Meta.Produced == TPortionMeta::INSERTED && BlobsSizes().first >= hotSize);
+ }
ui64 Portion() const {
Y_VERIFY(!Empty());
diff --git a/ydb/core/tx/columnshard/engines/tier_info.h b/ydb/core/tx/columnshard/engines/tier_info.h
index 92ffa8d660..61c8093e8b 100644
--- a/ydb/core/tx/columnshard/engines/tier_info.h
+++ b/ydb/core/tx/columnshard/engines/tier_info.h
@@ -16,6 +16,7 @@ struct TTierInfo {
std::shared_ptr<arrow::Field> EvictColumn;
std::optional<TCompression> Compression;
ui32 TtlUnitsInSecond;
+ bool NeedExport = false;
TTierInfo(const TString& tierName, TInstant evictBorder, const TString& column, ui32 unitsInSecond = 0)
: Name(tierName)
@@ -107,12 +108,12 @@ struct TTiering {
TSet<TTierRef> OrderedTiers; // Tiers ordered by border
std::shared_ptr<TTierInfo> Ttl;
- bool Empty() const {
- return OrderedTiers.empty();
+ bool HasTiers() const {
+ return !OrderedTiers.empty();
}
void Add(const std::shared_ptr<TTierInfo>& tier) {
- if (!Empty()) {
+ if (HasTiers()) {
// TODO: support different ttl columns
Y_VERIFY(tier->EvictColumnName == OrderedTiers.begin()->Get().EvictColumnName);
}
@@ -148,6 +149,15 @@ struct TTiering {
return {};
}
+ bool NeedExport(const TString& name) const {
+ auto it = TierByName.find(name);
+ if (it != TierByName.end()) {
+ Y_VERIFY(!name.empty());
+ return it->second->NeedExport;
+ }
+ return false;
+ }
+
THashSet<TString> GetTtlColumns() const {
THashSet<TString> out;
if (Ttl) {
diff --git a/ydb/core/tx/columnshard/engines/ut_logs_engine.cpp b/ydb/core/tx/columnshard/engines/ut_logs_engine.cpp
index 423318b75f..45e95bb5cf 100644
--- a/ydb/core/tx/columnshard/engines/ut_logs_engine.cpp
+++ b/ydb/core/tx/columnshard/engines/ut_logs_engine.cpp
@@ -293,7 +293,8 @@ bool Insert(TColumnEngineForLogs& engine, TTestDbWrapper& db, TSnapshot snap,
bool Insert(const TIndexInfo& tableInfo, TTestDbWrapper& db, TSnapshot snap,
TVector<TInsertedData>&& dataToIndex, THashMap<TBlobRange, TString>& blobs, ui32& step) {
TColumnEngineForLogs engine(TIndexInfo(tableInfo), 0, TestLimits());
- engine.Load(db);
+ THashSet<TUnifiedBlobId> lostBlobs;
+ engine.Load(db, lostBlobs);
return Insert(engine, db, snap, std::move(dataToIndex), blobs, step);
}
@@ -328,13 +329,14 @@ bool Compact(TColumnEngineForLogs& engine, TTestDbWrapper& db, TSnapshot snap, T
bool Compact(const TIndexInfo& tableInfo, TTestDbWrapper& db, TSnapshot snap, THashMap<TBlobRange,
TString>&& blobs, ui32& step, const TExpected& expected) {
TColumnEngineForLogs engine(TIndexInfo(tableInfo), 0, TestLimits());
- engine.Load(db);
+ THashSet<TUnifiedBlobId> lostBlobs;
+ engine.Load(db, lostBlobs);
return Compact(engine, db, snap, std::move(blobs), step, expected);
}
bool Cleanup(TColumnEngineForLogs& engine, TTestDbWrapper& db, TSnapshot snap, ui32 expectedToDrop) {
THashSet<ui64> pathsToDrop;
- std::shared_ptr<TColumnEngineChanges> changes = engine.StartCleanup(snap, pathsToDrop);
+ std::shared_ptr<TColumnEngineChanges> changes = engine.StartCleanup(snap, pathsToDrop, 1000);
UNIT_ASSERT(changes);
UNIT_ASSERT_VALUES_EQUAL(changes->PortionsToDrop.size(), expectedToDrop);
@@ -409,7 +411,8 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
// load
TColumnEngineForLogs engine(TIndexInfo(tableInfo), 0);
- engine.Load(db);
+ THashSet<TUnifiedBlobId> lostBlobs;
+ engine.Load(db, lostBlobs);
// selects
@@ -507,7 +510,8 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
// load
TColumnEngineForLogs engine(TIndexInfo(tableInfo), 0, TestLimits());
- engine.Load(db);
+ THashSet<TUnifiedBlobId> lostBlobs;
+ engine.Load(db, lostBlobs);
// read
@@ -576,7 +580,8 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
ui64 planStep = 1;
TColumnEngineForLogs engine(TIndexInfo(tableInfo), 0, TestLimits());
- engine.Load(db);
+ THashSet<TUnifiedBlobId> lostBlobs;
+ engine.Load(db, lostBlobs);
THashMap<TBlobRange, TString> blobs;
ui64 numRows = 1000;
@@ -606,7 +611,7 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
{ // check it's overloaded after reload
TColumnEngineForLogs tmpEngine(TIndexInfo(tableInfo), 0, TestLimits());
- tmpEngine.Load(db);
+ tmpEngine.Load(db, lostBlobs);
UNIT_ASSERT(tmpEngine.GetOverloadedGranules(pathId));
}
@@ -637,7 +642,7 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
{ // check it's not overloaded after reload
TColumnEngineForLogs tmpEngine(TIndexInfo(tableInfo), 0, TestLimits());
- tmpEngine.Load(db);
+ tmpEngine.Load(db, lostBlobs);
UNIT_ASSERT(!tmpEngine.GetOverloadedGranules(pathId));
}
}
@@ -678,7 +683,8 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
// load
TColumnEngineForLogs engine(TIndexInfo(tableInfo), 0, TestLimits());
- engine.Load(db);
+ THashSet<TUnifiedBlobId> lostBlobs;
+ engine.Load(db, lostBlobs);
// read
planStep = 3;
@@ -722,7 +728,7 @@ Y_UNIT_TEST_SUITE(TColumnEngineTestLogs) {
}
// load
- engine.Load(db);
+ engine.Load(db, lostBlobs);
UNIT_ASSERT_VALUES_EQUAL(engine.GetTotalStats().EmptyGranules, 1);
{ // full scan
diff --git a/ydb/core/tx/columnshard/eviction_actor.cpp b/ydb/core/tx/columnshard/eviction_actor.cpp
index e379a6b918..39f116d73b 100644
--- a/ydb/core/tx/columnshard/eviction_actor.cpp
+++ b/ydb/core/tx/columnshard/eviction_actor.cpp
@@ -106,7 +106,7 @@ private:
NBlobCache::TReadBlobRangeOptions readOpts {
.CacheAfterRead = false,
- .Fallback = isExternal,
+ .ForceFallback = isExternal,
.IsBackgroud = true
};
Send(BlobCacheActorId,
diff --git a/ydb/core/tx/columnshard/export_actor.cpp b/ydb/core/tx/columnshard/export_actor.cpp
index 1ee860ff3a..8dff625bf1 100644
--- a/ydb/core/tx/columnshard/export_actor.cpp
+++ b/ydb/core/tx/columnshard/export_actor.cpp
@@ -22,7 +22,7 @@ public:
}
void Handle(NBlobCache::TEvBlobCache::TEvReadBlobRangeResult::TPtr& ev, const TActorContext& ctx) {
- LOG_S_DEBUG("TEvReadBlobRangeResult (waiting " << BlobsToRead.size() << ") at tablet " << TabletId << " (export)");
+ LOG_S_TRACE("TEvReadBlobRangeResult (waiting " << BlobsToRead.size() << ") at tablet " << TabletId << " (export)");
auto& event = *ev->Get();
const TUnifiedBlobId& blobId = event.BlobRange.BlobId;
@@ -52,7 +52,7 @@ public:
{
auto it = Event->Blobs.find(blobId);
Y_VERIFY(it != Event->Blobs.end());
- it->second.Data = blobData;
+ it->second = blobData;
}
if (BlobsToRead.empty()) {
@@ -95,7 +95,7 @@ private:
NBlobCache::TReadBlobRangeOptions readOpts {
.CacheAfterRead = false,
- .Fallback = false,
+ .ForceFallback = false,
.IsBackgroud = true
};
Send(BlobCacheActorId, new NBlobCache::TEvBlobCache::TEvReadBlobRange(blobRange, std::move(readOpts)));
diff --git a/ydb/core/tx/columnshard/indexing_actor.cpp b/ydb/core/tx/columnshard/indexing_actor.cpp
index a05272ce73..5412ba3633 100644
--- a/ydb/core/tx/columnshard/indexing_actor.cpp
+++ b/ydb/core/tx/columnshard/indexing_actor.cpp
@@ -45,7 +45,7 @@ public:
}
void Handle(NBlobCache::TEvBlobCache::TEvReadBlobRangeResult::TPtr& ev, const TActorContext& ctx) {
- LOG_S_DEBUG("TEvReadBlobRangeResult (waiting " << BlobsToRead.size()
+ LOG_S_TRACE("TEvReadBlobRangeResult (waiting " << BlobsToRead.size()
<< ") at tablet " << TabletId << " (index)");
auto& event = *ev->Get();
@@ -110,8 +110,9 @@ private:
Y_VERIFY(blobRange.Size);
NBlobCache::TReadBlobRangeOptions readOpts {
.CacheAfterRead = false,
- .Fallback = false,
- .IsBackgroud = true
+ .ForceFallback = false,
+ .IsBackgroud = true,
+ .WithDeadline = false
};
Send(BlobCacheActorId, new NBlobCache::TEvBlobCache::TEvReadBlobRange(blobRange, std::move(readOpts)));
}
diff --git a/ydb/core/tx/columnshard/inflight_request_tracker.h b/ydb/core/tx/columnshard/inflight_request_tracker.h
index cdec4279bc..72beea0159 100644
--- a/ydb/core/tx/columnshard/inflight_request_tracker.h
+++ b/ydb/core/tx/columnshard/inflight_request_tracker.h
@@ -15,6 +15,7 @@ public:
// until all the references are released.
// NOTE: this ref counts are in-memory only, so the blobs can be deleted if tablet restarts
virtual void SetBlobInUse(const NOlap::TUnifiedBlobId& blobId, bool inUse) = 0;
+ virtual bool BlobInUse(const NOlap::TUnifiedBlobId& blobId) const = 0;
};
using NOlap::TReadMetadata;
@@ -59,6 +60,9 @@ public:
} else {
it->second--;
}
+ for (auto& rec : portion.Records) {
+ blobTracker.SetBlobInUse(rec.BlobRange.BlobId, false);
+ }
}
for (const auto& committedBlob : readMeta->CommittedBlobs) {
@@ -97,6 +101,9 @@ private:
for (const auto& portion : readMeta->SelectInfo->Portions) {
const ui64 portionId = portion.Records[0].Portion;
PortionUseCount[portionId]++;
+ for (auto& rec : portion.Records) {
+ blobTracker.SetBlobInUse(rec.BlobRange.BlobId, true);
+ }
}
for (const auto& committedBlob : readMeta->CommittedBlobs) {
diff --git a/ydb/core/tx/columnshard/read_actor.cpp b/ydb/core/tx/columnshard/read_actor.cpp
index a4f05397d7..69e8dc37c2 100644
--- a/ydb/core/tx/columnshard/read_actor.cpp
+++ b/ydb/core/tx/columnshard/read_actor.cpp
@@ -221,7 +221,7 @@ public:
NBlobCache::TReadBlobRangeOptions readOpts {
.CacheAfterRead = true,
- .Fallback = fallback,
+ .ForceFallback = fallback,
.IsBackgroud = false
};
Send(BlobCacheActorId, new NBlobCache::TEvBlobCache::TEvReadBlobRange(blobRange, std::move(readOpts)));
diff --git a/ydb/core/tx/columnshard/ut_rw/ut_columnshard_read_write.cpp b/ydb/core/tx/columnshard/ut_rw/ut_columnshard_read_write.cpp
index 408efc1422..b5bd722219 100644
--- a/ydb/core/tx/columnshard/ut_rw/ut_columnshard_read_write.cpp
+++ b/ydb/core/tx/columnshard/ut_rw/ut_columnshard_read_write.cpp
@@ -478,6 +478,75 @@ void TestWriteReadDup() {
}
}
+void TestWriteReadLongTxDup() {
+ TTestBasicRuntime runtime;
+ TTester::Setup(runtime);
+
+ TActorId sender = runtime.AllocateEdgeActor();
+ CreateTestBootstrapper(runtime, CreateTestTabletInfo(TTestTxConfig::TxTablet0, TTabletTypes::ColumnShard), &CreateColumnShard);
+
+ TDispatchOptions options;
+ options.FinalEvents.push_back(TDispatchOptions::TFinalEventCondition(TEvTablet::EvBoot));
+ runtime.DispatchEvents(options);
+
+ //
+
+ ui64 tableId = 1;
+ auto ydbSchema = TTestSchema::YdbSchema();
+ SetupSchema(runtime, sender, tableId, ydbSchema);
+
+ constexpr ui32 numRows = 10;
+ std::pair<ui64, ui64> portion = {10, 10 + numRows};
+
+ NLongTxService::TLongTxId longTxId;
+ UNIT_ASSERT(longTxId.ParseString("ydb://long-tx/01ezvvxjdk2hd4vdgjs68knvp8?node_id=1"));
+
+ ui64 txId = 0;
+ ui64 planStep = 100;
+ std::optional<ui64> writeId;
+
+ // Only the first blob with dedup pair {longTx, dedupId} should be inserted
+ // Others should return OK (write retries emulation)
+ for (ui32 i = 0; i < 4; ++i) {
+ auto data = MakeTestBlob({portion.first + i, portion.second + i}, ydbSchema);
+ UNIT_ASSERT(data.size() < NColumnShard::TLimits::MIN_BYTES_TO_INSERT);
+
+ auto writeIdOpt = WriteData(runtime, sender, longTxId, tableId, "0", data);
+ UNIT_ASSERT(writeIdOpt);
+ if (!i) {
+ writeId = *writeIdOpt;
+ }
+ UNIT_ASSERT_EQUAL(*writeIdOpt, *writeId);
+ }
+
+ ProposeCommit(runtime, sender, ++txId, {*writeId});
+ TSet<ui64> txIds = {txId};
+ PlanCommit(runtime, sender, planStep, txIds);
+
+ // read
+ TAutoPtr<IEventHandle> handle;
+ {
+ ForwardToTablet(runtime, TTestTxConfig::TxTablet0, sender,
+ new TEvColumnShard::TEvRead(sender, 0, planStep, txId, tableId));
+ auto event = runtime.GrabEdgeEvent<TEvColumnShard::TEvReadResult>(handle);
+ UNIT_ASSERT(event);
+
+ auto& resRead = Proto(event);
+ UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
+ UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), 0);
+ UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
+ UNIT_ASSERT_EQUAL(resRead.GetBatch(), 0);
+ UNIT_ASSERT_EQUAL(resRead.GetFinished(), true);
+ UNIT_ASSERT(resRead.GetData().size() > 0);
+
+ auto data = resRead.GetData();
+ auto meta = resRead.GetMeta();
+ UNIT_ASSERT(CheckColumns(data, meta, TTestSchema::ExtractNames(ydbSchema), numRows));
+ UNIT_ASSERT(DataHas(TVector<TString>{data}, meta.GetSchema(), portion, true));
+ UNIT_ASSERT(DataHasOnly(TVector<TString>{data}, meta.GetSchema(), portion));
+ }
+}
+
void TestWriteRead(bool reboots, const TestTableDescription& table = {}, TString codec = "") {
TTestBasicRuntime runtime;
TTester::Setup(runtime);
@@ -1095,6 +1164,33 @@ static NKikimrSSA::TProgram MakeSelect(TAssignment::EFunction compareId = TAssig
return ssa;
}
+// SELECT level, timestamp FROM t WHERE likeFunc(timestamp, pattern)
+static NKikimrSSA::TProgram MakeSelectLike(TAssignment::EFunction likeId, const TString& pattern) {
+ NKikimrSSA::TProgram ssa;
+
+ std::vector<ui32> columnIds = {6}; // message
+
+ auto* line1 = ssa.AddCommand();
+ auto* l1_assign = line1->MutableAssign();
+ l1_assign->MutableColumn()->SetId(100);
+ l1_assign->MutableConstant()->SetText(pattern);
+
+ auto* line2 = ssa.AddCommand();
+ auto* l2_assign = line2->MutableAssign();
+ l2_assign->MutableColumn()->SetId(101);
+ auto* l2_func = l2_assign->MutableFunction();
+ l2_func->SetId(likeId);
+ l2_func->AddArguments()->SetId(columnIds[0]);
+ l2_func->AddArguments()->SetId(100);
+
+ auto* line3 = ssa.AddCommand();
+ line3->MutableFilter()->MutablePredicate()->SetId(101);
+
+ auto* line4 = ssa.AddCommand();
+ line4->MutableProjection()->AddColumns()->SetId(columnIds[0]);
+ return ssa;
+}
+
// SELECT min(x), max(x), some(x), count(x) FROM t [GROUP BY key[0], key[1], ...]
NKikimrSSA::TProgram MakeSelectAggregates(ui32 columnId, const std::vector<ui32>& keys = {},
bool addProjection = true)
@@ -1339,6 +1435,101 @@ void TestReadWithProgram(const TestTableDescription& table = {})
}
}
+void TestReadWithProgramLike(const TestTableDescription& table = {}) {
+ TTestBasicRuntime runtime;
+ TTester::Setup(runtime);
+
+ TActorId sender = runtime.AllocateEdgeActor();
+ CreateTestBootstrapper(runtime,
+ CreateTestTabletInfo(TTestTxConfig::TxTablet0, TTabletTypes::ColumnShard), &CreateColumnShard);
+
+ TDispatchOptions options;
+ options.FinalEvents.push_back(TDispatchOptions::TFinalEventCondition(TEvTablet::EvBoot));
+ runtime.DispatchEvents(options);
+
+ ui64 metaShard = TTestTxConfig::TxTablet1;
+ ui64 writeId = 0;
+ ui64 tableId = 1;
+ ui64 planStep = 100;
+ ui64 txId = 100;
+
+ SetupSchema(runtime, sender, tableId, table.Schema);
+
+ { // write some data
+ bool ok = WriteData(runtime, sender, metaShard, writeId, tableId, MakeTestBlob({0, 100}, table.Schema));
+ UNIT_ASSERT(ok);
+
+ ProposeCommit(runtime, sender, metaShard, txId, {writeId});
+ PlanCommit(runtime, sender, planStep, txId);
+ }
+
+ TString pattern = "1";
+ std::vector<NKikimrSSA::TProgram> ssas = {
+ MakeSelectLike(TAssignment::FUNC_STR_MATCH, pattern),
+ MakeSelectLike(TAssignment::FUNC_STR_MATCH_IGNORE_CASE, pattern),
+ MakeSelectLike(TAssignment::FUNC_STR_STARTS_WITH, pattern),
+ MakeSelectLike(TAssignment::FUNC_STR_STARTS_WITH_IGNORE_CASE, pattern),
+ MakeSelectLike(TAssignment::FUNC_STR_ENDS_WITH, pattern),
+ MakeSelectLike(TAssignment::FUNC_STR_ENDS_WITH_IGNORE_CASE, pattern)
+ };
+
+ ui32 i = 0;
+ for (auto& ssa : ssas) {
+ TString programText;
+ {
+ TString serialized;
+ UNIT_ASSERT(ssa.SerializeToString(&serialized));
+ NKikimrSSA::TOlapProgram program;
+ program.SetProgram(serialized);
+ UNIT_ASSERT(program.SerializeToString(&programText));
+ }
+
+ auto* readEvent = new TEvColumnShard::TEvRead(sender, metaShard, planStep, txId, tableId);
+ auto& readProto = Proto(readEvent);
+
+ readProto.SetOlapProgramType(::NKikimrSchemeOp::EOlapProgramType::OLAP_PROGRAM_SSA_PROGRAM_WITH_PARAMETERS);
+ readProto.SetOlapProgram(programText);
+
+ ForwardToTablet(runtime, TTestTxConfig::TxTablet0, sender, readEvent);
+
+ TAutoPtr<IEventHandle> handle;
+ auto result = runtime.GrabEdgeEvent<TEvColumnShard::TEvReadResult>(handle);
+ UNIT_ASSERT(result);
+
+ auto& resRead = Proto(result);
+ UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
+ UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), metaShard);
+ {
+ UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
+ UNIT_ASSERT_EQUAL(resRead.GetBatch(), 0);
+ UNIT_ASSERT_EQUAL(resRead.GetFinished(), true);
+ UNIT_ASSERT(resRead.GetData().size() > 0);
+
+ auto& meta = resRead.GetMeta();
+ //auto& schema = meta.GetSchema();
+ TString readData = resRead.GetData();
+
+ switch (i) {
+ case 0:
+ case 1:
+ UNIT_ASSERT(CheckColumns(readData, meta, {"message"}, 19));
+ break;
+ case 2:
+ case 3:
+ UNIT_ASSERT(CheckColumns(readData, meta, {"message"}, 11));
+ break;
+ case 4:
+ case 5:
+ UNIT_ASSERT(CheckColumns(readData, meta, {"message"}, 10));
+ break;
+ default:
+ break;
+ }
+ }
+ ++i;
+ }
+}
+
void TestSomePrograms(const TestTableDescription& table) {
TTestBasicRuntime runtime;
TTester::Setup(runtime);
@@ -1597,6 +1788,7 @@ Y_UNIT_TEST_SUITE(TColumnShardTestReadWrite) {
Y_UNIT_TEST(WriteReadDuplicate) {
TestWriteReadDup();
+ TestWriteReadLongTxDup();
}
Y_UNIT_TEST(WriteRead) {
@@ -1715,6 +1907,10 @@ Y_UNIT_TEST_SUITE(TColumnShardTestReadWrite) {
TestReadWithProgram();
}
+ Y_UNIT_TEST(ReadWithProgramLike) {
+ TestReadWithProgramLike();
+ }
+
Y_UNIT_TEST(ReadSomePrograms) {
TestTableDescription table;
table.Schema = {
@@ -2180,16 +2376,6 @@ Y_UNIT_TEST_SUITE(TColumnShardTestReadWrite) {
}
}
- // Private events of different actors reuse the same ES_PRIVATE range
- // So in order to capture the right private event we need to check its type via dynamic_cast
- template <class TPrivateEvent>
- TPrivateEvent* TryGetPrivateEvent(TAutoPtr<IEventHandle> &ev) {
- if (ev->GetTypeRewrite() != TPrivateEvent::EventType) {
- return nullptr;
- }
- return dynamic_cast<TPrivateEvent*>(ev->GetBase());
- }
-
void TestCompactionGC(bool enableSmallBlobs) {
TTestBasicRuntime runtime;
TTester::Setup(runtime);
diff --git a/ydb/core/tx/columnshard/ut_schema/ut_columnshard_schema.cpp b/ydb/core/tx/columnshard/ut_schema/ut_columnshard_schema.cpp
index fe072bf9b5..a5847ac677 100644
--- a/ydb/core/tx/columnshard/ut_schema/ut_columnshard_schema.cpp
+++ b/ydb/core/tx/columnshard/ut_schema/ut_columnshard_schema.cpp
@@ -168,6 +168,22 @@ bool TestCreateTable(const TString& txBody, ui64 planStep = 1000, ui64 txId = 10
return ProposeSchemaTx(runtime, sender, txBody, {++planStep, ++txId});
}
+TString GetReadResult(NKikimrTxColumnShard::TEvReadResult& resRead,
+ std::optional<ui32> batchNo = 0,
+ std::optional<bool> finished = true)
+{
+ UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
+ UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), TTestTxConfig::TxTablet1);
+ UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
+ if (batchNo) {
+ UNIT_ASSERT_VALUES_EQUAL(resRead.GetBatch(), *batchNo);
+ }
+ if (finished) {
+ UNIT_ASSERT_EQUAL(resRead.GetFinished(), *finished);
+ }
+ return resRead.GetData();
+}
+
static constexpr ui32 PORTION_ROWS = 80 * 1000;
// ts[0] = 1600000000; // date -u --date='@1600000000' Sun Sep 13 12:26:40 UTC 2020
@@ -265,15 +281,11 @@ void TestTtl(bool reboots, bool internal, TTestSchema::TTableSpecials spec = {},
UNIT_ASSERT(event);
auto& resRead = Proto(event);
- UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
- UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), metaShard);
- UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
- UNIT_ASSERT_VALUES_EQUAL(resRead.GetBatch(), 0);
- UNIT_ASSERT_EQUAL(resRead.GetFinished(), true);
- UNIT_ASSERT(resRead.GetData().size() > 0);
+ TString data = GetReadResult(resRead);
+ UNIT_ASSERT(data.size() > 0);
auto& schema = resRead.GetMeta().GetSchema();
- UNIT_ASSERT(CheckSame(resRead.GetData(), schema, PORTION_ROWS, spec.TtlColumn, ts[1]));
+ UNIT_ASSERT(CheckSame(data, schema, PORTION_ROWS, spec.TtlColumn, ts[1]));
}
// Alter TTL
@@ -308,12 +320,8 @@ void TestTtl(bool reboots, bool internal, TTestSchema::TTableSpecials spec = {},
UNIT_ASSERT(event);
auto& resRead = Proto(event);
- UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
- UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), metaShard);
- UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
- UNIT_ASSERT_VALUES_EQUAL(resRead.GetBatch(), 0);
- UNIT_ASSERT_EQUAL(resRead.GetFinished(), true);
- UNIT_ASSERT_VALUES_EQUAL(resRead.GetData().size(), 0);
+ TString data = GetReadResult(resRead);
+ UNIT_ASSERT_VALUES_EQUAL(data.size(), 0);
}
// Disable TTL
@@ -366,6 +374,8 @@ public:
ui32 SuccessCounter = 0;
ui32 ErrorsCounter = 0;
ui32 ResponsesCounter = 0;
+ ui32 CaptureReadEvents = 0;
+ std::vector<TAutoPtr<IEventHandle>> CapturedReads;
TString SerializeToString() const {
TStringBuilder sb;
@@ -399,50 +409,60 @@ public:
Cerr << "FINISH_WAITING(" << attemption << "): " << SerializeToString() << Endl;
SuccessCounterStart = SuccessCounter;
}
+
+ void WaitReadsCaptured(TTestBasicRuntime& runtime) const {
+ const TInstant startInstant = TAppData::TimeProvider->Now();
+ const TInstant deadline = startInstant + TDuration::Seconds(10);
+ while (CaptureReadEvents && TAppData::TimeProvider->Now() < deadline) {
+ runtime.SimulateSleep(TDuration::Seconds(1));
+ }
+ UNIT_ASSERT_VALUES_EQUAL(CaptureReadEvents, 0);
+ }
+
+ void ResendCapturedReads(TTestBasicRuntime& runtime) {
+ for (auto& cev : CapturedReads) {
+ auto* msg = TryGetPrivateEvent<NBlobCache::TEvBlobCache::TEvReadBlobRange>(cev);
+ UNIT_ASSERT(msg);
+ Cerr << "RESEND " << msg->BlobRange.ToString() << " "
+ << msg->ReadOptions.ToString() << Endl;
+ runtime.Send(cev.Release());
+ }
+ CapturedReads.clear();
+ }
};
class TEventsCounter {
private:
TCountersContainer* Counters = nullptr;
TTestBasicRuntime& Runtime;
- const TActorId Sender;
-
- template <class TPrivateEvent>
- static TPrivateEvent* TryGetPrivateEvent(TAutoPtr<IEventHandle>& ev) {
- if (ev->GetTypeRewrite() != TPrivateEvent::EventType) {
- return nullptr;
- }
- return dynamic_cast<TPrivateEvent*>(ev->GetBase());
- }
public:
- TEventsCounter(TCountersContainer& counters, TTestBasicRuntime& runtime, const TActorId sender)
+ TEventsCounter(TCountersContainer& counters, TTestBasicRuntime& runtime)
: Counters(&counters)
, Runtime(runtime)
- , Sender(sender)
{
Y_UNUSED(Runtime);
- Y_UNUSED(Sender);
}
bool operator()(TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
TStringBuilder ss;
if (auto* msg = TryGetPrivateEvent<NColumnShard::TEvPrivate::TEvExport>(ev)) {
- ss << "EXPORT";
- if (msg->Status == NKikimrProto::OK) {
- ss << "(" << ++Counters->SuccessCounter << "): SUCCESS";
- }
- if (msg->Status == NKikimrProto::ERROR) {
- ss << "(" << ++Counters->ErrorsCounter << "): ERROR";
- }
- if (msg->Status == NKikimrProto::UNKNOWN) {
- ss << "(" << ++Counters->UnknownsCounter << "): UNKNOWN";
- }
+ ss << "EXPORT(" << ++Counters->SuccessCounter << "): " << NKikimrProto::EReplyStatus_Name(msg->Status);
} else if (auto* msg = TryGetPrivateEvent<NWrappers::NExternalStorage::TEvPutObjectResponse>(ev)) {
ss << "S3_RESPONSE(put " << ++Counters->ResponsesCounter << "):";
} else if (auto* msg = TryGetPrivateEvent<NWrappers::NExternalStorage::TEvDeleteObjectResponse>(ev)) {
ss << "(" << ++Counters->SuccessCounter << "): DELETE SUCCESS";
ss << "S3_RESPONSE(delete " << ++Counters->ResponsesCounter << "):";
+ } else if (auto* msg = TryGetPrivateEvent<NBlobCache::TEvBlobCache::TEvReadBlobRange>(ev)) {
+ if (Counters->CaptureReadEvents) {
+ Cerr << "CAPTURE " << msg->BlobRange.ToString() << " "
+ << msg->ReadOptions.ToString() << Endl;
+ --Counters->CaptureReadEvents;
+ Counters->CapturedReads.push_back(ev.Release());
+ return true;
+ } else {
+ return false;
+ }
} else {
return false;
}
@@ -470,6 +490,18 @@ std::vector<std::pair<ui32, ui64>> TestTiers(bool reboots, const std::vector<TSt
options.FinalEvents.push_back(TDispatchOptions::TFinalEventCondition(TEvTablet::EvBoot));
runtime.DispatchEvents(options);
+ // Disable blob cache. It hides evict-delete, evict-read races.
+ {
+ TAtomic unused;
+ runtime.GetAppData().Icb->SetValue("BlobCache.MaxCacheDataSize", 0, unused);
+ }
+
+ // Disable GC batching so that deleted blobs get collected without a delay
+ {
+ TAtomic unused;
+ runtime.GetAppData().Icb->SetValue("ColumnShardControls.BlobCountToTriggerGC", 1, unused);
+ }
+
//
ui64 metaShard = TTestTxConfig::TxTablet1;
@@ -506,7 +538,7 @@ std::vector<std::pair<ui32, ui64>> TestTiers(bool reboots, const std::vector<TSt
specRowsBytes.reserve(specs.size());
TCountersContainer counter;
- runtime.SetEventFilter(TEventsCounter(counter, runtime, sender));
+ runtime.SetEventFilter(TEventsCounter(counter, runtime));
for (ui32 i = 0; i < specs.size(); ++i) {
bool hasColdEviction = false;
for (auto&& i : specs[i].Tiers) {
@@ -529,44 +561,71 @@ std::vector<std::pair<ui32, ui64>> TestTiers(bool reboots, const std::vector<TSt
ProvideTieringSnapshot(runtime, sender, TTestSchema::BuildSnapshot(specs[i]));
}
+ // Read crossed with eviction (start)
+ {
+ auto read = std::make_unique<TEvColumnShard::TEvRead>(sender, metaShard, planStep-1, Max<ui64>(), tableId);
+ Proto(read.get()).AddColumnNames(specs[i].TtlColumn);
+
+ counter.CaptureReadEvents = 1; // TODO: we need affected by tiering blob here
+ ForwardToTablet(runtime, TTestTxConfig::TxTablet0, sender, read.release());
+ counter.WaitReadsCaptured(runtime);
+ }
+
+ // Eviction
+
TriggerTTL(runtime, sender, { ++planStep, ++txId }, {}, 0, specs[i].TtlColumn);
+
+ Cerr << (hasColdEviction ? "Cold" : "Hot")
+ << " tiering, spec " << i << ", num tiers: " << specs[i].Tiers.size() << "\n";
+
if (hasColdEviction) {
- Cerr << "Cold tiering, spec " << i << ", num tiers: " << specs[i].Tiers.size() << "\n";
if (i > initialEviction) {
counter.WaitEvents(runtime, i, 1, TDuration::Seconds(40));
} else {
counter.WaitEvents(runtime, i, 0, TDuration::Seconds(20));
}
} else {
- Cerr << "Hot tiering, spec " << i << ", num tiers: " << specs[i].Tiers.size() << "\n";
counter.WaitEvents(runtime, i, 0, TDuration::Seconds(4));
}
if (reboots) {
ProvideTieringSnapshot(runtime, sender, TTestSchema::BuildSnapshot(specs[i]));
}
- // Read
+ // Read crossed with eviction (finish)
+ {
+ counter.ResendCapturedReads(runtime);
+ ui32 numBatches = 0;
+ THashSet<ui32> batchNumbers;
+ while (!numBatches || numBatches < batchNumbers.size()) {
+ auto event = runtime.GrabEdgeEvent<TEvColumnShard::TEvReadResult>(handle);
+ UNIT_ASSERT(event);
+
+ auto& resRead = Proto(event);
+ TString data = GetReadResult(resRead, {}, {});
+ batchNumbers.insert(resRead.GetBatch());
+ if (resRead.GetFinished()) {
+ numBatches = resRead.GetBatch() + 1;
+ }
+ }
+ }
+
+ // Read data after eviction
- --planStep;
- auto read = std::make_unique<TEvColumnShard::TEvRead>(sender, metaShard, planStep, Max<ui64>(), tableId);
+ auto read = std::make_unique<TEvColumnShard::TEvRead>(sender, metaShard, planStep-1, Max<ui64>(), tableId);
Proto(read.get()).AddColumnNames(specs[i].TtlColumn);
-
ForwardToTablet(runtime, TTestTxConfig::TxTablet0, sender, read.release());
+
specRowsBytes.emplace_back(0, 0);
- ui32 idx = 0;
while (true) {
auto event = runtime.GrabEdgeEvent<TEvColumnShard::TEvReadResult>(handle);
UNIT_ASSERT(event);
auto& resRead = Proto(event);
- UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
- UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), metaShard);
- UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
- UNIT_ASSERT_EQUAL(resRead.GetBatch(), idx++);
-
- if (!resRead.GetData().size()) {
+ TString data = GetReadResult(resRead, {}, {});
+ if (!data.size()) {
break;
}
+
auto& meta = resRead.GetMeta();
auto& schema = meta.GetSchema();
auto ttlColumn = DeserializeColumn(resRead.GetData(), schema, specs[i].TtlColumn);
@@ -844,12 +903,8 @@ void TestDrop(bool reboots) {
UNIT_ASSERT(event);
auto& resRead = Proto(event);
- UNIT_ASSERT_EQUAL(resRead.GetOrigin(), TTestTxConfig::TxTablet0);
- UNIT_ASSERT_EQUAL(resRead.GetTxInitiator(), metaShard);
- UNIT_ASSERT_EQUAL(resRead.GetStatus(), NKikimrTxColumnShard::EResultStatus::SUCCESS);
- UNIT_ASSERT_EQUAL(resRead.GetBatch(), 0);
- UNIT_ASSERT_EQUAL(resRead.GetFinished(), true);
- UNIT_ASSERT_EQUAL(resRead.GetData().size(), 0);
+ TString data = GetReadResult(resRead);
+ UNIT_ASSERT_EQUAL(data.size(), 0);
}
}
diff --git a/ydb/core/tx/datashard/CMakeLists.darwin.txt b/ydb/core/tx/datashard/CMakeLists.darwin.txt
index 48f3c5133f..7ff7aafc71 100644
--- a/ydb/core/tx/datashard/CMakeLists.darwin.txt
+++ b/ydb/core/tx/datashard/CMakeLists.darwin.txt
@@ -87,8 +87,10 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_data_tx_out_rs_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_distributed_erase_tx_out_rs_unit.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_kqp_data_tx_out_rs_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_scheme_tx_out_rs_unit.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/cdc_stream_scan.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_async_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_base.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_cdc_stream.cpp
@@ -96,6 +98,7 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_exchange.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_exchange_split.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_record.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_record_body_serializer.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender_async_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender_cdc_stream.cpp
@@ -112,7 +115,6 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_persistent_snapshot_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_table_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_volatile_snapshot_unit.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__build_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__cancel_tx_proposal.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__compact_borrowed.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__compaction.cpp
diff --git a/ydb/core/tx/datashard/CMakeLists.linux-aarch64.txt b/ydb/core/tx/datashard/CMakeLists.linux-aarch64.txt
index 9257ce4c0c..b42c63650e 100644
--- a/ydb/core/tx/datashard/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/tx/datashard/CMakeLists.linux-aarch64.txt
@@ -88,8 +88,10 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_data_tx_out_rs_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_distributed_erase_tx_out_rs_unit.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_kqp_data_tx_out_rs_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_scheme_tx_out_rs_unit.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/cdc_stream_scan.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_async_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_base.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_cdc_stream.cpp
@@ -97,6 +99,7 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_exchange.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_exchange_split.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_record.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_record_body_serializer.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender_async_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender_cdc_stream.cpp
@@ -113,7 +116,6 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_persistent_snapshot_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_table_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_volatile_snapshot_unit.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__build_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__cancel_tx_proposal.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__compact_borrowed.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__compaction.cpp
diff --git a/ydb/core/tx/datashard/CMakeLists.linux.txt b/ydb/core/tx/datashard/CMakeLists.linux.txt
index 9257ce4c0c..b42c63650e 100644
--- a/ydb/core/tx/datashard/CMakeLists.linux.txt
+++ b/ydb/core/tx/datashard/CMakeLists.linux.txt
@@ -88,8 +88,10 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_data_tx_out_rs_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_distributed_erase_tx_out_rs_unit.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_kqp_data_tx_out_rs_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/build_scheme_tx_out_rs_unit.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/cdc_stream_scan.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_async_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_base.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_collector_cdc_stream.cpp
@@ -97,6 +99,7 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_exchange.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_exchange_split.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_record.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_record_body_serializer.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender_async_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/change_sender_cdc_stream.cpp
@@ -113,7 +116,6 @@ target_sources(core-tx-datashard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_persistent_snapshot_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_table_unit.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/create_volatile_snapshot_unit.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__build_index.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__cancel_tx_proposal.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__compact_borrowed.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard__compaction.cpp
diff --git a/ydb/core/tx/datashard/alter_cdc_stream_unit.cpp b/ydb/core/tx/datashard/alter_cdc_stream_unit.cpp
index de503b1b54..cca1f497ea 100644
--- a/ydb/core/tx/datashard/alter_cdc_stream_unit.cpp
+++ b/ydb/core/tx/datashard/alter_cdc_stream_unit.cpp
@@ -48,7 +48,7 @@ public:
const auto& snapshot = params.GetDropSnapshot();
Y_VERIFY(snapshot.GetStep() != 0);
- const TSnapshotKey key(pathId.OwnerId, pathId.LocalPathId, snapshot.GetStep(), snapshot.GetTxId());
+ const TSnapshotKey key(pathId, snapshot.GetStep(), snapshot.GetTxId());
DataShard.GetSnapshotManager().RemoveSnapshot(txc.DB, key);
} else {
Y_VERIFY_DEBUG(false, "Absent snapshot");
@@ -68,6 +68,13 @@ public:
DataShard.AddSchemaSnapshot(pathId, version, op->GetStep(), op->GetTxId(), txc, ctx);
}
+ auto& scanManager = DataShard.GetCdcStreamScanManager();
+ scanManager.Forget(txc.DB, pathId, streamPathId);
+ if (const auto* info = scanManager.Get(streamPathId)) {
+ DataShard.CancelScan(tableInfo->LocalTid, info->ScanId);
+ scanManager.Complete(streamPathId);
+ }
+
BuildResult(op, NKikimrTxDataShard::TEvProposeTransactionResult::COMPLETE);
op->Result()->SetStepOrderId(op->GetStepOrder().ToPair());
diff --git a/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp b/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp
index 7eb786866a..bd55d64eb2 100644
--- a/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp
+++ b/ydb/core/tx/datashard/build_and_wait_dependencies_unit.cpp
@@ -23,6 +23,7 @@ public:
private:
void BuildDependencies(const TOperation::TPtr &op);
+ bool BuildVolatileDependencies(const TOperation::TPtr &op);
};
TBuildAndWaitDependenciesUnit::TBuildAndWaitDependenciesUnit(TDataShard &dataShard,
@@ -42,7 +43,9 @@ bool TBuildAndWaitDependenciesUnit::HasDirectBlockers(const TOperation::TPtr& op
{
Y_VERIFY_DEBUG(op->IsWaitingDependencies());
- return !op->GetDependencies().empty() || !op->GetSpecialDependencies().empty();
+ return !op->GetDependencies().empty()
+ || !op->GetSpecialDependencies().empty()
+ || op->HasVolatileDependencies();
}
bool TBuildAndWaitDependenciesUnit::IsReadyToExecute(TOperation::TPtr op) const
@@ -66,6 +69,7 @@ EExecutionStatus TBuildAndWaitDependenciesUnit::Execute(TOperation::TPtr op,
// Build dependencies if not yet.
if (!op->IsWaitingDependencies()) {
BuildDependencies(op);
+ BuildVolatileDependencies(op);
// After dependencies are built we can add operation to active ops.
// For planned operations it means we can load and process the next
@@ -107,6 +111,10 @@ EExecutionStatus TBuildAndWaitDependenciesUnit::Execute(TOperation::TPtr op,
return EExecutionStatus::Continue;
}
+ } else if (BuildVolatileDependencies(op)) {
+ // We acquired new volatile dependencies, wait for them too
+ Y_VERIFY(!IsReadyToExecute(op));
+ return EExecutionStatus::Continue;
}
DataShard.IncCounter(COUNTER_WAIT_DEPENDENCIES_LATENCY_MS, op->GetCurrentElapsedAndReset().MilliSeconds());
@@ -168,6 +176,24 @@ void TBuildAndWaitDependenciesUnit::BuildDependencies(const TOperation::TPtr &op
op->ResetCurrentTimer();
}
+bool TBuildAndWaitDependenciesUnit::BuildVolatileDependencies(const TOperation::TPtr &op) {
+ // Scheme operations need to wait for all volatile transactions below them
+ if (op->IsSchemeTx()) {
+ TRowVersion current(op->GetStep(), op->GetTxId());
+ for (auto* info : DataShard.GetVolatileTxManager().GetVolatileTxByVersion()) {
+ if (current < info->Version) {
+ break;
+ }
+ op->AddVolatileDependency(info->TxId);
+ bool added = DataShard.GetVolatileTxManager()
+ .AttachWaitingRemovalOperation(info->TxId, op->GetTxId());
+ Y_VERIFY(added);
+ }
+ }
+
+ return op->HasVolatileDependencies();
+}
+
void TBuildAndWaitDependenciesUnit::Complete(TOperation::TPtr,
const TActorContext &)
{
diff --git a/ydb/core/tx/datashard/datashard__build_index.cpp b/ydb/core/tx/datashard/build_index.cpp
index b2fc2cf611..1eb08345a0 100644
--- a/ydb/core/tx/datashard/datashard__build_index.cpp
+++ b/ydb/core/tx/datashard/build_index.cpp
@@ -1,7 +1,7 @@
+#include "build_index.h"
#include "datashard_impl.h"
#include "upload_stats.h"
#include "range_ops.h"
-#include "datashard_build_index.h"
#include <ydb/core/base/appdata.h>
#include <ydb/core/base/counters.h>
@@ -17,8 +17,7 @@
#include <util/generic/algorithm.h>
#include <util/string/builder.h>
-namespace NKikimr {
-namespace NDataShard {
+namespace NKikimr::NDataShard {
using TColumnsTags = THashMap<TString, NTable::TTag>;
using TColumnsTypes = THashMap<TString, NScheme::TTypeInfo>;
@@ -556,6 +555,14 @@ TAutoPtr<NTable::IScan> CreateBuildIndexScan(
void TDataShard::Handle(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev, const TActorContext& ctx) {
const auto& record = ev->Get()->Record;
+ // Note: it's very unlikely that we have volatile txs before this snapshot
+ if (VolatileTxManager.HasVolatileTxsAtSnapshot(TRowVersion(record.GetSnapshotStep(), record.GetSnapshotTxId()))) {
+ VolatileTxManager.AttachWaitingSnapshotEvent(
+ TRowVersion(record.GetSnapshotStep(), record.GetSnapshotTxId()),
+ std::unique_ptr<IEventHandle>(ev.Release()));
+ return;
+ }
+
auto response = MakeHolder<TEvDataShard::TEvBuildIndexProgressResponse>();
response->Record.SetBuildIndexId(record.GetBuildIndexId());
response->Record.SetTabletId(TabletID());
@@ -626,7 +633,7 @@ void TDataShard::Handle(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev, cons
return;
}
- TSnapshotKey snapshotKey = TSnapshotKey(tableId.PathId.OwnerId, tableId.PathId.LocalPathId, record.GetSnapshotStep(), record.GetSnapshotTxId());
+ const TSnapshotKey snapshotKey(tableId.PathId, record.GetSnapshotStep(), record.GetSnapshotTxId());
const TSnapshot* snapshot = SnapshotManager.FindAvailable(snapshotKey);
if (!snapshot) {
badRequest(TStringBuilder()
@@ -653,7 +660,7 @@ void TDataShard::Handle(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev, cons
limits.MaxUploadRowsRetryCount = record.GetMaxRetries();
}
- ui32 scanId = QueueScan(userTable->LocalTid,
+ const auto scanId = QueueScan(userTable->LocalTid,
CreateBuildIndexScan(buildIndexId,
record.GetTargetName(),
seqNo,
@@ -675,5 +682,4 @@ void TDataShard::Handle(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev, cons
ctx.Send(ev->Sender, std::move(response));
}
-} // NDataShard
-} // NKikimr
+}
diff --git a/ydb/core/tx/datashard/datashard_build_index.h b/ydb/core/tx/datashard/build_index.h
index fb4277f7d6..61c85a1469 100644
--- a/ydb/core/tx/datashard/datashard_build_index.h
+++ b/ydb/core/tx/datashard/build_index.h
@@ -7,8 +7,7 @@
#include <util/generic/list.h>
#include <util/generic/map.h>
-namespace NKikimr {
-namespace NDataShard {
+namespace NKikimr::NDataShard {
class TDataShard;
@@ -56,5 +55,4 @@ private:
TBuildIndexIdToScanIdMap Records;
};
-} // namespace NDataShard
-} // namespace NKikimr
+}
diff --git a/ydb/core/tx/datashard/cdc_stream_scan.cpp b/ydb/core/tx/datashard/cdc_stream_scan.cpp
new file mode 100644
index 0000000000..8d65d8ba5d
--- /dev/null
+++ b/ydb/core/tx/datashard/cdc_stream_scan.cpp
@@ -0,0 +1,689 @@
+#include "cdc_stream_scan.h"
+#include "change_record_body_serializer.h"
+#include "datashard_impl.h"
+
+#include <util/generic/maybe.h>
+#include <util/string/builder.h>
+
+#define LOG_D(stream) LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, "[CdcStreamScan] " << stream)
+#define LOG_I(stream) LOG_INFO_S(ctx, NKikimrServices::TX_DATASHARD, "[CdcStreamScan] " << stream)
+#define LOG_W(stream) LOG_WARN_S(ctx, NKikimrServices::TX_DATASHARD, "[CdcStreamScan] " << stream)
+
+namespace NKikimr::NDataShard {
+
+using namespace NActors;
+using namespace NTable;
+using namespace NTabletFlatExecutor;
+
+void TCdcStreamScanManager::Reset() {
+ Scans.clear();
+ TxIdToPathId.clear();
+}
+
+bool TCdcStreamScanManager::Load(NIceDb::TNiceDb& db) {
+ using Schema = TDataShard::Schema;
+
+ auto rowset = db.Table<Schema::CdcStreamScans>().Select();
+ if (!rowset.IsReady()) {
+ return false;
+ }
+
+ while (!rowset.EndOfSet()) {
+ const auto streamPathId = TPathId(
+ rowset.GetValue<Schema::CdcStreamScans::StreamOwnerId>(),
+ rowset.GetValue<Schema::CdcStreamScans::StreamPathId>()
+ );
+
+ Y_VERIFY(!Scans.contains(streamPathId));
+ auto& info = Scans[streamPathId];
+
+ info.SnapshotVersion = TRowVersion(
+ rowset.GetValue<Schema::CdcStreamScans::SnapshotStep>(),
+ rowset.GetValue<Schema::CdcStreamScans::SnapshotTxId>()
+ );
+
+ if (rowset.HaveValue<Schema::CdcStreamScans::LastKey>()) {
+ info.LastKey.ConstructInPlace();
+ Y_VERIFY(TSerializedCellVec::TryParse(rowset.GetValue<Schema::CdcStreamScans::LastKey>(), *info.LastKey));
+ }
+
+ info.Stats.RowsProcessed = rowset.GetValueOrDefault<Schema::CdcStreamScans::RowsProcessed>(0);
+ info.Stats.BytesProcessed = rowset.GetValueOrDefault<Schema::CdcStreamScans::BytesProcessed>(0);
+
+ if (!rowset.Next()) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void TCdcStreamScanManager::Add(NTable::TDatabase& db, const TPathId& tablePathId, const TPathId& streamPathId,
+ const TRowVersion& snapshotVersion)
+{
+ Y_VERIFY(!Scans.contains(streamPathId));
+ auto& info = Scans[streamPathId];
+ info.SnapshotVersion = snapshotVersion;
+
+ NIceDb::TNiceDb nicedb(db);
+ PersistAdd(nicedb, tablePathId, streamPathId, info);
+}
+
+void TCdcStreamScanManager::Forget(NTable::TDatabase& db, const TPathId& tablePathId, const TPathId& streamPathId) {
+ NIceDb::TNiceDb nicedb(db);
+ PersistRemove(nicedb, tablePathId, streamPathId);
+}
+
+void TCdcStreamScanManager::Enqueue(const TPathId& streamPathId, ui64 txId, ui64 scanId) {
+ Y_VERIFY(Scans.contains(streamPathId));
+ auto& info = Scans.at(streamPathId);
+ info.TxId = txId;
+ info.ScanId = scanId;
+ TxIdToPathId[txId] = streamPathId;
+}
+
+void TCdcStreamScanManager::Register(ui64 txId, const TActorId& actorId) {
+ Y_VERIFY(TxIdToPathId.contains(txId));
+ Scans[TxIdToPathId.at(txId)].ActorId = actorId;
+}
+
+void TCdcStreamScanManager::Complete(const TPathId& streamPathId) {
+ auto it = Scans.find(streamPathId);
+ if (it == Scans.end()) {
+ return;
+ }
+
+ TxIdToPathId.erase(it->second.TxId);
+ Scans.erase(it);
+}
+
+void TCdcStreamScanManager::Complete(ui64 txId) {
+ Y_VERIFY(TxIdToPathId.contains(txId));
+ Complete(TxIdToPathId.at(txId));
+}
+
+TCdcStreamScanManager::TScanInfo* TCdcStreamScanManager::Get(const TPathId& streamPathId) {
+ return Scans.FindPtr(streamPathId);
+}
+
+const TCdcStreamScanManager::TScanInfo* TCdcStreamScanManager::Get(const TPathId& streamPathId) const {
+ return Scans.FindPtr(streamPathId);
+}
+
+bool TCdcStreamScanManager::Has(const TPathId& streamPathId) const {
+ return Scans.contains(streamPathId);
+}
+
+bool TCdcStreamScanManager::Has(ui64 txId) const {
+ return TxIdToPathId.contains(txId);
+}
+
+ui32 TCdcStreamScanManager::Size() const {
+ return Scans.size();
+}
+
+void TCdcStreamScanManager::PersistAdd(NIceDb::TNiceDb& db,
+ const TPathId& tablePathId, const TPathId& streamPathId, const TScanInfo& info)
+{
+ using Schema = TDataShard::Schema;
+ db.Table<Schema::CdcStreamScans>()
+ .Key(tablePathId.OwnerId, tablePathId.LocalPathId, streamPathId.OwnerId, streamPathId.LocalPathId)
+ .Update(
+ NIceDb::TUpdate<Schema::CdcStreamScans::SnapshotStep>(info.SnapshotVersion.Step),
+ NIceDb::TUpdate<Schema::CdcStreamScans::SnapshotTxId>(info.SnapshotVersion.TxId)
+ );
+}
+
+void TCdcStreamScanManager::PersistRemove(NIceDb::TNiceDb& db,
+ const TPathId& tablePathId, const TPathId& streamPathId)
+{
+ using Schema = TDataShard::Schema;
+ db.Table<Schema::CdcStreamScans>()
+ .Key(tablePathId.OwnerId, tablePathId.LocalPathId, streamPathId.OwnerId, streamPathId.LocalPathId)
+ .Delete();
+}
+
+void TCdcStreamScanManager::PersistProgress(NIceDb::TNiceDb& db,
+ const TPathId& tablePathId, const TPathId& streamPathId, const TScanInfo& info)
+{
+ using Schema = TDataShard::Schema;
+ db.Table<Schema::CdcStreamScans>()
+ .Key(tablePathId.OwnerId, tablePathId.LocalPathId, streamPathId.OwnerId, streamPathId.LocalPathId)
+ .Update(
+ NIceDb::TUpdate<Schema::CdcStreamScans::LastKey>(info.LastKey->GetBuffer()),
+ NIceDb::TUpdate<Schema::CdcStreamScans::RowsProcessed>(info.Stats.RowsProcessed),
+ NIceDb::TUpdate<Schema::CdcStreamScans::BytesProcessed>(info.Stats.BytesProcessed)
+ );
+}
+
+class TDataShard::TTxCdcStreamScanProgress
+ : public TTransactionBase<TDataShard>
+ , protected TChangeRecordBodySerializer
+{
+ TDataShard::TEvPrivate::TEvCdcStreamScanProgress::TPtr Request;
+ THolder<TDataShard::TEvPrivate::TEvCdcStreamScanContinue> Response;
+ TVector<IDataShardChangeCollector::TChange> ChangeRecords;
+
+ static TVector<TRawTypeValue> MakeKey(TArrayRef<const TCell> cells, TUserTable::TCPtr table) {
+ TVector<TRawTypeValue> key(Reserve(cells.size()));
+
+ Y_VERIFY(cells.size() == table->KeyColumnTypes.size());
+ for (TPos pos = 0; pos < cells.size(); ++pos) {
+ key.emplace_back(cells.at(pos).AsRef(), table->KeyColumnTypes.at(pos));
+ }
+
+ return key;
+ }
+
+ static TVector<TUpdateOp> MakeUpdates(TArrayRef<const TCell> cells, TArrayRef<const TTag> tags, TUserTable::TCPtr table) {
+ TVector<TUpdateOp> updates(Reserve(cells.size()));
+
+ Y_VERIFY(cells.size() == tags.size());
+ for (TPos pos = 0; pos < cells.size(); ++pos) {
+ const auto tag = tags.at(pos);
+ auto it = table->Columns.find(tag);
+ Y_VERIFY(it != table->Columns.end());
+ updates.emplace_back(tag, ECellOp::Set, TRawTypeValue(cells.at(pos).AsRef(), it->second.Type));
+ }
+
+ return updates;
+ }
+
+ static TRowState MakeRow(TArrayRef<const TCell> cells) {
+ TRowState row(cells.size());
+
+ row.Touch(ERowOp::Upsert);
+ for (TPos pos = 0; pos < cells.size(); ++pos) {
+ row.Set(pos, ECellOp::Set, cells.at(pos));
+ }
+
+ return row;
+ }
+
+public:
+ explicit TTxCdcStreamScanProgress(TDataShard* self, TDataShard::TEvPrivate::TEvCdcStreamScanProgress::TPtr ev)
+ : TBase(self)
+ , Request(ev)
+ {
+ }
+
+ TTxType GetTxType() const override { return TXTYPE_CDC_STREAM_SCAN_PROGRESS; }
+
+ bool Execute(TTransactionContext& txc, const TActorContext& ctx) override {
+ const auto& ev = *Request->Get();
+ const auto& tablePathId = ev.TablePathId;
+ const auto& streamPathId = ev.StreamPathId;
+ const auto& readVersion = ev.ReadVersion;
+ const auto& valueTags = ev.ValueTags;
+
+ LOG_D("Progress"
+ << ": streamPathId# " << streamPathId);
+
+ if (Self->CheckChangesQueueOverflow()) {
+ return true;
+ }
+
+ Y_VERIFY(Self->GetUserTables().contains(tablePathId.LocalPathId));
+ auto table = Self->GetUserTables().at(tablePathId.LocalPathId);
+
+ auto it = table->CdcStreams.find(streamPathId);
+ Y_VERIFY(it != table->CdcStreams.end());
+
+ NIceDb::TNiceDb db(txc.DB);
+ for (const auto& [k, v] : ev.Rows) {
+ const auto key = MakeKey(k.GetCells(), table);
+ const auto& keyTags = table->KeyColumnIds;
+
+ TRowState row(0);
+ TSelectStats stats;
+ auto ready = txc.DB.Select(table->LocalTid, key, {}, row, stats, 0, readVersion);
+ if (ready == EReady::Page) {
+ return false;
+ }
+
+ if (ready == EReady::Gone || stats.InvisibleRowSkips) {
+ continue;
+ }
+
+ NKikimrChangeExchange::TChangeRecord::TDataChange body;
+ switch (it->second.Mode) {
+ case NKikimrSchemeOp::ECdcStreamModeKeysOnly:
+ Serialize(body, ERowOp::Upsert, key, keyTags, {});
+ break;
+ case NKikimrSchemeOp::ECdcStreamModeUpdate:
+ Serialize(body, ERowOp::Upsert, key, keyTags, MakeUpdates(v.GetCells(), valueTags, table));
+ break;
+ case NKikimrSchemeOp::ECdcStreamModeNewImage:
+ case NKikimrSchemeOp::ECdcStreamModeNewAndOldImages: {
+ const auto newImage = MakeRow(v.GetCells());
+ Serialize(body, ERowOp::Upsert, key, keyTags, nullptr, &newImage, valueTags);
+ break;
+ }
+ case NKikimrSchemeOp::ECdcStreamModeOldImage: {
+ const auto oldImage = MakeRow(v.GetCells());
+ Serialize(body, ERowOp::Upsert, key, keyTags, &oldImage, nullptr, valueTags);
+ break;
+ }
+ default:
+ Y_FAIL_S("Invalid stream mode: " << static_cast<ui32>(it->second.Mode));
+ }
+
+ auto record = TChangeRecordBuilder(TChangeRecord::EKind::CdcDataChange)
+ .WithOrder(Self->AllocateChangeRecordOrder(db))
+ .WithGroup(0)
+ .WithStep(readVersion.Step)
+ .WithTxId(readVersion.TxId)
+ .WithPathId(streamPathId)
+ .WithTableId(tablePathId)
+ .WithSchemaVersion(table->GetTableSchemaVersion())
+ .WithBody(body.SerializeAsString())
+ .Build();
+
+ ChangeRecords.push_back(IDataShardChangeCollector::TChange{
+ .Order = record.GetOrder(),
+ .Group = record.GetGroup(),
+ .Step = record.GetStep(),
+ .TxId = record.GetTxId(),
+ .PathId = record.GetPathId(),
+ .BodySize = record.GetBody().size(),
+ .TableId = record.GetTableId(),
+ .SchemaVersion = record.GetSchemaVersion(),
+ });
+
+ Self->PersistChangeRecord(db, record);
+ }
+
+ if (ev.Rows) {
+ const auto& [key, _] = ev.Rows.back();
+
+ auto* info = Self->CdcStreamScanManager.Get(streamPathId);
+ Y_VERIFY(info);
+
+ info->LastKey = key;
+ info->Stats = ev.Stats;
+ Self->CdcStreamScanManager.PersistProgress(db, tablePathId, streamPathId, *info);
+ }
+
+ Response = MakeHolder<TDataShard::TEvPrivate::TEvCdcStreamScanContinue>();
+ return true;
+ }
+
+ void Complete(const TActorContext& ctx) override {
+ if (Response) {
+ LOG_I("Enqueue " << ChangeRecords.size() << " change record(s)"
+ << ": streamPathId# " << Request->Get()->StreamPathId);
+
+ Self->EnqueueChangeRecords(std::move(ChangeRecords));
+ ctx.Send(Request->Sender, Response.Release());
+ } else {
+ LOG_I("Re-run progress tx"
+ << ": streamPathId# " << Request->Get()->StreamPathId);
+
+ // re-schedule tx
+ ctx.Schedule(TDuration::Seconds(1), Request->Release().Release());
+ }
+ }
+
+}; // TTxCdcStreamScanProgress
+
+class TCdcStreamScan: public IActorCallback, public IScan {
+ using TStats = TCdcStreamScanManager::TStats;
+
+ struct TDataShardId {
+ TActorId ActorId;
+ ui64 TabletId;
+ };
+
+ struct TLimits {
+ ui32 BatchMaxBytes;
+ ui32 BatchMinRows;
+ ui32 BatchMaxRows;
+
+ TLimits(const NKikimrTxDataShard::TEvCdcStreamScanRequest::TLimits& proto)
+ : BatchMaxBytes(proto.GetBatchMaxBytes())
+ , BatchMinRows(proto.GetBatchMinRows())
+ , BatchMaxRows(proto.GetBatchMaxRows())
+ {
+ }
+ };
+
+ class TBuffer {
+ public:
+ void AddRow(TArrayRef<const TCell> key, TArrayRef<const TCell> value) {
+ const auto& [k, v] = Data.emplace_back(
+ TSerializedCellVec(TSerializedCellVec::Serialize(key)),
+ TSerializedCellVec(TSerializedCellVec::Serialize(value))
+ );
+ ByteSize += k.GetBuffer().size() + v.GetBuffer().size();
+ }
+
+ auto&& Flush() {
+ ByteSize = 0;
+ return std::move(Data);
+ }
+
+ ui64 Bytes() const {
+ return ByteSize;
+ }
+
+ ui64 Rows() const {
+ return Data.size();
+ }
+
+ explicit operator bool() const {
+ return !Data.empty();
+ }
+
+ private:
+ TVector<std::pair<TSerializedCellVec, TSerializedCellVec>> Data; // key & value (if any)
+ ui64 ByteSize = 0;
+ };
+
+ STATEFN(StateWork) {
+ switch (ev->GetTypeRewrite()) {
+ hFunc(TEvDataShard::TEvCdcStreamScanRequest, Handle);
+ hFunc(TDataShard::TEvPrivate::TEvCdcStreamScanContinue, Handle);
+ }
+ }
+
+ void Handle(TEvDataShard::TEvCdcStreamScanRequest::TPtr& ev) {
+ ReplyTo = ev->Sender;
+ Reply(NKikimrTxDataShard::TEvCdcStreamScanResponse::IN_PROGRESS);
+ }
+
+ void Progress() {
+ Stats.RowsProcessed += Buffer.Rows();
+ Stats.BytesProcessed += Buffer.Bytes();
+
+ Send(DataShard.ActorId, new TDataShard::TEvPrivate::TEvCdcStreamScanProgress(
+ TablePathId, StreamPathId, ReadVersion, ValueTags, std::move(Buffer.Flush()), Stats
+ ));
+ }
+
+ void Handle(TDataShard::TEvPrivate::TEvCdcStreamScanContinue::TPtr&) {
+ Driver->Touch(NoMoreData ? EScan::Final : EScan::Feed);
+ }
+
+ void Reply(NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus status, const TString& error = {}) {
+ auto response = MakeHolder<TEvDataShard::TEvCdcStreamScanResponse>();
+
+ response->Record.SetTabletId(DataShard.TabletId);
+ PathIdFromPathId(TablePathId, response->Record.MutableTablePathId());
+ PathIdFromPathId(StreamPathId, response->Record.MutableStreamPathId());
+ response->Record.SetStatus(status);
+ response->Record.SetErrorDescription(error);
+ response->Record.MutableStats()->SetRowsProcessed(Stats.RowsProcessed);
+ response->Record.MutableStats()->SetBytesProcessed(Stats.BytesProcessed);
+
+ Send(ReplyTo, std::move(response));
+ }
+
+public:
+ explicit TCdcStreamScan(const TDataShard* const self, const TActorId& replyTo, ui64 txId,
+ const TPathId& tablePathId, const TPathId& streamPathId, const TRowVersion& readVersion,
+ const TVector<TTag>& valueTags, const TMaybe<TSerializedCellVec>& lastKey,
+ const TStats& stats, const TLimits& limits)
+ : IActorCallback(static_cast<TReceiveFunc>(&TCdcStreamScan::StateWork), NKikimrServices::TActivity::CDC_STREAM_SCAN_ACTOR)
+ , DataShard{self->SelfId(), self->TabletID()}
+ , ReplyTo(replyTo)
+ , TxId(txId)
+ , TablePathId(tablePathId)
+ , StreamPathId(streamPathId)
+ , ReadVersion(readVersion)
+ , ValueTags(valueTags)
+ , LastKey(lastKey)
+ , Limits(limits)
+ , Driver(nullptr)
+ , NoMoreData(false)
+ , Stats(stats)
+ {
+ }
+
+ void Describe(IOutputStream& o) const noexcept override {
+ o << "CdcStreamScan {"
+ << " TxId: " << TxId
+ << " TablePathId: " << TablePathId
+ << " StreamPathId: " << StreamPathId
+ << " }";
+ }
+
+ IScan::TInitialState Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
+ TlsActivationContext->AsActorContext().RegisterWithSameMailbox(this);
+ Driver = driver;
+ Y_VERIFY(!LastKey || LastKey->GetCells().size() == scheme->Tags(true).size());
+ return {EScan::Feed, {}};
+ }
+
+ void Registered(TActorSystem* sys, const TActorId&) override {
+ sys->Send(DataShard.ActorId, new TDataShard::TEvPrivate::TEvCdcStreamScanRegistered(TxId, SelfId()));
+ }
+
+ EScan Seek(TLead& lead, ui64) noexcept override {
+ if (LastKey) {
+ lead.To(ValueTags, LastKey->GetCells(), ESeek::Upper);
+ } else {
+ lead.To(ValueTags, {}, ESeek::Lower);
+ }
+
+ return EScan::Feed;
+ }
+
+ EScan Feed(TArrayRef<const TCell> key, const TRow& row) noexcept override {
+ Buffer.AddRow(key, *row);
+ if (Buffer.Bytes() < Limits.BatchMaxBytes) {
+ if (Buffer.Rows() < Limits.BatchMaxRows) {
+ return EScan::Feed;
+ }
+ } else {
+ if (Buffer.Rows() < Limits.BatchMinRows) {
+ return EScan::Feed;
+ }
+ }
+
+ Progress();
+ return EScan::Sleep;
+ }
+
+ EScan Exhausted() noexcept override {
+ NoMoreData = true;
+
+ if (!Buffer) {
+ return EScan::Final;
+ }
+
+ Progress();
+ return EScan::Sleep;
+ }
+
+ TAutoPtr<IDestructable> Finish(EAbort abort) noexcept override {
+ if (abort != EAbort::None) {
+ Reply(NKikimrTxDataShard::TEvCdcStreamScanResponse::ABORTED);
+ } else {
+ Reply(NKikimrTxDataShard::TEvCdcStreamScanResponse::DONE);
+ }
+
+ PassAway();
+ return nullptr;
+ }
+
+private:
+ const TDataShardId DataShard;
+ TActorId ReplyTo;
+ const ui64 TxId;
+ const TPathId TablePathId;
+ const TPathId StreamPathId;
+ const TRowVersion ReadVersion;
+ const TVector<TTag> ValueTags;
+ const TMaybe<TSerializedCellVec> LastKey;
+ const TLimits Limits;
+
+ IDriver* Driver;
+ bool NoMoreData;
+ TBuffer Buffer;
+ TStats Stats;
+
+}; // TCdcStreamScan
+
+class TDataShard::TTxCdcStreamScanRun: public TTransactionBase<TDataShard> {
+ TEvDataShard::TEvCdcStreamScanRequest::TPtr Request;
+ THolder<IEventHandle> Response; // response to sender or forward to scanner
+
+ THolder<IEventHandle> MakeResponse(const TActorContext& ctx,
+ NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus status, const TString& error = {}) const
+ {
+ return MakeHolder<IEventHandle>(Request->Sender, ctx.SelfID, new TEvDataShard::TEvCdcStreamScanResponse(
+ Request->Get()->Record, Self->TabletID(), status, error
+ ));
+ }
+
+public:
+ explicit TTxCdcStreamScanRun(TDataShard* self, TEvDataShard::TEvCdcStreamScanRequest::TPtr ev)
+ : TBase(self)
+ , Request(ev)
+ {
+ }
+
+ TTxType GetTxType() const override { return TXTYPE_CDC_STREAM_SCAN_RUN; }
+
+ bool Execute(TTransactionContext&, const TActorContext& ctx) override {
+ const auto& record = Request->Get()->Record;
+
+ LOG_D("Run"
+ << ": ev# " << record.ShortDebugString());
+
+ const auto tablePathId = PathIdFromPathId(record.GetTablePathId());
+ if (!Self->GetUserTables().contains(tablePathId.LocalPathId)) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::BAD_REQUEST,
+ TStringBuilder() << "Unknown table"
+ << ": tablePathId# " << tablePathId);
+ return true;
+ }
+
+ auto table = Self->GetUserTables().at(tablePathId.LocalPathId);
+ if (record.GetTableSchemaVersion() != table->GetTableSchemaVersion()) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::SCHEME_ERROR,
+ TStringBuilder() << "Schema version mismatch"
+ << ": tablePathId# " << tablePathId
+ << ", got# " << record.GetTableSchemaVersion()
+ << ", expected# " << table->GetTableSchemaVersion());
+ return true;
+ }
+
+ const auto streamPathId = PathIdFromPathId(record.GetStreamPathId());
+ auto it = table->CdcStreams.find(streamPathId);
+ if (it == table->CdcStreams.end()) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::SCHEME_ERROR,
+ TStringBuilder() << "Unknown stream"
+ << ": tablePathId# " << tablePathId
+ << ", streamPathId# " << streamPathId);
+ return true;
+ }
+
+ if (it->second.State != NKikimrSchemeOp::ECdcStreamStateScan) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::SCHEME_ERROR,
+ TStringBuilder() << "Unexpected stream state"
+ << ": tablePathId# " << tablePathId
+ << ", streamPathId# " << streamPathId
+ << ", state# " << it->second.State);
+ return true;
+ }
+
+ if (const auto* info = Self->CdcStreamScanManager.Get(streamPathId)) {
+ if (const auto& to = info->ActorId) {
+ Response = Request->Forward(to);
+ return true;
+ } else if (info->ScanId) {
+ return true; // nop, scan actor will report state when it starts
+ }
+ } else if (Self->CdcStreamScanManager.Size()) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::OVERLOADED);
+ return true;
+ }
+
+ if (!record.HasSnapshotStep()) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::BAD_REQUEST,
+ "SnapshotStep was not specified");
+ return true;
+ }
+
+ if (!record.HasSnapshotTxId()) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::BAD_REQUEST,
+ "SnapshotTxId was not specified");
+ return true;
+ }
+
+ const TSnapshotKey snapshotKey(tablePathId, record.GetSnapshotStep(), record.GetSnapshotTxId());
+ if (!Self->SnapshotManager.FindAvailable(snapshotKey)) {
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::BAD_REQUEST,
+ TStringBuilder() << "Snapshot was not found"
+ << ": key# " << snapshotKey.ToTuple());
+ return true;
+ }
+
+ TVector<TTag> valueTags;
+ if (it->second.Mode != NKikimrSchemeOp::ECdcStreamModeKeysOnly) {
+ valueTags.reserve(table->Columns.size() - 1);
+ for (const auto& [tag, column] : table->Columns) {
+ if (!column.IsKey) {
+ valueTags.push_back(tag);
+ }
+ }
+ }
+
+ const auto* info = Self->CdcStreamScanManager.Get(streamPathId);
+ Y_VERIFY(info);
+
+ auto* appData = AppData(ctx);
+ const auto& taskName = appData->DataShardConfig.GetCdcInitialScanTaskName();
+ const auto taskPrio = appData->DataShardConfig.GetCdcInitialScanTaskPriority();
+
+ const auto snapshotVersion = TRowVersion(snapshotKey.Step, snapshotKey.TxId);
+ Y_VERIFY(info->SnapshotVersion == snapshotVersion);
+
+ // Note: cdc stream is added with a schema transaction and those wait for volatile txs
+ Y_VERIFY(!Self->GetVolatileTxManager().HasVolatileTxsAtSnapshot(snapshotVersion));
+
+ const ui64 localTxId = ++Self->NextTieBreakerIndex;
+ auto scan = MakeHolder<TCdcStreamScan>(Self, Request->Sender, localTxId,
+ tablePathId, streamPathId, snapshotVersion, valueTags, info->LastKey, info->Stats, record.GetLimits());
+ const ui64 scanId = Self->QueueScan(table->LocalTid, scan.Release(), localTxId,
+ TScanOptions()
+ .SetResourceBroker(taskName, taskPrio)
+ .SetSnapshotRowVersion(snapshotVersion)
+ );
+ Self->CdcStreamScanManager.Enqueue(streamPathId, localTxId, scanId);
+
+ LOG_I("Run scan"
+ << ": streamPathId# " << streamPathId);
+
+ Response = MakeResponse(ctx, NKikimrTxDataShard::TEvCdcStreamScanResponse::ACCEPTED);
+ return true;
+ }
+
+ void Complete(const TActorContext& ctx) override {
+ if (Response) {
+ ctx.Send(Response.Release());
+ }
+ }
+
+}; // TTxCdcStreamScanRun
+
+void TDataShard::Handle(TEvDataShard::TEvCdcStreamScanRequest::TPtr& ev, const TActorContext& ctx) {
+ Execute(new TTxCdcStreamScanRun(this, ev), ctx);
+}
+
+void TDataShard::Handle(TEvPrivate::TEvCdcStreamScanRegistered::TPtr& ev, const TActorContext& ctx) {
+ if (!CdcStreamScanManager.Has(ev->Get()->TxId)) {
+ LOG_W("Unknown cdc stream scan actor registered"
+ << ": at: " << TabletID());
+ return;
+ }
+
+ CdcStreamScanManager.Register(ev->Get()->TxId, ev->Get()->ActorId);
+}
+
+void TDataShard::Handle(TEvPrivate::TEvCdcStreamScanProgress::TPtr& ev, const TActorContext& ctx) {
+ Execute(new TTxCdcStreamScanProgress(this, ev), ctx);
+}
+
+}
diff --git a/ydb/core/tx/datashard/cdc_stream_scan.h b/ydb/core/tx/datashard/cdc_stream_scan.h
new file mode 100644
index 0000000000..c8be61ded2
--- /dev/null
+++ b/ydb/core/tx/datashard/cdc_stream_scan.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include <library/cpp/actors/core/actor.h>
+
+#include <ydb/core/base/pathid.h>
+#include <ydb/core/scheme/scheme_tablecell.h>
+#include <ydb/core/tablet_flat/flat_cxx_database.h>
+
+#include <util/generic/hash.h>
+#include <util/generic/maybe.h>
+
+namespace NKikimr::NDataShard {
+
+class TCdcStreamScanManager {
+public:
+ struct TStats {
+ ui64 RowsProcessed = 0;
+ ui64 BytesProcessed = 0;
+ };
+
+private:
+ struct TScanInfo {
+ TRowVersion SnapshotVersion;
+ ui64 TxId = 0;
+ ui64 ScanId = 0;
+ NActors::TActorId ActorId;
+ TMaybe<TSerializedCellVec> LastKey;
+ TStats Stats;
+ };
+
+public:
+ void Reset();
+ bool Load(NIceDb::TNiceDb& db);
+ void Add(NTable::TDatabase& db, const TPathId& tablePathId, const TPathId& streamPathId, const TRowVersion& snapshotVersion);
+ void Forget(NTable::TDatabase& db, const TPathId& tablePathId, const TPathId& streamPathId);
+
+ void Enqueue(const TPathId& streamPathId, ui64 txId, ui64 scanId);
+ void Register(ui64 txId, const NActors::TActorId& actorId);
+
+ void Complete(const TPathId& streamPathId);
+ void Complete(ui64 txId);
+
+ TScanInfo* Get(const TPathId& streamPathId);
+ const TScanInfo* Get(const TPathId& streamPathId) const;
+
+ bool Has(const TPathId& streamPathId) const;
+ bool Has(ui64 txId) const;
+
+ ui32 Size() const;
+
+ void PersistAdd(NIceDb::TNiceDb& db,
+ const TPathId& tablePathId, const TPathId& streamPathId, const TScanInfo& info);
+ void PersistRemove(NIceDb::TNiceDb& db,
+ const TPathId& tablePathId, const TPathId& streamPathId);
+ void PersistProgress(NIceDb::TNiceDb& db,
+ const TPathId& tablePathId, const TPathId& streamPathId, const TScanInfo& info);
+
+private:
+ THashMap<TPathId, TScanInfo> Scans;
+ THashMap<ui64, TPathId> TxIdToPathId;
+};
+
+}
diff --git a/ydb/core/tx/datashard/change_collector.cpp b/ydb/core/tx/datashard/change_collector.cpp
index 939f1476be..facc452aab 100644
--- a/ydb/core/tx/datashard/change_collector.cpp
+++ b/ydb/core/tx/datashard/change_collector.cpp
@@ -11,10 +11,14 @@ namespace NDataShard {
using namespace NMiniKQL;
-class TChangeCollectorProxy: public IDataShardChangeCollector {
+class TChangeCollectorProxy
+ : public IDataShardChangeCollector
+ , public IBaseChangeCollectorSink
+{
public:
- TChangeCollectorProxy(TDataShard& dataShard, bool isImmediateTx)
- : DataShard(dataShard)
+ TChangeCollectorProxy(TDataShard* self, NTable::TDatabase& db, bool isImmediateTx)
+ : Self(self)
+ , Db(db)
{
if (!isImmediateTx) {
Group = 0;
@@ -25,6 +29,14 @@ public:
Underlying.emplace_back(std::move(collector));
}
+ void OnRestart() override {
+ for (auto& collector : Underlying) {
+ collector->OnRestart();
+ }
+
+ Collected.clear();
+ }
+
bool NeedToReadKeys() const override {
for (const auto& collector : Underlying) {
if (collector->NeedToReadKeys()) {
@@ -35,28 +47,28 @@ public:
return false;
}
- void SetReadVersion(const TRowVersion& readVersion) override {
- for (auto& collector : Underlying) {
- collector->SetReadVersion(readVersion);
- }
- }
-
- void SetWriteVersion(const TRowVersion& writeVersion) override {
+ bool OnUpdate(const TTableId& tableId, ui32 localTid, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates,
+ const TRowVersion& writeVersion) override
+ {
+ Y_UNUSED(localTid);
WriteVersion = writeVersion;
+ WriteTxId = 0;
for (auto& collector : Underlying) {
- collector->SetWriteVersion(writeVersion);
+ if (!collector->Collect(tableId, rop, key, updates)) {
+ return false;
+ }
}
- }
- void SetWriteTxId(ui64 txId) override {
- for (auto& collector : Underlying) {
- collector->SetWriteTxId(txId);
- }
+ return true;
}
- bool Collect(const TTableId& tableId, NTable::ERowOp rop,
- TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates) override
+ bool OnUpdateTx(const TTableId& tableId, ui32 localTid, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates,
+ ui64 writeTxId) override
{
+ Y_UNUSED(localTid);
+ WriteTxId = writeTxId;
for (auto& collector : Underlying) {
if (!collector->Collect(tableId, rop, key, updates)) {
return false;
@@ -67,80 +79,93 @@ public:
}
const TVector<TChange>& GetCollected() const override {
- CollectedBuf.clear();
-
- if (!LockChanges.empty()) {
- std::copy(LockChanges.begin(), LockChanges.end(), std::back_inserter(CollectedBuf));
- }
-
- for (const auto& collector : Underlying) {
- const auto& collected = collector->GetCollected();
- std::copy(collected.begin(), collected.end(), std::back_inserter(CollectedBuf));
- }
-
- return CollectedBuf;
+ return Collected;
}
TVector<TChange>&& GetCollected() override {
- CollectedBuf.clear();
+ return std::move(Collected);
+ }
- if (!LockChanges.empty()) {
- std::move(LockChanges.begin(), LockChanges.end(), std::back_inserter(CollectedBuf));
- }
+ void CommitLockChanges(ui64 lockId, const TRowVersion& writeVersion) override {
+ NIceDb::TNiceDb db(Db);
- for (auto& collector : Underlying) {
- auto collected = std::move(collector->GetCollected());
- std::move(collected.begin(), collected.end(), std::back_inserter(CollectedBuf));
+ if (!Group) {
+ Group = Self->AllocateChangeRecordGroup(db);
}
- return std::move(CollectedBuf);
+ Self->CommitLockChangeRecords(db, lockId, *Group, writeVersion, Collected);
}
- void Reset() override {
- for (auto& collector : Underlying) {
- collector->Reset();
- }
-
- CollectedBuf.clear();
+ TVersionState GetVersionState() override {
+ return TVersionState{
+ .WriteVersion = WriteVersion,
+ .WriteTxId = WriteTxId,
+ };
}
- void CommitLockChanges(ui64 lockId, const TVector<TChange>& changes, TTransactionContext& txc) override {
- if (changes.empty()) {
- return;
- }
+ void SetVersionState(const TVersionState& state) override {
+ WriteVersion = state.WriteVersion;
+ WriteTxId = state.WriteTxId;
+ }
- NIceDb::TNiceDb db(txc.DB);
+ void AddChange(const TTableId& tableId, const TPathId& pathId, TChangeRecord::EKind kind, const TDataChange& body) override {
+ NIceDb::TNiceDb db(Db);
- ui64 count = changes.back().LockOffset + 1;
- ui64 order = DataShard.AllocateChangeRecordOrder(db, count);
+ Y_VERIFY_S(Self->IsUserTable(tableId), "Unknown table: " << tableId);
+ auto userTable = Self->GetUserTables().at(tableId.PathId.LocalPathId);
+ Y_VERIFY(userTable->GetTableSchemaVersion());
- if (!Group) {
- Group = DataShard.AllocateChangeRecordGroup(db);
- for (auto& collector : Underlying) {
- collector->SetGroup(*Group);
+ TChangeRecordBuilder builder(kind);
+ if (!WriteTxId) {
+ if (!Group) {
+ Group = Self->AllocateChangeRecordGroup(db);
}
+ builder
+ .WithOrder(Self->AllocateChangeRecordOrder(db))
+ .WithGroup(*Group)
+ .WithStep(WriteVersion.Step)
+ .WithTxId(WriteVersion.TxId);
+ } else {
+ ui64 lockOffset = Self->GetNextChangeRecordLockOffset(WriteTxId);
+ builder
+ .WithLockId(WriteTxId)
+ .WithLockOffset(lockOffset);
}
- LockChanges.reserve(LockChanges.size() + changes.size());
- for (const auto& change : changes) {
- TChange fixed = change;
- fixed.Order = order + change.LockOffset;
- fixed.Group = *Group;
- fixed.Step = WriteVersion.Step;
- fixed.TxId = WriteVersion.TxId;
- LockChanges.push_back(fixed);
+ auto record = builder
+ .WithPathId(pathId)
+ .WithTableId(tableId.PathId)
+ .WithSchemaVersion(userTable->GetTableSchemaVersion())
+ .WithBody(body.SerializeAsString())
+ .Build();
+
+ Self->PersistChangeRecord(db, record);
+ if (record.GetLockId() == 0) {
+ Collected.push_back(TChange{
+ .Order = record.GetOrder(),
+ .Group = record.GetGroup(),
+ .Step = record.GetStep(),
+ .TxId = record.GetTxId(),
+ .PathId = record.GetPathId(),
+ .BodySize = record.GetBody().size(),
+ .TableId = record.GetTableId(),
+ .SchemaVersion = record.GetSchemaVersion(),
+ .LockId = record.GetLockId(),
+ .LockOffset = record.GetLockOffset(),
+ });
}
-
- DataShard.PersistCommitLockChangeRecords(txc, order, lockId, *Group, WriteVersion);
}
private:
- TDataShard& DataShard;
+ TDataShard* Self;
+ NTable::TDatabase& Db;
+
TMaybe<ui64> Group;
- TRowVersion WriteVersion = TRowVersion::Min();
TVector<THolder<IBaseChangeCollector>> Underlying;
- TVector<TChange> LockChanges;
- mutable TVector<TChange> CollectedBuf;
+ TVector<TChange> Collected;
+
+ TRowVersion WriteVersion;
+ ui64 WriteTxId = 0;
}; // TChangeCollectorProxy
@@ -152,14 +177,14 @@ IDataShardChangeCollector* CreateChangeCollector(TDataShard& dataShard, IDataSha
return nullptr;
}
- auto proxy = MakeHolder<TChangeCollectorProxy>(dataShard, isImmediateTx);
+ auto proxy = MakeHolder<TChangeCollectorProxy>(&dataShard, db, isImmediateTx);
if (hasAsyncIndexes) {
- proxy->AddUnderlying(MakeHolder<TAsyncIndexChangeCollector>(&dataShard, userDb, db, isImmediateTx));
+ proxy->AddUnderlying(MakeHolder<TAsyncIndexChangeCollector>(&dataShard, userDb, *proxy));
}
if (hasCdcStreams) {
- proxy->AddUnderlying(MakeHolder<TCdcStreamChangeCollector>(&dataShard, userDb, db, isImmediateTx));
+ proxy->AddUnderlying(MakeHolder<TCdcStreamChangeCollector>(&dataShard, userDb, *proxy));
}
return proxy.Release();
@@ -173,3 +198,13 @@ IDataShardChangeCollector* CreateChangeCollector(TDataShard& dataShard, IDataSha
} // NDataShard
} // NKikimr
+
+Y_DECLARE_OUT_SPEC(, NKikimr::NDataShard::IDataShardChangeCollector::TChange, o, x) {
+ o << "{"
+ << " Order: " << x.Order
+ << " PathId: " << x.PathId
+ << " BodySize: " << x.BodySize
+ << " TableId: " << x.TableId
+ << " SchemaVersion: " << x.SchemaVersion
+ << " }";
+}
diff --git a/ydb/core/tx/datashard/change_collector.h b/ydb/core/tx/datashard/change_collector.h
index cad92e8109..4ebc6742b6 100644
--- a/ydb/core/tx/datashard/change_collector.h
+++ b/ydb/core/tx/datashard/change_collector.h
@@ -13,7 +13,28 @@ class IDataShardUserDb;
class IDataShardChangeCollector : public NMiniKQL::IChangeCollector {
public:
- virtual void CommitLockChanges(ui64 lockId, const TVector<TChange>& changes, NTabletFlatExecutor::TTransactionContext& txc) = 0;
+ // basic change record's info
+ struct TChange {
+ ui64 Order;
+ ui64 Group;
+ ui64 Step;
+ ui64 TxId;
+ TPathId PathId;
+ ui64 BodySize;
+ TPathId TableId;
+ ui64 SchemaVersion;
+ ui64 LockId = 0;
+ ui64 LockOffset = 0;
+ };
+
+public:
+ virtual void OnRestart() = 0;
+ virtual bool NeedToReadKeys() const = 0;
+
+ virtual void CommitLockChanges(ui64 lockId, const TRowVersion& writeVersion) = 0;
+
+ virtual const TVector<TChange>& GetCollected() const = 0;
+ virtual TVector<TChange>&& GetCollected() = 0;
};
IDataShardChangeCollector* CreateChangeCollector(TDataShard& dataShard, IDataShardUserDb& userDb, NTable::TDatabase& db, const TUserTable& table, bool isImmediateTx);
diff --git a/ydb/core/tx/datashard/change_collector_async_index.cpp b/ydb/core/tx/datashard/change_collector_async_index.cpp
index 5fb94c3830..8f899d9321 100644
--- a/ydb/core/tx/datashard/change_collector_async_index.cpp
+++ b/ydb/core/tx/datashard/change_collector_async_index.cpp
@@ -59,12 +59,12 @@ static THashMap<TTag, TPos> MakeTagToPos(const C& container, E extractor) {
return tagToPos;
}
-bool TAsyncIndexChangeCollector::NeedToReadKeys() const {
- return true;
+void TAsyncIndexChangeCollector::OnRestart() {
+ TBaseChangeCollector::OnRestart();
}
-void TAsyncIndexChangeCollector::SetReadVersion(const TRowVersion& readVersion) {
- ReadVersion = readVersion;
+bool TAsyncIndexChangeCollector::NeedToReadKeys() const {
+ return true;
}
bool TAsyncIndexChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
@@ -162,9 +162,16 @@ bool TAsyncIndexChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
if (updatedTagToPos.contains(tag)) {
needUpdate = true;
FillDataFromUpdate(tag, updatedTagToPos.at(tag), updates);
- } else if (rop == ERowOp::Reset) {
+ } else {
Y_VERIFY(userTable->Columns.contains(tag));
- FillDataWithNull(tag, userTable->Columns.at(tag).Type);
+ const auto& column = userTable->Columns.at(tag);
+
+ if (rop == ERowOp::Reset && !column.IsKey) {
+ FillDataWithNull(tag, column.Type);
+ } else {
+ Y_VERIFY(tagToPos.contains(tag));
+ FillDataFromRowState(tag, tagToPos.at(tag), row, column.Type);
+ }
}
}
@@ -179,10 +186,6 @@ bool TAsyncIndexChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
return true;
}
-void TAsyncIndexChangeCollector::Reset() {
- TBaseChangeCollector::Reset();
-}
-
auto TAsyncIndexChangeCollector::CacheTags(const TTableId& tableId) const {
Y_VERIFY(Self->GetUserTables().contains(tableId.PathId.LocalPathId));
auto userTable = Self->GetUserTables().at(tableId.PathId.LocalPathId);
@@ -254,6 +257,11 @@ void TAsyncIndexChangeCollector::FillKeyWithNull(TTag tag, NScheme::TTypeInfo ty
TagsSeen.insert(tag);
}
+void TAsyncIndexChangeCollector::FillDataFromRowState(TTag tag, TPos pos, const TRowState& rowState, NScheme::TTypeInfo type) {
+ Y_VERIFY(pos < rowState.Size());
+ IndexDataVals.emplace_back(tag, ECellOp::Set, TRawTypeValue(rowState.Get(pos).AsRef(), type));
+}
+
void TAsyncIndexChangeCollector::FillDataFromUpdate(TTag tag, TPos pos, TArrayRef<const TUpdateOp> updates) {
Y_VERIFY(pos < updates.size());
@@ -272,7 +280,7 @@ void TAsyncIndexChangeCollector::Persist(const TTableId& tableId, const TPathId&
{
NKikimrChangeExchange::TChangeRecord::TDataChange body;
Serialize(body, rop, key, keyTags, updates);
- TBaseChangeCollector::Persist(tableId, pathId, TChangeRecord::EKind::AsyncIndex, body);
+ Sink.AddChange(tableId, pathId, TChangeRecord::EKind::AsyncIndex, body);
}
void TAsyncIndexChangeCollector::Clear() {
diff --git a/ydb/core/tx/datashard/change_collector_async_index.h b/ydb/core/tx/datashard/change_collector_async_index.h
index 614cb0334c..6090674814 100644
--- a/ydb/core/tx/datashard/change_collector_async_index.h
+++ b/ydb/core/tx/datashard/change_collector_async_index.h
@@ -34,6 +34,7 @@ class TAsyncIndexChangeCollector: public TBaseChangeCollector {
void FillKeyFromKey(NTable::TTag tag, NTable::TPos pos, TArrayRef<const TRawTypeValue> key);
void FillKeyFromUpdate(NTable::TTag tag, NTable::TPos pos, TArrayRef<const NTable::TUpdateOp> updates);
void FillKeyWithNull(NTable::TTag tag, NScheme::TTypeInfo type);
+ void FillDataFromRowState(NTable::TTag tag, NTable::TPos pos, const NTable::TRowState& rowState, NScheme::TTypeInfo type);
void FillDataFromUpdate(NTable::TTag tag, NTable::TPos pos, TArrayRef<const NTable::TUpdateOp> updates);
void FillDataWithNull(NTable::TTag tag, NScheme::TTypeInfo type);
@@ -46,17 +47,13 @@ class TAsyncIndexChangeCollector: public TBaseChangeCollector {
public:
using TBaseChangeCollector::TBaseChangeCollector;
+ void OnRestart() override;
bool NeedToReadKeys() const override;
- void SetReadVersion(const TRowVersion& readVersion) override;
bool Collect(const TTableId& tableId, NTable::ERowOp rop,
TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates) override;
- void Reset() override;
-
private:
- TRowVersion ReadVersion;
-
mutable THashMap<TTableId, TCachedTags> CachedTags;
// reused between Collect() calls, cleared after every Clear() call
diff --git a/ydb/core/tx/datashard/change_collector_base.cpp b/ydb/core/tx/datashard/change_collector_base.cpp
index 2bbe8daf6e..e96369533f 100644
--- a/ydb/core/tx/datashard/change_collector_base.cpp
+++ b/ydb/core/tx/datashard/change_collector_base.cpp
@@ -11,177 +11,19 @@ namespace NDataShard {
using namespace NMiniKQL;
using namespace NTable;
-TBaseChangeCollector::TBaseChangeCollector(TDataShard* self, IDataShardUserDb& userDb, TDatabase& db, bool isImmediateTx)
+TBaseChangeCollector::TBaseChangeCollector(TDataShard* self, IDataShardUserDb& userDb, IBaseChangeCollectorSink& sink)
: Self(self)
, UserDb(userDb)
- , Db(db)
+ , Sink(sink)
{
- if (!isImmediateTx) {
- Group = 0;
- }
}
-bool TBaseChangeCollector::NeedToReadKeys() const {
- return false;
-}
-
-void TBaseChangeCollector::SetReadVersion(const TRowVersion& readVersion) {
- Y_UNUSED(readVersion);
-}
-
-void TBaseChangeCollector::SetWriteVersion(const TRowVersion& writeVersion) {
- WriteVersion = writeVersion;
-}
-
-void TBaseChangeCollector::SetWriteTxId(ui64 txId) {
- WriteTxId = txId;
-}
-
-void TBaseChangeCollector::SetGroup(ui64 group) {
- if (!Group) {
- Group = group;
- }
-}
-
-const TVector<IChangeCollector::TChange>& TBaseChangeCollector::GetCollected() const {
- return Collected;
+void TBaseChangeCollector::OnRestart() {
+ // nothing
}
-TVector<IChangeCollector::TChange>&& TBaseChangeCollector::GetCollected() {
- return std::move(Collected);
-}
-
-void TBaseChangeCollector::Reset() {
- Collected.clear();
-}
-
-void TBaseChangeCollector::SerializeCells(TSerializedCells& out, TArrayRef<const TRawTypeValue> in, TArrayRef<const TTag> tags) {
- Y_VERIFY_S(in.size() == tags.size(), "Count doesn't match"
- << ": in# " << in.size()
- << ", tags# " << tags.size());
-
- TVector<TCell> cells(Reserve(in.size()));
- for (size_t i = 0; i < in.size(); ++i) {
- out.AddTags(tags.at(i));
- cells.emplace_back(in.at(i).AsRef());
- }
-
- out.SetData(TSerializedCellVec::Serialize(cells));
-}
-
-void TBaseChangeCollector::SerializeCells(TSerializedCells& out, TArrayRef<const TUpdateOp> in) {
- if (!in) {
- return;
- }
-
- TVector<TCell> cells(Reserve(in.size()));
- for (const auto& op : in) {
- Y_VERIFY_S(op.Op == ECellOp::Set, "Unexpected cell op: " << op.Op.Raw());
-
- out.AddTags(op.Tag);
- cells.emplace_back(op.AsCell());
- }
-
- out.SetData(TSerializedCellVec::Serialize(cells));
-}
-
-void TBaseChangeCollector::SerializeCells(TSerializedCells& out, const TRowState& state, TArrayRef<const TTag> tags) {
- Y_VERIFY_S(state.Size() == tags.size(), "Count doesn't match"
- << ": state# " << state.Size()
- << ", tags# " << tags.size());
-
- TVector<TCell> cells(Reserve(state.Size()));
- for (TPos pos = 0; pos < state.Size(); ++pos) {
- out.AddTags(tags.at(pos));
- cells.emplace_back(state.Get(pos));
- }
-
- out.SetData(TSerializedCellVec::Serialize(cells));
-}
-
-void TBaseChangeCollector::Serialize(TDataChange& out, ERowOp rop,
- TArrayRef<const TRawTypeValue> key, TArrayRef<const TTag> keyTags, TArrayRef<const TUpdateOp> updates)
-{
- SerializeCells(*out.MutableKey(), key, keyTags);
-
- switch (rop) {
- case ERowOp::Upsert:
- SerializeCells(*out.MutableUpsert(), updates);
- break;
- case ERowOp::Erase:
- out.MutableErase();
- break;
- case ERowOp::Reset:
- SerializeCells(*out.MutableReset(), updates);
- break;
- default:
- Y_FAIL_S("Unsupported row op: " << static_cast<ui8>(rop));
- }
-}
-
-void TBaseChangeCollector::Serialize(TDataChange& out, ERowOp rop,
- TArrayRef<const TRawTypeValue> key, TArrayRef<const TTag> keyTags,
- const TRowState* oldState, const TRowState* newState, TArrayRef<const TTag> valueTags)
-{
- Serialize(out, rop, key, keyTags, {});
-
- if (oldState) {
- SerializeCells(*out.MutableOldImage(), *oldState, valueTags);
- }
-
- if (newState) {
- SerializeCells(*out.MutableNewImage(), *newState, valueTags);
- }
-}
-
-void TBaseChangeCollector::Persist(
- const TTableId& tableId, // origin table
- const TPathId& pathId, // target object (table, stream, etc...)
- TChangeRecord::EKind kind, const TDataChange& body)
-{
- NIceDb::TNiceDb db(Db);
-
- Y_VERIFY_S(Self->IsUserTable(tableId), "Unknown table: " << tableId);
- auto userTable = Self->GetUserTables().at(tableId.PathId.LocalPathId);
- Y_VERIFY(userTable->GetTableSchemaVersion());
-
- TChangeRecordBuilder builder(kind);
- if (!WriteTxId) {
- if (!Group) {
- Group = Self->AllocateChangeRecordGroup(db);
- }
- builder
- .WithOrder(Self->AllocateChangeRecordOrder(db))
- .WithGroup(*Group)
- .WithStep(WriteVersion.Step)
- .WithTxId(WriteVersion.TxId);
- } else {
- ui64 lockOffset = Self->GetNextChangeRecordLockOffset(WriteTxId) + Collected.size();
- builder
- .WithLockId(WriteTxId)
- .WithLockOffset(lockOffset);
- }
-
- auto record = builder
- .WithPathId(pathId)
- .WithTableId(tableId.PathId)
- .WithSchemaVersion(userTable->GetTableSchemaVersion())
- .WithBody(body.SerializeAsString())
- .Build();
-
- Self->PersistChangeRecord(db, record);
- Collected.push_back(TChange{
- .Order = record.GetOrder(),
- .Group = record.GetGroup(),
- .Step = record.GetStep(),
- .TxId = record.GetTxId(),
- .PathId = record.GetPathId(),
- .BodySize = record.GetBody().size(),
- .TableId = record.GetTableId(),
- .SchemaVersion = record.GetSchemaVersion(),
- .LockId = record.GetLockId(),
- .LockOffset = record.GetLockOffset(),
- });
+bool TBaseChangeCollector::NeedToReadKeys() const {
+ return false;
}
} // NDataShard
diff --git a/ydb/core/tx/datashard/change_collector_base.h b/ydb/core/tx/datashard/change_collector_base.h
index 82ba562d5d..b62e137c3f 100644
--- a/ydb/core/tx/datashard/change_collector_base.h
+++ b/ydb/core/tx/datashard/change_collector_base.h
@@ -1,6 +1,7 @@
#pragma once
-
+#include "change_collector.h"
#include "change_record.h"
+#include "change_record_body_serializer.h"
#include <ydb/core/engine/minikql/change_collector_iface.h>
#include <ydb/core/protos/change_exchange.pb.h>
@@ -14,53 +15,53 @@ namespace NDataShard {
class TDataShard;
class IDataShardUserDb;
-class IBaseChangeCollector : public NMiniKQL::IChangeCollector {
+class IBaseChangeCollectorSink {
public:
- virtual void SetGroup(ui64 group) = 0;
-};
-
-class TBaseChangeCollector: public IBaseChangeCollector {
using TDataChange = NKikimrChangeExchange::TChangeRecord::TDataChange;
- using TSerializedCells = TDataChange::TSerializedCells;
- static void SerializeCells(TSerializedCells& out, TArrayRef<const TRawTypeValue> in, TArrayRef<const NTable::TTag> tags);
- static void SerializeCells(TSerializedCells& out, TArrayRef<const NTable::TUpdateOp> in);
- static void SerializeCells(TSerializedCells& out, const NTable::TRowState& state, TArrayRef<const NTable::TTag> tags);
+ struct TVersionState {
+ TRowVersion WriteVersion;
+ ui64 WriteTxId = 0;
+ };
+
+public:
+ virtual TVersionState GetVersionState() = 0;
+ virtual void SetVersionState(const TVersionState& state) = 0;
+ virtual void AddChange(const TTableId& tableId, const TPathId& pathId, TChangeRecord::EKind kind, const TDataChange& body) = 0;
protected:
- static void Serialize(TDataChange& out, NTable::ERowOp rop,
- TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TTag> keyTags, TArrayRef<const NTable::TUpdateOp> updates);
- static void Serialize(TDataChange& out, NTable::ERowOp rop,
- TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TTag> keyTags,
- const NTable::TRowState* oldState, const NTable::TRowState* newState, TArrayRef<const NTable::TTag> valueTags);
+ ~IBaseChangeCollectorSink() = default;
+};
+
+class IBaseChangeCollector {
+public:
+ virtual ~IBaseChangeCollector() = default;
- void Persist(const TTableId& tableId, const TPathId& pathId, TChangeRecord::EKind kind, const TDataChange& body);
+ virtual void OnRestart() = 0;
+ virtual bool NeedToReadKeys() const = 0;
+
+ virtual bool Collect(const TTableId& tableId, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates) = 0;
+};
+
+class TBaseChangeCollector
+ : public IBaseChangeCollector
+ , protected TChangeRecordBodySerializer
+{
+ using TDataChange = NKikimrChangeExchange::TChangeRecord::TDataChange;
public:
- explicit TBaseChangeCollector(TDataShard* self, IDataShardUserDb& userDb, NTable::TDatabase& db, bool isImmediateTx);
+ explicit TBaseChangeCollector(TDataShard* self, IDataShardUserDb& userDb, IBaseChangeCollectorSink& sink);
+ void OnRestart() override;
bool NeedToReadKeys() const override;
- void SetReadVersion(const TRowVersion& readVersion) override;
- void SetWriteVersion(const TRowVersion& writeVersion) override;
- void SetWriteTxId(ui64 txId) override;
- void SetGroup(ui64 group) override;
- const TVector<TChange>& GetCollected() const override;
- TVector<TChange>&& GetCollected() override;
- void Reset() override;
-
- // there is no Collect, still abstract
+ // abstract class, subclasses need to implement Collect
protected:
TDataShard* Self;
IDataShardUserDb& UserDb;
- NTable::TDatabase& Db;
-
- TRowVersion WriteVersion;
- ui64 WriteTxId = 0;
- TMaybe<ui64> Group;
-
- TVector<TChange> Collected;
+ IBaseChangeCollectorSink& Sink;
}; // TBaseChangeCollector
diff --git a/ydb/core/tx/datashard/change_collector_cdc_stream.cpp b/ydb/core/tx/datashard/change_collector_cdc_stream.cpp
index c47e343139..56d000a623 100644
--- a/ydb/core/tx/datashard/change_collector_cdc_stream.cpp
+++ b/ydb/core/tx/datashard/change_collector_cdc_stream.cpp
@@ -12,8 +12,18 @@ using namespace NTable;
namespace {
+ auto MakeKeyCells(TArrayRef<const TRawTypeValue> key) {
+ TVector<TCell> result(Reserve(key.size()));
+
+ for (TPos pos = 0; pos < key.size(); ++pos) {
+ result.emplace_back(key.at(pos).AsRef());
+ }
+
+ return result;
+ }
+
auto MakeValueTags(const TMap<TTag, TUserTable::TUserColumn>& columns) {
- TVector<TTag> result;
+ TVector<TTag> result(Reserve(columns.size() - 1));
for (const auto& [tag, column] : columns) {
if (!column.IsKey) {
@@ -24,6 +34,31 @@ namespace {
return result;
}
+ auto MakeValueTypes(const TMap<TTag, TUserTable::TUserColumn>& columns) {
+ TVector<NScheme::TTypeInfo> result(Reserve(columns.size() - 1));
+
+ for (const auto& [_, column] : columns) {
+ if (!column.IsKey) {
+ result.push_back(column.Type);
+ }
+ }
+
+ return result;
+ }
+
+ auto MakeUpdates(TArrayRef<const TCell> cells, TArrayRef<const TTag> tags, TArrayRef<const NScheme::TTypeInfo> types) {
+ TVector<TUpdateOp> result(Reserve(cells.size()));
+
+ Y_VERIFY(cells.size() == tags.size());
+ Y_VERIFY(cells.size() == types.size());
+
+ for (TPos pos = 0; pos < cells.size(); ++pos) {
+ result.emplace_back(tags.at(pos), ECellOp::Set, TRawTypeValue(cells.at(pos).AsRef(), types.at(pos)));
+ }
+
+ return result;
+ }
+
auto MakeTagToPos(TArrayRef<const TTag> tags) {
THashMap<TTag, TPos> result;
@@ -57,8 +92,31 @@ namespace {
}
}
+ struct TVersionContext {
+ IBaseChangeCollectorSink& Sink;
+ IBaseChangeCollectorSink::TVersionState SavedState;
+
+ TVersionContext(IBaseChangeCollectorSink& sink, const TRowVersion& replace)
+ : Sink(sink)
+ , SavedState(sink.GetVersionState())
+ {
+ Sink.SetVersionState({
+ .WriteVersion = replace,
+ .WriteTxId = 0,
+ });
+ }
+
+ ~TVersionContext() {
+ Sink.SetVersionState(SavedState);
+ }
+ };
+
} // anonymous
+void TCdcStreamChangeCollector::OnRestart() {
+ TBaseChangeCollector::OnRestart();
+}
+
bool TCdcStreamChangeCollector::NeedToReadKeys() const {
if (CachedNeedToReadKeys) {
return *CachedNeedToReadKeys;
@@ -90,10 +148,6 @@ bool TCdcStreamChangeCollector::NeedToReadKeys() const {
return *CachedNeedToReadKeys;
}
-void TCdcStreamChangeCollector::SetReadVersion(const TRowVersion& readVersion) {
- ReadVersion = readVersion;
-}
-
bool TCdcStreamChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
TArrayRef<const TRawTypeValue> key, TArrayRef<const TUpdateOp> updates)
{
@@ -101,6 +155,9 @@ bool TCdcStreamChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
auto userTable = Self->GetUserTables().at(tableId.PathId.LocalPathId);
const auto& keyTags = userTable->KeyColumnIds;
+ const auto& keyTypes = userTable->KeyColumnTypes;
+ const auto valueTags = MakeValueTags(userTable->Columns);
+ const auto valueTypes = MakeValueTypes(userTable->Columns);
Y_VERIFY_S(key.size() == keyTags.size(), "Count doesn't match"
<< ": key# " << key.size()
@@ -116,8 +173,70 @@ bool TCdcStreamChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
}
for (const auto& [pathId, stream] : userTable->CdcStreams) {
- if (stream.State == NKikimrSchemeOp::ECdcStreamStateDisabled) {
- continue;
+ TMaybe<TRowState> initialState;
+ TMaybe<TRowVersion> snapshotVersion;
+
+ switch (stream.State) {
+ case NKikimrSchemeOp::ECdcStreamStateDisabled:
+ continue; // do not generate change record at all
+ case NKikimrSchemeOp::ECdcStreamStateScan:
+ if (const auto* info = Self->GetCdcStreamScanManager().Get(pathId)) {
+ snapshotVersion = info->SnapshotVersion;
+
+ TSelectStats stats;
+ const auto stateAtSnapshot = GetState(tableId, key, valueTags, stats, info->SnapshotVersion);
+ if (!stateAtSnapshot) {
+ return false;
+ }
+
+ const auto state = stateAtSnapshot->GetRowState();
+ const bool presentInSnapshot = (state == ERowOp::Upsert || state == ERowOp::Reset);
+
+ if (!presentInSnapshot || stats.InvisibleRowSkips) {
+ // just generate change record
+ } else if (!info->LastKey) {
+ initialState = stateAtSnapshot;
+ } else {
+ const auto& lastKeyCells = info->LastKey->GetCells();
+ const auto keyCells = MakeKeyCells(key);
+
+ Y_VERIFY(keyCells.size() == lastKeyCells.size());
+ Y_VERIFY(keyCells.size() == keyTypes.size());
+
+ const int cmp = CompareTypedCellVectors(keyCells.data(), lastKeyCells.data(), keyTypes.data(), keyCells.size());
+ if (cmp > 0) {
+ initialState = stateAtSnapshot;
+ }
+ }
+ } else {
+ Y_FAIL_S("Cannot retrieve cdc stream scan info: " << pathId);
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (initialState) {
+ Y_VERIFY(snapshotVersion.Defined());
+ TVersionContext ctx(Sink, *snapshotVersion);
+
+ switch (stream.Mode) {
+ case NKikimrSchemeOp::ECdcStreamModeKeysOnly:
+ Persist(tableId, pathId, ERowOp::Upsert, key, keyTags, {});
+ break;
+ case NKikimrSchemeOp::ECdcStreamModeUpdate:
+ Persist(tableId, pathId, ERowOp::Upsert, key, keyTags, MakeUpdates(**initialState, valueTags, valueTypes));
+ break;
+ case NKikimrSchemeOp::ECdcStreamModeNewImage:
+ case NKikimrSchemeOp::ECdcStreamModeNewAndOldImages:
+ Persist(tableId, pathId, ERowOp::Upsert, key, keyTags, nullptr, &*initialState, valueTags);
+ break;
+ case NKikimrSchemeOp::ECdcStreamModeOldImage:
+ Persist(tableId, pathId, ERowOp::Upsert, key, keyTags, &*initialState, nullptr, valueTags);
+ break;
+ default:
+ Y_FAIL_S("Invalid stream mode: " << static_cast<ui32>(stream.Mode));
+ }
}
switch (stream.Mode) {
@@ -129,28 +248,22 @@ bool TCdcStreamChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
break;
case NKikimrSchemeOp::ECdcStreamModeNewImage:
case NKikimrSchemeOp::ECdcStreamModeOldImage:
- case NKikimrSchemeOp::ECdcStreamModeNewAndOldImages: {
- const auto valueTags = MakeValueTags(userTable->Columns);
- const auto oldState = GetCurrentState(tableId, key, valueTags);
-
- if (!oldState) {
- return false;
- }
-
- if (stream.Mode == NKikimrSchemeOp::ECdcStreamModeOldImage) {
- Persist(tableId, pathId, rop, key, keyTags, NullIfErased(&*oldState), nullptr, valueTags);
- } else {
- const auto newState = PatchState(*oldState, rop, MakeTagToPos(valueTags), MappedUpdates(updates));
-
- if (stream.Mode == NKikimrSchemeOp::ECdcStreamModeNewImage) {
- Persist(tableId, pathId, rop, key, keyTags, nullptr, NullIfErased(&newState), valueTags);
+ case NKikimrSchemeOp::ECdcStreamModeNewAndOldImages:
+ if (const auto oldState = GetState(tableId, key, valueTags)) {
+ if (stream.Mode == NKikimrSchemeOp::ECdcStreamModeOldImage) {
+ Persist(tableId, pathId, rop, key, keyTags, NullIfErased(&*oldState), nullptr, valueTags);
} else {
- Persist(tableId, pathId, rop, key, keyTags, NullIfErased(&*oldState), NullIfErased(&newState), valueTags);
+ const auto newState = PatchState(*oldState, rop, MakeTagToPos(valueTags), MappedUpdates(updates));
+ if (stream.Mode == NKikimrSchemeOp::ECdcStreamModeNewImage) {
+ Persist(tableId, pathId, rop, key, keyTags, nullptr, NullIfErased(&newState), valueTags);
+ } else {
+ Persist(tableId, pathId, rop, key, keyTags, NullIfErased(&*oldState), NullIfErased(&newState), valueTags);
+ }
}
+ } else {
+ return false;
}
-
break;
- }
default:
Y_FAIL_S("Invalid stream mode: " << static_cast<ui32>(stream.Mode));
}
@@ -159,15 +272,11 @@ bool TCdcStreamChangeCollector::Collect(const TTableId& tableId, ERowOp rop,
return true;
}
-void TCdcStreamChangeCollector::Reset() {
- TBaseChangeCollector::Reset();
-}
-
-TMaybe<TRowState> TCdcStreamChangeCollector::GetCurrentState(const TTableId& tableId, TArrayRef<const TRawTypeValue> key,
- TArrayRef<const TTag> valueTags)
+TMaybe<TRowState> TCdcStreamChangeCollector::GetState(const TTableId& tableId, TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const TTag> valueTags, TSelectStats& stats, const TMaybe<TRowVersion>& readVersion)
{
TRowState row;
- const auto ready = UserDb.SelectRow(tableId, key, valueTags, row);
+ const auto ready = UserDb.SelectRow(tableId, key, valueTags, row, stats, readVersion);
if (ready == EReady::Page) {
return Nothing();
@@ -176,6 +285,13 @@ TMaybe<TRowState> TCdcStreamChangeCollector::GetCurrentState(const TTableId& tab
return row;
}
+TMaybe<TRowState> TCdcStreamChangeCollector::GetState(const TTableId& tableId, TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const TTag> valueTags, const TMaybe<TRowVersion>& readVersion)
+{
+ TSelectStats stats;
+ return GetState(tableId, key, valueTags, stats, readVersion);
+}
+
TRowState TCdcStreamChangeCollector::PatchState(const TRowState& oldState, ERowOp rop,
const THashMap<TTag, TPos>& tagToPos, const THashMap<TTag, TUpdateOp>& updates)
{
@@ -215,7 +331,7 @@ void TCdcStreamChangeCollector::Persist(const TTableId& tableId, const TPathId&
{
NKikimrChangeExchange::TChangeRecord::TDataChange body;
Serialize(body, rop, key, keyTags, updates);
- TBaseChangeCollector::Persist(tableId, pathId, TChangeRecord::EKind::CdcDataChange, body);
+ Sink.AddChange(tableId, pathId, TChangeRecord::EKind::CdcDataChange, body);
}
void TCdcStreamChangeCollector::Persist(const TTableId& tableId, const TPathId& pathId, ERowOp rop,
@@ -224,7 +340,7 @@ void TCdcStreamChangeCollector::Persist(const TTableId& tableId, const TPathId&
{
NKikimrChangeExchange::TChangeRecord::TDataChange body;
Serialize(body, rop, key, keyTags, oldState, newState, valueTags);
- TBaseChangeCollector::Persist(tableId, pathId, TChangeRecord::EKind::CdcDataChange, body);
+ Sink.AddChange(tableId, pathId, TChangeRecord::EKind::CdcDataChange, body);
}
} // NDataShard
diff --git a/ydb/core/tx/datashard/change_collector_cdc_stream.h b/ydb/core/tx/datashard/change_collector_cdc_stream.h
index a307da39d0..cd5dde6d92 100644
--- a/ydb/core/tx/datashard/change_collector_cdc_stream.h
+++ b/ydb/core/tx/datashard/change_collector_cdc_stream.h
@@ -7,8 +7,10 @@ namespace NKikimr {
namespace NDataShard {
class TCdcStreamChangeCollector: public TBaseChangeCollector {
- TMaybe<NTable::TRowState> GetCurrentState(const TTableId& tableId, TArrayRef<const TRawTypeValue> key,
- TArrayRef<const NTable::TTag> valueTags);
+ TMaybe<NTable::TRowState> GetState(const TTableId& tableId, TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const NTable::TTag> valueTags, NTable::TSelectStats& stats, const TMaybe<TRowVersion>& readVersion = {});
+ TMaybe<NTable::TRowState> GetState(const TTableId& tableId, TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const NTable::TTag> valueTags, const TMaybe<TRowVersion>& readVersion = {});
static NTable::TRowState PatchState(const NTable::TRowState& oldState, NTable::ERowOp rop,
const THashMap<NTable::TTag, NTable::TPos>& tagToPos, const THashMap<NTable::TTag, NTable::TUpdateOp>& updates);
@@ -21,17 +23,13 @@ class TCdcStreamChangeCollector: public TBaseChangeCollector {
public:
using TBaseChangeCollector::TBaseChangeCollector;
+ void OnRestart() override;
bool NeedToReadKeys() const override;
- void SetReadVersion(const TRowVersion& readVersion) override;
bool Collect(const TTableId& tableId, NTable::ERowOp rop,
TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TUpdateOp> updates) override;
- void Reset() override;
-
private:
- TRowVersion ReadVersion;
-
mutable TMaybe<bool> CachedNeedToReadKeys;
}; // TCdcStreamChangeCollector
diff --git a/ydb/core/tx/datashard/change_record.cpp b/ydb/core/tx/datashard/change_record.cpp
index d70f9f02a0..cba5084194 100644
--- a/ydb/core/tx/datashard/change_record.cpp
+++ b/ydb/core/tx/datashard/change_record.cpp
@@ -13,8 +13,7 @@
#include <util/stream/str.h>
-namespace NKikimr {
-namespace NDataShard {
+namespace NKikimr::NDataShard {
void TChangeRecord::SerializeTo(NKikimrChangeExchange::TChangeRecord& record) const {
record.SetOrder(Order);
@@ -347,5 +346,4 @@ TChangeRecord&& TChangeRecordBuilder::Build() {
return std::move(Record);
}
-} // NDataShard
-} // NKikimr
+}
diff --git a/ydb/core/tx/datashard/change_record.h b/ydb/core/tx/datashard/change_record.h
index 8ecad30b32..decfa6dce6 100644
--- a/ydb/core/tx/datashard/change_record.h
+++ b/ydb/core/tx/datashard/change_record.h
@@ -14,8 +14,7 @@ namespace NKikimrChangeExchange {
class TChangeRecord;
}
-namespace NKikimr {
-namespace NDataShard {
+namespace NKikimr::NDataShard {
class TChangeRecordBuilder;
@@ -101,8 +100,7 @@ private:
}; // TChangeRecordBuilder
-} // NDataShard
-} // NKikimr
+}
Y_DECLARE_OUT_SPEC(inline, NKikimr::NDataShard::TChangeRecord, out, value) {
return value.Out(out);
diff --git a/ydb/core/tx/datashard/change_record_body_serializer.cpp b/ydb/core/tx/datashard/change_record_body_serializer.cpp
new file mode 100644
index 0000000000..b1227992b0
--- /dev/null
+++ b/ydb/core/tx/datashard/change_record_body_serializer.cpp
@@ -0,0 +1,94 @@
+#include "change_record_body_serializer.h"
+
+#include <ydb/core/util/yverify_stream.h>
+
+namespace NKikimr::NDataShard {
+
+using namespace NTable;
+
+void TChangeRecordBodySerializer::SerializeCells(TSerializedCells& out,
+ TArrayRef<const TRawTypeValue> in, TArrayRef<const TTag> tags)
+{
+ Y_VERIFY_S(in.size() == tags.size(), "Count doesn't match"
+ << ": in# " << in.size()
+ << ", tags# " << tags.size());
+
+ TVector<TCell> cells(Reserve(in.size()));
+ for (size_t i = 0; i < in.size(); ++i) {
+ out.AddTags(tags.at(i));
+ cells.emplace_back(in.at(i).AsRef());
+ }
+
+ out.SetData(TSerializedCellVec::Serialize(cells));
+}
+
+void TChangeRecordBodySerializer::SerializeCells(TSerializedCells& out,
+ TArrayRef<const TUpdateOp> in)
+{
+ if (!in) {
+ return;
+ }
+
+ TVector<TCell> cells(Reserve(in.size()));
+ for (const auto& op : in) {
+ Y_VERIFY_S(op.Op == ECellOp::Set, "Unexpected cell op: " << op.Op.Raw());
+
+ out.AddTags(op.Tag);
+ cells.emplace_back(op.AsCell());
+ }
+
+ out.SetData(TSerializedCellVec::Serialize(cells));
+}
+
+void TChangeRecordBodySerializer::SerializeCells(TSerializedCells& out,
+ const TRowState& state, TArrayRef<const TTag> tags)
+{
+ Y_VERIFY_S(state.Size() == tags.size(), "Count doesn't match"
+ << ": state# " << state.Size()
+ << ", tags# " << tags.size());
+
+ TVector<TCell> cells(Reserve(state.Size()));
+ for (TPos pos = 0; pos < state.Size(); ++pos) {
+ out.AddTags(tags.at(pos));
+ cells.emplace_back(state.Get(pos));
+ }
+
+ out.SetData(TSerializedCellVec::Serialize(cells));
+}
+
+void TChangeRecordBodySerializer::Serialize(TDataChange& out, ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const TTag> keyTags, TArrayRef<const TUpdateOp> updates)
+{
+ SerializeCells(*out.MutableKey(), key, keyTags);
+
+ switch (rop) {
+ case ERowOp::Upsert:
+ SerializeCells(*out.MutableUpsert(), updates);
+ break;
+ case ERowOp::Erase:
+ out.MutableErase();
+ break;
+ case ERowOp::Reset:
+ SerializeCells(*out.MutableReset(), updates);
+ break;
+ default:
+ Y_FAIL_S("Unsupported row op: " << static_cast<ui8>(rop));
+ }
+}
+
+void TChangeRecordBodySerializer::Serialize(TDataChange& out, ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const TTag> keyTags,
+ const TRowState* oldState, const TRowState* newState, TArrayRef<const TTag> valueTags)
+{
+ Serialize(out, rop, key, keyTags, {});
+
+ if (oldState) {
+ SerializeCells(*out.MutableOldImage(), *oldState, valueTags);
+ }
+
+ if (newState) {
+ SerializeCells(*out.MutableNewImage(), *newState, valueTags);
+ }
+}
+
+}
diff --git a/ydb/core/tx/datashard/change_record_body_serializer.h b/ydb/core/tx/datashard/change_record_body_serializer.h
new file mode 100644
index 0000000000..29f6b53deb
--- /dev/null
+++ b/ydb/core/tx/datashard/change_record_body_serializer.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <ydb/core/protos/change_exchange.pb.h>
+#include <ydb/core/scheme_types/scheme_raw_type_value.h>
+#include <ydb/core/tablet_flat/flat_database.h>
+
+namespace NKikimr::NDataShard {
+
+class TChangeRecordBodySerializer {
+ using TDataChange = NKikimrChangeExchange::TChangeRecord::TDataChange;
+ using TSerializedCells = TDataChange::TSerializedCells;
+
+ static void SerializeCells(TSerializedCells& out,
+ TArrayRef<const TRawTypeValue> in, TArrayRef<const NTable::TTag> tags);
+ static void SerializeCells(TSerializedCells& out,
+ TArrayRef<const NTable::TUpdateOp> in);
+ static void SerializeCells(TSerializedCells& out,
+ const NTable::TRowState& state, TArrayRef<const NTable::TTag> tags);
+
+public:
+ static void Serialize(TDataChange& out, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TTag> keyTags, TArrayRef<const NTable::TUpdateOp> updates);
+ static void Serialize(TDataChange& out, NTable::ERowOp rop,
+ TArrayRef<const TRawTypeValue> key, TArrayRef<const NTable::TTag> keyTags,
+ const NTable::TRowState* oldState, const NTable::TRowState* newState, TArrayRef<const NTable::TTag> valueTags);
+
+}; // TChangeRecordBodySerializer
+
+}
diff --git a/ydb/core/tx/datashard/check_data_tx_unit.cpp b/ydb/core/tx/datashard/check_data_tx_unit.cpp
index deb9f1f903..53172927bc 100644
--- a/ydb/core/tx/datashard/check_data_tx_unit.cpp
+++ b/ydb/core/tx/datashard/check_data_tx_unit.cpp
@@ -104,7 +104,7 @@ EExecutionStatus TCheckDataTxUnit::Execute(TOperation::TPtr op,
<< " at " << DataShard.TabletID();
BuildResult(op, NKikimrTxDataShard::TEvProposeTransactionResult::BAD_REQUEST)
- ->AddError(NKikimrTxDataShard::TError::BAD_ARGUMENT, err);
+ ->AddError(NKikimrTxDataShard::TError::SNAPSHOT_NOT_EXIST, err);
op->Abort(EExecutionUnitKind::FinishPropose);
LOG_ERROR_S(ctx, NKikimrServices::TX_DATASHARD, err);
diff --git a/ydb/core/tx/datashard/check_scheme_tx_unit.cpp b/ydb/core/tx/datashard/check_scheme_tx_unit.cpp
index 2182381c0b..8305b5970d 100644
--- a/ydb/core/tx/datashard/check_scheme_tx_unit.cpp
+++ b/ydb/core/tx/datashard/check_scheme_tx_unit.cpp
@@ -634,7 +634,7 @@ bool TCheckSchemeTxUnit::CheckFinalizeBuildIndex(TActiveTransaction *activeTx) {
}
const auto pathId = GetPathId(finalize);
- const auto snapshotKey = TSnapshotKey(pathId.OwnerId, pathId.LocalPathId, finalize.GetSnapshotStep(), finalize.GetSnapshotTxId());
+ const auto snapshotKey = TSnapshotKey(pathId, finalize.GetSnapshotStep(), finalize.GetSnapshotTxId());
if (DataShard.GetSnapshotManager().FindAvailable(snapshotKey) == nullptr) {
LOG_DEBUG_S(TActivationContext::AsActorContext(), NKikimrServices::TX_DATASHARD,
diff --git a/ydb/core/tx/datashard/create_cdc_stream_unit.cpp b/ydb/core/tx/datashard/create_cdc_stream_unit.cpp
index b27e674334..7298514525 100644
--- a/ydb/core/tx/datashard/create_cdc_stream_unit.cpp
+++ b/ydb/core/tx/datashard/create_cdc_stream_unit.cpp
@@ -31,12 +31,11 @@ public:
const auto& params = schemeTx.GetCreateCdcStreamNotice();
const auto& streamDesc = params.GetStreamDescription();
+ const auto streamPathId = PathIdFromPathId(streamDesc.GetPathId());
const auto pathId = PathIdFromPathId(params.GetPathId());
Y_VERIFY(pathId.OwnerId == DataShard.GetPathOwnerId());
- const auto streamPathId = PathIdFromPathId(streamDesc.GetPathId());
-
const auto version = params.GetTableSchemaVersion();
Y_VERIFY(version);
@@ -52,8 +51,11 @@ public:
Y_VERIFY(tx->GetStep() != 0);
DataShard.GetSnapshotManager().AddSnapshot(txc.DB,
- TSnapshotKey(pathId.OwnerId, pathId.LocalPathId, tx->GetStep(), tx->GetTxId()),
+ TSnapshotKey(pathId, tx->GetStep(), tx->GetTxId()),
params.GetSnapshotName(), TSnapshot::FlagScheme, TDuration::Zero());
+
+ DataShard.GetCdcStreamScanManager().Add(txc.DB,
+ pathId, streamPathId, TRowVersion(tx->GetStep(), tx->GetTxId()));
}
AddSender.Reset(new TEvChangeExchange::TEvAddSender(
diff --git a/ydb/core/tx/datashard/datashard.cpp b/ydb/core/tx/datashard/datashard.cpp
index a8f6565a10..1ecbe38018 100644
--- a/ydb/core/tx/datashard/datashard.cpp
+++ b/ydb/core/tx/datashard/datashard.cpp
@@ -3,6 +3,7 @@
#include <ydb/core/base/interconnect_channels.h>
#include <ydb/core/engine/minikql/flat_local_tx_factory.h>
+#include <ydb/core/formats/arrow_batch_builder.h>
#include <ydb/core/scheme/scheme_tablecell.h>
#include <ydb/core/tablet/tablet_counters_protobuf.h>
#include <ydb/core/tx/long_tx_service/public/events.h>
@@ -488,6 +489,59 @@ void TDataShard::SendDelayedAcks(const TActorContext& ctx, TVector<THolder<IEven
delayedAcks.clear();
}
+class TDataShard::TWaitVolatileDependencies final : public IVolatileTxCallback {
+public:
+ TWaitVolatileDependencies(
+ TDataShard* self, const absl::flat_hash_set<ui64>& dependencies,
+ const TActorId& target,
+ std::unique_ptr<IEventBase> event,
+ ui64 cookie)
+ : Self(self)
+ , Dependencies(dependencies)
+ , Target(target)
+ , Event(std::move(event))
+ , Cookie(cookie)
+ { }
+
+ void OnCommit(ui64 txId) override {
+ Dependencies.erase(txId);
+ if (Dependencies.empty()) {
+ Finish();
+ }
+ }
+
+ void OnAbort(ui64 txId) override {
+ Dependencies.erase(txId);
+ if (Dependencies.empty()) {
+ Finish();
+ }
+ }
+
+ void Finish() {
+ Self->Send(Target, Event.release(), 0, Cookie);
+ }
+
+private:
+ TDataShard* Self;
+ absl::flat_hash_set<ui64> Dependencies;
+ TActorId Target;
+ std::unique_ptr<IEventBase> Event;
+ ui64 Cookie;
+};
+
+void TDataShard::WaitVolatileDependenciesThenSend(
+ const absl::flat_hash_set<ui64>& dependencies,
+ const TActorId& target, std::unique_ptr<IEventBase> event,
+ ui64 cookie)
+{
+ Y_VERIFY(!dependencies.empty(), "Unexpected empty dependencies");
+ auto callback = MakeIntrusive<TWaitVolatileDependencies>(this, dependencies, target, std::move(event), cookie);
+ for (ui64 txId : dependencies) {
+ bool ok = VolatileTxManager.AttachVolatileTxCallback(txId, callback);
+ Y_VERIFY_S(ok, "Unexpected failure to attach callback to volatile tx " << txId);
+ }
+}
+
class TDataShard::TSendVolatileResult final : public IVolatileTxCallback {
public:
TSendVolatileResult(
@@ -501,7 +555,7 @@ public:
, TxId(txId)
{ }
- void OnCommit() override {
+ void OnCommit(ui64) override {
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_DATASHARD,
"Complete [" << Step << " : " << TxId << "] from " << Self->TabletID()
<< " at tablet " << Self->TabletID() << " send result to client "
@@ -513,11 +567,11 @@ public:
Self->Send(Target, Result.Release(), flags);
}
- void OnAbort() override {
+ void OnAbort(ui64 txId) override {
Result->Record.ClearTxResult();
Result->Record.SetStatus(NKikimrTxDataShard::TEvProposeTransactionResult::ABORTED);
Result->AddError(NKikimrTxDataShard::TError::EXECUTION_CANCELLED, "Distributed transaction aborted due to commit failure");
- OnCommit();
+ OnCommit(txId);
}
private:
@@ -587,11 +641,11 @@ ui64 TDataShard::AllocateChangeRecordGroup(NIceDb::TNiceDb& db) {
ui64 TDataShard::GetNextChangeRecordLockOffset(ui64 lockId) {
auto it = LockChangeRecords.find(lockId);
- if (it == LockChangeRecords.end() || it->second.empty()) {
+ if (it == LockChangeRecords.end() || it->second.Changes.empty()) {
return 0;
}
- return it->second.back().LockOffset + 1;
+ return it->second.Changes.back().LockOffset + 1;
}
void TDataShard::PersistChangeRecord(NIceDb::TNiceDb& db, const TChangeRecord& record) {
@@ -599,7 +653,8 @@ void TDataShard::PersistChangeRecord(NIceDb::TNiceDb& db, const TChangeRecord& r
<< ": record: " << record
<< ", at tablet: " << TabletID());
- if (record.GetLockId() == 0) {
+ ui64 lockId = record.GetLockId();
+ if (lockId == 0) {
db.Table<Schema::ChangeRecords>().Key(record.GetOrder()).Update(
NIceDb::TUpdate<Schema::ChangeRecords::Group>(record.GetGroup()),
NIceDb::TUpdate<Schema::ChangeRecords::PlanStep>(record.GetStep()),
@@ -614,6 +669,43 @@ void TDataShard::PersistChangeRecord(NIceDb::TNiceDb& db, const TChangeRecord& r
NIceDb::TUpdate<Schema::ChangeRecordDetails::Kind>(record.GetKind()),
NIceDb::TUpdate<Schema::ChangeRecordDetails::Body>(record.GetBody()));
} else {
+ auto& state = LockChangeRecords[lockId];
+ Y_VERIFY(state.Changes.empty() || state.Changes.back().LockOffset < record.GetLockOffset(),
+ "Lock records must be added in their lock offset order");
+
+ if (state.Changes.size() == state.PersistentCount) {
+ db.GetDatabase().OnCommit([this, lockId] {
+ // We mark all added records as persistent
+ auto it = LockChangeRecords.find(lockId);
+ Y_VERIFY(it != LockChangeRecords.end());
+ it->second.PersistentCount = it->second.Changes.size();
+ });
+ db.GetDatabase().OnRollback([this, lockId] {
+ // We remove all change records that have not been committed
+ auto it = LockChangeRecords.find(lockId);
+ Y_VERIFY(it != LockChangeRecords.end());
+ it->second.Changes.erase(
+ it->second.Changes.begin() + it->second.PersistentCount,
+ it->second.Changes.end());
+ if (it->second.Changes.empty()) {
+ LockChangeRecords.erase(it);
+ }
+ });
+ }
+
+ state.Changes.push_back(IDataShardChangeCollector::TChange{
+ .Order = record.GetOrder(),
+ .Group = record.GetGroup(),
+ .Step = record.GetStep(),
+ .TxId = record.GetTxId(),
+ .PathId = record.GetPathId(),
+ .BodySize = record.GetBody().size(),
+ .TableId = record.GetTableId(),
+ .SchemaVersion = record.GetSchemaVersion(),
+ .LockId = record.GetLockId(),
+ .LockOffset = record.GetLockOffset(),
+ });
+
db.Table<Schema::LockChangeRecords>().Key(record.GetLockId(), record.GetLockOffset()).Update(
NIceDb::TUpdate<Schema::LockChangeRecords::PathOwnerId>(record.GetPathId().OwnerId),
NIceDb::TUpdate<Schema::LockChangeRecords::LocalPathId>(record.GetPathId().LocalPathId),
@@ -627,16 +719,36 @@ void TDataShard::PersistChangeRecord(NIceDb::TNiceDb& db, const TChangeRecord& r
}
}
-void TDataShard::PersistCommitLockChangeRecords(TTransactionContext& txc, ui64 order, ui64 lockId, ui64 group, const TRowVersion& rowVersion) {
- LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_DATASHARD, "PersistCommitLockChangeRecords"
- << ": order# " << order
- << ", lockId# " << lockId
+bool TDataShard::HasLockChangeRecords(ui64 lockId) const {
+ auto it = LockChangeRecords.find(lockId);
+ return it != LockChangeRecords.end() && !it->second.Changes.empty();
+}
+
+void TDataShard::CommitLockChangeRecords(NIceDb::TNiceDb& db, ui64 lockId, ui64 group, const TRowVersion& rowVersion, TVector<IDataShardChangeCollector::TChange>& collected) {
+ LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_DATASHARD, "CommitLockChangeRecords"
+ << ": lockId# " << lockId
<< ", group# " << group
<< ", version# " << rowVersion
<< ", at tablet: " << TabletID());
auto it = LockChangeRecords.find(lockId);
- Y_VERIFY_S(it != LockChangeRecords.end() && !it->second.empty(), "Cannot commit lock " << lockId << " change records: there are no pending change records");
+ Y_VERIFY_S(it != LockChangeRecords.end() && !it->second.Changes.empty(), "Cannot commit lock " << lockId << " change records: there are no pending change records");
+
+ ui64 count = it->second.Changes.back().LockOffset + 1;
+ ui64 order = AllocateChangeRecordOrder(db, count);
+
+ // Transform uncommitted changes into their committed form
+ collected.reserve(collected.size() + it->second.Changes.size());
+ for (const auto& change : it->second.Changes) {
+ auto committed = change;
+ committed.Order = order + change.LockOffset;
+ committed.Group = group;
+ committed.Step = rowVersion.Step;
+ committed.TxId = rowVersion.TxId;
+ collected.push_back(committed);
+ }
+
+ Y_VERIFY_S(!CommittedLockChangeRecords.contains(lockId), "Cannot commit lock " << lockId << " more than once");
auto& entry = CommittedLockChangeRecords[lockId];
Y_VERIFY_S(entry.Order == Max<ui64>(), "Cannot commit lock " << lockId << " change records multiple times");
@@ -644,9 +756,7 @@ void TDataShard::PersistCommitLockChangeRecords(TTransactionContext& txc, ui64 o
entry.Group = group;
entry.Step = rowVersion.Step;
entry.TxId = rowVersion.TxId;
- entry.Count = it->second.size();
-
- NIceDb::TNiceDb db(txc.DB);
+ entry.Count = it->second.Changes.size();
db.Table<Schema::ChangeRecordCommits>().Key(order).Update(
NIceDb::TUpdate<Schema::ChangeRecordCommits::LockId>(lockId),
@@ -654,12 +764,14 @@ void TDataShard::PersistCommitLockChangeRecords(TTransactionContext& txc, ui64 o
NIceDb::TUpdate<Schema::ChangeRecordCommits::PlanStep>(rowVersion.Step),
NIceDb::TUpdate<Schema::ChangeRecordCommits::TxId>(rowVersion.TxId));
- txc.OnCommit([this, lockId]() {
+ db.GetDatabase().OnCommit([this, lockId]() {
// We expect operation to enqueue transformed change records,
// so we no longer need original uncommitted records.
- LockChangeRecords.erase(lockId);
+ auto it = LockChangeRecords.find(lockId);
+ Y_VERIFY_S(it != LockChangeRecords.end(), "Unexpected failure to find lockId# " << lockId);
+ LockChangeRecords.erase(it);
});
- txc.OnRollback([this, lockId]() {
+ db.GetDatabase().OnRollback([this, lockId]() {
CommittedLockChangeRecords.erase(lockId);
});
}
@@ -748,7 +860,7 @@ void TDataShard::RemoveChangeRecord(NIceDb::TNiceDb& db, ui64 order) {
SetCounter(COUNTER_CHANGE_QUEUE_SIZE, ChangesQueue.size());
}
-void TDataShard::EnqueueChangeRecords(TVector<NMiniKQL::IChangeCollector::TChange>&& records) {
+void TDataShard::EnqueueChangeRecords(TVector<IDataShardChangeCollector::TChange>&& records) {
if (!records) {
return;
}
@@ -787,48 +899,6 @@ void TDataShard::EnqueueChangeRecords(TVector<NMiniKQL::IChangeCollector::TChang
Send(OutChangeSender, new TEvChangeExchange::TEvEnqueueRecords(std::move(forward)));
}
-void TDataShard::AddLockChangeRecords(ui64 lockId, TVector<NMiniKQL::IChangeCollector::TChange>&& records) {
- if (!records) {
- return;
- }
-
- auto orderedByLockOffset = [](auto& records) -> bool {
- auto it = records.begin();
- ui64 prevOffset = it->LockOffset;
- while (++it != records.end()) {
- ui64 offset = it->LockOffset;
- if (!(prevOffset < offset)) {
- return false;
- }
- }
- return true;
- };
- Y_VERIFY_DEBUG(orderedByLockOffset(records));
-
- auto& lockChanges = LockChangeRecords[lockId];
- if (lockChanges.empty()) {
- lockChanges = std::move(records);
- return;
- }
-
- Y_VERIFY_DEBUG(lockChanges.back().LockOffset < records.front().LockOffset);
-
- lockChanges.reserve(lockChanges.size() + records.size());
- for (auto& record : records) {
- lockChanges.emplace_back(std::move(record));
- }
-}
-
-const TVector<NMiniKQL::IChangeCollector::TChange>& TDataShard::GetLockChangeRecords(ui64 lockId) const {
- auto it = LockChangeRecords.find(lockId);
- if (it == LockChangeRecords.end()) {
- static TVector<NMiniKQL::IChangeCollector::TChange> empty;
- return empty;
- }
-
- return it->second;
-}
-
void TDataShard::CreateChangeSender(const TActorContext& ctx) {
Y_VERIFY(!OutChangeSender);
OutChangeSender = Register(NDataShard::CreateChangeSender(this));
@@ -895,7 +965,7 @@ void TDataShard::SuspendChangeSender(const TActorContext& ctx) {
OutChangeSenderSuspended = true;
}
-bool TDataShard::LoadChangeRecords(NIceDb::TNiceDb& db, TVector<NMiniKQL::IChangeCollector::TChange>& records) {
+bool TDataShard::LoadChangeRecords(NIceDb::TNiceDb& db, TVector<IDataShardChangeCollector::TChange>& records) {
using Schema = TDataShard::Schema;
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_DATASHARD, "LoadChangeRecords"
@@ -925,7 +995,7 @@ bool TDataShard::LoadChangeRecords(NIceDb::TNiceDb& db, TVector<NMiniKQL::IChang
rowset.GetValue<Schema::ChangeRecords::TablePathId>()
);
- records.push_back(NMiniKQL::IChangeCollector::TChange{
+ records.push_back(IDataShardChangeCollector::TChange{
.Order = order,
.Group = group,
.Step = step,
@@ -969,7 +1039,9 @@ bool TDataShard::LoadLockChangeRecords(NIceDb::TNiceDb& db) {
rowset.GetValue<Schema::LockChangeRecords::TablePathId>()
);
- LockChangeRecords[lockId].push_back(NMiniKQL::IChangeCollector::TChange{
+ auto& state = LockChangeRecords[lockId];
+
+ state.Changes.push_back(IDataShardChangeCollector::TChange{
.Order = Max<ui64>(),
.Group = 0,
.Step = 0,
@@ -981,6 +1053,7 @@ bool TDataShard::LoadLockChangeRecords(NIceDb::TNiceDb& db) {
.LockId = lockId,
.LockOffset = lockOffset,
});
+ state.PersistentCount = state.Changes.size();
if (!rowset.Next()) {
return false;
@@ -990,7 +1063,7 @@ bool TDataShard::LoadLockChangeRecords(NIceDb::TNiceDb& db) {
return true;
}
-bool TDataShard::LoadChangeRecordCommits(NIceDb::TNiceDb& db, TVector<NMiniKQL::IChangeCollector::TChange>& records) {
+bool TDataShard::LoadChangeRecordCommits(NIceDb::TNiceDb& db, TVector<IDataShardChangeCollector::TChange>& records) {
using Schema = TDataShard::Schema;
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TX_DATASHARD, "LoadChangeRecordCommits"
@@ -1016,8 +1089,8 @@ bool TDataShard::LoadChangeRecordCommits(NIceDb::TNiceDb& db, TVector<NMiniKQL::
entry.Step = step;
entry.TxId = txId;
- for (auto& record : LockChangeRecords[lockId]) {
- records.push_back(NMiniKQL::IChangeCollector::TChange{
+ for (auto& record : LockChangeRecords[lockId].Changes) {
+ records.push_back(IDataShardChangeCollector::TChange{
.Order = order + record.LockOffset,
.Group = group,
.Step = step,
@@ -1076,6 +1149,11 @@ void TDataShard::ScheduleRemoveAbandonedLockChanges() {
continue;
}
+ if (auto* info = VolatileTxManager.FindByCommitTxId(lockId)) {
+ // Skip lock changes attached to volatile transactions
+ continue;
+ }
+
PendingLockChangeRecordsToRemove.push_back(lockId);
}
@@ -2852,12 +2930,22 @@ void TDataShard::AbortExpectationsFromDeletedTablet(ui64 tabletId, THashMap<ui64
void TDataShard::Handle(TEvTabletPipe::TEvServerConnected::TPtr &ev, const TActorContext &ctx) {
Y_UNUSED(ev); Y_UNUSED(ctx);
- LOG_DEBUG(ctx, NKikimrServices::TX_DATASHARD, "Server connected at tablet %s %" PRIu64 ,
- Executor()->GetStats().IsFollower ? "follower" : "leader", ev->Get()->TabletId);
+ LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, "Server connected at "
+ << (Executor()->GetStats().IsFollower ? "follower " : "leader ")
+ << "tablet# " << ev->Get()->TabletId
+ << ", clientId# " << ev->Get()->ClientId
+ << ", serverId# " << ev->Get()->ServerId
+ << ", sessionId# " << ev->InterconnectSession);
}
void TDataShard::Handle(TEvTabletPipe::TEvServerDisconnected::TPtr &ev, const TActorContext &ctx) {
Y_UNUSED(ev); Y_UNUSED(ctx);
+ LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, "Server disconnected at "
+ << (Executor()->GetStats().IsFollower ? "follower " : "leader ")
+ << "tablet# " << ev->Get()->TabletId
+ << ", clientId# " << ev->Get()->ClientId
+ << ", serverId# " << ev->Get()->ServerId
+ << ", sessionId# " << ev->InterconnectSession);
}
void TDataShard::Handle(TEvMediatorTimecast::TEvRegisterTabletResult::TPtr& ev, const TActorContext& ctx) {
@@ -3090,6 +3178,15 @@ bool TDataShard::RemoveExpectation(ui64 target, ui64 txId) {
auto ctx = TActivationContext::ActorContextFor(SelfId());
ResendReadSetPipeTracker.DetachTablet(Max<ui64>(), target, 0, ctx);
}
+
+ // progress one more tx to force delayed schema operations
+ if (removed && OutReadSets.Empty() && Pipeline.HasSchemaOperation()) {
+ // TODO: wait for empty OutRS in a separate unit?
+ auto ctx = TActivationContext::ActorContextFor(SelfId());
+ Pipeline.AddCandidateUnit(EExecutionUnitKind::PlanQueue);
+ PlanQueue.Progress(ctx);
+ }
+
return removed;
}
@@ -3675,6 +3772,12 @@ void TDataShard::ScanComplete(NTable::EAbort,
<< ", at: "<< TabletID());
InFlightCondErase.Clear();
+ } else if (CdcStreamScanManager.Has(cookie)) {
+ LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, "Cdc stream scan complete"
+ << ": cookie: " << cookie
+ << ", at: "<< TabletID());
+
+ CdcStreamScanManager.Complete(cookie);
} else if (!Pipeline.FinishStreamingTx(cookie)) {
LOG_ERROR_S(ctx, NKikimrServices::TX_DATASHARD,
"Scan complete at " << TabletID() << " for unknown tx " << cookie);
@@ -3973,4 +4076,19 @@ void TEvDataShard::TEvReadResult::FillRecord() {
}
}
+std::shared_ptr<arrow::RecordBatch> TEvDataShard::TEvReadResult::GetArrowBatch() const {
+ return const_cast<TEvDataShard::TEvReadResult*>(this)->GetArrowBatch();
+}
+
+std::shared_ptr<arrow::RecordBatch> TEvDataShard::TEvReadResult::GetArrowBatch() {
+ if (ArrowBatch)
+ return ArrowBatch;
+
+ if (Record.GetRowCount() == 0)
+ return nullptr;
+
+ ArrowBatch = NArrow::CreateNoColumnsBatch(Record.GetRowCount());
+ return ArrowBatch;
+}
+
} // NKikimr
diff --git a/ydb/core/tx/datashard/datashard.h b/ydb/core/tx/datashard/datashard.h
index a2237a97ca..b459df3fa0 100644
--- a/ydb/core/tx/datashard/datashard.h
+++ b/ydb/core/tx/datashard/datashard.h
@@ -313,6 +313,9 @@ struct TEvDataShard {
EvGetOpenTxs, /* for tests */
EvGetOpenTxsResult, /* for tests */
+ EvCdcStreamScanRequest,
+ EvCdcStreamScanResponse,
+
EvEnd
};
@@ -899,6 +902,9 @@ struct TEvDataShard {
// In current kqp impl ranges are already in TSerializedTableRange
// format, thus same format here
TVector<TSerializedTableRange> Ranges;
+
+ // True when TEvRead is cancelled while enqueued in a waiting queue
+ bool Cancelled = false;
};
struct TEvReadResult : public TEventPB<TEvReadResult,
@@ -924,20 +930,24 @@ struct TEvDataShard {
static NActors::IEventBase* Load(TEventSerializedData* data);
+ size_t GetRowsCount() const {
+ return Record.GetRowCount();
+ }
+
private:
void FillRecord();
public:
// CellVec (TODO: add schema?)
- size_t GetRowsCount() const {
- return Rows.size() + RowsSerialized.size();
- }
-
TConstArrayRef<TCell> GetCells(size_t row) const {
+ if (Rows.empty() && RowsSerialized.empty() && Record.GetRowCount())
+ return {};
+
if (!Rows.empty()) {
return Rows[row];
}
+
return RowsSerialized[row].GetCells();
}
@@ -947,7 +957,12 @@ struct TEvDataShard {
// Arrow
- std::shared_ptr<arrow::RecordBatch> ArrowBatch;
+ void SetArrowBatch(std::shared_ptr<arrow::RecordBatch>&& batch) {
+ ArrowBatch = std::move(batch);
+ }
+
+ std::shared_ptr<arrow::RecordBatch> GetArrowBatch();
+ std::shared_ptr<arrow::RecordBatch> GetArrowBatch() const;
private:
// for local events
@@ -955,6 +970,8 @@ struct TEvDataShard {
// for remote events to avoid extra copying
TVector<TSerializedCellVec> RowsSerialized;
+
+ std::shared_ptr<arrow::RecordBatch> ArrowBatch;
};
struct TEvReadContinue : public TEventLocal<TEvReadContinue, TEvDataShard::EvReadContinue> {
@@ -1582,6 +1599,31 @@ struct TEvDataShard {
{ }
};
+ struct TEvCdcStreamScanRequest
+ : public TEventPB<TEvCdcStreamScanRequest,
+ NKikimrTxDataShard::TEvCdcStreamScanRequest,
+ EvCdcStreamScanRequest>
+ {
+ };
+
+ struct TEvCdcStreamScanResponse
+ : public TEventPB<TEvCdcStreamScanResponse,
+ NKikimrTxDataShard::TEvCdcStreamScanResponse,
+ EvCdcStreamScanResponse>
+ {
+ TEvCdcStreamScanResponse() = default;
+
+ explicit TEvCdcStreamScanResponse(
+ const NKikimrTxDataShard::TEvCdcStreamScanRequest& request, ui64 tabletId,
+ NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus status, const TString& error = {})
+ {
+ Record.SetTabletId(tabletId);
+ Record.MutableTablePathId()->CopyFrom(request.GetTablePathId());
+ Record.MutableStreamPathId()->CopyFrom(request.GetStreamPathId());
+ Record.SetStatus(status);
+ Record.SetErrorDescription(error);
+ }
+ };
};
IActor* CreateDataShard(const TActorId &tablet, TTabletStorageInfo *info);
diff --git a/ydb/core/tx/datashard/datashard__engine_host.cpp b/ydb/core/tx/datashard/datashard__engine_host.cpp
index 3891d6b076..f5e4ce2da0 100644
--- a/ydb/core/tx/datashard/datashard__engine_host.cpp
+++ b/ydb/core/tx/datashard/datashard__engine_host.cpp
@@ -214,18 +214,31 @@ public:
const TTableId& tableId,
TArrayRef<const TRawTypeValue> key,
TArrayRef<const NTable::TTag> tags,
- NTable::TRowState& row) override
+ NTable::TRowState& row,
+ NTable::TSelectStats& stats,
+ const TMaybe<TRowVersion>& readVersion) override
{
auto tid = LocalTableId(tableId);
return DB.Select(
- tid, key, tags, row,
+ tid, key, tags, row, stats,
/* readFlags */ 0,
- ReadVersion,
+ readVersion.GetOrElse(ReadVersion),
GetReadTxMap(tableId),
GetReadTxObserver(tableId));
}
+ NTable::EReady SelectRow(
+ const TTableId& tableId,
+ TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const NTable::TTag> tags,
+ NTable::TRowState& row,
+ const TMaybe<TRowVersion>& readVersion) override
+ {
+ NTable::TSelectStats stats;
+ return SelectRow(tableId, key, tags, row, stats, readVersion);
+ }
+
void SetWriteVersion(TRowVersion writeVersion) {
WriteVersion = writeVersion;
}
@@ -273,7 +286,7 @@ public:
return it->second.Get();
}
- void CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion, TTransactionContext& txc) {
+ void CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion) {
auto localTid = Self->GetLocalTableId(tableId);
Y_VERIFY_S(localTid, "Unexpected failure to find table " << tableId << " in datashard " << Self->TabletID());
@@ -298,19 +311,16 @@ public:
"Committing changes lockId# " << lockId << " in localTid# " << localTid << " shard# " << Self->TabletID());
DB.CommitTx(localTid, lockId, writeVersion);
- if (!CommittedLockChanges.contains(lockId)) {
- if (const auto& lockChanges = Self->GetLockChangeRecords(lockId)) {
- if (auto* collector = GetChangeCollector(tableId)) {
- collector->SetWriteVersion(WriteVersion);
- collector->CommitLockChanges(lockId, lockChanges, txc);
- CommittedLockChanges.insert(lockId);
- }
+ if (!CommittedLockChanges.contains(lockId) && Self->HasLockChangeRecords(lockId)) {
+ if (auto* collector = GetChangeCollector(tableId)) {
+ collector->CommitLockChanges(lockId, WriteVersion);
+ CommittedLockChanges.insert(lockId);
}
}
}
- TVector<IChangeCollector::TChange> GetCollectedChanges() const {
- TVector<IChangeCollector::TChange> total;
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const {
+ TVector<IDataShardChangeCollector::TChange> total;
for (auto& [_, collector] : ChangeCollectors) {
if (!collector) {
@@ -327,7 +337,7 @@ public:
void ResetCollectedChanges() {
for (auto& pr : ChangeCollectors) {
if (pr.second) {
- pr.second->Reset();
+ pr.second->OnRestart();
}
}
}
@@ -536,7 +546,13 @@ public:
if (VolatileTxId) {
Y_VERIFY(!LockTxId);
- VolatileCommitTxIds.insert(VolatileTxId);
+ if (VolatileCommitTxIds.insert(VolatileTxId).second) {
+ // Update TxMap to include the new commit
+ auto it = TxMaps.find(tableId.PathId);
+ if (it != TxMaps.end()) {
+ it->second->Add(VolatileTxId, WriteVersion);
+ }
+ }
return VolatileTxId;
}
@@ -549,14 +565,17 @@ public:
}
auto baseTxMap = Self->GetVolatileTxManager().GetTxMap();
- if (!baseTxMap && !VolatileTxId && !LockTxId) {
- // Don't use tx map when there's nothing we want to view as committed
- return nullptr;
- }
- // Don't use tx map when we know there's no write lock for a table
- // Note: currently write lock implies uncommitted changes
- if (!baseTxMap && !VolatileTxId && LockTxId && !Self->SysLocksTable().HasCurrentWriteLock(tableId)) {
+ bool needTxMap = (
+ // We need tx map when there are waiting volatile transactions
+ baseTxMap ||
+ // We need tx map to see committed volatile tx changes
+ VolatileTxId && !VolatileCommitTxIds.empty() ||
+ // We need tx map when current lock has uncommitted changes
+ LockTxId && Self->SysLocksTable().HasCurrentWriteLock(tableId));
+
+ if (!needTxMap) {
+ // We don't need tx map
return nullptr;
}
@@ -567,8 +586,7 @@ public:
// Uncommitted changes are visible in all possible snapshots
ptr->Add(LockTxId, TRowVersion::Min());
} else if (VolatileTxId) {
- // We want volatile changes to be visible at the write vrsion
- ptr->Add(VolatileTxId, WriteVersion);
+ // We want committed volatile changes to be visible at the write version
for (ui64 commitTxId : VolatileCommitTxIds) {
ptr->Add(commitTxId, WriteVersion);
}
@@ -579,38 +597,40 @@ public:
}
NTable::ITransactionObserverPtr GetReadTxObserver(const TTableId& tableId) const override {
- if (TSysTables::IsSystemTable(tableId) || !LockTxId)
+ if (TSysTables::IsSystemTable(tableId))
return nullptr;
- if (!Self->GetVolatileTxManager().GetTxMap() &&
- !Self->SysLocksTable().HasWriteLocks(tableId))
- {
- // We don't have any uncommitted changes, so there's nothing we
- // could possibly conflict with.
+ bool needObserver = (
+ // We need observer when there are waiting changes in the tx map
+ Self->GetVolatileTxManager().GetTxMap() ||
+ // We need observer for locked reads when there are active write locks
+ LockTxId && Self->SysLocksTable().HasWriteLocks(tableId));
+
+ if (!needObserver) {
+ // We don't need tx observer
return nullptr;
}
auto& ptr = TxObservers[tableId.PathId];
if (!ptr) {
- // This observer is supposed to find conflicts
- ptr = new TReadTxObserver(this, tableId);
+ if (LockTxId) {
+ ptr = new TLockedReadTxObserver(this);
+ } else {
+ ptr = new TReadTxObserver(this);
+ }
}
return ptr;
}
- class TReadTxObserver : public NTable::ITransactionObserver {
+ class TLockedReadTxObserver : public NTable::ITransactionObserver {
public:
- TReadTxObserver(const TDataShardEngineHost* host, const TTableId& tableId)
+ TLockedReadTxObserver(const TDataShardEngineHost* host)
: Host(host)
- , TableId(tableId)
- {
- Y_UNUSED(Host);
- Y_UNUSED(TableId);
- }
+ { }
void OnSkipUncommitted(ui64 txId) override {
- Host->AddReadConflict(TableId, txId);
+ Host->AddReadConflict(txId);
}
void OnSkipCommitted(const TRowVersion&) override {
@@ -622,21 +642,50 @@ public:
}
void OnApplyCommitted(const TRowVersion& rowVersion) override {
- Host->CheckReadConflict(TableId, rowVersion);
+ Host->CheckReadConflict(rowVersion);
}
void OnApplyCommitted(const TRowVersion& rowVersion, ui64 txId) override {
- Host->CheckReadConflict(TableId, rowVersion);
+ Host->CheckReadConflict(rowVersion);
Host->CheckReadDependency(txId);
}
private:
const TDataShardEngineHost* const Host;
- const TTableId TableId;
};
- void AddReadConflict(const TTableId& tableId, ui64 txId) const {
- Y_UNUSED(tableId);
+ class TReadTxObserver : public NTable::ITransactionObserver {
+ public:
+ TReadTxObserver(const TDataShardEngineHost* host)
+ : Host(host)
+ { }
+
+ void OnSkipUncommitted(ui64) override {
+ // We don't care about uncommitted changes
+ // Any future commit is supposed to be above our read version
+ }
+
+ void OnSkipCommitted(const TRowVersion&) override {
+ // We already use InvisibleRowSkips for these
+ }
+
+ void OnSkipCommitted(const TRowVersion&, ui64) override {
+ // We already use InvisibleRowSkips for these
+ }
+
+ void OnApplyCommitted(const TRowVersion&) override {
+ // Not needed
+ }
+
+ void OnApplyCommitted(const TRowVersion&, ui64 txId) override {
+ Host->CheckReadDependency(txId);
+ }
+
+ private:
+ const TDataShardEngineHost* const Host;
+ };
+
+ void AddReadConflict(ui64 txId) const {
Y_VERIFY(LockTxId);
// We have detected uncommitted changes in txId that could affect
@@ -645,8 +694,7 @@ public:
Self->SysLocksTable().AddReadConflict(txId);
}
- void CheckReadConflict(const TTableId& tableId, const TRowVersion& rowVersion) const {
- Y_UNUSED(tableId);
+ void CheckReadConflict(const TRowVersion& rowVersion) const {
Y_VERIFY(LockTxId);
if (rowVersion > ReadVersion) {
@@ -663,11 +711,38 @@ public:
void CheckReadDependency(ui64 txId) const {
if (auto* info = Self->GetVolatileTxManager().FindByCommitTxId(txId)) {
- if (info->State == EVolatileTxState::Waiting) {
- // We are reading undecided changes and need to wait until they are resolved
- VolatileReadDependencies.insert(info->TxId);
+ switch (info->State) {
+ case EVolatileTxState::Waiting:
+ // We are reading undecided changes and need to wait until they are resolved
+ EngineBay.GetKqpComputeCtx().AddVolatileReadDependency(info->TxId);
+ break;
+ case EVolatileTxState::Committed:
+ // Committed changes are immediately visible and don't need a dependency
+ break;
+ case EVolatileTxState::Aborting:
+ // We just read something that we know is aborting, we would have to retry later
+ EngineBay.GetKqpComputeCtx().AddVolatileReadDependency(info->TxId);
+ break;
+ }
+ }
+ }
+
+ bool NeedToReadBeforeWrite(const TTableId& tableId) const override {
+ if (Self->GetVolatileTxManager().GetTxMap()) {
+ return true;
+ }
+
+ if (Self->SysLocksTable().HasWriteLocks(tableId)) {
+ return true;
+ }
+
+ if (auto* collector = GetChangeCollector(tableId)) {
+ if (collector->NeedToReadKeys()) {
+ return true;
}
}
+
+ return false;
}
void CheckWriteConflicts(const TTableId& tableId, TArrayRef<const TCell> row) {
@@ -714,7 +789,7 @@ public:
class TLockedWriteTxObserver : public NTable::ITransactionObserver {
public:
- TLockedWriteTxObserver(const TDataShardEngineHost* host, ui64 txId, ui64& skipCount, ui32 localTid)
+ TLockedWriteTxObserver(TDataShardEngineHost* host, ui64 txId, ui64& skipCount, ui32 localTid)
: Host(host)
, SelfTxId(txId)
, SkipCount(skipCount)
@@ -754,7 +829,7 @@ public:
}
private:
- const TDataShardEngineHost* const Host;
+ TDataShardEngineHost* const Host;
const ui64 SelfTxId;
ui64& SkipCount;
const ui32 LocalTid;
@@ -763,7 +838,7 @@ public:
class TWriteTxObserver : public NTable::ITransactionObserver {
public:
- TWriteTxObserver(const TDataShardEngineHost* host)
+ TWriteTxObserver(TDataShardEngineHost* host)
: Host(host)
{
}
@@ -791,7 +866,7 @@ public:
}
private:
- const TDataShardEngineHost* const Host;
+ TDataShardEngineHost* const Host;
};
void AddWriteConflict(ui64 txId) const {
@@ -802,19 +877,26 @@ public:
}
}
- void BreakWriteConflict(ui64 txId) const {
+ void BreakWriteConflict(ui64 txId) {
if (VolatileCommitTxIds.contains(txId)) {
// Skip our own commits
} else if (auto* info = Self->GetVolatileTxManager().FindByCommitTxId(txId)) {
// We must not overwrite uncommitted changes that may become committed
- // later, so we need to switch transaction to volatile writes mid
- // flight. This is only needed so we don't block writes and still
- // commit changes in the correct order.
- if (!VolatileTxId && info->State != EVolatileTxState::Aborted) {
- Y_FAIL("TODO: implement switching to volatile writes mid-transaction");
- }
- // Add dependency on undecided transactions
- if (info->State == EVolatileTxState::Waiting) {
+ // later, so we need to add a dependency that will force us to wait
+ // until it is persistently committed. We may ignore aborting changes
+ // even though they may not be persistent yet, since this tx will
+ // also perform writes, and either it fails, or future generation
+ // could not have possibly committed it already.
+ if (info->State != EVolatileTxState::Aborting) {
+ if (!VolatileTxId) {
+ // All further writes will use this VolatileTxId and will
+ // add it to VolatileCommitTxIds, forcing it to be committed
+ // like a volatile transaction. Note that this does not make
+ // it into a real volatile transaction, it works as usual in
+ // every sense, only persistent commit order is affected by
+ // a dependency below.
+ VolatileTxId = EngineBay.GetTxId();
+ }
VolatileDependencies.insert(info->TxId);
}
} else {
@@ -845,7 +927,6 @@ private:
mutable absl::flat_hash_map<TPathId, NTable::ITransactionObserverPtr> TxObservers;
mutable absl::flat_hash_set<ui64> VolatileCommitTxIds;
mutable absl::flat_hash_set<ui64> VolatileDependencies;
- mutable absl::flat_hash_set<ui64> VolatileReadDependencies;
};
//
@@ -1042,14 +1123,14 @@ void TEngineBay::SetIsRepeatableSnapshot() {
host->SetIsRepeatableSnapshot();
}
-void TEngineBay::CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion, TTransactionContext& txc) {
+void TEngineBay::CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion) {
Y_VERIFY(EngineHost);
auto* host = static_cast<TDataShardEngineHost*>(EngineHost.Get());
- host->CommitChanges(tableId, lockId, writeVersion, txc);
+ host->CommitChanges(tableId, lockId, writeVersion);
}
-TVector<IChangeCollector::TChange> TEngineBay::GetCollectedChanges() const {
+TVector<IDataShardChangeCollector::TChange> TEngineBay::GetCollectedChanges() const {
Y_VERIFY(EngineHost);
auto* host = static_cast<TDataShardEngineHost*>(EngineHost.Get());
diff --git a/ydb/core/tx/datashard/datashard__engine_host.h b/ydb/core/tx/datashard/datashard__engine_host.h
index 6a4b877b7d..62bfe0a197 100644
--- a/ydb/core/tx/datashard/datashard__engine_host.h
+++ b/ydb/core/tx/datashard/datashard__engine_host.h
@@ -1,6 +1,7 @@
#pragma once
#include "defs.h"
+#include "change_collector.h"
#include <ydb/core/kqp/runtime/kqp_tasks_runner.h>
#include <ydb/core/tablet_flat/tablet_flat_executor.h>
@@ -94,6 +95,9 @@ public:
EngineHost.Reset();
}
+ ui64 GetStep() const { return StepTxId.first; }
+ ui64 GetTxId() const { return StepTxId.second; }
+
const TValidationInfo& TxInfo() const { return Info; }
TEngineBay::TSizes CalcSizes(bool needsTotalKeysSize) const;
@@ -103,9 +107,9 @@ public:
void SetIsImmediateTx();
void SetIsRepeatableSnapshot();
- void CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion, TTransactionContext& txc);
+ void CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion);
- TVector<NMiniKQL::IChangeCollector::TChange> GetCollectedChanges() const;
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const;
void ResetCollectedChanges();
TVector<ui64> GetVolatileCommitTxIds() const;
diff --git a/ydb/core/tx/datashard/datashard__init.cpp b/ydb/core/tx/datashard/datashard__init.cpp
index b88b6650b3..d609d6813e 100644
--- a/ydb/core/tx/datashard/datashard__init.cpp
+++ b/ydb/core/tx/datashard/datashard__init.cpp
@@ -30,6 +30,7 @@ bool TDataShard::TTxInit::Execute(TTransactionContext& txc, const TActorContext&
Self->SchemaSnapshotManager.Reset();
Self->S3Uploads.Reset();
Self->S3Downloads.Reset();
+ Self->CdcStreamScanManager.Reset();
Self->KillChangeSender(ctx);
Self->ChangesQueue.clear();
@@ -42,6 +43,9 @@ bool TDataShard::TTxInit::Execute(TTransactionContext& txc, const TActorContext&
if (done && Self->State != TShardState::Offline) {
Self->SnapshotManager.Fix_KIKIMR_12289(txc.DB);
Self->SnapshotManager.Fix_KIKIMR_14259(txc.DB);
+ for (const auto& pr : Self->TableInfos) {
+ pr.second->Fix_KIKIMR_17222(txc.DB);
+ }
}
return done;
@@ -173,6 +177,7 @@ bool TDataShard::TTxInit::ReadEverything(TTransactionContext &txc) {
PRECHARGE_SYS_TABLE(Schema::LockConflicts);
PRECHARGE_SYS_TABLE(Schema::TxVolatileDetails);
PRECHARGE_SYS_TABLE(Schema::TxVolatileParticipants);
+ PRECHARGE_SYS_TABLE(Schema::CdcStreamScans);
if (!ready)
return false;
@@ -522,6 +527,12 @@ bool TDataShard::TTxInit::ReadEverything(TTransactionContext &txc) {
}
}
+ if (Self->State != TShardState::Offline && txc.DB.GetScheme().GetTableInfo(Schema::CdcStreamScans::TableId)) {
+ if (!Self->CdcStreamScanManager.Load(db)) {
+ return false;
+ }
+ }
+
Self->SubscribeNewLocks();
Self->ScheduleRemoveAbandonedLockChanges();
diff --git a/ydb/core/tx/datashard/datashard__kqp_scan.cpp b/ydb/core/tx/datashard/datashard__kqp_scan.cpp
index a691ba1182..f04adb2952 100644
--- a/ydb/core/tx/datashard/datashard__kqp_scan.cpp
+++ b/ydb/core/tx/datashard/datashard__kqp_scan.cpp
@@ -543,6 +543,13 @@ void TDataShard::Handle(TEvDataShard::TEvKqpScan::TPtr& ev, const TActorContext&
auto scanComputeActor = ev->Sender;
auto generation = request.GetGeneration();
+ if (VolatileTxManager.HasVolatileTxsAtSnapshot(TRowVersion(request.GetSnapshot().GetStep(), request.GetSnapshot().GetTxId()))) {
+ VolatileTxManager.AttachWaitingSnapshotEvent(
+ TRowVersion(request.GetSnapshot().GetStep(), request.GetSnapshot().GetTxId()),
+ std::unique_ptr<IEventHandle>(ev.Release()));
+ return;
+ }
+
auto infoIt = TableInfos.find(request.GetLocalPathId());
auto reportError = [this, scanComputeActor, generation] (const TString& table, const TString& detailedReason) {
diff --git a/ydb/core/tx/datashard/datashard__monitoring.cpp b/ydb/core/tx/datashard/datashard__monitoring.cpp
index 644f9a7419..957b7c0089 100644
--- a/ydb/core/tx/datashard/datashard__monitoring.cpp
+++ b/ydb/core/tx/datashard/datashard__monitoring.cpp
@@ -255,6 +255,7 @@ public:
auto &deps = *resp.MutableDependencies();
FillDependencies(op->GetDependencies(), *deps.MutableDependencies());
FillDependencies(op->GetDependents(), *deps.MutableDependents());
+ FillDependencies(op->GetVolatileDependencies(), *deps.MutableDependencies());
if (op->IsExecuting() && !op->InReadSets().empty()) {
auto &inData = *resp.MutableInputData();
@@ -299,6 +300,16 @@ public:
}
}
+ void FillDependencies(const absl::flat_hash_set<ui64> &deps,
+ ::google::protobuf::RepeatedPtrField<NKikimrTxDataShard::TEvGetOperationResponse_TDependency> &arr)
+ {
+ for (ui64 txId : deps) {
+ auto &dep = *arr.Add();
+ dep.SetTarget(txId);
+ dep.AddTypes("Data");
+ }
+ }
+
void Complete(const TActorContext &) override {}
TTxType GetTxType() const override { return TXTYPE_MONITORING; }
diff --git a/ydb/core/tx/datashard/datashard__read_columns.cpp b/ydb/core/tx/datashard/datashard__read_columns.cpp
index 983abe32f7..66cbf2c77f 100644
--- a/ydb/core/tx/datashard/datashard__read_columns.cpp
+++ b/ydb/core/tx/datashard/datashard__read_columns.cpp
@@ -212,6 +212,15 @@ public:
}
bool Execute(TTransactionContext& txc, const TActorContext& ctx) override {
+ // FIXME: we need to transform HEAD into some non-repeatable snapshot here
+ if (!ReadVersion.IsMax() && Self->GetVolatileTxManager().HasVolatileTxsAtSnapshot(ReadVersion)) {
+ Self->GetVolatileTxManager().AttachWaitingSnapshotEvent(
+ ReadVersion,
+ std::unique_ptr<IEventHandle>(Ev.Release()));
+ Result.Destroy();
+ return true;
+ }
+
Result = new TEvDataShard::TEvReadColumnsResponse(Self->TabletID());
bool useScan = Self->ReadColumnsScanEnabled;
diff --git a/ydb/core/tx/datashard/datashard__read_iterator.cpp b/ydb/core/tx/datashard/datashard__read_iterator.cpp
index 05f5a7e8a2..0a051664af 100644
--- a/ydb/core/tx/datashard/datashard__read_iterator.cpp
+++ b/ydb/core/tx/datashard/datashard__read_iterator.cpp
@@ -17,6 +17,32 @@ namespace {
constexpr ui64 MinRowsPerCheck = 1000;
+class TRowCountBlockBuilder : public IBlockBuilder {
+public:
+ bool Start(const TVector<std::pair<TString, NScheme::TTypeInfo>>&, ui64, ui64, TString&) override
+ {
+ return true;
+ }
+
+ void AddRow(const TDbTupleRef&, const TDbTupleRef&) override {
+ ++RowCount;
+ }
+
+ TString Finish() override {
+ return TString();
+ }
+
+ size_t Bytes() const override { return 0; }
+
+private:
+ ui64 RowCount = 0;
+
+ std::unique_ptr<IBlockBuilder> Clone() const override {
+ return nullptr;
+ }
+};
+
+
class TCellBlockBuilder : public IBlockBuilder {
public:
bool Start(
@@ -152,6 +178,11 @@ std::pair<std::unique_ptr<IBlockBuilder>, TString> CreateBlockBuilder(
std::unique_ptr<IBlockBuilder> blockBuilder;
TString error;
+ if (state.Columns.empty()) {
+ blockBuilder.reset(new TRowCountBlockBuilder());
+ return std::make_pair(std::move(blockBuilder), error);
+ }
+
auto nameTypeCols = GetNameTypeColumns(state.Columns, tableInfo);
if (nameTypeCols.empty()) {
error = "Wrong columns requested";
@@ -159,10 +190,10 @@ std::pair<std::unique_ptr<IBlockBuilder>, TString> CreateBlockBuilder(
}
switch (state.Format) {
- case NKikimrTxDataShard::EScanDataFormat::ARROW:
+ case NKikimrTxDataShard::ARROW:
blockBuilder.reset(new NArrow::TArrowBatchBuilder());
break;
- case NKikimrTxDataShard::EScanDataFormat::CELLVEC:
+ case NKikimrTxDataShard::CELLVEC:
blockBuilder.reset(new TCellBlockBuilder());
break;
default:
@@ -229,9 +260,11 @@ class TReader {
const TMonotonic StartTs;
TDataShard* Self;
+ const TTableId TableId;
+
std::vector<NScheme::TTypeInfo> ColumnTypes;
- ui32 FirstUnprocessedQuery;
+ ui32 FirstUnprocessedQuery; // must be unsigned
TString LastProcessedKey;
ui64 RowsRead = 0;
@@ -249,6 +282,8 @@ class TReader {
NTable::ITransactionMapPtr TxMap;
NTable::ITransactionObserverPtr TxObserver;
+ absl::flat_hash_set<ui64> VolatileReadDependencies;
+ bool VolatileWaitForCommit = false;
enum class EReadStatus {
Done = 0,
@@ -267,6 +302,7 @@ public:
, TableInfo(tableInfo)
, StartTs(ts)
, Self(self)
+ , TableId(state.PathId.OwnerId, state.PathId.LocalPathId, state.SchemaVersion)
, FirstUnprocessedQuery(State.FirstUnprocessedQuery)
{
GetTimeFast(&StartTime);
@@ -279,17 +315,34 @@ public:
const TSerializedTableRange& range)
{
bool fromInclusive;
+ bool toInclusive;
TSerializedCellVec keyFromCells;
+ TSerializedCellVec keyToCells;
if (Y_UNLIKELY(FirstUnprocessedQuery == State.FirstUnprocessedQuery && State.LastProcessedKey)) {
- fromInclusive = false;
- keyFromCells = TSerializedCellVec(State.LastProcessedKey);
+ if (!State.Reverse) {
+ keyFromCells = TSerializedCellVec(State.LastProcessedKey);
+ fromInclusive = false;
+
+ keyToCells = range.To;
+ toInclusive = range.ToInclusive;
+ } else {
+ // reverse
+ keyFromCells = range.From;
+ fromInclusive = true;
+
+ keyToCells = TSerializedCellVec(State.LastProcessedKey);
+ toInclusive = false;
+ }
} else {
- fromInclusive = range.FromInclusive;
keyFromCells = range.From;
+ fromInclusive = range.FromInclusive;
+
+ keyToCells = range.To;
+ toInclusive = range.ToInclusive;
}
+
const auto keyFrom = ToRawTypeValue(keyFromCells, TableInfo, fromInclusive);
- const TSerializedCellVec keyToCells(range.To);
- const auto keyTo = ToRawTypeValue(keyToCells, TableInfo, !range.ToInclusive);
+ const auto keyTo = ToRawTypeValue(keyToCells, TableInfo, !toInclusive);
// TODO: split range into parts like in read_columns
@@ -297,8 +350,8 @@ public:
iterRange.MinKey = keyFrom;
iterRange.MaxKey = keyTo;
iterRange.MinInclusive = fromInclusive;
- iterRange.MaxInclusive = range.ToInclusive;
- bool reverse = State.Reverse;
+ iterRange.MaxInclusive = toInclusive;
+ const bool reverse = State.Reverse;
EReadStatus result;
if (!reverse) {
@@ -358,12 +411,15 @@ public:
if (ready == NTable::EReady::Page) {
return EReadStatus::NeedData;
}
+
+ Self->GetKeyAccessSampler()->AddSample(TableId, keyCells.GetCells());
+
if (ready == NTable::EReady::Gone) {
return EReadStatus::Done;
}
// TODO: looks kind of ugly: we assume that cells in rowState are stored in array
- TDbTupleRef value(&ColumnTypes[0], &rowState.Get(0), ColumnTypes.size());
+ TDbTupleRef value(ColumnTypes.data(), (*rowState).data(), ColumnTypes.size());
// note that if user requests key columns then they will be in
// rowValues and we don't have to add rowKey columns
@@ -376,7 +432,9 @@ public:
// TODO: merge ReadRanges and ReadKeys to single template Read?
bool ReadRanges(TTransactionContext& txc, const TActorContext& ctx) {
- for (; FirstUnprocessedQuery < State.Request->Ranges.size(); ++FirstUnprocessedQuery) {
+ // note that FirstUnprocessedQuery is unsigned and if we do reverse iteration,
+ // then it will also become less than size() when finished
+ while (FirstUnprocessedQuery < State.Request->Ranges.size()) {
if (ShouldStop())
return true;
@@ -384,7 +442,7 @@ public:
auto status = ReadRange(txc, ctx, range);
switch (status) {
case EReadStatus::Done:
- continue;
+ break;
case EReadStatus::StoppedByLimit:
return true;
case EReadStatus::NeedData:
@@ -392,13 +450,20 @@ public:
return true;
return false;
}
+
+ if (!State.Reverse)
+ FirstUnprocessedQuery++;
+ else
+ FirstUnprocessedQuery--;
}
return true;
}
bool ReadKeys(TTransactionContext& txc, const TActorContext& ctx) {
- for (; FirstUnprocessedQuery < State.Request->Keys.size(); ++FirstUnprocessedQuery) {
+ // note that FirstUnprocessedQuery is unsigned and if we do reverse iteration,
+ // then it will also become less than size() when finished
+ while (FirstUnprocessedQuery < State.Request->Keys.size()) {
if (ShouldStop())
return true;
@@ -406,7 +471,7 @@ public:
auto status = ReadKey(txc, ctx, key, FirstUnprocessedQuery);
switch (status) {
case EReadStatus::Done:
- continue;
+ break;
case EReadStatus::StoppedByLimit:
return true;
case EReadStatus::NeedData:
@@ -414,6 +479,11 @@ public:
return true;
return false;
}
+
+ if (!State.Reverse)
+ FirstUnprocessedQuery++;
+ else
+ FirstUnprocessedQuery--;
}
return true;
@@ -437,6 +507,10 @@ public:
|| FirstUnprocessedQuery < State.Request->Ranges.size();
}
+ size_t GetQueriesCount() const {
+ return State.Request->Keys.size() + State.Request->Ranges.size();
+ }
+
void UpdateCycles() {
GetTimeFast(&EndTime);
}
@@ -493,27 +567,34 @@ public:
}
}
- if (!isKeysRequest)
+ Self->IncCounter(COUNTER_READ_ITERATOR_ROWS_READ, RowsRead);
+ if (!isKeysRequest) {
Self->IncCounter(COUNTER_ENGINE_HOST_SELECT_RANGE_ROW_SKIPS, InvisibleRowSkips);
+ Self->IncCounter(COUNTER_ENGINE_HOST_SELECT_RANGE_ROWS, RowsRead);
+ Self->IncCounter(COUNTER_RANGE_READ_ROWS_PER_REQUEST, RowsRead);
+ }
+ if (RowsRead) {
+ record.SetRowCount(RowsRead);
+ }
+
+ // not that in case of empty columns set, here we have 0 bytes
+ // and if is false
BytesInResult = BlockBuilder.Bytes();
if (BytesInResult) {
- Self->IncCounter(COUNTER_READ_ITERATOR_ROWS_READ, RowsRead);
Self->IncCounter(COUNTER_READ_ITERATOR_BYTES_READ, BytesInResult);
if (isKeysRequest) {
// backward compatibility
Self->IncCounter(COUNTER_ENGINE_HOST_SELECT_ROW_BYTES, BytesInResult);
} else {
// backward compatibility
- Self->IncCounter(COUNTER_ENGINE_HOST_SELECT_RANGE_ROWS, RowsRead);
- Self->IncCounter(COUNTER_RANGE_READ_ROWS_PER_REQUEST, RowsRead);
Self->IncCounter(COUNTER_ENGINE_HOST_SELECT_RANGE_BYTES, BytesInResult);
}
switch (State.Format) {
case NKikimrTxDataShard::ARROW: {
auto& arrowBuilder = static_cast<NArrow::TArrowBatchBuilder&>(BlockBuilder);
- result.ArrowBatch = arrowBuilder.FlushBatch(false);
+ result.SetArrowBatch(arrowBuilder.FlushBatch(false));
break;
}
case NKikimrTxDataShard::CELLVEC: {
@@ -556,9 +637,13 @@ public:
}
ui64 GetRowsRead() const { return RowsRead; }
+ ui64 GetBytesRead() const { return BytesInResult > 0 ? BytesInResult : BlockBuilder.Bytes(); }
bool HadInvisibleRowSkips() const { return InvisibleRowSkips > 0; }
bool HadInconsistentResult() const { return HadInconsistentResult_; }
+ const absl::flat_hash_set<ui64>& GetVolatileReadDependencies() const { return VolatileReadDependencies; }
+ bool NeedVolatileWaitForCommit() const { return VolatileWaitForCommit; }
+
private:
bool OutOfQuota() const {
return RowsRead >= State.Quota.Rows ||
@@ -611,18 +696,20 @@ private:
// note that if user requests key columns then they will be in
// rowValues and we don't have to add rowKey columns
BlockBuilder.AddRow(TDbTupleRef(), rowValues);
-
++RowsRead;
InvisibleRowSkips += iter->Stats.InvisibleRowSkips;
RowsSinceLastCheck += 1 + ResetRowStats(iter->Stats);
+
+ Self->GetKeyAccessSampler()->AddSample(TableId, rowKey.Cells());
+
if (ShouldStop()) {
return EReadStatus::StoppedByLimit;
}
}
// last iteration to Page or Gone also might have deleted or invisible rows
- RowsSinceLastCheck += ResetRowStats(iter->Stats);
InvisibleRowSkips += iter->Stats.InvisibleRowSkips;
+ RowsSinceLastCheck += ResetRowStats(iter->Stats);
// TODO: consider restart when Page and too few data read
// (how much is too few, less than user's limit?)
@@ -638,32 +725,52 @@ private:
}
const NTable::ITransactionMapPtr& GetReadTxMap() {
- if (!TxMap &&
- State.LockId &&
- !TSysTables::IsSystemTable(State.PathId) &&
- Self->SysLocksTable().HasCurrentWriteLock(State.PathId))
- {
- TxMap = new NTable::TSingleTransactionMap(State.LockId, TRowVersion::Min());
+ if (!TxMap && Self->IsUserTable(State.PathId)) {
+ auto baseTxMap = Self->GetVolatileTxManager().GetTxMap();
+
+ bool needTxMap = (
+ // We need tx map when there are waiting volatile transactions
+ baseTxMap ||
+ // We need tx map when current lock has uncommitted changes
+ State.LockId && Self->SysLocksTable().HasCurrentWriteLock(State.PathId));
+
+ if (needTxMap) {
+ auto ptr = MakeIntrusive<NTable::TDynamicTransactionMap>(baseTxMap);
+ if (State.LockId) {
+ ptr->Add(State.LockId, TRowVersion::Min());
+ }
+ TxMap = ptr;
+ }
}
return TxMap;
}
const NTable::ITransactionObserverPtr& GetReadTxObserver() {
- if (!TxObserver &&
- State.LockId &&
- !TSysTables::IsSystemTable(State.PathId) &&
- Self->SysLocksTable().HasWriteLocks(State.PathId))
- {
- TxObserver = new TReadTxObserver(this);
+ if (!TxObserver && Self->IsUserTable(State.PathId)) {
+ auto baseTxMap = Self->GetVolatileTxManager().GetTxMap();
+
+ bool needTxObserver = (
+ // We need tx observer when there are waiting volatile transactions
+ baseTxMap ||
+ // We need tx observer when current lock has uncommitted changes
+ State.LockId && Self->SysLocksTable().HasCurrentWriteLock(State.PathId));
+
+ if (needTxObserver) {
+ if (State.LockId) {
+ TxObserver = new TLockedReadTxObserver(this);
+ } else {
+ TxObserver = new TReadTxObserver(this);
+ }
+ }
}
return TxObserver;
}
- class TReadTxObserver : public NTable::ITransactionObserver {
+ class TLockedReadTxObserver : public NTable::ITransactionObserver {
public:
- TReadTxObserver(TReader* reader)
+ TLockedReadTxObserver(TReader* reader)
: Reader(reader)
{
}
@@ -684,8 +791,40 @@ private:
Reader->CheckReadConflict(rowVersion);
}
- void OnApplyCommitted(const TRowVersion& rowVersion, ui64) override {
+ void OnApplyCommitted(const TRowVersion& rowVersion, ui64 txId) override {
Reader->CheckReadConflict(rowVersion);
+ Reader->CheckReadDependency(txId);
+ }
+
+ private:
+ TReader* const Reader;
+ };
+
+ class TReadTxObserver : public NTable::ITransactionObserver {
+ public:
+ TReadTxObserver(TReader* reader)
+ : Reader(reader)
+ {
+ }
+
+ void OnSkipUncommitted(ui64) override {
+ // We don't care about uncommitted changes
+ }
+
+ void OnSkipCommitted(const TRowVersion&) override {
+ // We already use InvisibleRowSkips for these
+ }
+
+ void OnSkipCommitted(const TRowVersion&, ui64) override {
+ // We already use InvisibleRowSkips for these
+ }
+
+ void OnApplyCommitted(const TRowVersion&) override {
+ // Not needed
+ }
+
+ void OnApplyCommitted(const TRowVersion&, ui64 txId) override {
+ Reader->CheckReadDependency(txId);
}
private:
@@ -711,6 +850,28 @@ private:
HadInconsistentResult_ = true;
}
}
+
+ void CheckReadDependency(ui64 txId) {
+ if (auto* info = Self->GetVolatileTxManager().FindByCommitTxId(txId)) {
+ switch (info->State) {
+ case EVolatileTxState::Waiting:
+ // We are reading undecided changes and need to wait until they are resolved
+ VolatileReadDependencies.insert(info->TxId);
+ break;
+ case EVolatileTxState::Committed:
+ // Committed changes are immediately visible and don't need a dependency
+ if (!info->AddCommitted) {
+ // However we may need to wait until they are persistent
+ VolatileWaitForCommit = true;
+ }
+ break;
+ case EVolatileTxState::Aborting:
+ // We just read something that we know is aborting, we would have to retry later
+ VolatileReadDependencies.insert(info->TxId);
+ break;
+ }
+ }
+ }
};
const NHPTimer::STime TReader::MaxCyclesPerIteration =
@@ -866,7 +1027,7 @@ public:
if (!snapshotFound) {
SetStatusError(
Result->Record,
- Ydb::StatusIds::NOT_FOUND,
+ Ydb::StatusIds::PRECONDITION_FAILED,
TStringBuilder() << "Table id " << tableId << " lost snapshot at "
<< state.ReadVersion << " shard " << Self->TabletID()
<< " with lowWatermark " << Self->GetSnapshotManager().GetLowWatermark()
@@ -919,6 +1080,18 @@ public:
if (!Read(txc, ctx, state))
return EExecutionStatus::Restart;
+ // Check if successful result depends on unresolved volatile transactions
+ if (Result && !Result->Record.HasStatus() && !Reader->GetVolatileReadDependencies().empty()) {
+ for (ui64 txId : Reader->GetVolatileReadDependencies()) {
+ AddVolatileDependency(txId);
+ bool ok = Self->GetVolatileTxManager().AttachBlockedOperation(txId, GetTxId());
+ Y_VERIFY(ok, "Unexpected failure to attach a blocked operation");
+ }
+ Reader.reset();
+ Result.reset(new TEvDataShard::TEvReadResult());
+ return EExecutionStatus::Continue;
+ }
+
TDataShard::EPromotePostExecuteEdges readType = TDataShard::EPromotePostExecuteEdges::RepeatableRead;
if (state.IsHeadRead) {
@@ -973,7 +1146,7 @@ public:
if (hadWrites)
return EExecutionStatus::DelayCompleteNoMoreRestarts;
- if (Self->Pipeline.HasCommittingOpsBelow(state.ReadVersion))
+ if (Self->Pipeline.HasCommittingOpsBelow(state.ReadVersion) || Reader && Reader->NeedVolatileWaitForCommit())
return EExecutionStatus::DelayComplete;
Complete(ctx);
@@ -1018,6 +1191,9 @@ public:
}
state.Reverse = record.GetReverse();
+ if (state.Reverse) {
+ state.FirstUnprocessedQuery = Request->Keys.size() + Request->Ranges.size() - 1;
+ }
if (state.PathId.OwnerId != Self->TabletID()) {
// owner is schemeshard, read user table
@@ -1078,7 +1254,7 @@ public:
if (!snapshotFound) {
SetStatusError(
Result->Record,
- Ydb::StatusIds::NOT_FOUND,
+ Ydb::StatusIds::PRECONDITION_FAILED,
TStringBuilder() << "Table id " << tableId << " has no snapshot at "
<< state.ReadVersion << " shard " << Self->TabletID()
<< " with lowWatermark " << Self->GetSnapshotManager().GetLowWatermark()
@@ -1180,7 +1356,7 @@ public:
auto it = Self->ReadIterators.find(readId);
if (it == Self->ReadIterators.end()) {
// the one who removed the iterator should have reply to user
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
+ LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
<< " has been invalidated before TReadOperation::SendResult()");
return;
}
@@ -1208,9 +1384,9 @@ public:
if (record.HasStatus()) {
record.SetReadId(readId.ReadId);
record.SetSeqNo(state.SeqNo + 1);
- Self->SendImmediateReadResult(Sender, Result.release(), 0, state.SessionId);
LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
<< " TReadOperation::Execute() finished with error, aborting: " << record.DebugString());
+ Self->SendImmediateReadResult(Sender, Result.release(), 0, state.SessionId);
Self->DeleteReadIterator(it);
return;
}
@@ -1219,7 +1395,11 @@ public:
Y_ASSERT(BlockBuilder);
LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
- << " sends rowCount# " << Reader->GetRowsRead() << ", hasUnreadQueries# " << Reader->HasUnreadQueries()
+ << " sends rowCount# " << Reader->GetRowsRead() << ", bytes# " << Reader->GetBytesRead()
+ << ", quota rows left# " << (state.Quota.Rows - Reader->GetRowsRead())
+ << ", quota bytes left# " << (state.Quota.Bytes - Reader->GetBytesRead())
+ << ", hasUnreadQueries# " << Reader->HasUnreadQueries()
+ << ", total queries# " << Reader->GetQueriesCount()
<< ", firstUnprocessed# " << state.FirstUnprocessedQuery);
Reader->FillResult(*Result, state);
@@ -1257,9 +1437,13 @@ public:
ctx.Send(
Self->SelfId(),
new TEvDataShard::TEvReadContinue(Sender, Request->Record.GetReadId()));
+ } else {
+ Self->IncCounter(COUNTER_READ_ITERATORS_EXHAUSTED_COUNT);
+ LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID()
+ << " read iterator# " << readId << " exhausted");
}
} else {
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
+ LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
<< " finished in read");
Self->DeleteReadIterator(it);
}
@@ -1316,7 +1500,7 @@ private:
if (!Self->GetSnapshotManager().FindAvailable(snapshotKey) && !allowMvcc) {
SetStatusError(
Result->Record,
- Ydb::StatusIds::ABORTED,
+ Ydb::StatusIds::PRECONDITION_FAILED,
TStringBuilder() << "Table id " << tableId << " lost snapshot at "
<< state.ReadVersion << " shard " << Self->TabletID()
<< " with lowWatermark " << Self->GetSnapshotManager().GetLowWatermark()
@@ -1624,6 +1808,7 @@ class TDataShard::TTxReadContinue : public NTabletFlatExecutor::TTransactionBase
std::unique_ptr<IBlockBuilder> BlockBuilder;
TShortTableInfo TableInfo;
std::unique_ptr<TReader> Reader;
+ bool DelayedResult = false;
public:
TTxReadContinue(TDataShard* ds, TEvDataShard::TEvReadContinue::TPtr ev)
@@ -1665,7 +1850,7 @@ public:
Result->Record,
Ydb::StatusIds::NOT_FOUND,
TStringBuilder() << "Unknown table id: " << state.PathId.LocalPathId);
- SendResult(txc, ctx);
+ SendResult(ctx);
return true;
}
auto userTableInfo = it->second;
@@ -1677,7 +1862,7 @@ public:
Ydb::StatusIds::SCHEME_ERROR,
TStringBuilder() << "Schema changed, current " << currentSchemaVersion
<< ", requested table schemaversion " << state.SchemaVersion);
- SendResult(txc, ctx);
+ SendResult(ctx);
return true;
}
@@ -1690,7 +1875,7 @@ public:
Ydb::StatusIds::NOT_FOUND,
TStringBuilder() << "Failed to get scheme for table local id: "
<< state.PathId.LocalPathId);
- SendResult(txc, ctx);
+ SendResult(ctx);
return true;
}
TableInfo = TShortTableInfo(state.PathId.LocalPathId, *schema);
@@ -1708,12 +1893,12 @@ public:
if (!Self->GetSnapshotManager().FindAvailable(snapshotKey) && !allowMvcc) {
SetStatusError(
Result->Record,
- Ydb::StatusIds::ABORTED,
+ Ydb::StatusIds::PRECONDITION_FAILED,
TStringBuilder() << "Table id " << tableId << " lost snapshot at "
<< state.ReadVersion << " shard " << Self->TabletID()
<< " with lowWatermark " << Self->GetSnapshotManager().GetLowWatermark()
<< (Self->IsFollower() ? " RO replica" : ""));
- SendResult(txc, ctx);
+ SendResult(ctx);
return true;
}
@@ -1724,7 +1909,7 @@ public:
Result->Record,
Ydb::StatusIds::BAD_REQUEST,
p.second);
- SendResult(txc, ctx);
+ SendResult(ctx);
return true;
}
std::swap(BlockBuilder, p.first);
@@ -1732,7 +1917,7 @@ public:
Y_ASSERT(Result);
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID()
+ LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID()
<< " ReadContinue: reader# " << Ev->Get()->Reader << ", readId# " << Ev->Get()->ReadId
<< ", FirstUnprocessedQuery# " << state.FirstUnprocessedQuery);
@@ -1747,19 +1932,34 @@ public:
Self));
if (Reader->Read(txc, ctx)) {
- SendResult(txc, ctx);
+ // Retry later when dependencies are resolved
+ if (!Reader->GetVolatileReadDependencies().empty()) {
+ Self->WaitVolatileDependenciesThenSend(
+ Reader->GetVolatileReadDependencies(),
+ Self->SelfId(),
+ std::make_unique<TEvDataShard::TEvReadContinue>(Ev->Get()->Reader, Ev->Get()->ReadId));
+ return true;
+ }
+
+ ApplyLocks(ctx);
+
+ if (!Reader->NeedVolatileWaitForCommit()) {
+ SendResult(ctx);
+ } else {
+ DelayedResult = true;
+ }
return true;
}
return false;
}
- void Complete(const TActorContext&) override {
- // nothing to do
+ void Complete(const TActorContext& ctx) override {
+ if (DelayedResult) {
+ SendResult(ctx);
+ }
}
- void SendResult(TTransactionContext& txc, const TActorContext& ctx) {
- Y_UNUSED(txc);
-
+ void ApplyLocks(const TActorContext& ctx) {
const auto* request = Ev->Get();
TReadIteratorId readId(request->Reader, request->ReadId);
auto it = Self->ReadIterators.find(readId);
@@ -1768,31 +1968,15 @@ public:
auto& state = *it->second;
if (!Result) {
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
- << " TTxReadContinue::Execute() finished without Result, aborting");
-
- Result.reset(new TEvDataShard::TEvReadResult());
- SetStatusError(Result->Record, Ydb::StatusIds::ABORTED, "Iterator aborted");
- Result->Record.SetReadId(readId.ReadId);
- Self->SendImmediateReadResult(request->Reader, Result.release(), 0, state.SessionId);
- Self->DeleteReadIterator(it);
return;
}
- // error happened and status set
auto& record = Result->Record;
if (record.HasStatus()) {
- record.SetSeqNo(state.SeqNo + 1);
- record.SetReadId(readId.ReadId);
- Self->SendImmediateReadResult(request->Reader, Result.release(), 0, state.SessionId);
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
- << " TTxReadContinue::Execute() finished with error, aborting: " << record.DebugString());
- Self->DeleteReadIterator(it);
return;
}
Y_ASSERT(Reader);
- Y_ASSERT(BlockBuilder);
if (state.Lock) {
auto& sysLocks = Self->SysLocksTable();
@@ -1820,10 +2004,6 @@ public:
// A broken write lock means we are reading inconsistent results and must abort
if (state.Lock->IsWriteLock()) {
SetStatusError(record, Ydb::StatusIds::ABORTED, "Read conflict with concurrent transaction");
- record.SetSeqNo(state.SeqNo + 1);
- record.SetReadId(readId.ReadId);
- Self->SendImmediateReadResult(request->Reader, Result.release(), 0, state.SessionId);
- Self->DeleteReadIterator(it);
return;
}
@@ -1834,9 +2014,49 @@ public:
Y_VERIFY(locks.empty(), "ApplyLocks acquired unexpected locks");
}
}
+ }
+
+ void SendResult(const TActorContext& ctx) {
+ const auto* request = Ev->Get();
+ TReadIteratorId readId(request->Reader, request->ReadId);
+ auto it = Self->ReadIterators.find(readId);
+ Y_VERIFY(it != Self->ReadIterators.end());
+ Y_VERIFY(it->second);
+ auto& state = *it->second;
+
+ if (!Result) {
+ LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
+ << " TTxReadContinue::Execute() finished without Result, aborting");
+
+ Result.reset(new TEvDataShard::TEvReadResult());
+ SetStatusError(Result->Record, Ydb::StatusIds::ABORTED, "Iterator aborted");
+ Result->Record.SetReadId(readId.ReadId);
+ Self->SendImmediateReadResult(request->Reader, Result.release(), 0, state.SessionId);
+ Self->DeleteReadIterator(it);
+ return;
+ }
+
+ // error happened and status set
+ auto& record = Result->Record;
+ if (record.HasStatus()) {
+ record.SetSeqNo(state.SeqNo + 1);
+ record.SetReadId(readId.ReadId);
+ Self->SendImmediateReadResult(request->Reader, Result.release(), 0, state.SessionId);
+ LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
+ << " TTxReadContinue::Execute() finished with error, aborting: " << record.DebugString());
+ Self->DeleteReadIterator(it);
+ return;
+ }
+
+ Y_ASSERT(Reader);
+ Y_ASSERT(BlockBuilder);
LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " readContinue iterator# " << readId
- << " sends rowCount# " << Reader->GetRowsRead() << ", hasUnreadQueries# " << Reader->HasUnreadQueries()
+ << " sends rowCount# " << Reader->GetRowsRead() << ", bytes# " << Reader->GetBytesRead()
+ << ", quota rows left# " << (state.Quota.Rows - Reader->GetRowsRead())
+ << ", quota bytes left# " << (state.Quota.Bytes - Reader->GetBytesRead())
+ << ", hasUnreadQueries# " << Reader->HasUnreadQueries()
+ << ", total queries# " << Reader->GetQueriesCount()
<< ", firstUnprocessed# " << state.FirstUnprocessedQuery);
Reader->FillResult(*Result, state);
@@ -1851,8 +2071,9 @@ public:
Self->SelfId(),
new TEvDataShard::TEvReadContinue(request->Reader, request->ReadId));
} else {
+ Self->IncCounter(COUNTER_READ_ITERATORS_EXHAUSTED_COUNT);
LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID()
- << " Read quota exhausted for " << request->Reader << "," << request->ReadId);
+ << " read iterator# " << readId << " exhausted");
}
} else {
LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, Self->TabletID() << " read iterator# " << readId
@@ -1863,14 +2084,8 @@ public:
};
void TDataShard::Handle(TEvDataShard::TEvRead::TPtr& ev, const TActorContext& ctx) {
- if (MediatorStateWaiting) {
- MediatorStateWaitingMsgs.emplace_back(ev.Release());
- UpdateProposeQueueSize();
- return;
- }
-
// note that ins some cases we mutate this request below
- const auto* request = ev->Get();
+ auto* request = ev->Get();
const auto& record = request->Record;
if (Y_UNLIKELY(!record.HasReadId())) {
std::unique_ptr<TEvDataShard::TEvReadResult> result(new TEvDataShard::TEvReadResult());
@@ -1880,6 +2095,10 @@ void TDataShard::Handle(TEvDataShard::TEvRead::TPtr& ev, const TActorContext& ct
}
TReadIteratorId readId(ev->Sender, record.GetReadId());
+ if (!Pipeline.HandleWaitingReadIterator(readId, request)) {
+ // This request has been cancelled
+ return;
+ }
auto replyWithError = [&] (auto code, const auto& msg) {
std::unique_ptr<TEvDataShard::TEvReadResult> result(new TEvDataShard::TEvReadResult());
@@ -1891,6 +2110,27 @@ void TDataShard::Handle(TEvDataShard::TEvRead::TPtr& ev, const TActorContext& ct
ctx.Send(ev->Sender, result.release());
};
+ if (Y_UNLIKELY(Pipeline.HasWaitingReadIterator(readId) || ReadIterators.contains(readId))) {
+ replyWithError(
+ Ydb::StatusIds::ALREADY_EXISTS,
+ TStringBuilder() << "Request " << readId.ReadId << " already executing");
+ return;
+ }
+
+ if (!IsStateActive()) {
+ replyWithError(
+ Ydb::StatusIds::OVERLOADED,
+ TStringBuilder() << "Shard " << TabletID() << " is splitting/merging");
+ return;
+ }
+
+ if (MediatorStateWaiting) {
+ Pipeline.RegisterWaitingReadIterator(readId, request);
+ MediatorStateWaitingMsgs.emplace_back(ev.Release());
+ UpdateProposeQueueSize();
+ return;
+ }
+
if (Pipeline.HasDrop()) {
replyWithError(
Ydb::StatusIds::INTERNAL_ERROR,
@@ -1908,13 +2148,6 @@ void TDataShard::Handle(TEvDataShard::TEvRead::TPtr& ev, const TActorContext& ct
return;
}
- if (Y_UNLIKELY(ReadIterators.contains(readId))) {
- replyWithError(
- Ydb::StatusIds::ALREADY_EXISTS,
- TStringBuilder() << "Request " << readId.ReadId << " already executing");
- return;
- }
-
if (!request->Keys.empty() && !request->Ranges.empty()) {
replyWithError(Ydb::StatusIds::BAD_REQUEST, "Both keys and ranges are forbidden");
return;
@@ -1930,11 +2163,6 @@ void TDataShard::Handle(TEvDataShard::TEvRead::TPtr& ev, const TActorContext& ct
return;
}
- if (record.ColumnsSize() == 0) {
- replyWithError(Ydb::StatusIds::BAD_REQUEST, "Missing Columns");
- return;
- }
-
TRowVersion readVersion = TRowVersion::Max();
bool isHeadRead = false;
if (record.HasSnapshot()) {
@@ -1974,7 +2202,7 @@ void TDataShard::Handle(TEvDataShard::TEvRead::TPtr& ev, const TActorContext& ct
// check if there is MVCC version and maybe wait
if (readVersion < GetSnapshotManager().GetLowWatermark()) {
replyWithError(
- Ydb::StatusIds::NOT_FOUND,
+ Ydb::StatusIds::PRECONDITION_FAILED,
TStringBuilder() << "MVCC read " << readVersion
<< " bellow low watermark " << GetSnapshotManager().GetLowWatermark());
return;
@@ -2164,13 +2392,14 @@ void TDataShard::Handle(TEvDataShard::TEvReadAck::TPtr& ev, const TActorContext&
record.GetMaxBytes());
if (wasExhausted && !state.IsExhausted()) {
+ DecCounter(COUNTER_READ_ITERATORS_EXHAUSTED_COUNT);
ctx.Send(
SelfId(),
new TEvDataShard::TEvReadContinue(ev->Sender, record.GetReadId()));
}
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, TabletID() << " ReadAck: " << record
- << ", " << (wasExhausted ? "read continued" : "quota updated")
+ LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, TabletID() << " ReadAck for read iterator# " << readId
+ << ": " << record << ", " << (wasExhausted ? "read continued" : "quota updated")
<< ", bytesLeft# " << state.Quota.Bytes << ", rowsLeft# " << state.Quota.Rows);
}
@@ -2179,9 +2408,14 @@ void TDataShard::Handle(TEvDataShard::TEvReadCancel::TPtr& ev, const TActorConte
if (!record.HasReadId())
return;
- LOG_DEBUG_S(ctx, NKikimrServices::TX_DATASHARD, TabletID() << " ReadCancel: " << record);
+ LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, TabletID() << " ReadCancel: " << record);
TReadIteratorId readId(ev->Sender, record.GetReadId());
+ if (Pipeline.CancelWaitingReadIterator(readId)) {
+ Y_VERIFY(!ReadIterators.contains(readId));
+ return;
+ }
+
auto it = ReadIterators.find(readId);
if (it == ReadIterators.end())
return;
@@ -2222,6 +2456,7 @@ void TDataShard::CancelReadIterators(Ydb::StatusIds::StatusCode code, const TStr
ReadIteratorSessions.clear();
SetCounter(COUNTER_READ_ITERATORS_COUNT, 0);
+ SetCounter(COUNTER_READ_ITERATORS_EXHAUSTED_COUNT, 0);
}
void TDataShard::DeleteReadIterator(TReadIteratorsMap::iterator it) {
@@ -2233,6 +2468,9 @@ void TDataShard::DeleteReadIterator(TReadIteratorsMap::iterator it) {
session.Iterators.erase(it->first);
}
}
+ if (state->IsExhausted()) {
+ DecCounter(COUNTER_READ_ITERATORS_EXHAUSTED_COUNT);
+ }
ReadIterators.erase(it);
SetCounter(COUNTER_READ_ITERATORS_COUNT, ReadIterators.size());
}
@@ -2247,6 +2485,7 @@ void TDataShard::ReadIteratorsOnNodeDisconnected(const TActorId& sessionId, cons
<< " closed session# " << sessionId << ", iterators# " << session.Iterators.size());
auto now = AppData()->MonotonicTimeProvider->Now();
+ ui64 exhaustedCount = 0;
for (const auto& readId: session.Iterators) {
// we don't send anything to client, because it's up
// to client to detect disconnect
@@ -2260,11 +2499,16 @@ void TDataShard::ReadIteratorsOnNodeDisconnected(const TActorId& sessionId, cons
IncCounter(COUNTER_READ_ITERATOR_LIFETIME_MS, delta.MilliSeconds());
}
+ if (state->IsExhausted()) {
+ ++exhaustedCount;
+ }
+
ReadIterators.erase(it);
}
ReadIteratorSessions.erase(itSession);
SetCounter(COUNTER_READ_ITERATORS_COUNT, ReadIterators.size());
+ DecCounter(COUNTER_READ_ITERATORS_EXHAUSTED_COUNT, exhaustedCount);
}
} // NKikimr::NDataShard
diff --git a/ydb/core/tx/datashard/datashard_active_transaction.h b/ydb/core/tx/datashard/datashard_active_transaction.h
index 6acc43e9af..5ca5ff5164 100644
--- a/ydb/core/tx/datashard/datashard_active_transaction.h
+++ b/ydb/core/tx/datashard/datashard_active_transaction.h
@@ -181,11 +181,11 @@ public:
void SetReadVersion(TRowVersion readVersion) { EngineBay.SetReadVersion(readVersion); }
void SetVolatileTxId(ui64 txId) { EngineBay.SetVolatileTxId(txId); }
- void CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion, TTransactionContext& txc) {
- EngineBay.CommitChanges(tableId, lockId, writeVersion, txc);
+ void CommitChanges(const TTableId& tableId, ui64 lockId, const TRowVersion& writeVersion) {
+ EngineBay.CommitChanges(tableId, lockId, writeVersion);
}
- TVector<NMiniKQL::IChangeCollector::TChange> GetCollectedChanges() const { return EngineBay.GetCollectedChanges(); }
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const { return EngineBay.GetCollectedChanges(); }
void ResetCollectedChanges() { EngineBay.ResetCollectedChanges(); }
TVector<ui64> GetVolatileCommitTxIds() const { return EngineBay.GetVolatileCommitTxIds(); }
diff --git a/ydb/core/tx/datashard/datashard_common_upload.cpp b/ydb/core/tx/datashard/datashard_common_upload.cpp
index 1e2dbf816c..9fd3330d9c 100644
--- a/ydb/core/tx/datashard/datashard_common_upload.cpp
+++ b/ydb/core/tx/datashard/datashard_common_upload.cpp
@@ -66,13 +66,6 @@ bool TCommonUploadOps<TEvRequest, TEvResponse>::Execute(TDataShard* self, TTrans
ChangeCollector.Reset(CreateChangeCollector(*self, userDb, txc.DB, tableInfo, true));
}
- if (ChangeCollector) {
- ChangeCollector->SetWriteVersion(writeVersion);
- if (ChangeCollector->NeedToReadKeys()) {
- ChangeCollector->SetReadVersion(readVersion);
- }
- }
-
// Prepare (id, Type) vector for value columns
TVector<NTable::TTag> tagsForSelect;
TVector<std::pair<ui32, NScheme::TTypeInfo>> valueCols;
@@ -183,7 +176,7 @@ bool TCommonUploadOps<TEvRequest, TEvResponse>::Execute(TDataShard* self, TTrans
if (ChangeCollector) {
Y_VERIFY(CollectChanges);
- if (!ChangeCollector->Collect(fullTableId, NTable::ERowOp::Upsert, key, value)) {
+ if (!ChangeCollector->OnUpdate(fullTableId, writeTableId, NTable::ERowOp::Upsert, key, value, writeVersion)) {
pageFault = true;
}
@@ -212,7 +205,7 @@ bool TCommonUploadOps<TEvRequest, TEvResponse>::Execute(TDataShard* self, TTrans
if (pageFault) {
if (ChangeCollector) {
- ChangeCollector->Reset();
+ ChangeCollector->OnRestart();
}
return false;
@@ -252,7 +245,7 @@ TEvResponse* TCommonUploadOps<TEvRequest, TEvResponse>::GetResult() {
}
template <typename TEvRequest, typename TEvResponse>
-TVector<NMiniKQL::IChangeCollector::TChange> TCommonUploadOps<TEvRequest, TEvResponse>::GetCollectedChanges() const {
+TVector<IDataShardChangeCollector::TChange> TCommonUploadOps<TEvRequest, TEvResponse>::GetCollectedChanges() const {
if (!ChangeCollector) {
return {};
}
diff --git a/ydb/core/tx/datashard/datashard_common_upload.h b/ydb/core/tx/datashard/datashard_common_upload.h
index 052937aaba..7c7f79c99e 100644
--- a/ydb/core/tx/datashard/datashard_common_upload.h
+++ b/ydb/core/tx/datashard/datashard_common_upload.h
@@ -1,5 +1,6 @@
#pragma once
+#include "change_collector.h"
#include "datashard_impl.h"
#include <ydb/core/engine/minikql/change_collector_iface.h>
@@ -9,14 +10,12 @@ namespace NDataShard {
template <typename TEvRequest, typename TEvResponse>
class TCommonUploadOps {
- using IChangeCollector = NMiniKQL::IChangeCollector;
-
typename TEvRequest::TPtr Ev;
const bool BreakLocks;
const bool CollectChanges;
THolder<TEvResponse> Result;
- THolder<IChangeCollector> ChangeCollector;
+ THolder<IDataShardChangeCollector> ChangeCollector;
public:
explicit TCommonUploadOps(typename TEvRequest::TPtr& ev, bool breakLocks, bool collectChanges);
@@ -26,7 +25,7 @@ protected:
void GetResult(TDataShard* self, TActorId& target, THolder<IEventBase>& event, ui64& cookie);
const TEvRequest* GetRequest() const;
TEvResponse* GetResult();
- TVector<IChangeCollector::TChange> GetCollectedChanges() const;
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const;
private:
void SetError(ui32 status, const TString& descr);
diff --git a/ydb/core/tx/datashard/datashard_direct_erase.cpp b/ydb/core/tx/datashard/datashard_direct_erase.cpp
index 1862e7d81e..2ad5d5e659 100644
--- a/ydb/core/tx/datashard/datashard_direct_erase.cpp
+++ b/ydb/core/tx/datashard/datashard_direct_erase.cpp
@@ -72,13 +72,6 @@ TDirectTxErase::EStatus TDirectTxErase::CheckedExecute(
params.Tx->ChangeCollector.Reset(CreateChangeCollector(*self, *userDb, params.Txc->DB, tableInfo, true));
}
- if (auto collector = params.GetChangeCollector()) {
- collector->SetWriteVersion(params.WriteVersion);
- if (collector->NeedToReadKeys()) {
- collector->SetReadVersion(params.ReadVersion);
- }
- }
-
const bool breakWriteConflicts = self->SysLocksTable().HasWriteLocks(fullTableId);
bool pageFault = false;
@@ -143,7 +136,7 @@ TDirectTxErase::EStatus TDirectTxErase::CheckedExecute(
}
if (auto collector = params.GetChangeCollector()) {
- if (!collector->Collect(fullTableId, NTable::ERowOp::Erase, key, {})) {
+ if (!collector->OnUpdate(fullTableId, localTableId, NTable::ERowOp::Erase, key, {}, params.WriteVersion)) {
pageFault = true;
}
}
@@ -164,7 +157,7 @@ TDirectTxErase::EStatus TDirectTxErase::CheckedExecute(
if (pageFault) {
if (auto collector = params.GetChangeCollector()) {
- collector->Reset();
+ collector->OnRestart();
}
return EStatus::PageFault;
@@ -236,7 +229,7 @@ TDirectTxResult TDirectTxErase::GetResult(TDataShard* self) {
return res;
}
-TVector<NMiniKQL::IChangeCollector::TChange> TDirectTxErase::GetCollectedChanges() const {
+TVector<IDataShardChangeCollector::TChange> TDirectTxErase::GetCollectedChanges() const {
if (!ChangeCollector) {
return {};
}
diff --git a/ydb/core/tx/datashard/datashard_direct_erase.h b/ydb/core/tx/datashard/datashard_direct_erase.h
index d526178b9d..c79ef35bd1 100644
--- a/ydb/core/tx/datashard/datashard_direct_erase.h
+++ b/ydb/core/tx/datashard/datashard_direct_erase.h
@@ -1,16 +1,15 @@
#pragma once
+#include "change_collector.h"
#include "datashard_direct_transaction.h"
namespace NKikimr {
namespace NDataShard {
class TDirectTxErase : public IDirectTx {
- using IChangeCollector = NMiniKQL::IChangeCollector;
-
TEvDataShard::TEvEraseRowsRequest::TPtr Ev;
THolder<TEvDataShard::TEvEraseRowsResponse> Result;
- THolder<IChangeCollector> ChangeCollector;
+ THolder<IDataShardChangeCollector> ChangeCollector;
enum class EStatus {
Success,
@@ -53,7 +52,7 @@ class TDirectTxErase : public IDirectTx {
return true;
}
- IChangeCollector* GetChangeCollector() const {
+ IDataShardChangeCollector* GetChangeCollector() const {
return Tx ? Tx->ChangeCollector.Get() : nullptr;
}
};
@@ -71,7 +70,7 @@ public:
bool Execute(TDataShard* self, TTransactionContext& txc, const TRowVersion& readVersion, const TRowVersion& writeVersion) override;
TDirectTxResult GetResult(TDataShard* self) override;
- TVector<IChangeCollector::TChange> GetCollectedChanges() const override;
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const override;
};
} // NDataShard
diff --git a/ydb/core/tx/datashard/datashard_direct_transaction.cpp b/ydb/core/tx/datashard/datashard_direct_transaction.cpp
index 858247f36a..f83c8ef550 100644
--- a/ydb/core/tx/datashard/datashard_direct_transaction.cpp
+++ b/ydb/core/tx/datashard/datashard_direct_transaction.cpp
@@ -52,7 +52,7 @@ void TDirectTransaction::SendResult(TDataShard* self, const TActorContext& ctx)
}
}
-TVector<NMiniKQL::IChangeCollector::TChange> TDirectTransaction::GetCollectedChanges() const {
+TVector<IDataShardChangeCollector::TChange> TDirectTransaction::GetCollectedChanges() const {
return Impl->GetCollectedChanges();
}
diff --git a/ydb/core/tx/datashard/datashard_direct_transaction.h b/ydb/core/tx/datashard/datashard_direct_transaction.h
index e4d83188d5..99933431ca 100644
--- a/ydb/core/tx/datashard/datashard_direct_transaction.h
+++ b/ydb/core/tx/datashard/datashard_direct_transaction.h
@@ -22,7 +22,7 @@ public:
virtual ~IDirectTx() = default;
virtual bool Execute(TDataShard* self, TTransactionContext& txc, const TRowVersion& readVersion, const TRowVersion& writeVersion) = 0;
virtual TDirectTxResult GetResult(TDataShard* self) = 0;
- virtual TVector<NMiniKQL::IChangeCollector::TChange> GetCollectedChanges() const = 0;
+ virtual TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const = 0;
};
class TDirectTransaction : public TOperation {
@@ -35,7 +35,7 @@ public:
private:
bool Execute(TDataShard* self, TTransactionContext& txc);
void SendResult(TDataShard* self, const TActorContext& ctx);
- TVector<NMiniKQL::IChangeCollector::TChange> GetCollectedChanges() const;
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const;
friend class TDirectOpUnit;
diff --git a/ydb/core/tx/datashard/datashard_direct_upload.cpp b/ydb/core/tx/datashard/datashard_direct_upload.cpp
index abb3eda763..61b586f097 100644
--- a/ydb/core/tx/datashard/datashard_direct_upload.cpp
+++ b/ydb/core/tx/datashard/datashard_direct_upload.cpp
@@ -18,7 +18,7 @@ TDirectTxResult TDirectTxUpload::GetResult(TDataShard* self) {
return res;
}
-TVector<NMiniKQL::IChangeCollector::TChange> TDirectTxUpload::GetCollectedChanges() const {
+TVector<IDataShardChangeCollector::TChange> TDirectTxUpload::GetCollectedChanges() const {
return TCommonUploadOps::GetCollectedChanges();
}
diff --git a/ydb/core/tx/datashard/datashard_direct_upload.h b/ydb/core/tx/datashard/datashard_direct_upload.h
index b6bc1845b3..17a94b2b06 100644
--- a/ydb/core/tx/datashard/datashard_direct_upload.h
+++ b/ydb/core/tx/datashard/datashard_direct_upload.h
@@ -16,7 +16,7 @@ public:
bool Execute(TDataShard* self, TTransactionContext& txc, const TRowVersion& readVersion, const TRowVersion& writeVersion) override;
TDirectTxResult GetResult(TDataShard* self) override;
- TVector<NMiniKQL::IChangeCollector::TChange> GetCollectedChanges() const override;
+ TVector<IDataShardChangeCollector::TChange> GetCollectedChanges() const override;
};
} // NDataShard
diff --git a/ydb/core/tx/datashard/datashard_impl.h b/ydb/core/tx/datashard/datashard_impl.h
index 874fa1f885..a36e212cce 100644
--- a/ydb/core/tx/datashard/datashard_impl.h
+++ b/ydb/core/tx/datashard/datashard_impl.h
@@ -10,10 +10,11 @@
#include "datashard_s3_downloads.h"
#include "datashard_s3_uploads.h"
#include "datashard_user_table.h"
-#include "datashard_build_index.h"
#include "datashard_repl_offsets.h"
#include "datashard_repl_offsets_client.h"
#include "datashard_repl_offsets_server.h"
+#include "build_index.h"
+#include "cdc_stream_scan.h"
#include "change_exchange.h"
#include "change_record.h"
#include "progress_queue.h"
@@ -217,6 +218,8 @@ class TDataShard
class TTxRemoveLockChangeRecords;
class TTxVolatileTxCommit;
class TTxVolatileTxAbort;
+ class TTxCdcStreamScanRun;
+ class TTxCdcStreamScanProgress;
template <typename T> friend class TTxDirectBase;
class TTxUploadRows;
@@ -262,6 +265,7 @@ class TDataShard
friend class TSnapshotManager;
friend class TSchemaSnapshotManager;
friend class TVolatileTxManager;
+ friend class TCdcStreamScanManager;
friend class TReplicationSourceOffsetsClient;
friend class TReplicationSourceOffsetsServer;
@@ -271,6 +275,7 @@ class TDataShard
friend class TBuildIndexScan;
friend class TReadColumnsScan;
friend class TCondEraseScan;
+ friend class TCdcStreamScan;
friend class TDatashardKeySampler;
friend class TS3UploadsManager;
@@ -282,7 +287,6 @@ class TDataShard
friend class TTxStartMvccStateChange;
friend class TTxExecuteMvccStateChange;
- class TFindSubDomainPathIdActor;
class TTxPersistSubDomainPathId;
class TTxPersistSubDomainOutOfSpace;
@@ -296,6 +300,7 @@ class TDataShard
class TTxApplyReplicationChanges;
+ class TWaitVolatileDependencies;
class TSendVolatileResult;
struct TEvPrivate {
@@ -317,12 +322,15 @@ class TDataShard
EvPersistScanStateAck,
EvConditionalEraseRowsRegistered,
EvAsyncJobComplete,
- EvSubDomainPathIdFound,
+ EvSubDomainPathIdFound, // unused
EvRequestChangeRecords,
EvRemoveChangeRecords,
EvReplicationSourceOffsets,
EvMediatorRestoreBackup,
EvRemoveLockChangeRecords,
+ EvCdcStreamScanRegistered,
+ EvCdcStreamScanProgress,
+ EvCdcStreamScanContinue,
EvEnd
};
@@ -431,16 +439,6 @@ class TDataShard
TAutoPtr<IDestructable> Prod;
};
- struct TEvSubDomainPathIdFound : public TEventLocal<TEvSubDomainPathIdFound, EvSubDomainPathIdFound> {
- TEvSubDomainPathIdFound(ui64 schemeShardId, ui64 localPathId)
- : SchemeShardId(schemeShardId)
- , LocalPathId(localPathId)
- { }
-
- const ui64 SchemeShardId;
- const ui64 LocalPathId;
- };
-
struct TEvRequestChangeRecords : public TEventLocal<TEvRequestChangeRecords, EvRequestChangeRecords> {};
struct TEvRemoveChangeRecords : public TEventLocal<TEvRemoveChangeRecords, EvRemoveChangeRecords> {};
@@ -466,6 +464,44 @@ class TDataShard
struct TEvMediatorRestoreBackup : public TEventLocal<TEvMediatorRestoreBackup, EvMediatorRestoreBackup> {};
struct TEvRemoveLockChangeRecords : public TEventLocal<TEvRemoveLockChangeRecords, EvRemoveLockChangeRecords> {};
+
+ struct TEvCdcStreamScanRegistered : public TEventLocal<TEvCdcStreamScanRegistered, EvCdcStreamScanRegistered> {
+ explicit TEvCdcStreamScanRegistered(ui64 txId, const TActorId& actorId)
+ : TxId(txId)
+ , ActorId(actorId)
+ {
+ }
+
+ const ui64 TxId;
+ const TActorId ActorId;
+ };
+
+ struct TEvCdcStreamScanProgress : public TEventLocal<TEvCdcStreamScanProgress, EvCdcStreamScanProgress> {
+ explicit TEvCdcStreamScanProgress(
+ const TPathId& tablePathId,
+ const TPathId& streamPathId,
+ const TRowVersion& readVersion,
+ const TVector<ui32>& valueTags,
+ TVector<std::pair<TSerializedCellVec, TSerializedCellVec>>&& rows,
+ const TCdcStreamScanManager::TStats& stats)
+ : TablePathId(tablePathId)
+ , StreamPathId(streamPathId)
+ , ReadVersion(readVersion)
+ , ValueTags(valueTags)
+ , Rows(std::move(rows))
+ , Stats(stats)
+ {
+ }
+
+ const TPathId TablePathId;
+ const TPathId StreamPathId;
+ const TRowVersion ReadVersion;
+ const TVector<ui32> ValueTags;
+ TVector<std::pair<TSerializedCellVec, TSerializedCellVec>> Rows;
+ const TCdcStreamScanManager::TStats Stats;
+ };
+
+ struct TEvCdcStreamScanContinue : public TEventLocal<TEvCdcStreamScanContinue, EvCdcStreamScanContinue> {};
};
struct Schema : NIceDb::Schema {
@@ -906,6 +942,31 @@ class TDataShard
using TColumns = TableColumns<TxId, ShardId>;
};
+ struct CdcStreamScans : Table<34> {
+ struct TableOwnerId : Column<1, NScheme::NTypeIds::Uint64> {};
+ struct TablePathId : Column<2, NScheme::NTypeIds::Uint64> {};
+ struct StreamOwnerId : Column<3, NScheme::NTypeIds::Uint64> {};
+ struct StreamPathId : Column<4, NScheme::NTypeIds::Uint64> {};
+ struct LastKey : Column<5, NScheme::NTypeIds::String> {};
+ struct SnapshotStep : Column<6, NScheme::NTypeIds::Uint64> {};
+ struct SnapshotTxId : Column<7, NScheme::NTypeIds::Uint64> {};
+ struct RowsProcessed : Column<8, NScheme::NTypeIds::Uint64> {};
+ struct BytesProcessed : Column<9, NScheme::NTypeIds::Uint64> {};
+
+ using TKey = TableKey<TableOwnerId, TablePathId, StreamOwnerId, StreamPathId>;
+ using TColumns = TableColumns<
+ TableOwnerId,
+ TablePathId,
+ StreamOwnerId,
+ StreamPathId,
+ LastKey,
+ SnapshotStep,
+ SnapshotTxId,
+ RowsProcessed,
+ BytesProcessed
+ >;
+ };
+
using TTables = SchemaTables<Sys, UserTables, TxMain, TxDetails, InReadSets, OutReadSets, PlanQueue,
DeadlineQueue, SchemaOperations, SplitSrcSnapshots, SplitDstReceivedSnapshots, TxArtifacts, ScanProgress,
Snapshots, S3Uploads, S3Downloads, ChangeRecords, ChangeRecordDetails, ChangeSenders, S3UploadedParts,
@@ -913,7 +974,7 @@ class TDataShard
ReplicationSourceOffsets, ReplicationSources, DstReplicationSourceOffsetsReceived,
UserTablesStats, SchemaSnapshots, Locks, LockRanges, LockConflicts,
LockChangeRecords, LockChangeRecordDetails, ChangeRecordCommits,
- TxVolatileDetails, TxVolatileParticipants>;
+ TxVolatileDetails, TxVolatileParticipants, CdcStreamScans>;
// These settings are persisted on each Init. So we use empty settings in order not to overwrite what
// was changed by the user
@@ -1117,6 +1178,9 @@ class TDataShard
void Handle(TEvDataShard::TEvStoreS3DownloadInfo::TPtr& ev, const TActorContext& ctx);
void Handle(TEvDataShard::TEvUnsafeUploadRowsRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvDataShard::TEvCdcStreamScanRequest::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPrivate::TEvCdcStreamScanRegistered::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPrivate::TEvCdcStreamScanProgress::TPtr& ev, const TActorContext& ctx);
void Handle(TEvPrivate::TEvAsyncJobComplete::TPtr& ev, const TActorContext& ctx);
void Handle(TEvDataShard::TEvCancelBackup::TPtr &ev, const TActorContext &ctx);
@@ -1136,7 +1200,7 @@ class TDataShard
void Handle(TEvents::TEvUndelivered::TPtr& ev, const TActorContext& ctx);
void Handle(TEvInterconnect::TEvNodeDisconnected::TPtr& ev, const TActorContext& ctx);
- void Handle(TEvPrivate::TEvSubDomainPathIdFound::TPtr& ev, const TActorContext& ctx);
+ void Handle(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound::TPtr& ev, const TActorContext& ctx);
void Handle(TEvTxProxySchemeCache::TEvWatchNotifyUpdated::TPtr& ev, const TActorContext& ctx);
// change sending
@@ -1268,6 +1332,12 @@ public:
TVector<THolder<TEvTxProcessing::TEvReadSet>> &&readsets);
void ResendReadSet(const TActorContext& ctx, ui64 step, ui64 txId, ui64 source, ui64 target, const TString& body, ui64 seqno);
void SendDelayedAcks(const TActorContext& ctx, TVector<THolder<IEventHandle>>& delayedAcks) const;
+
+ void WaitVolatileDependenciesThenSend(
+ const absl::flat_hash_set<ui64>& dependencies,
+ const TActorId& target, std::unique_ptr<IEventBase> event,
+ ui64 cookie = 0);
+
void SendResult(const TActorContext &ctx,
TOutputOpData::TResultPtr &result,
const TActorId &target,
@@ -1279,6 +1349,14 @@ public:
TabletCounters->Simple()[counter].Set(num);
}
+ void DecCounter(NDataShard::ESimpleCounters counter, ui64 num = 1) const {
+ TabletCounters->Simple()[counter].Sub(num);
+ }
+
+ void IncCounter(NDataShard::ESimpleCounters counter, ui64 num = 1) const {
+ TabletCounters->Simple()[counter].Add(num);
+ }
+
void IncCounter(NDataShard::ECumulativeCounters counter, ui64 num = 1) const {
TabletCounters->Cumulative()[counter].Increment(num);
}
@@ -1627,24 +1705,28 @@ public:
ui64 AllocateChangeRecordGroup(NIceDb::TNiceDb& db);
ui64 GetNextChangeRecordLockOffset(ui64 lockId);
void PersistChangeRecord(NIceDb::TNiceDb& db, const TChangeRecord& record);
- void PersistCommitLockChangeRecords(TTransactionContext& txc, ui64 order, ui64 lockId, ui64 group, const TRowVersion& rowVersion);
+ bool HasLockChangeRecords(ui64 lockId) const;
+ void CommitLockChangeRecords(NIceDb::TNiceDb& db, ui64 lockId, ui64 group, const TRowVersion& rowVersion, TVector<IDataShardChangeCollector::TChange>& collected);
void MoveChangeRecord(NIceDb::TNiceDb& db, ui64 order, const TPathId& pathId);
void MoveChangeRecord(NIceDb::TNiceDb& db, ui64 lockId, ui64 lockOffset, const TPathId& pathId);
void RemoveChangeRecord(NIceDb::TNiceDb& db, ui64 order);
- void EnqueueChangeRecords(TVector<NMiniKQL::IChangeCollector::TChange>&& records);
- void AddLockChangeRecords(ui64 lockId, TVector<NMiniKQL::IChangeCollector::TChange>&& records);
- const TVector<NMiniKQL::IChangeCollector::TChange>& GetLockChangeRecords(ui64 lockId) const;
+ void EnqueueChangeRecords(TVector<IDataShardChangeCollector::TChange>&& records);
void CreateChangeSender(const TActorContext& ctx);
void KillChangeSender(const TActorContext& ctx);
void MaybeActivateChangeSender(const TActorContext& ctx);
void SuspendChangeSender(const TActorContext& ctx);
const TActorId& GetChangeSender() const { return OutChangeSender; }
- bool LoadChangeRecords(NIceDb::TNiceDb& db, TVector<NMiniKQL::IChangeCollector::TChange>& records);
+ bool LoadChangeRecords(NIceDb::TNiceDb& db, TVector<IDataShardChangeCollector::TChange>& records);
bool LoadLockChangeRecords(NIceDb::TNiceDb& db);
- bool LoadChangeRecordCommits(NIceDb::TNiceDb& db, TVector<NMiniKQL::IChangeCollector::TChange>& records);
+ bool LoadChangeRecordCommits(NIceDb::TNiceDb& db, TVector<IDataShardChangeCollector::TChange>& records);
void ScheduleRemoveLockChanges(ui64 lockId);
void ScheduleRemoveAbandonedLockChanges();
+ static void PersistCdcStreamScanLastKey(NIceDb::TNiceDb& db, const TSerializedCellVec& value,
+ const TPathId& tablePathId, const TPathId& streamPathId);
+ static bool LoadCdcStreamScanLastKey(NIceDb::TNiceDb& db, TMaybe<TSerializedCellVec>& result,
+ const TPathId& tablePathId, const TPathId& streamPathId);
+ static void RemoveCdcStreamScanLastKey(NIceDb::TNiceDb& db, const TPathId& tablePathId, const TPathId& streamPathId);
static void PersistSchemeTxResult(NIceDb::TNiceDb &db, const TSchemaOperation& op);
void NotifySchemeshard(const TActorContext& ctx, ui64 txId = 0);
@@ -1662,6 +1744,8 @@ public:
TVolatileTxManager& GetVolatileTxManager() { return VolatileTxManager; }
const TVolatileTxManager& GetVolatileTxManager() const { return VolatileTxManager; }
+ TCdcStreamScanManager& GetCdcStreamScanManager() { return CdcStreamScanManager; }
+ const TCdcStreamScanManager& GetCdcStreamScanManager() const { return CdcStreamScanManager; }
template <typename... Args>
bool PromoteCompleteEdge(Args&&... args) {
@@ -2284,6 +2368,7 @@ private:
TSnapshotManager SnapshotManager;
TSchemaSnapshotManager SchemaSnapshotManager;
TVolatileTxManager VolatileTxManager;
+ TCdcStreamScanManager CdcStreamScanManager;
TReplicationSourceOffsetsServerLink ReplicationSourceOffsetsServer;
@@ -2428,7 +2513,7 @@ private:
{
}
- explicit TEnqueuedRecord(const NMiniKQL::IChangeCollector::TChange& record)
+ explicit TEnqueuedRecord(const IDataShardChangeCollector::TChange& record)
: TEnqueuedRecord(record.BodySize, record.TableId,
record.SchemaVersion, record.LockId, record.LockOffset)
{
@@ -2452,6 +2537,11 @@ private:
TActorId OutChangeSender;
bool OutChangeSenderSuspended = false;
+ struct TUncommittedLockChangeRecords {
+ TVector<IDataShardChangeCollector::TChange> Changes;
+ size_t PersistentCount = 0;
+ };
+
struct TCommittedLockChangeRecords {
ui64 Order = Max<ui64>();
ui64 Group;
@@ -2462,7 +2552,7 @@ private:
size_t Count = 0;
};
- THashMap<ui64, TVector<NMiniKQL::IChangeCollector::TChange>> LockChangeRecords; // ui64 is lock id
+ THashMap<ui64, TUncommittedLockChangeRecords> LockChangeRecords; // ui64 is lock id
THashMap<ui64, TCommittedLockChangeRecords> CommittedLockChangeRecords; // ui64 is lock id
TVector<ui64> PendingLockChangeRecordsToRemove;
@@ -2519,7 +2609,7 @@ public:
return result;
}
- void SetLockChangeRecords(THashMap<ui64, TVector<NMiniKQL::IChangeCollector::TChange>>&& lockChangeRecords) {
+ void SetLockChangeRecords(THashMap<ui64, TUncommittedLockChangeRecords>&& lockChangeRecords) {
LockChangeRecords = std::move(lockChangeRecords);
}
@@ -2648,12 +2738,15 @@ protected:
HFunc(TEvDataShard::TEvRefreshVolatileSnapshotRequest, Handle);
HFunc(TEvDataShard::TEvDiscardVolatileSnapshotRequest, Handle);
HFuncTraced(TEvDataShard::TEvBuildIndexCreateRequest, Handle);
+ HFunc(TEvDataShard::TEvCdcStreamScanRequest, Handle);
+ HFunc(TEvPrivate::TEvCdcStreamScanRegistered, Handle);
+ HFunc(TEvPrivate::TEvCdcStreamScanProgress, Handle);
HFunc(TEvPrivate::TEvAsyncJobComplete, Handle);
HFunc(TEvPrivate::TEvPeriodicWakeup, DoPeriodicTasks);
HFunc(TEvents::TEvUndelivered, Handle);
IgnoreFunc(TEvInterconnect::TEvNodeConnected);
HFunc(TEvInterconnect::TEvNodeDisconnected, Handle);
- HFunc(TEvPrivate::TEvSubDomainPathIdFound, Handle);
+ HFunc(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound, Handle);
HFunc(TEvTxProxySchemeCache::TEvWatchNotifyUpdated, Handle);
IgnoreFunc(TEvTxProxySchemeCache::TEvWatchNotifyDeleted);
IgnoreFunc(TEvTxProxySchemeCache::TEvWatchNotifyUnavailable);
diff --git a/ydb/core/tx/datashard/datashard_kqp.cpp b/ydb/core/tx/datashard/datashard_kqp.cpp
index 1a36cd6d05..6839de0910 100644
--- a/ydb/core/tx/datashard/datashard_kqp.cpp
+++ b/ydb/core/tx/datashard/datashard_kqp.cpp
@@ -511,6 +511,10 @@ THolder<TEvDataShard::TEvProposeTransactionResult> KqpCompleteTransaction(const
MKQL_ENSURE_S(runStatus == NYql::NDq::ERunStatus::Finished);
+ if (computeCtx.HasVolatileReadDependencies()) {
+ return nullptr;
+ }
+
auto result = MakeHolder<TEvDataShard::TEvProposeTransactionResult>(NKikimrTxDataShard::TX_KIND_DATA,
origin, txId, NKikimrTxDataShard::TEvProposeTransactionResult::COMPLETE);
@@ -741,8 +745,9 @@ bool KqpValidateVolatileTx(ui64 origin, TActiveTransaction* tx, TSysLocks& sysLo
YQL_ENSURE(kqpTx.GetUseGenericReadSets());
// We may have some stale data since before the restart
- tx->OutReadSets().clear();
- tx->AwaitingDecisions().clear();
+ // We expect all stale data to be cleared on restarts
+ Y_VERIFY(tx->OutReadSets().empty());
+ Y_VERIFY(tx->AwaitingDecisions().empty());
// Note: usually all shards send locks, since they either have side effects or need to validate locks
// However it is technically possible to have pure-read shards, that don't contribute to the final decision
@@ -880,7 +885,7 @@ void KqpEraseLocks(ui64 origin, TActiveTransaction* tx, TSysLocks& sysLocks) {
}
}
-void KqpCommitLocks(ui64 origin, TActiveTransaction* tx, const TRowVersion& writeVersion, TDataShard& dataShard, TTransactionContext& txc) {
+void KqpCommitLocks(ui64 origin, TActiveTransaction* tx, const TRowVersion& writeVersion, TDataShard& dataShard) {
auto& kqpTx = tx->GetDataTx()->GetKqpTransaction();
if (!kqpTx.HasLocks()) {
@@ -904,7 +909,7 @@ void KqpCommitLocks(ui64 origin, TActiveTransaction* tx, const TRowVersion& writ
TTableId tableId(lockProto.GetSchemeShard(), lockProto.GetPathId());
auto txId = lockProto.GetLockId();
- tx->GetDataTx()->CommitChanges(tableId, txId, writeVersion, txc);
+ tx->GetDataTx()->CommitChanges(tableId, txId, writeVersion);
}
} else {
KqpEraseLocks(origin, tx, sysLocks);
diff --git a/ydb/core/tx/datashard/datashard_kqp.h b/ydb/core/tx/datashard/datashard_kqp.h
index 458a103f91..b696c19dbc 100644
--- a/ydb/core/tx/datashard/datashard_kqp.h
+++ b/ydb/core/tx/datashard/datashard_kqp.h
@@ -38,7 +38,7 @@ bool KqpValidateLocks(ui64 origin, TActiveTransaction* tx, TSysLocks& sysLocks);
bool KqpValidateVolatileTx(ui64 origin, TActiveTransaction* tx, TSysLocks& sysLocks);
void KqpEraseLocks(ui64 origin, TActiveTransaction* tx, TSysLocks& sysLocks);
-void KqpCommitLocks(ui64 origin, TActiveTransaction* tx, const TRowVersion& writeVersion, TDataShard& dataShard, TTransactionContext& txc);
+void KqpCommitLocks(ui64 origin, TActiveTransaction* tx, const TRowVersion& writeVersion, TDataShard& dataShard);
void KqpUpdateDataShardStatCounters(TDataShard& dataShard, const NMiniKQL::TEngineHostCounters& counters);
diff --git a/ydb/core/tx/datashard/datashard_kqp_compute.cpp b/ydb/core/tx/datashard/datashard_kqp_compute.cpp
index 8bd347f5b6..63ab5553e1 100644
--- a/ydb/core/tx/datashard/datashard_kqp_compute.cpp
+++ b/ydb/core/tx/datashard/datashard_kqp_compute.cpp
@@ -224,8 +224,7 @@ bool TKqpDatashardComputeContext::PinPages(const TVector<IEngineFlat::TValidated
break;
case TKeyDesc::ERowOperation::Update:
case TKeyDesc::ERowOperation::Erase: {
- const auto collector = EngineHost.GetChangeCollector(key.TableId);
- if (collector && collector->NeedToReadKeys()) {
+ if (EngineHost.NeedToReadBeforeWrite(key.TableId)) {
columnOpFilter.insert(TKeyDesc::EColumnOperation::Set);
columnOpFilter.insert(TKeyDesc::EColumnOperation::InplaceUpdate);
}
diff --git a/ydb/core/tx/datashard/datashard_kqp_compute.h b/ydb/core/tx/datashard/datashard_kqp_compute.h
index d482af0b9e..03943e72e1 100644
--- a/ydb/core/tx/datashard/datashard_kqp_compute.h
+++ b/ydb/core/tx/datashard/datashard_kqp_compute.h
@@ -86,6 +86,10 @@ public:
bool HadInconsistentReads() const { return InconsistentReads; }
void SetInconsistentReads() { InconsistentReads = true; }
+ bool HasVolatileReadDependencies() const { return !VolatileReadDependencies.empty(); }
+ const absl::flat_hash_set<ui64>& GetVolatileReadDependencies() const { return VolatileReadDependencies; }
+ void AddVolatileReadDependency(ui64 txId) { VolatileReadDependencies.insert(txId); }
+
private:
void TouchTableRange(const TTableId& tableId, const TTableRange& range) const;
void TouchTablePoint(const TTableId& tableId, const TArrayRef<const TCell>& key) const;
@@ -117,6 +121,7 @@ private:
bool InconsistentReads = false;
TRowVersion ReadVersion = TRowVersion::Min();
THashMap<std::pair<ui64, ui64>, TActorId> OutputChannels;
+ absl::flat_hash_set<ui64> VolatileReadDependencies;
};
class TKqpDatashardApplyContext : public NUdf::IApplyContext {
diff --git a/ydb/core/tx/datashard/datashard_kqp_lookup_table.cpp b/ydb/core/tx/datashard/datashard_kqp_lookup_table.cpp
index d72063a50e..75a82ae3d6 100644
--- a/ydb/core/tx/datashard/datashard_kqp_lookup_table.cpp
+++ b/ydb/core/tx/datashard/datashard_kqp_lookup_table.cpp
@@ -115,7 +115,7 @@ public:
switch (keysValues.Fetch(key)) {
case NUdf::EFetchStatus::Ok: {
TVector<TCell> keyCells(ParseResult.KeyIndices.size());
- FillKeyTupleValue(key, ParseResult.KeyIndices, ParseResult.KeyTypes, keyCells, ctx.TypeEnv);
+ FillKeyTupleValue(key, ParseResult.KeyIndices, ParseResult.KeyTypes, keyCells, *ctx.TypeEnv);
NUdf::TUnboxedValue result;
TKqpTableStats stats;
@@ -197,10 +197,10 @@ public:
MKQL_ENSURE_S(tableInfo);
TVector<TCell> fromCells(tableInfo->KeyColumns.size());
- FillKeyTupleValue(key, ParseResult.KeyIndices, ParseResult.KeyTypes, fromCells, ctx.TypeEnv);
+ FillKeyTupleValue(key, ParseResult.KeyIndices, ParseResult.KeyTypes, fromCells, *ctx.TypeEnv);
TVector<TCell> toCells(ParseResult.KeyIndices.size());
- FillKeyTupleValue(key, ParseResult.KeyIndices, ParseResult.KeyTypes, toCells, ctx.TypeEnv);
+ FillKeyTupleValue(key, ParseResult.KeyIndices, ParseResult.KeyTypes, toCells, *ctx.TypeEnv);
auto range = TTableRange(fromCells, true, toCells, true);
diff --git a/ydb/core/tx/datashard/datashard_kqp_read_table.cpp b/ydb/core/tx/datashard/datashard_kqp_read_table.cpp
index 08b10e0791..fb687b8c5b 100644
--- a/ydb/core/tx/datashard/datashard_kqp_read_table.cpp
+++ b/ydb/core/tx/datashard/datashard_kqp_read_table.cpp
@@ -269,10 +269,10 @@ private:
EFetchResult ReadValue(TComputationContext& ctx, NUdf::TUnboxedValue* const* output) const final {
if (!this->Iterator) {
TVector<TCell> fromCells;
- BuildKeyTupleCells(ParseResult.FromTuple->GetType(), FromNode->GetValue(ctx), fromCells, ctx.TypeEnv);
+ BuildKeyTupleCells(ParseResult.FromTuple->GetType(), FromNode->GetValue(ctx), fromCells, *ctx.TypeEnv);
TVector<TCell> toCells;
- BuildKeyTupleCells(ParseResult.ToTuple->GetType(), ToNode->GetValue(ctx), toCells, ctx.TypeEnv);
+ BuildKeyTupleCells(ParseResult.ToTuple->GetType(), ToNode->GetValue(ctx), toCells, *ctx.TypeEnv);
auto range = TTableRange(fromCells, ParseResult.FromInclusive, toCells, ParseResult.ToInclusive);
@@ -328,7 +328,7 @@ private:
if (!RangeId) {
const auto localTid = this->ComputeCtx.GetLocalTableId(ParseResult.TableId);
const auto* tableInfo = this->ComputeCtx.Database->GetScheme().GetTableInfo(localTid);
- Ranges = CreateTableRanges<IsReverse>(ParseResult, RangesNode, ctx.TypeEnv, ctx, tableInfo->KeyColumns.size());
+ Ranges = CreateTableRanges<IsReverse>(ParseResult, RangesNode, *ctx.TypeEnv, ctx, tableInfo->KeyColumns.size());
RangeId = 0;
if (ItemsLimit) {
diff --git a/ydb/core/tx/datashard/datashard_pipeline.cpp b/ydb/core/tx/datashard/datashard_pipeline.cpp
index 753066d0e0..fa333ded45 100644
--- a/ydb/core/tx/datashard/datashard_pipeline.cpp
+++ b/ydb/core/tx/datashard/datashard_pipeline.cpp
@@ -517,6 +517,15 @@ TOperation::TPtr TPipeline::GetActiveOp(ui64 txId)
return nullptr;
}
+TOperation::TPtr TPipeline::GetVolatileOp(ui64 txId)
+{
+ TOperation::TPtr op = FindOp(txId);
+ if (op && op->HasVolatilePrepareFlag()) {
+ return op;
+ }
+ return nullptr;
+}
+
bool TPipeline::LoadTxDetails(TTransactionContext &txc,
const TActorContext &ctx,
TActiveTransaction::TPtr tx)
@@ -644,6 +653,11 @@ bool TPipeline::SaveInReadSet(const TEvTxProcessing::TEvReadSet &rs,
}
TOperation::TPtr op = GetActiveOp(txId);
+ bool active = true;
+ if (!op) {
+ op = GetVolatileOp(txId);
+ active = false;
+ }
if (op) {
// If input read sets are not loaded yet then
// it will be added at load.
@@ -655,8 +669,10 @@ bool TPipeline::SaveInReadSet(const TEvTxProcessing::TEvReadSet &rs,
}
op->AddDelayedInReadSet(rs.Record);
- AddCandidateOp(op);
- Self->PlanQueue.Progress(ctx);
+ if (active) {
+ AddCandidateOp(op);
+ Self->PlanQueue.Progress(ctx);
+ }
return false;
}
@@ -1748,6 +1764,9 @@ void TPipeline::AddWaitingReadIterator(
TEvDataShard::TEvRead::TPtr ev,
const TActorContext& ctx)
{
+ // Combined with registration for convenience
+ RegisterWaitingReadIterator(TReadIteratorId(ev->Sender, ev->Get()->Record.GetReadId()), ev->Get());
+
if (Y_UNLIKELY(Self->MvccSwitchState == TSwitchState::SWITCHING)) {
// postpone tx processing till mvcc state switch is finished
WaitingDataReadIterators.emplace(TRowVersion::Min(), ev);
@@ -1771,6 +1790,35 @@ void TPipeline::AddWaitingReadIterator(
<< ", current unreliable edge# " << unreadableEdge);
}
+bool TPipeline::HasWaitingReadIterator(const TReadIteratorId& readId) {
+ return WaitingReadIteratorsById.contains(readId);
+}
+
+bool TPipeline::CancelWaitingReadIterator(const TReadIteratorId& readId) {
+ auto it = WaitingReadIteratorsById.find(readId);
+ if (it != WaitingReadIteratorsById.end()) {
+ it->second->Cancelled = true;
+ WaitingReadIteratorsById.erase(it);
+ return true;
+ }
+
+ return false;
+}
+
+void TPipeline::RegisterWaitingReadIterator(const TReadIteratorId& readId, TEvDataShard::TEvRead* event) {
+ auto res = WaitingReadIteratorsById.emplace(readId, event);
+ Y_VERIFY(res.second);
+}
+
+bool TPipeline::HandleWaitingReadIterator(const TReadIteratorId& readId, TEvDataShard::TEvRead* event) {
+ auto it = WaitingReadIteratorsById.find(readId);
+ if (it != WaitingReadIteratorsById.end() && it->second == event) {
+ WaitingReadIteratorsById.erase(it);
+ }
+
+ return !event->Cancelled;
+}
+
TRowVersion TPipeline::GetReadEdge() const {
if (Self->TransQueue.PlannedTxs) {
for (auto order : Self->TransQueue.PlannedTxs) {
diff --git a/ydb/core/tx/datashard/datashard_pipeline.h b/ydb/core/tx/datashard/datashard_pipeline.h
index f4c235d8ed..df76f64db6 100644
--- a/ydb/core/tx/datashard/datashard_pipeline.h
+++ b/ydb/core/tx/datashard/datashard_pipeline.h
@@ -6,6 +6,7 @@
#include "datashard_dep_tracker.h"
#include "datashard_user_table.h"
#include "execution_unit.h"
+#include "read_iterator.h"
#include <ydb/core/tablet_flat/flat_cxx_database.h>
@@ -230,6 +231,7 @@ public:
TOperation::TPtr FindOp(ui64 txId);
TOperation::TPtr GetActiveOp(ui64 txId);
+ TOperation::TPtr GetVolatileOp(ui64 txId);
const TMap<TStepOrder, TOperation::TPtr> &GetActiveOps() const { return ActiveOps; }
void AddActiveOp(TOperation::TPtr op);
@@ -338,6 +340,10 @@ public:
const TRowVersion& version,
TEvDataShard::TEvRead::TPtr ev,
const TActorContext& ctx);
+ bool HasWaitingReadIterator(const TReadIteratorId& readId);
+ bool CancelWaitingReadIterator(const TReadIteratorId& readId);
+ void RegisterWaitingReadIterator(const TReadIteratorId& readId, TEvDataShard::TEvRead* event);
+ bool HandleWaitingReadIterator(const TReadIteratorId& readId, TEvDataShard::TEvRead* event);
TRowVersion GetReadEdge() const;
TRowVersion GetUnreadableEdge(bool prioritizedReads) const;
@@ -484,6 +490,7 @@ private:
THashMap<ui64, TOperation::TPtr> CompletingOps;
TMultiMap<TRowVersion, TEvDataShard::TEvRead::TPtr> WaitingDataReadIterators;
+ THashMap<TReadIteratorId, TEvDataShard::TEvRead*, TReadIteratorId::THash> WaitingReadIteratorsById;
bool GetPlannedTx(NIceDb::TNiceDb& db, ui64& step, ui64& txId);
void SaveLastPlannedTx(NIceDb::TNiceDb& db, TStepOrder stepTxId);
diff --git a/ydb/core/tx/datashard/datashard_split_src.cpp b/ydb/core/tx/datashard/datashard_split_src.cpp
index f762801c22..8fbcf1af96 100644
--- a/ydb/core/tx/datashard/datashard_split_src.cpp
+++ b/ydb/core/tx/datashard/datashard_split_src.cpp
@@ -96,7 +96,7 @@ public:
void TDataShard::CheckSplitCanStart(const TActorContext& ctx) {
if (State == TShardState::SplitSrcWaitForNoTxInFlight) {
- ui64 txInFly = TxInFly();
+ ui64 txInFly = TxInFly() + VolatileTxManager.GetTxInFlight();
ui64 immediateTxInFly = ImmediateInFly();
SetCounter(COUNTER_SPLIT_SRC_WAIT_TX_IN_FLY, txInFly);
SetCounter(COUNTER_SPLIT_SRC_WAIT_IMMEDIATE_TX_IN_FLY, immediateTxInFly);
diff --git a/ydb/core/tx/datashard/datashard_subdomain_path_id.cpp b/ydb/core/tx/datashard/datashard_subdomain_path_id.cpp
index 97d6b88e94..ac973a45e0 100644
--- a/ydb/core/tx/datashard/datashard_subdomain_path_id.cpp
+++ b/ydb/core/tx/datashard/datashard_subdomain_path_id.cpp
@@ -9,110 +9,6 @@ namespace NDataShard {
static constexpr TDuration MaxFindSubDomainPathIdDelay = TDuration::Minutes(10);
-class TDataShard::TFindSubDomainPathIdActor : public TActorBootstrapped<TFindSubDomainPathIdActor> {
- using TBase = TActorBootstrapped<TFindSubDomainPathIdActor>;
-
-public:
- TFindSubDomainPathIdActor(const TActorId& parent, ui64 tabletId, ui64 schemeShardId, bool delayFirstRequest)
- : Parent(parent)
- , TabletId(tabletId)
- , SchemeShardId(schemeShardId)
- , DelayNextRequest(delayFirstRequest)
- { }
-
- void Bootstrap() {
- if (DelayNextRequest) {
- // Wait up to a large delay, so requests from shards spread over time
- auto delay = TDuration::MicroSeconds(RandomNumber(MaxFindSubDomainPathIdDelay.MicroSeconds()));
- Timer = CreateLongTimer(TActivationContext::AsActorContext(), delay,
- new IEventHandle(SelfId(), SelfId(), new TEvents::TEvWakeup));
- Become(&TThis::StateSleep);
- } else {
- DelayNextRequest = true;
- WakeUp();
- }
- }
-
- void PassAway() override {
- if (Timer) {
- Send(Timer, new TEvents::TEvPoison);
- }
- NTabletPipe::CloseAndForgetClient(SelfId(), SchemeShardPipe);
- TBase::PassAway();
- }
-
-private:
- STFUNC(StateSleep) {
- Y_UNUSED(ctx);
- switch (ev->GetTypeRewrite()) {
- sFunc(TEvents::TEvPoison, PassAway);
- sFunc(TEvents::TEvWakeup, WakeUp);
- }
- }
-
- void WakeUp() {
- Timer = { };
- SchemeShardPipe = Register(NTabletPipe::CreateClient(SelfId(), SchemeShardId));
- NTabletPipe::SendData(SelfId(), SchemeShardPipe,
- new NSchemeShard::TEvSchemeShard::TEvFindTabletSubDomainPathId(TabletId));
- Become(&TThis::StateWork);
- }
-
-private:
- STFUNC(StateWork) {
- Y_UNUSED(ctx);
- switch (ev->GetTypeRewrite()) {
- sFunc(TEvents::TEvPoison, PassAway);
- hFunc(TEvTabletPipe::TEvClientConnected, Handle);
- hFunc(TEvTabletPipe::TEvClientDestroyed, Handle);
- hFunc(NSchemeShard::TEvSchemeShard::TEvFindTabletSubDomainPathIdResult, Handle);
- }
- }
-
- void Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev) {
- const auto* msg = ev->Get();
-
- if (msg->Status != NKikimrProto::OK) {
- // We could not connect to schemeshard, try again
- SchemeShardPipe = { };
- Bootstrap();
- return;
- }
- }
-
- void Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev) {
- const auto* msg = ev->Get();
-
- if (msg->ClientId == SchemeShardPipe) {
- // We lost connection to schemeshard, try again
- SchemeShardPipe = { };
- Bootstrap();
- return;
- }
- }
-
- void Handle(NSchemeShard::TEvSchemeShard::TEvFindTabletSubDomainPathIdResult::TPtr& ev) {
- const auto* msg = ev->Get();
-
- if (msg->Record.GetStatus() != NKikimrScheme::TEvFindTabletSubDomainPathIdResult::SUCCESS) {
- // The request failed for some reason, we just stop trying in that case
- PassAway();
- return;
- }
-
- Send(Parent, new TEvPrivate::TEvSubDomainPathIdFound(msg->Record.GetSchemeShardId(), msg->Record.GetSubDomainPathId()));
- PassAway();
- }
-
-private:
- const TActorId Parent;
- const ui64 TabletId;
- const ui64 SchemeShardId;
- bool DelayNextRequest;
- TActorId Timer;
- TActorId SchemeShardPipe;
-};
-
void TDataShard::StopFindSubDomainPathId() {
if (FindSubDomainPathIdActor) {
Send(FindSubDomainPathIdActor, new TEvents::TEvPoison);
@@ -126,7 +22,7 @@ void TDataShard::StartFindSubDomainPathId(bool delayFirstRequest) {
CurrentSchemeShardId != INVALID_TABLET_ID &&
(!SubDomainPathId || SubDomainPathId->OwnerId != CurrentSchemeShardId))
{
- FindSubDomainPathIdActor = Register(new TFindSubDomainPathIdActor(SelfId(), TabletID(), CurrentSchemeShardId, delayFirstRequest));
+ FindSubDomainPathIdActor = Register(CreateFindSubDomainPathIdActor(SelfId(), TabletID(), CurrentSchemeShardId, delayFirstRequest, MaxFindSubDomainPathIdDelay));
}
}
@@ -159,7 +55,7 @@ private:
const ui64 LocalPathId;
};
-void TDataShard::Handle(TEvPrivate::TEvSubDomainPathIdFound::TPtr& ev, const TActorContext& ctx) {
+void TDataShard::Handle(NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound::TPtr& ev, const TActorContext& ctx) {
const auto* msg = ev->Get();
if (FindSubDomainPathIdActor == ev->Sender) {
diff --git a/ydb/core/tx/datashard/datashard_trans_queue.cpp b/ydb/core/tx/datashard/datashard_trans_queue.cpp
index b6e07f742c..3c1f463357 100644
--- a/ydb/core/tx/datashard/datashard_trans_queue.cpp
+++ b/ydb/core/tx/datashard/datashard_trans_queue.cpp
@@ -254,7 +254,10 @@ void TTransQueue::UpdateTxFlags(NIceDb::TNiceDb& db, ui64 txId, ui64 flags) {
auto it = TxsInFly.find(txId);
Y_VERIFY(it != TxsInFly.end());
- Y_VERIFY(!it->second->HasVolatilePrepareFlag(), "Unexpected UpdateTxFlags for a volatile transaction");
+ if (it->second->HasVolatilePrepareFlag()) {
+ // We keep volatile transactions in memory and don't store anything
+ return;
+ }
const ui64 preserveFlagsMask = TTxFlags::PublicFlagsMask | TTxFlags::PreservedPrivateFlagsMask;
diff --git a/ydb/core/tx/datashard/datashard_txs.h b/ydb/core/tx/datashard/datashard_txs.h
index 43815707b6..8b56677de9 100644
--- a/ydb/core/tx/datashard/datashard_txs.h
+++ b/ydb/core/tx/datashard/datashard_txs.h
@@ -49,7 +49,7 @@ private:
bool CreateScheme(TTransactionContext &txc);
bool ReadEverything(TTransactionContext &txc);
private:
- TVector<NMiniKQL::IChangeCollector::TChange> ChangeRecords;
+ TVector<IDataShardChangeCollector::TChange> ChangeRecords;
};
class TDataShard::TTxPlanStep : public NTabletFlatExecutor::TTransactionBase<TDataShard> {
diff --git a/ydb/core/tx/datashard/datashard_user_db.cpp b/ydb/core/tx/datashard/datashard_user_db.cpp
index fccc69d2e7..9787d473a4 100644
--- a/ydb/core/tx/datashard/datashard_user_db.cpp
+++ b/ydb/core/tx/datashard/datashard_user_db.cpp
@@ -6,12 +6,25 @@ NTable::EReady TDataShardUserDb::SelectRow(
const TTableId& tableId,
TArrayRef<const TRawTypeValue> key,
TArrayRef<const NTable::TTag> tags,
- NTable::TRowState& row)
+ NTable::TRowState& row,
+ NTable::TSelectStats& stats,
+ const TMaybe<TRowVersion>& readVersion)
{
auto tid = Self.GetLocalTableId(tableId);
Y_VERIFY(tid != 0, "Unexpected SelectRow for an unknown table");
- return Db.Select(tid, key, tags, row, /* readFlags */ 0, ReadVersion);
+ return Db.Select(tid, key, tags, row, stats, /* readFlags */ 0, readVersion.GetOrElse(ReadVersion));
+}
+
+NTable::EReady TDataShardUserDb::SelectRow(
+ const TTableId& tableId,
+ TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const NTable::TTag> tags,
+ NTable::TRowState& row,
+ const TMaybe<TRowVersion>& readVersion)
+{
+ NTable::TSelectStats stats;
+ return SelectRow(tableId, key, tags, row, stats, readVersion);
}
} // namespace NKikimr::NDataShard
diff --git a/ydb/core/tx/datashard/datashard_user_db.h b/ydb/core/tx/datashard/datashard_user_db.h
index 1bace953ee..5731066d5c 100644
--- a/ydb/core/tx/datashard/datashard_user_db.h
+++ b/ydb/core/tx/datashard/datashard_user_db.h
@@ -1,6 +1,8 @@
#pragma once
#include "datashard_impl.h"
+#include <util/generic/maybe.h>
+
namespace NKikimr::NDataShard {
class IDataShardUserDb {
@@ -12,12 +14,21 @@ public:
const TTableId& tableId,
TArrayRef<const TRawTypeValue> key,
TArrayRef<const NTable::TTag> tags,
- NTable::TRowState& row) = 0;
+ NTable::TRowState& row,
+ NTable::TSelectStats& stats,
+ const TMaybe<TRowVersion>& readVersion = {}) = 0;
+
+ virtual NTable::EReady SelectRow(
+ const TTableId& tableId,
+ TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const NTable::TTag> tags,
+ NTable::TRowState& row,
+ const TMaybe<TRowVersion>& readVersion = {}) = 0;
};
class TDataShardUserDb final : public IDataShardUserDb {
public:
- TDataShardUserDb(TDataShard& self, NTable::TDatabase& db, const TRowVersion& readVersion = TRowVersion::Min())
+ TDataShardUserDb(TDataShard& self, NTable::TDatabase& db, const TRowVersion& readVersion)
: Self(self)
, Db(db)
, ReadVersion(readVersion)
@@ -27,7 +38,16 @@ public:
const TTableId& tableId,
TArrayRef<const TRawTypeValue> key,
TArrayRef<const NTable::TTag> tags,
- NTable::TRowState& row) override;
+ NTable::TRowState& row,
+ NTable::TSelectStats& stats,
+ const TMaybe<TRowVersion>& readVersion = {}) override;
+
+ NTable::EReady SelectRow(
+ const TTableId& tableId,
+ TArrayRef<const TRawTypeValue> key,
+ TArrayRef<const NTable::TTag> tags,
+ NTable::TRowState& row,
+ const TMaybe<TRowVersion>& readVersion = {}) override;
private:
TDataShard& Self;
diff --git a/ydb/core/tx/datashard/datashard_user_table.cpp b/ydb/core/tx/datashard/datashard_user_table.cpp
index 8a8016c475..e357b3af61 100644
--- a/ydb/core/tx/datashard/datashard_user_table.cpp
+++ b/ydb/core/tx/datashard/datashard_user_table.cpp
@@ -609,4 +609,35 @@ void TUserTable::ApplyDefaults(TTransactionContext& txc) const
}
}
+void TUserTable::Fix_KIKIMR_17222(NTable::TDatabase& db) const
+{
+ Fix_KIKIMR_17222(db, LocalTid);
+ if (ShadowTid) {
+ Fix_KIKIMR_17222(db, ShadowTid);
+ }
+}
+
+void TUserTable::Fix_KIKIMR_17222(NTable::TDatabase& db, ui32 tid) const
+{
+ const auto* tableInfo = db.GetScheme().GetTableInfo(tid);
+ if (!tableInfo) {
+ // Local table does not exist, nothing to fix
+ return;
+ }
+
+ for (const auto& fam : Families) {
+ ui32 familyId = fam.first;
+ if (tableInfo->Families.contains(familyId)) {
+ // Family exists, nothing to fix
+ continue;
+ }
+
+ const TUserFamily& family = fam.second;
+
+ db.Alter().AddFamily(tid, familyId, family.GetRoomId());
+ db.Alter().SetFamily(tid, familyId, family.Cache, family.Codec);
+ db.Alter().SetFamilyBlobs(tid, familyId, family.GetOuterThreshold(), family.GetExternalThreshold());
+ }
+}
+
}}
diff --git a/ydb/core/tx/datashard/datashard_user_table.h b/ydb/core/tx/datashard/datashard_user_table.h
index 409e677388..2a5dadea1a 100644
--- a/ydb/core/tx/datashard/datashard_user_table.h
+++ b/ydb/core/tx/datashard/datashard_user_table.h
@@ -387,6 +387,8 @@ struct TUserTable : public TThrRefBase {
const NKikimrSchemeOp::TTableDescription& alter, TString& strError);
void ApplyDefaults(NTabletFlatExecutor::TTransactionContext& txc) const;
+ void Fix_KIKIMR_17222(NTable::TDatabase& db) const;
+
TTableRange GetTableRange() const { return Range.ToTableRange(); }
const TString& GetSchema() const { return Schema; }
@@ -420,6 +422,8 @@ private:
void DoApplyCreate(NTabletFlatExecutor::TTransactionContext& txc, const TString& tableName, bool shadow,
const NKikimrSchemeOp::TPartitionConfig& partConfig) const;
+ void Fix_KIKIMR_17222(NTable::TDatabase& db, ui32 tid) const;
+
private:
TString Schema;
ui64 TableSchemaVersion = 0;
diff --git a/ydb/core/tx/datashard/datashard_ut_change_collector.cpp b/ydb/core/tx/datashard/datashard_ut_change_collector.cpp
index b6a70d3c3a..32753c722a 100644
--- a/ydb/core/tx/datashard/datashard_ut_change_collector.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_change_collector.cpp
@@ -579,6 +579,29 @@ Y_UNIT_TEST_SUITE(AsyncIndexChangeCollector) {
});
}
+ Y_UNIT_TEST(ImplicitlyUpdateCoveredColumn) {
+ const auto schema = TShardedTableOptions()
+ .Columns({
+ {"a", "Uint32", true, false},
+ {"b", "Uint32", false, false},
+ {"c", "Uint32", false, false},
+ })
+ .Indexes({
+ {"by_b", {"b"}, {"c"}, NKikimrSchemeOp::EIndexTypeGlobalAsync},
+ });
+
+ Run("/Root/path", schema, TVector<TString>{
+ "UPSERT INTO `/Root/path` (a, b, c) VALUES (1, 10, 100);",
+ "UPSERT INTO `/Root/path` (a, b) VALUES (1, 20);",
+ }, {
+ {"by_b", {
+ TStructRecord(NTable::ERowOp::Upsert, {{"b", 10}, {"a", 1}}, {{"c", 100}}),
+ TStructRecord(NTable::ERowOp::Erase, {{"b", 10}, {"a", 1}}),
+ TStructRecord(NTable::ERowOp::Upsert, {{"b", 20}, {"a", 1}}, {{"c", 100}}),
+ }},
+ });
+ }
+
} // AsyncIndexChangeCollector
Y_UNIT_TEST_SUITE(CdcStreamChangeCollector) {
diff --git a/ydb/core/tx/datashard/datashard_ut_change_exchange.cpp b/ydb/core/tx/datashard/datashard_ut_change_exchange.cpp
index fd3be2d402..1485ead642 100644
--- a/ydb/core/tx/datashard/datashard_ut_change_exchange.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_change_exchange.cpp
@@ -786,7 +786,6 @@ Y_UNIT_TEST_SUITE(Cdc) {
}
};
-
TShardedTableOptions SimpleTable() {
return TShardedTableOptions()
.Columns({
@@ -795,33 +794,40 @@ Y_UNIT_TEST_SUITE(Cdc) {
});
}
- TCdcStream KeysOnly(NKikimrSchemeOp::ECdcStreamFormat format, const TString& name = "Stream", bool vt = false) {
+ TCdcStream KeysOnly(NKikimrSchemeOp::ECdcStreamFormat format, const TString& name = "Stream") {
return TCdcStream{
.Name = name,
.Mode = NKikimrSchemeOp::ECdcStreamModeKeysOnly,
.Format = format,
- .VirtualTimestamps = vt,
};
}
- TCdcStream Updates(NKikimrSchemeOp::ECdcStreamFormat format, const TString& name = "Stream", bool vt = false) {
+ TCdcStream Updates(NKikimrSchemeOp::ECdcStreamFormat format, const TString& name = "Stream") {
return TCdcStream{
.Name = name,
.Mode = NKikimrSchemeOp::ECdcStreamModeUpdate,
.Format = format,
- .VirtualTimestamps = vt,
};
}
- TCdcStream NewAndOldImages(NKikimrSchemeOp::ECdcStreamFormat format, const TString& name = "Stream", bool vt = false) {
+ TCdcStream NewAndOldImages(NKikimrSchemeOp::ECdcStreamFormat format, const TString& name = "Stream") {
return TCdcStream{
.Name = name,
.Mode = NKikimrSchemeOp::ECdcStreamModeNewAndOldImages,
.Format = format,
- .VirtualTimestamps = vt,
};
}
+ TCdcStream WithVirtualTimestamps(TCdcStream streamDesc) {
+ streamDesc.VirtualTimestamps = true;
+ return streamDesc;
+ }
+
+ TCdcStream WithInitialScan(TCdcStream streamDesc) {
+ streamDesc.InitialState = NKikimrSchemeOp::ECdcStreamStateScan;
+ return streamDesc;
+ }
+
TString CalcPartitionKey(const TString& data) {
NJson::TJsonValue json;
UNIT_ASSERT(NJson::ReadJsonTree(data, &json));
@@ -1093,7 +1099,6 @@ Y_UNIT_TEST_SUITE(Cdc) {
}
};
-
#define Y_UNIT_TEST_TRIPLET(N, VAR1, VAR2, VAR3) \
template<typename TRunner> void N(NUnitTest::TTestContext&); \
struct TTestRegistration##N { \
@@ -1164,7 +1169,7 @@ Y_UNIT_TEST_SUITE(Cdc) {
}
Y_UNIT_TEST_TRIPLET(VirtualTimestamps, PqRunner, YdsRunner, TopicRunner) {
- TRunner::Read(SimpleTable(), KeysOnly(NKikimrSchemeOp::ECdcStreamFormatJson, "Stream", true), {R"(
+ TRunner::Read(SimpleTable(), WithVirtualTimestamps(KeysOnly(NKikimrSchemeOp::ECdcStreamFormatJson)), {R"(
UPSERT INTO `/Root/Table` (key, value) VALUES
(1, 10),
(2, 20),
@@ -1916,6 +1921,130 @@ Y_UNIT_TEST_SUITE(Cdc) {
}
}
+ Y_UNIT_TEST(InitialScan) {
+ TPortManager portManager;
+ TServer::TPtr server = new TServer(TServerSettings(portManager.GetPort(2134), {}, DefaultPQConfig())
+ .SetUseRealThreads(false)
+ .SetDomainName("Root")
+ .SetEnableChangefeedInitialScan(true)
+ );
+
+ auto& runtime = *server->GetRuntime();
+ const auto edgeActor = runtime.AllocateEdgeActor();
+
+ SetupLogging(runtime);
+ InitRoot(server, edgeActor);
+ CreateShardedTable(server, edgeActor, "/Root", "Table", SimpleTable());
+
+ ExecSQL(server, edgeActor, R"(
+ UPSERT INTO `/Root/Table` (key, value) VALUES
+ (1, 10),
+ (2, 20),
+ (3, 30);
+ )");
+
+ WaitTxNotification(server, edgeActor, AsyncAlterAddStream(server, "/Root", "Table",
+ WithInitialScan(Updates(NKikimrSchemeOp::ECdcStreamFormatJson))));
+
+ WaitForContent(server, edgeActor, "/Root/Table/Stream", {
+ R"({"update":{"value":10},"key":[1]})",
+ R"({"update":{"value":20},"key":[2]})",
+ R"({"update":{"value":30},"key":[3]})",
+ });
+
+ ExecSQL(server, edgeActor, R"(
+ UPSERT INTO `/Root/Table` (key, value) VALUES
+ (1, 100),
+ (2, 200),
+ (3, 300);
+ )");
+
+ WaitForContent(server, edgeActor, "/Root/Table/Stream", {
+ R"({"update":{"value":10},"key":[1]})",
+ R"({"update":{"value":20},"key":[2]})",
+ R"({"update":{"value":30},"key":[3]})",
+ R"({"update":{"value":100},"key":[1]})",
+ R"({"update":{"value":200},"key":[2]})",
+ R"({"update":{"value":300},"key":[3]})",
+ });
+ }
+
+ Y_UNIT_TEST(InitialScanUpdatedRows) {
+ TPortManager portManager;
+ TServer::TPtr server = new TServer(TServerSettings(portManager.GetPort(2134), {}, DefaultPQConfig())
+ .SetUseRealThreads(false)
+ .SetDomainName("Root")
+ .SetEnableChangefeedInitialScan(true)
+ );
+
+ auto& runtime = *server->GetRuntime();
+ const auto edgeActor = runtime.AllocateEdgeActor();
+
+ SetupLogging(runtime);
+ InitRoot(server, edgeActor);
+ CreateShardedTable(server, edgeActor, "/Root", "Table", SimpleTable());
+
+ ExecSQL(server, edgeActor, R"(
+ UPSERT INTO `/Root/Table` (key, value) VALUES
+ (1, 10),
+ (2, 20),
+ (3, 30);
+ )");
+
+ TVector<THolder<IEventHandle>> delayed;
+ auto prevObserver = runtime.SetObserverFunc([&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::EvCdcStreamScanRequest) {
+ delayed.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+
+ WaitTxNotification(server, edgeActor, AsyncAlterAddStream(server, "/Root", "Table",
+ WithInitialScan(Updates(NKikimrSchemeOp::ECdcStreamFormatJson))));
+
+ if (delayed.empty()) {
+ TDispatchOptions opts;
+ opts.FinalEvents.emplace_back([&delayed](IEventHandle&) {
+ return !delayed.empty();
+ });
+ runtime.DispatchEvents(opts);
+ }
+
+ ExecSQL(server, edgeActor, R"(
+ UPSERT INTO `/Root/Table` (key, value) VALUES
+ (1, 100),
+ (4, 40);
+ )");
+
+ ExecSQL(server, edgeActor, R"(
+ DELETE FROM `/Root/Table` WHERE key = 2;
+ )");
+
+ WaitForContent(server, edgeActor, "/Root/Table/Stream", {
+ R"({"update":{"value":10},"key":[1]})",
+ R"({"update":{"value":100},"key":[1]})",
+ R"({"update":{"value":40},"key":[4]})",
+ R"({"update":{"value":20},"key":[2]})",
+ R"({"erase":{},"key":[2]})",
+ });
+
+ runtime.SetObserverFunc(prevObserver);
+ for (auto& ev : std::exchange(delayed, TVector<THolder<IEventHandle>>())) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ WaitForContent(server, edgeActor, "/Root/Table/Stream", {
+ R"({"update":{"value":10},"key":[1]})",
+ R"({"update":{"value":100},"key":[1]})",
+ R"({"update":{"value":40},"key":[4]})",
+ R"({"update":{"value":20},"key":[2]})",
+ R"({"erase":{},"key":[2]})",
+ R"({"update":{"value":30},"key":[3]})",
+ });
+ }
+
} // Cdc
} // NKikimr
diff --git a/ydb/core/tx/datashard/datashard_ut_common.cpp b/ydb/core/tx/datashard/datashard_ut_common.cpp
index d5a9599dac..d8d92b4f60 100644
--- a/ydb/core/tx/datashard/datashard_ut_common.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_common.cpp
@@ -30,6 +30,7 @@ const bool ENABLE_DATASHARD_LOG = true;
const bool DUMP_RESULT = false;
void TTester::Setup(TTestActorRuntime& runtime, const TOptions& opts) {
+ Y_UNUSED(opts);
if (ENABLE_DATASHARD_LOG) {
runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NActors::NLog::PRI_TRACE);
}
@@ -40,7 +41,6 @@ void TTester::Setup(TTestActorRuntime& runtime, const TOptions& opts) {
TAppPrepare app;
- app.SetEnableMvcc(opts.Mvcc);
auto domain = TDomainsInfo::TDomain::ConstructDomainWithExplicitTabletIds(
"dc-1", domainId, FAKE_SCHEMESHARD_TABLET_ID,
@@ -1462,6 +1462,19 @@ TRowVersion CommitWrites(
return { step, txId };
}
+ui64 AsyncDropTable(
+ Tests::TServer::TPtr server,
+ TActorId sender,
+ const TString& workingDir,
+ const TString& name)
+{
+ auto request = SchemeTxTemplate(NKikimrSchemeOp::ESchemeOpDropTable, workingDir);
+ auto& desc = *request->Record.MutableTransaction()->MutableModifyScheme()->MutableDrop();
+ desc.SetName(name);
+
+ return RunSchemeTx(*server->GetRuntime(), std::move(request), sender, true);
+}
+
ui64 AsyncSplitTable(
Tests::TServer::TPtr server,
TActorId sender,
@@ -1640,6 +1653,9 @@ ui64 AsyncAlterAddStream(
desc.MutableStreamDescription()->SetMode(streamDesc.Mode);
desc.MutableStreamDescription()->SetFormat(streamDesc.Format);
desc.MutableStreamDescription()->SetVirtualTimestamps(streamDesc.VirtualTimestamps);
+ if (streamDesc.InitialState) {
+ desc.MutableStreamDescription()->SetState(*streamDesc.InitialState);
+ }
return RunSchemeTx(*server->GetRuntime(), std::move(request));
}
diff --git a/ydb/core/tx/datashard/datashard_ut_common.h b/ydb/core/tx/datashard/datashard_ut_common.h
index 0e8c4a1441..0340b6eb40 100644
--- a/ydb/core/tx/datashard/datashard_ut_common.h
+++ b/ydb/core/tx/datashard/datashard_ut_common.h
@@ -364,6 +364,32 @@ THolder<NKqp::TEvKqp::TEvQueryRequest> MakeSQLRequest(const TString &sql,
void InitRoot(Tests::TServer::TPtr server,
TActorId sender);
+class TLambdaActor : public IActorCallback {
+public:
+ using TCallback = std::function<void(TAutoPtr<IEventHandle>&, const TActorContext&)>;
+ using TNoCtxCallback = std::function<void(TAutoPtr<IEventHandle>&)>;
+
+public:
+ TLambdaActor(TCallback&& callback)
+ : IActorCallback(static_cast<TReceiveFunc>(&TLambdaActor::StateWork))
+ , Callback(std::move(callback))
+ { }
+
+ TLambdaActor(TNoCtxCallback&& callback)
+ : TLambdaActor([callback = std::move(callback)](auto& ev, auto&) {
+ callback(ev);
+ })
+ { }
+
+private:
+ STFUNC(StateWork) {
+ Callback(ev, ctx);
+ }
+
+private:
+ TCallback Callback;
+};
+
enum class EShadowDataMode {
Default,
Enabled,
@@ -397,10 +423,12 @@ struct TShardedTableOptions {
struct TCdcStream {
using EMode = NKikimrSchemeOp::ECdcStreamMode;
using EFormat = NKikimrSchemeOp::ECdcStreamFormat;
+ using EState = NKikimrSchemeOp::ECdcStreamState;
TString Name;
EMode Mode;
EFormat Format;
+ TMaybe<EState> InitialState;
bool VirtualTimestamps = false;
};
@@ -428,21 +456,6 @@ struct TShardedTableOptions {
#undef TABLE_OPTION_IMPL
};
-#define Y_UNIT_TEST_WITH_MVCC_IMPL(N, OPT) \
- template<bool OPT> void N(NUnitTest::TTestContext&); \
- struct TTestRegistration##N { \
- TTestRegistration##N() { \
- TCurrentTest::AddTest(#N, static_cast<void (*)(NUnitTest::TTestContext&)>(&N<false>), false); \
- TCurrentTest::AddTest("Mvcc" #N, static_cast<void (*)(NUnitTest::TTestContext&)>(&N<true>), false); \
- } \
- }; \
- static TTestRegistration##N testRegistration##N; \
- template<bool OPT> \
- void N(NUnitTest::TTestContext&)
-
-#define Y_UNIT_TEST_WITH_MVCC(N) Y_UNIT_TEST_WITH_MVCC_IMPL(N, UseMvcc)
-#define WithMvcc UseMvcc
-
#define Y_UNIT_TEST_QUAD(N, OPT1, OPT2) \
template<bool OPT1, bool OPT2> void N(NUnitTest::TTestContext&); \
struct TTestRegistration##N { \
@@ -545,6 +558,12 @@ TRowVersion CommitWrites(
const TVector<TString>& tables,
ui64 writeTxId);
+ui64 AsyncDropTable(
+ Tests::TServer::TPtr server,
+ TActorId sender,
+ const TString& workingDir,
+ const TString& name);
+
ui64 AsyncSplitTable(
Tests::TServer::TPtr server,
TActorId sender,
diff --git a/ydb/core/tx/datashard/datashard_ut_common_kqp.h b/ydb/core/tx/datashard/datashard_ut_common_kqp.h
index 01827e50c5..9994ee28b3 100644
--- a/ydb/core/tx/datashard/datashard_ut_common_kqp.h
+++ b/ydb/core/tx/datashard/datashard_ut_common_kqp.h
@@ -120,12 +120,16 @@ namespace NKqpHelpers {
return request;
}
+ inline TString FormatResult(const Ydb::ResultSet& rs) {
+ Cerr << JoinSeq(", ", rs.rows());
+ return JoinSeq(", ", rs.rows());
+ }
+
inline TString FormatResult(const Ydb::Table::ExecuteQueryResult& result) {
if (result.result_sets_size() == 0) {
return "<empty>";
}
- Cerr << JoinSeq(", ", result.result_sets(0).rows());
- return JoinSeq(", ", result.result_sets(0).rows());
+ return FormatResult(result.result_sets(0));
}
inline TString FormatResult(const Ydb::Table::ExecuteDataQueryResponse& response) {
diff --git a/ydb/core/tx/datashard/datashard_ut_erase_rows.cpp b/ydb/core/tx/datashard/datashard_ut_erase_rows.cpp
index a659a0e87a..fc453a4d08 100644
--- a/ydb/core/tx/datashard/datashard_ut_erase_rows.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_erase_rows.cpp
@@ -355,11 +355,10 @@ void DistributedEraseTx(
} // anonymous
Y_UNIT_TEST_SUITE(EraseRowsTests) {
- void EraseRowsShouldSuccess(TMaybe<ui64> injectSchemaVersion, bool enableMvcc) {
+ void EraseRowsShouldSuccess(TMaybe<ui64> injectSchemaVersion) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings
- .SetEnableMvcc(enableMvcc)
.SetDomainName("Root")
.SetUseRealThreads(false);
@@ -386,15 +385,14 @@ Y_UNIT_TEST_SUITE(EraseRowsTests) {
UNIT_ASSERT_STRINGS_EQUAL(StripInPlace(content), "key = 3, value = 2020-04-15T00:00:00.000000Z");
}
- Y_UNIT_TEST_WITH_MVCC(EraseRowsShouldSuccess) {
- EraseRowsShouldSuccess(Nothing(), WithMvcc);
+ Y_UNIT_TEST(EraseRowsShouldSuccess) {
+ EraseRowsShouldSuccess(Nothing());
}
- Y_UNIT_TEST_WITH_MVCC(EraseRowsShouldFailOnVariousErrors) {
+ Y_UNIT_TEST(EraseRowsShouldFailOnVariousErrors) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings
- .SetEnableMvcc(WithMvcc)
.SetDomainName("Root")
.SetUseRealThreads(false);
@@ -427,13 +425,12 @@ Y_UNIT_TEST_SUITE(EraseRowsTests) {
TProto::TEvEraseResponse::SCHEME_ERROR, "Cell count doesn't match row scheme");
}
- void ConditionalEraseShouldSuccess(const TString& ttlColType, EUnit unit, const TString& toUpload, const TString& afterErase, bool enableMvcc = false) {
+ void ConditionalEraseShouldSuccess(const TString& ttlColType, EUnit unit, const TString& toUpload, const TString& afterErase) {
using TEvResponse = TEvDataShard::TEvConditionalEraseRowsResponse;
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings
- .SetEnableMvcc(enableMvcc)
.SetDomainName("Root")
.SetUseRealThreads(false);
@@ -457,7 +454,7 @@ Y_UNIT_TEST_SUITE(EraseRowsTests) {
UNIT_ASSERT_STRINGS_EQUAL(StripInPlace(content), Strip(afterErase));
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldErase) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldErase) {
ConditionalEraseShouldSuccess("Timestamp", TUnit::AUTO, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, CAST("1970-01-01T00:00:00.000000Z" AS Timestamp)),
@@ -467,10 +464,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = 2030-04-15T00:00:00.000000Z
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldNotErase) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldNotErase) {
ConditionalEraseShouldSuccess("Timestamp", TUnit::AUTO, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, CAST("2030-04-15T00:00:00.000000Z" AS Timestamp)),
@@ -480,10 +477,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
key = 1, value = 2030-04-15T00:00:00.000000Z
key = 2, value = 2030-04-15T00:00:00.000000Z
key = 3, value = 2030-04-15T00:00:00.000000Z
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnUint32) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnUint32) {
ConditionalEraseShouldSuccess("Uint32", TUnit::SECONDS, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, 0),
@@ -493,10 +490,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = 1902441600
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnUint64Seconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnUint64Seconds) {
ConditionalEraseShouldSuccess("Uint64", TUnit::SECONDS, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, 0),
@@ -506,10 +503,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = 1902441600
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnUint64MilliSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnUint64MilliSeconds) {
ConditionalEraseShouldSuccess("Uint64", TUnit::MILLISECONDS, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, 0),
@@ -519,10 +516,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = 1902441600000
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnUint64MicroSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnUint64MicroSeconds) {
ConditionalEraseShouldSuccess("Uint64", TUnit::MICROSECONDS, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, 0),
@@ -532,10 +529,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = 1902441600000000
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnUint64NanoSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnUint64NanoSeconds) {
ConditionalEraseShouldSuccess("Uint64", TUnit::NANOSECONDS, R"(
UPSERT INTO `/Root/table-1` (key, value) VALUES
(1, 0),
@@ -545,10 +542,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = 1902441600000000000
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnDyNumberSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnDyNumberSeconds) {
ConditionalEraseShouldSuccess("DyNumber", TUnit::SECONDS, R"(
--!syntax_v1
UPSERT INTO `/Root/table-1` (key, value) VALUES
@@ -563,10 +560,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
key = 5, value = .19024416e10
key = 6, value = .6362496e12
key = 7, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnDyNumberMilliSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnDyNumberMilliSeconds) {
ConditionalEraseShouldSuccess("DyNumber", TUnit::MILLISECONDS, R"(
--!syntax_v1
UPSERT INTO `/Root/table-1` (key, value) VALUES
@@ -579,10 +576,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
key = 3, value = .19024416e13
key = 4, value = .6362496e15
key = 5, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnDyNumberMicroSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnDyNumberMicroSeconds) {
ConditionalEraseShouldSuccess("DyNumber", TUnit::MICROSECONDS, R"(
--!syntax_v1
UPSERT INTO `/Root/table-1` (key, value) VALUES
@@ -598,10 +595,10 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
key = 6, value = .19024416e16
key = 7, value = .99999999999999999999999999999999999999e126
key = 8, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldEraseOnDyNumberNanoSeconds) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldEraseOnDyNumberNanoSeconds) {
ConditionalEraseShouldSuccess("DyNumber", TUnit::NANOSECONDS, R"(
--!syntax_v1
UPSERT INTO `/Root/table-1` (key, value) VALUES
@@ -612,16 +609,15 @@ UPSERT INTO `/Root/table-1` (key, value) VALUES
)", R"(
key = 3, value = .19024416e19
key = 4, value = (empty maybe)
- )", WithMvcc);
+ )");
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldFailOnVariousErrors) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldFailOnVariousErrors) {
using TEvResponse = TEvDataShard::TEvConditionalEraseRowsResponse;
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings
- .SetEnableMvcc(WithMvcc)
.SetDomainName("Root")
.SetUseRealThreads(false);
@@ -661,13 +657,15 @@ key = 4, value = (empty maybe)
}
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldBreakLocks) {
+ Y_UNIT_TEST_TWIN(ConditionalEraseRowsShouldBreakLocks, StreamLookup) {
using TEvResponse = TEvDataShard::TEvConditionalEraseRowsResponse;
TPortManager pm;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings
- .SetEnableMvcc(WithMvcc)
+ .SetAppConfig(appConfig)
.SetDomainName("Root")
.SetUseRealThreads(false);
@@ -714,13 +712,12 @@ key = 4, value = (empty maybe)
}
}
- Y_UNIT_TEST_WITH_MVCC(ConditionalEraseRowsShouldNotEraseModifiedRows) {
+ Y_UNIT_TEST(ConditionalEraseRowsShouldNotEraseModifiedRows) {
using TEvResponse = TEvDataShard::TEvConditionalEraseRowsResponse;
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings
- .SetEnableMvcc(WithMvcc)
.SetDomainName("Root")
.SetUseRealThreads(false);
diff --git a/ydb/core/tx/datashard/datashard_ut_followers.cpp b/ydb/core/tx/datashard/datashard_ut_followers.cpp
index e8173c24aa..ea21a77677 100644
--- a/ydb/core/tx/datashard/datashard_ut_followers.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_followers.cpp
@@ -16,7 +16,6 @@ Y_UNIT_TEST_SUITE(DataShardFollowers) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
diff --git a/ydb/core/tx/datashard/datashard_ut_init.cpp b/ydb/core/tx/datashard/datashard_ut_init.cpp
index ac15dc35de..a4022dfbbe 100644
--- a/ydb/core/tx/datashard/datashard_ut_init.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_init.cpp
@@ -51,48 +51,6 @@ TString GetTablePath(TTestActorRuntime &runtime,
}
Y_UNIT_TEST_SUITE(TTxDataShardTestInit) {
- Y_UNIT_TEST(TestMvccStateSwitch) {
- TPortManager pm;
- TServerSettings serverSettings(pm.GetPort(2134));
- serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetUseRealThreads(false);
-
- Tests::TServer::TPtr server = new TServer(serverSettings);
- auto &runtime = *server->GetRuntime();
- auto sender = runtime.AllocateEdgeActor();
- runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_DEBUG);
- InitRoot(server, sender);
-
- CreateShardedTable(server, sender, "/Root", "table-1", 1);
-
- auto tabletId = GetTableShards(server, sender, "/Root/table-1")[0];
- auto actorId = ResolveTablet(runtime, tabletId);
- auto datashard = dynamic_cast<NDataShard::TDataShard*>(runtime.FindActor(actorId));
-
- UNIT_ASSERT_EQUAL(datashard->GetSnapshotManager().GetMvccState(), NDataShard::EMvccState::MvccEnabled);
-
- runtime.GetAppData().FeatureFlags.SetEnableMvccForTest(false);
-
- GracefulRestartTablet(runtime, tabletId, sender);
-
- auto waitFor = [&](const auto& condition, const TString& description) {
- if (!condition()) {
- Cerr << "... waiting for " << description << Endl;
- TDispatchOptions options;
- options.CustomFinalCondition = [&]() {
- return condition();
- };
- runtime.DispatchEvents(options);
- UNIT_ASSERT_C(condition(), "... failed to wait for " << description);
- }
- };
-
- actorId = ResolveTablet(runtime, tabletId);
- datashard = dynamic_cast<NDataShard::TDataShard*>(runtime.FindActor(actorId));
-
- waitFor([&]{ return datashard->GetSnapshotManager().GetMvccState() == NDataShard::EMvccState::MvccDisabled; }, "mvcc disabled");
- }
Y_UNIT_TEST(TestGetShardStateAfterInitialization) {
TTestBasicRuntime runtime;
diff --git a/ydb/core/tx/datashard/datashard_ut_kqp_errors.cpp b/ydb/core/tx/datashard/datashard_ut_kqp_errors.cpp
index 2642b82513..772d1c86b7 100644
--- a/ydb/core/tx/datashard/datashard_ut_kqp_errors.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_kqp_errors.cpp
@@ -34,12 +34,18 @@ bool HasIssue(const TIssues& issues, ui32 code, TStringBuf message, std::functio
class TLocalFixture {
public:
- TLocalFixture() {
+ TLocalFixture(bool disableSnaphots = false) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ if (disableSnaphots) {
+ serverSettings.SetEnableMvccSnapshotReads(false);
+ }
serverSettings.SetDomainName("Root")
.SetNodeCount(2)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Server = new TServer(serverSettings);
Runtime = Server->GetRuntime();
@@ -62,7 +68,7 @@ public:
Runtime->SetLogPriority(NKikimrServices::KQP_RESOURCE_MANAGER, NLog::PRI_NOTICE);
// Runtime->SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_DEBUG);
// Runtime->SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
-// Runtime->SetLogPriority(NKikimrServices::KQP_EXECUTER, NActors::NLog::PRI_TRACE);
+ Runtime->SetLogPriority(NKikimrServices::KQP_EXECUTER, NActors::NLog::PRI_TRACE);
auto sender = Runtime->AllocateEdgeActor();
InitRoot(Server, sender);
@@ -223,7 +229,7 @@ Y_UNIT_TEST(ProposeError) {
}
Y_UNIT_TEST(ProposeRequestUndelivered) {
- TLocalFixture fixture;
+ TLocalFixture fixture(true);
auto mitm = [&](TTestActorRuntimeBase& rt, TAutoPtr<IEventHandle> &ev) {
if (ev->GetTypeRewrite() == TEvPipeCache::TEvForward::EventType) {
auto forwardEvent = ev.Get()->Get<TEvPipeCache::TEvForward>();
@@ -243,7 +249,7 @@ Y_UNIT_TEST(ProposeRequestUndelivered) {
auto& record = ev->Get()->Record.GetRef();
UNIT_ASSERT_VALUES_EQUAL_C(record.GetYdbStatus(), Ydb::StatusIds::UNAVAILABLE, record.DebugString());
- // Cerr << record.DebugString() << Endl;
+ Cerr << record.DebugString() << Endl;
TIssues issues;
IssuesFromMessage(record.GetResponse().GetQueryIssues(), issues);
@@ -297,7 +303,7 @@ void TestProposeResultLost(TTestActorRuntime& runtime, TActorId client, const TS
}
Y_UNIT_TEST(ProposeResultLost_RoTx) {
- TLocalFixture fixture;
+ TLocalFixture fixture(true);
TestProposeResultLost(*fixture.Runtime, fixture.Client,
Q_("select * from `/Root/table-1`"),
[](const NKikimrKqp::TEvQueryResponse& record) {
diff --git a/ydb/core/tx/datashard/datashard_ut_kqp_scan.cpp b/ydb/core/tx/datashard/datashard_ut_kqp_scan.cpp
index cc772f24e9..b5d2a176ec 100644
--- a/ydb/core/tx/datashard/datashard_ut_kqp_scan.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_kqp_scan.cpp
@@ -49,7 +49,7 @@ Y_UNIT_TEST_SUITE(KqpScan) {
* kill tablet after that. So in order to complete scan ComputeActor need to handle scan restart after
* each ScanData.
*/
- Y_UNIT_TEST_WITH_MVCC(ScanRetryRead) {
+ Y_UNIT_TEST(ScanRetryRead) {
NKikimrConfig::TAppConfig appCfg;
auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager();
@@ -59,7 +59,6 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetNodeCount(2)
.SetAppConfig(appCfg)
.SetUseRealThreads(false);
@@ -158,13 +157,12 @@ Y_UNIT_TEST_SUITE(KqpScan) {
/*
* Force remote scans by meddling with EvShardsResolveStatus. Check that remote scan actually took place.
*/
- Y_UNIT_TEST_WITH_MVCC(RemoteShardScan) {
+ Y_UNIT_TEST(RemoteShardScan) {
NKikimrConfig::TAppConfig appCfg;
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetNodeCount(2)
.SetAppConfig(appCfg)
.SetUseRealThreads(false);
@@ -224,7 +222,8 @@ Y_UNIT_TEST_SUITE(KqpScan) {
/*
* Check that remote scan actually happened.
*/
- case NKqp::TKqpComputeEvents::EvScanData: {
+ case NKqp::TKqpComputeEvents::EvScanData:
+ case TEvDataShard::EvRead: {
remoteScanDetected = remoteScanDetected || ev->Sender.NodeId() != ev->Recipient.NodeId();
break;
}
@@ -244,7 +243,7 @@ Y_UNIT_TEST_SUITE(KqpScan) {
UNIT_ASSERT_VALUES_EQUAL(result, 596400);
}
- Y_UNIT_TEST_WITH_MVCC(ScanDuringSplitThenMerge) {
+ Y_UNIT_TEST(ScanDuringSplitThenMerge) {
NKikimrConfig::TAppConfig appCfg;
auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager();
@@ -254,7 +253,6 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetNodeCount(2)
.SetAppConfig(appCfg)
.SetUseRealThreads(false);
@@ -377,7 +375,7 @@ Y_UNIT_TEST_SUITE(KqpScan) {
UNIT_ASSERT_VALUES_EQUAL(result, 596400);
}
- Y_UNIT_TEST_WITH_MVCC(ScanDuringSplit) {
+ Y_UNIT_TEST(ScanDuringSplit) {
NKikimrConfig::TAppConfig appCfg;
auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager();
@@ -387,7 +385,6 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetNodeCount(2)
.SetAppConfig(appCfg)
.SetUseRealThreads(false);
@@ -494,7 +491,7 @@ Y_UNIT_TEST_SUITE(KqpScan) {
UNIT_ASSERT_VALUES_EQUAL(result, 596400);
}
- Y_UNIT_TEST_WITH_MVCC(ScanRetryReadRanges) {
+ Y_UNIT_TEST(ScanRetryReadRanges) {
Y_UNUSED(EnableLogging);
NKikimrConfig::TAppConfig appCfg;
@@ -506,7 +503,6 @@ Y_UNIT_TEST_SUITE(KqpScan) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetNodeCount(2)
.SetAppConfig(appCfg)
.SetUseRealThreads(false);
@@ -551,6 +547,13 @@ Y_UNIT_TEST_SUITE(KqpScan) {
break;
}
+ case TEvDataShard::EvRead: {
+ if (!incomingRangesSize) {
+ auto& request = ev->Get<TEvDataShard::TEvRead>()->Record;
+ incomingRangesSize = request.RangesSize();
+ }
+ break;
+ }
/*
* Respond to streamData with acks. Without that execution pipeline will stop
diff --git a/ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp b/ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp
new file mode 100644
index 0000000000..d17cf96558
--- /dev/null
+++ b/ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp
@@ -0,0 +1,151 @@
+#include "datashard_ut_common_kqp.h"
+
+namespace NKikimr {
+
+using namespace Tests;
+using namespace NDataShard::NKqpHelpers;
+
+namespace {
+ TString FillTableQuery() {
+ TStringBuilder sql;
+ sql << "UPSERT INTO `/Root/TestTable` (key, value) VALUES ";
+ for (size_t i = 0; i < 1000; ++i) {
+ sql << " (" << i << ", " << i << i << "),";
+ }
+ sql << " (10000, 10000);";
+ return sql;
+ }
+}
+
+Y_UNIT_TEST_SUITE(KqpStreamLookup) {
+ Y_UNIT_TEST(ReadTableDuringSplit) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto runtime = server->GetRuntime();
+ auto sender = runtime->AllocateEdgeActor();
+
+ InitRoot(server, sender);
+
+ // Split would fail otherwise :(
+ SetSplitMergePartCountLimit(server->GetRuntime(), -1);
+
+ CreateShardedTable(server, sender, "/Root", "TestTable", 1);
+ auto shards = GetTableShards(server, sender, "/Root/TestTable");
+
+ ExecSQL(server, sender, FillTableQuery());
+
+ bool readReceived = false;
+ auto captureEvents = [&](TTestActorRuntimeBase &, TAutoPtr <IEventHandle> &ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::TEvRead::EventType) {
+ IActor* actor = runtime->FindActor(ev->Sender);
+ if (actor && actor->GetActivityType() == NKikimrServices::TActivity::KQP_STREAM_LOOKUP_ACTOR) {
+
+ if (!readReceived) {
+ auto senderSplit = runtime->AllocateEdgeActor();
+ ui64 txId = AsyncSplitTable(server, senderSplit, "/Root/TestTable", shards[0], 500);
+ Cerr << "--- split started ---" << Endl;
+ WaitTxNotification(server, senderSplit, txId);
+ Cerr << "--- split finished ---" << Endl;
+ shards = GetTableShards(server, sender, "/Root/TestTable");
+ UNIT_ASSERT_VALUES_EQUAL(shards.size(), 2u);
+
+ readReceived = true;
+ }
+ }
+ }
+
+ return false;
+ };
+
+ server->GetRuntime()->SetEventFilter(captureEvents);
+
+ SendSQL(server, sender, R"(
+ $keys = SELECT key FROM `/Root/TestTable`;
+ SELECT * FROM `/Root/TestTable` WHERE key IN $keys;
+ )");
+
+ auto reply = runtime->GrabEdgeEventRethrow<NKqp::TEvKqp::TEvQueryResponse>(sender);
+ UNIT_ASSERT_VALUES_EQUAL(reply->Get()->Record.GetRef().GetYdbStatus(), Ydb::StatusIds::SUCCESS);
+ auto results = reply->Get()->Record.GetRef().GetResponse().GetResults();
+ UNIT_ASSERT_VALUES_EQUAL(results.size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(results[0].GetValue().GetStruct(0).ListSize(), 1000);
+ }
+
+ Y_UNIT_TEST(ReadTableWithIndexDuringSplit) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto runtime = server->GetRuntime();
+ auto sender = runtime->AllocateEdgeActor();
+
+ InitRoot(server, sender);
+
+ // Split would fail otherwise :(
+ SetSplitMergePartCountLimit(server->GetRuntime(), -1);
+
+ CreateShardedTable(server, sender, "/Root", "TestTable",
+ TShardedTableOptions()
+ .Columns({
+ {"key", "Uint32", true, false},
+ {"value", "Uint32", false, false},
+ })
+ .Indexes({
+ TShardedTableOptions::TIndex{
+ "by_value",
+ {"value"},
+ {},
+ NKikimrSchemeOp::EIndexTypeGlobal
+ }
+ })
+ );
+
+ auto shards = GetTableShards(server, sender, "/Root/TestTable");
+
+ ExecSQL(server, sender, FillTableQuery());
+
+ bool readReceived = false;
+ auto captureEvents = [&](TTestActorRuntimeBase &, TAutoPtr <IEventHandle> &ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::TEvRead::EventType) {
+ IActor* actor = runtime->FindActor(ev->Sender);
+ if (actor && actor->GetActivityType() == NKikimrServices::TActivity::KQP_STREAM_LOOKUP_ACTOR) {
+
+ if (!readReceived) {
+ auto senderSplit = runtime->AllocateEdgeActor();
+ ui64 txId = AsyncSplitTable(server, senderSplit, "/Root/TestTable", shards[0], 500);
+ Cerr << "--- split started ---" << Endl;
+ WaitTxNotification(server, senderSplit, txId);
+ Cerr << "--- split finished ---" << Endl;
+ shards = GetTableShards(server, sender, "/Root/TestTable");
+ UNIT_ASSERT_VALUES_EQUAL(shards.size(), 2u);
+
+ readReceived = true;
+ }
+ }
+ }
+
+ return false;
+ };
+
+ server->GetRuntime()->SetEventFilter(captureEvents);
+
+ SendSQL(server, sender, R"(
+ SELECT * FROM `/Root/TestTable` VIEW by_value WHERE value = 500500;
+ )");
+
+ auto reply = runtime->GrabEdgeEventRethrow<NKqp::TEvKqp::TEvQueryResponse>(sender);
+ UNIT_ASSERT_VALUES_EQUAL(reply->Get()->Record.GetRef().GetYdbStatus(), Ydb::StatusIds::SUCCESS);
+ auto results = reply->Get()->Record.GetRef().GetResponse().GetResults();
+ UNIT_ASSERT_VALUES_EQUAL(results.size(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(results[0].GetValue().GetStruct(0).ListSize(), 1);
+ }
+
+} // Y_UNIT_TEST_SUITE(KqpStreamLookup)
+} // namespace NKikimr
+
diff --git a/ydb/core/tx/datashard/datashard_ut_minstep.cpp b/ydb/core/tx/datashard/datashard_ut_minstep.cpp
index c2f2999ad1..64c8764838 100644
--- a/ydb/core/tx/datashard/datashard_ut_minstep.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_minstep.cpp
@@ -66,11 +66,17 @@ TAutoPtr<IEventHandle> EjectDataPropose(TServer::TPtr server, ui64 dataShard)
}
Y_UNIT_TEST_SUITE(TDataShardMinStepTest) {
- void TestDropTablePlanComesNotTooEarly(const TString& query, Ydb::StatusIds::StatusCode expectedStatus) {
+ void TestDropTablePlanComesNotTooEarly(const TString& query, Ydb::StatusIds::StatusCode expectedStatus, bool disableSnaphots = true) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ if (disableSnaphots) {
+ serverSettings.SetEnableMvccSnapshotReads(false);
+ }
serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -156,8 +162,11 @@ Y_UNIT_TEST_SUITE(TDataShardMinStepTest) {
void TestAlterProposeRebootMinStep(ERebootOnPropose rebootOnPropose) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -375,11 +384,17 @@ Y_UNIT_TEST_SUITE(TDataShardMinStepTest) {
TestAlterProposeRebootMinStep(ERebootOnPropose::SchemeShard);
}
- void TestDropTableCompletesQuickly(const TString& query, Ydb::StatusIds::StatusCode expectedStatus) {
+ void TestDropTableCompletesQuickly(const TString& query, Ydb::StatusIds::StatusCode expectedStatus, bool disableSnaphots = false) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ if (disableSnaphots) {
+ serverSettings.SetEnableMvccSnapshotReads(false);
+ }
serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -472,7 +487,8 @@ Y_UNIT_TEST_SUITE(TDataShardMinStepTest) {
Y_UNIT_TEST(TestDropTableCompletesQuicklyRO) {
TestDropTableCompletesQuickly(
"SELECT * FROM `/Root/table-1` UNION ALL SELECT * FROM `/Root/table-2`;",
- Ydb::StatusIds::SUCCESS
+ Ydb::StatusIds::SUCCESS,
+ true
);
}
diff --git a/ydb/core/tx/datashard/datashard_ut_order.cpp b/ydb/core/tx/datashard/datashard_ut_order.cpp
index 0b690ed269..9688b1e9d8 100644
--- a/ydb/core/tx/datashard/datashard_ut_order.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_order.cpp
@@ -215,29 +215,26 @@ static void ZigZag(const TTester::TOptions& opts, bool symmetric, ui32 limit = 4
ZigZag(proxy, symmetric, limit);
}
-Y_UNIT_TEST_WITH_MVCC(ZigZag) {
+Y_UNIT_TEST(ZigZag) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
ZigZag(opts, true);
ZigZag(opts, false);
}
-Y_UNIT_TEST_WITH_MVCC(ZigZag_oo) {
+Y_UNIT_TEST(ZigZag_oo) {
TVector<ui32> variants = {4, 8, 16};
for (ui32 var : variants) {
TTester::TOptions opts;
opts.EnableOutOfOrder(var);
- opts.EnableMvcc(WithMvcc);
ZigZag(opts, true);
ZigZag(opts, false);
}
}
-Y_UNIT_TEST_WITH_MVCC(ZigZag_oo8_dirty) {
+Y_UNIT_TEST(ZigZag_oo8_dirty) {
TTester::TOptions opts;
opts.EnableOutOfOrder(8);
opts.EnableSoftUpdates();
- opts.EnableMvcc(WithMvcc);
ZigZag(opts, true);
ZigZag(opts, false);
}
@@ -313,48 +310,41 @@ static void ImmediateBetweenOnline(const TTester::TOptions& opts, bool forceOnli
proxy.ExecQueue();
}
-Y_UNIT_TEST_WITH_MVCC(ImmediateBetweenOnline) {
+Y_UNIT_TEST(ImmediateBetweenOnline) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
ImmediateBetweenOnline(opts, false);
}
-Y_UNIT_TEST_WITH_MVCC(ImmediateBetweenOnline_Init) {
+Y_UNIT_TEST(ImmediateBetweenOnline_Init) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
ImmediateBetweenOnline(opts, false);
}
-Y_UNIT_TEST_WITH_MVCC(ForceOnlineBetweenOnline) {
+Y_UNIT_TEST(ForceOnlineBetweenOnline) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
ImmediateBetweenOnline(opts, true);
}
-Y_UNIT_TEST_WITH_MVCC(ImmediateBetweenOnline_oo8) {
+Y_UNIT_TEST(ImmediateBetweenOnline_oo8) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
opts.EnableOutOfOrder(8);
ImmediateBetweenOnline(opts, false);
}
-Y_UNIT_TEST_WITH_MVCC(ImmediateBetweenOnline_Init_oo8) {
+Y_UNIT_TEST(ImmediateBetweenOnline_Init_oo8) {
TTester::TOptions opts(1);
- opts.EnableMvcc(WithMvcc);
opts.EnableOutOfOrder(8);
ImmediateBetweenOnline(opts, false);
}
-Y_UNIT_TEST_WITH_MVCC(ForceOnlineBetweenOnline_oo8) {
+Y_UNIT_TEST(ForceOnlineBetweenOnline_oo8) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
opts.EnableOutOfOrder(8);
ImmediateBetweenOnline(opts, true);
}
-Y_UNIT_TEST_WITH_MVCC(ImmediateBetweenOnline_oo8_dirty) {
+Y_UNIT_TEST(ImmediateBetweenOnline_oo8_dirty) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
opts.EnableOutOfOrder(8);
opts.EnableSoftUpdates();
ImmediateBetweenOnline(opts, false);
@@ -379,9 +369,8 @@ static void EvictShardCache(TFakeMiniKQLProxy& proxy, ui32 count = 500) {
proxy.ExecQueue();
}
-Y_UNIT_TEST_WITH_MVCC(DelayData) {
+Y_UNIT_TEST(DelayData) {
TTester::TOptions opts;
- opts.EnableMvcc(WithMvcc);
opts.EnableOutOfOrder(2);
opts.ExecutorCacheSize = 0;
TTester t(TTester::ESchema_MultiShardKV, opts);
@@ -408,10 +397,9 @@ Y_UNIT_TEST_WITH_MVCC(DelayData) {
proxy.ExecQueue();
}
-Y_UNIT_TEST_WITH_MVCC(ReadWriteReorder) {
+Y_UNIT_TEST(ReadWriteReorder) {
TTester::TOptions opts;
opts.EnableOutOfOrder(10);
- opts.EnableMvcc(WithMvcc);
TTester t(TTester::ESchema_MultiShardKV, opts);
TFakeMiniKQLProxy proxy(t);
@@ -785,12 +773,11 @@ static void RandomTxDeps(const TTester::TOptions& opts, ui32 numTxs, ui32 maxKey
static constexpr ui32 NumRun() { return 2; }
-Y_UNIT_TEST_WITH_MVCC(RandomPoints_ReproducerDelayData1) {
+Y_UNIT_TEST(RandomPoints_ReproducerDelayData1) {
TTester::TOptions opts;
opts.DelayData = true;
opts.ExecutorCacheSize = 0;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
RandomTxDeps(opts, 8, 8, false, false,
{5, 5, 6, 7, 3, 6, 5, 6},
@@ -798,11 +785,10 @@ Y_UNIT_TEST_WITH_MVCC(RandomPoints_ReproducerDelayData1) {
{11, 30, 10, 12, 5, 23, 30, 32});
}
-Y_UNIT_TEST_WITH_MVCC(RandomPoints_ReproducerDelayRS1) {
+Y_UNIT_TEST(RandomPoints_ReproducerDelayRS1) {
TTester::TOptions opts;
opts.DelayReadSet = true;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
RandomTxDeps(opts, 8, 8, true, false,
{2, 7, 7, 7, 6, 3, 2, 4},
@@ -810,11 +796,10 @@ Y_UNIT_TEST_WITH_MVCC(RandomPoints_ReproducerDelayRS1) {
{0, 40, 2, 33, 8, 4, 1, 3});
}
-Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayRS) {
+Y_UNIT_TEST(RandomPoints_DelayRS) {
TTester::TOptions opts;
opts.DelayReadSet = true;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TVector<std::pair<ui32, ui32>> variants;
variants.push_back({8, 8});
@@ -834,11 +819,10 @@ Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayRS) {
}
}
-Y_UNIT_TEST_WITH_MVCC(RandomDotRanges_DelayRS) {
+Y_UNIT_TEST(RandomDotRanges_DelayRS) {
TTester::TOptions opts;
opts.DelayReadSet = true;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TVector<std::pair<ui32, ui32>> variants;
variants.push_back({8, 8});
@@ -858,12 +842,11 @@ Y_UNIT_TEST_WITH_MVCC(RandomDotRanges_DelayRS) {
}
}
-Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayRS_Reboot) {
+Y_UNIT_TEST(RandomPoints_DelayRS_Reboot) {
TTester::TOptions opts;
opts.DelayReadSet = true;
opts.RebootOnDelay = true;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TVector<std::pair<ui32, ui32>> variants;
variants.push_back({8, 8});
@@ -883,13 +866,12 @@ Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayRS_Reboot) {
}
}
-Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayRS_Reboot_Dirty) {
+Y_UNIT_TEST(RandomPoints_DelayRS_Reboot_Dirty) {
TTester::TOptions opts;
opts.DelayReadSet = true;
opts.RebootOnDelay = true;
opts.EnableSoftUpdates();
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TVector<std::pair<ui32, ui32>> variants;
variants.push_back({8, 8});
@@ -909,12 +891,11 @@ Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayRS_Reboot_Dirty) {
}
}
-Y_UNIT_TEST_WITH_MVCC(RandomPoints_DelayData) {
+Y_UNIT_TEST(RandomPoints_DelayData) {
TTester::TOptions opts;
opts.DelayData = true;
opts.ExecutorCacheSize = 0;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TVector<std::pair<ui32, ui32>> variants;
variants.push_back({8, 8});
@@ -1139,11 +1120,10 @@ static void RandomPointsAndRanges(const TTester::TOptions& opts, ui32 numTxs, ui
RandomPointsAndRanges(proxy, numTxs, maxWrites, maxReads, maxRanges);
}
-Y_UNIT_TEST_WITH_MVCC(RandomPointsAndRanges) {
+Y_UNIT_TEST(RandomPointsAndRanges) {
TTester::TOptions opts;
opts.ExecutorCacheSize = 0;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TVector<TVector<ui32>> variants;
variants.push_back(TVector<ui32>() = {100, 20, 20, 20});
@@ -1160,11 +1140,10 @@ Y_UNIT_TEST_WITH_MVCC(RandomPointsAndRanges) {
///
Y_UNIT_TEST_SUITE(DataShardScan) {
-Y_UNIT_TEST_WITH_MVCC(ScanFollowedByUpdate) {
+Y_UNIT_TEST(ScanFollowedByUpdate) {
TTester::TOptions opts;
opts.ExecutorCacheSize = 0;
opts.EnableOutOfOrder(8);
- opts.EnableMvcc(WithMvcc);
TTester t(TTester::ESchema_MultiShardKV, opts);
TFakeMiniKQLProxy proxy(t);
@@ -1236,12 +1215,15 @@ Y_UNIT_TEST_WITH_MVCC(ScanFollowedByUpdate) {
proxy.ExecQueue();
}
-Y_UNIT_TEST_TWIN(TestDelayedTxWaitsForWriteActiveTxOnly, UseMvcc) {
+Y_UNIT_TEST(TestDelayedTxWaitsForWriteActiveTxOnly) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(false);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -1328,12 +1310,15 @@ Y_UNIT_TEST_TWIN(TestDelayedTxWaitsForWriteActiveTxOnly, UseMvcc) {
}
}
-Y_UNIT_TEST_TWIN(TestOnlyDataTxLagCausesRejects, UseMvcc) {
+Y_UNIT_TEST(TestOnlyDataTxLagCausesRejects) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetEnableMvccSnapshotReads(false);
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -1413,12 +1398,15 @@ Y_UNIT_TEST_TWIN(TestOnlyDataTxLagCausesRejects, UseMvcc) {
Y_UNIT_TEST_SUITE(DataShardOutOfOrder) {
-Y_UNIT_TEST_TWIN(TestOutOfOrderLockLost, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestOutOfOrderLockLost, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -1538,9 +1526,12 @@ Y_UNIT_TEST_TWIN(TestOutOfOrderLockLost, UseMvcc) {
Y_UNIT_TEST(TestMvccReadDoesntBlockWrites) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetEnableMvccSnapshotReads(false);
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
+ .SetAppConfig(app)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1666,12 +1657,15 @@ Y_UNIT_TEST(TestMvccReadDoesntBlockWrites) {
}
}
-Y_UNIT_TEST_TWIN(TestOutOfOrderReadOnlyAllowed, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestOutOfOrderReadOnlyAllowed, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -1763,11 +1757,13 @@ Y_UNIT_TEST_TWIN(TestOutOfOrderReadOnlyAllowed, UseMvcc) {
}
}
-Y_UNIT_TEST_TWIN(TestOutOfOrderNonConflictingWrites, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestOutOfOrderNonConflictingWrites, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
+ .SetAppConfig(app)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1867,142 +1863,11 @@ Y_UNIT_TEST_TWIN(TestOutOfOrderNonConflictingWrites, UseMvcc) {
}
}
-Y_UNIT_TEST(TestOutOfOrderRestartLocksSingleWithoutBarrier) {
- TPortManager pm;
- TServerSettings serverSettings(pm.GetPort(2134));
- serverSettings.SetDomainName("Root")
- .SetEnableMvcc(false) // intentionally, because we test non-mvcc locks logic
- .SetUseRealThreads(false);
-
- Tests::TServer::TPtr server = new TServer(serverSettings);
- auto &runtime = *server->GetRuntime();
- auto sender = runtime.AllocateEdgeActor();
-
- // This test requires barrier to be disabled
- runtime.GetAppData().FeatureFlags.SetDisableDataShardBarrier(true);
-
- runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
- runtime.SetLogPriority(NKikimrServices::KQP_EXECUTER, NLog::PRI_DEBUG);
-
- InitRoot(server, sender);
-
- CreateShardedTable(server, sender, "/Root", "table-1", 1);
- CreateShardedTable(server, sender, "/Root", "table-2", 1);
- auto table1shards = GetTableShards(server, sender, "/Root/table-1");
- auto table2shards = GetTableShards(server, sender, "/Root/table-2");
-
- ExecSQL(server, sender, Q_("UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);"));
- ExecSQL(server, sender, Q_("UPSERT INTO `/Root/table-2` (key, value) VALUES (2, 1);"));
-
- TString sessionId = CreateSessionRPC(runtime);
-
- TString txId;
- {
- auto result = KqpSimpleBegin(runtime, sessionId, txId, Q_(R"(
- SELECT * FROM `/Root/table-1` WHERE key = 1
- UNION ALL
- SELECT * FROM `/Root/table-2` WHERE key = 2)"));
- UNIT_ASSERT_VALUES_EQUAL(
- result,
- "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
- "{ items { uint32_value: 2 } items { uint32_value: 1 } }");
- }
-
- // Capture and block all readset messages
- TVector<THolder<IEventHandle>> readSets;
- auto captureRS = [&](TTestActorRuntimeBase&,
- TAutoPtr<IEventHandle> &event) -> auto {
- if (event->GetTypeRewrite() == TEvTxProcessing::EvReadSet) {
- readSets.push_back(std::move(event));
- return TTestActorRuntime::EEventAction::DROP;
- }
- return TTestActorRuntime::EEventAction::PROCESS;
- };
- auto prevObserverFunc = runtime.SetObserverFunc(captureRS);
-
- // Send a commit request, it would block on readset exchange
- SendRequest(runtime, MakeSimpleRequestRPC(Q_(R"(
- UPSERT INTO `/Root/table-1` (key, value) VALUES (3, 2);
- UPSERT INTO `/Root/table-2` (key, value) VALUES (4, 2))"), sessionId, txId, true));
-
- // Wait until we captured both readsets
- if (readSets.size() < 2) {
- TDispatchOptions options;
- options.FinalEvents.emplace_back(
- [&](IEventHandle &) -> bool {
- return readSets.size() >= 2;
- });
- runtime.DispatchEvents(options);
- }
- UNIT_ASSERT_VALUES_EQUAL(readSets.size(), 2u);
-
- // Reboot table-1 tablet
- readSets.clear();
- RebootTablet(runtime, table1shards[0], sender);
-
- // Wait until we captured both readsets again
- if (readSets.size() < 2) {
- TDispatchOptions options;
- options.FinalEvents.emplace_back(
- [&](IEventHandle &) -> bool {
- return readSets.size() >= 2;
- });
- runtime.DispatchEvents(options);
- }
- UNIT_ASSERT_VALUES_EQUAL(readSets.size(), 2u);
-
- // Select keys 1 and 3, we expect this immediate tx to succeed
- // Note that key 3 is not written yet, but we pretend immediate tx
- // executes before that waiting transaction (no key 3 yet).
- {
- auto result = KqpSimpleExec(runtime, Q_("SELECT key, value FROM `/Root/table-1` WHERE key = 1 OR key = 3;"));
- UNIT_ASSERT_VALUES_EQUAL(result, "{ items { uint32_value: 1 } items { uint32_value: 1 } }");
- }
-
- // Upsert key 1, we expect this immediate tx to timeout
- // Another tx has already checked locks for that key, we must never
- // pretend some other conflicting write happened before that tx completes.
- {
- TString tmpSessionId = CreateSessionRPC(runtime);
- TString tmpTxId;
- auto req = MakeSimpleRequestRPC(Q_("UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 3);"), tmpSessionId, tmpTxId, true);
- req.mutable_operation_params()->mutable_cancel_after()->set_seconds(1);
- req.mutable_operation_params()->mutable_operation_timeout()->set_seconds(1);
- auto response = AwaitResponse(runtime, SendRequest(runtime, std::move(req)));
- UNIT_ASSERT_VALUES_EQUAL(response.operation().status(), Ydb::StatusIds::TIMEOUT);
- }
-
- // Upsert key 5, this immediate tx should timeout because we currently
- // lose information on locked keys after reboot and it acts as a global
- // barrier.
- {
- TString tmpSessionId = CreateSessionRPC(runtime);
- TString tmpTxId;
- auto req = MakeSimpleRequestRPC(Q_("UPSERT INTO `/Root/table-1` (key, value) VALUES (5, 3);"), tmpSessionId, tmpTxId, true);
- req.mutable_operation_params()->mutable_cancel_after()->set_seconds(1);
- req.mutable_operation_params()->mutable_operation_timeout()->set_seconds(1);
- auto response = AwaitResponse(runtime, SendRequest(runtime, std::move(req)));
- UNIT_ASSERT_VALUES_EQUAL(response.operation().status(), Ydb::StatusIds::TIMEOUT);
- }
-
- // Release readsets allowing tx to progress
- runtime.SetObserverFunc(prevObserverFunc);
- for (auto& ev : readSets) {
- runtime.Send(ev.Release(), 0, /* viaActorSystem */ true);
- }
-
- // Select key 3, we expect a success
- {
- auto result = KqpSimpleExec(runtime, Q_("SELECT key, value FROM `/Root/table-1` WHERE key = 3;"));
- UNIT_ASSERT_VALUES_EQUAL(result, "{ items { uint32_value: 3 } items { uint32_value: 2 } }");
- }
-}
-
Y_UNIT_TEST(MvccTestOutOfOrderRestartLocksSingleWithoutBarrier) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetEnableMvccSnapshotReads(false);
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2115,11 +1980,13 @@ Y_UNIT_TEST(MvccTestOutOfOrderRestartLocksSingleWithoutBarrier) {
}
}
-Y_UNIT_TEST_TWIN(TestOutOfOrderRestartLocksReorderedWithoutBarrier, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestOutOfOrderRestartLocksReorderedWithoutBarrier, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
+ .SetAppConfig(app)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2245,11 +2112,13 @@ Y_UNIT_TEST_TWIN(TestOutOfOrderRestartLocksReorderedWithoutBarrier, UseMvcc) {
}
}
-Y_UNIT_TEST_TWIN(TestOutOfOrderNoBarrierRestartImmediateLongTail, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestOutOfOrderNoBarrierRestartImmediateLongTail, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
+ .SetAppConfig(app)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2425,12 +2294,15 @@ Y_UNIT_TEST_TWIN(TestOutOfOrderNoBarrierRestartImmediateLongTail, UseMvcc) {
}
}
-Y_UNIT_TEST_TWIN(TestCopyTableNoDeadlock, UseMvcc) {
+Y_UNIT_TEST(TestCopyTableNoDeadlock) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetEnableMvccSnapshotReads(false);
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -2608,9 +2480,13 @@ Y_UNIT_TEST_TWIN(TestCopyTableNoDeadlock, UseMvcc) {
Y_UNIT_TEST(TestPlannedCancelSplit) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetEnableMvccSnapshotReads(false);
serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -2792,11 +2668,10 @@ Y_UNIT_TEST(TestPlannedCancelSplit) {
"Split needed " << elapsed.ToString() << " to complete, which is too long");
}
-Y_UNIT_TEST_TWIN(TestPlannedTimeoutSplit, UseMvcc) {
+Y_UNIT_TEST(TestPlannedTimeoutSplit) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2910,11 +2785,10 @@ Y_UNIT_TEST_TWIN(TestPlannedTimeoutSplit, UseMvcc) {
}
}
-Y_UNIT_TEST_TWIN(TestPlannedHalfOverloadedSplit, UseMvcc) {
+Y_UNIT_TEST(TestPlannedHalfOverloadedSplit) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3292,11 +3166,10 @@ Y_UNIT_TEST(TestReadTableImmediateWriteBlock) {
}
}
-Y_UNIT_TEST_TWIN(TestReadTableSingleShardImmediate, WithMvcc) {
+Y_UNIT_TEST(TestReadTableSingleShardImmediate) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3508,12 +3381,15 @@ Y_UNIT_TEST(TestImmediateQueueThenSplit) {
<< failures << " failures");
}
-void TestLateKqpQueryAfterColumnDrop(bool dataQuery, const TString& query, bool enableMvcc = false) {
+void TestLateKqpQueryAfterColumnDrop(bool dataQuery, const TString& query) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ app.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(enableMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -3621,21 +3497,23 @@ void TestLateKqpQueryAfterColumnDrop(bool dataQuery, const TString& query, bool
}
}
-Y_UNIT_TEST_WITH_MVCC(TestLateKqpScanAfterColumnDrop) {
- TestLateKqpQueryAfterColumnDrop(false, "SELECT SUM(value2) FROM `/Root/table-1`", WithMvcc);
+Y_UNIT_TEST(TestLateKqpScanAfterColumnDrop) {
+ TestLateKqpQueryAfterColumnDrop(false, "SELECT SUM(value2) FROM `/Root/table-1`");
}
-Y_UNIT_TEST_WITH_MVCC(TestLateKqpDataReadAfterColumnDrop) {
+Y_UNIT_TEST(TestLateKqpDataReadAfterColumnDrop) {
TestLateKqpQueryAfterColumnDrop(true, R"(
SELECT SUM(value2) FROM `/Root/table-1`
- )", WithMvcc);
+ )");
}
Y_UNIT_TEST(MvccTestSnapshotRead) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
+ .SetAppConfig(app)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3837,12 +3715,15 @@ Y_UNIT_TEST(TestSecondaryClearanceAfterShardRestartRace) {
ExecSQL(server, sender, Q_("UPSERT INTO `/Root/table-1` (key, value) VALUES (4, 4);"));
}
-Y_UNIT_TEST_TWIN(TestShardRestartNoUndeterminedImmediate, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestShardRestartNoUndeterminedImmediate, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -3940,12 +3821,15 @@ Y_UNIT_TEST_TWIN(TestShardRestartNoUndeterminedImmediate, UseMvcc) {
}
}
-Y_UNIT_TEST_TWIN(TestShardRestartPlannedCommitShouldSucceed, UseMvcc) {
+Y_UNIT_TEST_TWIN(TestShardRestartPlannedCommitShouldSucceed, StreamLookup) {
TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ app.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
- .SetUseRealThreads(false);
+ .SetUseRealThreads(false)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -4031,8 +3915,6 @@ Y_UNIT_TEST(TestShardSnapshotReadNoEarlyReply) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -4177,8 +4059,6 @@ Y_UNIT_TEST(TestSnapshotReadAfterBrokenLock) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -4244,8 +4124,6 @@ Y_UNIT_TEST(TestSnapshotReadAfterBrokenLockOutOfOrder) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -4366,8 +4244,6 @@ Y_UNIT_TEST(TestSnapshotReadAfterStuckRW) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -4463,8 +4339,6 @@ Y_UNIT_TEST_TWIN(TestSnapshotReadPriority, UnprotectedReads) {
controls.MutableDataShardControls()->SetUnprotectedMvccSnapshotReads(UnprotectedReads ? 1 : 0);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls)
.SetUseRealThreads(false);
@@ -4737,8 +4611,6 @@ Y_UNIT_TEST(TestUnprotectedReadsThenWriteVisibility) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetNodeCount(2)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls)
.SetUseRealThreads(false);
@@ -5151,8 +5023,6 @@ Y_UNIT_TEST(UncommittedReads) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls)
.SetUseRealThreads(false);
diff --git a/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp b/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp
index 261b67f43d..c15c674b25 100644
--- a/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp
@@ -79,14 +79,14 @@ std::vector<TOwnedCellVec> GetRows(
const TVector<std::pair<TString, NScheme::TTypeInfo>>& batchSchema,
const TEvDataShard::TEvReadResult& result)
{
- UNIT_ASSERT(result.ArrowBatch);
+ UNIT_ASSERT(result.GetArrowBatch());
// TODO: use schema from ArrowBatch
TRowWriter writer;
NArrow::TArrowToYdbConverter converter(batchSchema, writer);
TString error;
- UNIT_ASSERT(converter.Process(*result.ArrowBatch, error));
+ UNIT_ASSERT(converter.Process(*result.GetArrowBatch(), error));
return std::move(writer.Rows);
}
@@ -146,7 +146,7 @@ void CheckResultArrow(
std::vector<NTable::TTag> columns = {})
{
UNIT_ASSERT(!gold.empty());
- UNIT_ASSERT(result.ArrowBatch);
+ UNIT_ASSERT(result.GetArrowBatch());
TVector<std::pair<TString, NScheme::TTypeInfo>> batchSchema;
const auto& description = userTable.GetDescription();
@@ -201,7 +201,7 @@ void CheckResult(
UNIT_ASSERT(false);
}
} else {
- UNIT_ASSERT(!result.ArrowBatch && result.GetRowsCount() == 0);
+ UNIT_ASSERT(!result.GetArrowBatch() && result.GetRowsCount() == 0);
}
}
@@ -518,12 +518,11 @@ struct TTestHelper {
return std::unique_ptr<TEvDataShard::TEvReadResult>(event.Release());
}
- std::unique_ptr<TEvDataShard::TEvReadResult> SendRead(
+ void SendReadAsync(
const TString& tableName,
TEvDataShard::TEvRead* request,
ui32 node = 0,
- TActorId sender = {},
- TDuration timeout = TDuration::Max())
+ TActorId sender = {})
{
if (!sender) {
sender = Sender;
@@ -538,6 +537,16 @@ struct TTestHelper {
node,
GetTestPipeConfig(),
table.ClientId);
+ }
+
+ std::unique_ptr<TEvDataShard::TEvReadResult> SendRead(
+ const TString& tableName,
+ TEvDataShard::TEvRead* request,
+ ui32 node = 0,
+ TActorId sender = {},
+ TDuration timeout = TDuration::Max())
+ {
+ SendReadAsync(tableName, request, node, sender);
return WaitReadResult(timeout);
}
@@ -762,6 +771,49 @@ struct TTestHelper {
return config;
}
+ NKikimrTabletBase::TEvGetCountersResponse GetCounters(
+ const TString& tableName,
+ ui32 node = 0,
+ TActorId sender = {})
+ {
+ if (!sender) {
+ sender = Sender;
+ }
+
+ const auto& table = Tables[tableName];
+ auto &runtime = *Server->GetRuntime();
+ runtime.SendToPipe(
+ table.TabletId,
+ sender,
+ new TEvTablet::TEvGetCounters,
+ node,
+ GetTestPipeConfig(),
+ table.ClientId);
+
+ auto ev = runtime.GrabEdgeEvent<TEvTablet::TEvGetCountersResponse>(sender);
+
+ UNIT_ASSERT(ev);
+ return ev->Get()->Record;
+ }
+
+ ui64 GetSimpleCounter(
+ const TString& tableName,
+ const TString& name,
+ ui32 node = 0)
+ {
+ const auto counters = GetCounters(tableName, node);
+ for (const auto& counter : counters.GetTabletCounters().GetAppCounters().GetSimpleCounters()) {
+ if (name != counter.GetName()) {
+ continue;
+ }
+
+ return counter.GetValue();
+ }
+
+ UNIT_ASSERT_C(false, "Counter not found: " << name);
+ return 0; // unreachable
+ }
+
public:
bool WithFollower = false;
ui64 ShardCount = 1;
@@ -913,6 +965,94 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
}
}
+ Y_UNIT_TEST(ShouldReadNoColumnsKeysRequestCellVec) {
+ // KIKIMR-16897: no columns mean we want to calc row count
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1, NKikimrTxDataShard::CELLVEC);
+ request->Record.ClearColumns();
+ AddKeyQuery(*request, {3, 3, 3});
+ AddKeyQuery(*request, {1, 1, 1});
+ AddKeyQuery(*request, {5, 5, 5});
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ UNIT_ASSERT(readResult);
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult, {
+ std::vector<ui32>(),
+ std::vector<ui32>(),
+ std::vector<ui32>(),
+ });
+ UNIT_ASSERT_VALUES_EQUAL(readResult->GetRowsCount(), 3UL);
+ }
+
+ Y_UNIT_TEST(ShouldReadNoColumnsKeysRequestArrow) {
+ // KIKIMR-16897: no columns mean we want to calc row count
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1, NKikimrTxDataShard::ARROW);
+ request->Record.ClearColumns();
+ AddKeyQuery(*request, {3, 3, 3});
+ AddKeyQuery(*request, {1, 1, 1});
+ AddKeyQuery(*request, {5, 5, 5});
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ UNIT_ASSERT(readResult);
+ UNIT_ASSERT_VALUES_EQUAL(readResult->Record.GetStatus().GetCode(), Ydb::StatusIds::SUCCESS);
+ UNIT_ASSERT_VALUES_EQUAL(readResult->GetRowsCount(), 3UL);
+ UNIT_ASSERT(readResult->GetArrowBatch());
+
+ auto batch = readResult->GetArrowBatch();
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), 3UL);
+ }
+
+ Y_UNIT_TEST(ShouldReadNoColumnsRangeRequestCellVec) {
+ // KIKIMR-16897: no columns mean we want to calc row count
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1, NKikimrTxDataShard::CELLVEC);
+ request->Record.ClearColumns();
+ AddRangeQuery<ui32>(
+ *request,
+ {1, 1, 1},
+ true,
+ {5, 5, 5},
+ true
+ );
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ UNIT_ASSERT(readResult);
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult, {
+ std::vector<ui32>(),
+ std::vector<ui32>(),
+ std::vector<ui32>(),
+ });
+ UNIT_ASSERT_VALUES_EQUAL(readResult->GetRowsCount(), 3UL);
+ }
+
+ Y_UNIT_TEST(ShouldReadNoColumnsRangeRequestArrow) {
+ // KIKIMR-16897: no columns mean we want to calc row count
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1, NKikimrTxDataShard::ARROW);
+ request->Record.ClearColumns();
+ AddRangeQuery<ui32>(
+ *request,
+ {1, 1, 1},
+ true,
+ {5, 5, 5},
+ true
+ );
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ UNIT_ASSERT(readResult);
+ UNIT_ASSERT_VALUES_EQUAL(readResult->Record.GetStatus().GetCode(), Ydb::StatusIds::SUCCESS);
+ UNIT_ASSERT_VALUES_EQUAL(readResult->GetRowsCount(), 3UL);
+ UNIT_ASSERT(readResult->GetArrowBatch());
+
+ auto batch = readResult->GetArrowBatch();
+ UNIT_ASSERT_VALUES_EQUAL(batch->num_rows(), 3UL);
+ }
+
Y_UNIT_TEST(ShouldReadNonExistingKey) {
TTestHelper helper;
@@ -941,6 +1081,23 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
});
}
+ Y_UNIT_TEST(ShouldReverseReadMultipleKeys) {
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1);
+ AddKeyQuery(*request, {3, 3, 3});
+ AddKeyQuery(*request, {1, 1, 1});
+ AddKeyQuery(*request, {5, 5, 5});
+ request->Record.SetReverse(true);
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult, {
+ {5, 5, 5, 500},
+ {1, 1, 1, 100},
+ {3, 3, 3, 300},
+ });
+ }
+
Y_UNIT_TEST(ShouldReadMultipleKeysOneByOne) {
TTestHelper helper;
@@ -999,6 +1156,65 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
// TODO: check continuation token
}
+ Y_UNIT_TEST(ShouldReverseReadMultipleKeysOneByOne) {
+ TTestHelper helper;
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1);
+ AddKeyQuery(*request1, {3, 3, 3});
+ AddKeyQuery(*request1, {1, 1, 1});
+ AddKeyQuery(*request1, {5, 5, 5});
+ request1->Record.SetMaxRowsInResult(1);
+ request1->Record.SetReverse(true);
+
+ ui32 continueCounter = 0;
+ helper.Server->GetRuntime()->SetObserverFunc([&continueCounter](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::EvReadContinue) {
+ ++continueCounter;
+ }
+
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+
+ auto readResult1 = helper.SendRead("table-1", request1.release());
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult1, {
+ {5, 5, 5, 500}
+ });
+
+ const auto& record1 = readResult1->Record;
+ UNIT_ASSERT(!record1.GetLimitReached());
+ UNIT_ASSERT(record1.HasSeqNo());
+ //UNIT_ASSERT(!record1.HasFinished());
+ UNIT_ASSERT_VALUES_EQUAL(record1.GetReadId(), 1UL);
+ UNIT_ASSERT_VALUES_EQUAL(record1.GetSeqNo(), 1UL);
+ // TODO: check continuation token
+
+ auto readResult2 = helper.WaitReadResult();
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult2, {
+ {1, 1, 1, 100}
+ });
+
+ const auto& record2 = readResult2->Record;
+ UNIT_ASSERT(!record2.GetLimitReached());
+ UNIT_ASSERT(!record2.HasFinished());
+ UNIT_ASSERT_VALUES_EQUAL(record2.GetReadId(), 1UL);
+ UNIT_ASSERT_VALUES_EQUAL(record2.GetSeqNo(), 2UL);
+ // TODO: check continuation token
+
+ auto readResult3 = helper.WaitReadResult();
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult3, {
+ {3, 3, 3, 300}
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 2);
+
+ const auto& record3 = readResult3->Record;
+ UNIT_ASSERT(!record3.GetLimitReached());
+ UNIT_ASSERT(record3.HasFinished());
+ UNIT_ASSERT_VALUES_EQUAL(record3.GetReadId(), 1UL);
+ UNIT_ASSERT_VALUES_EQUAL(record3.GetSeqNo(), 3UL);
+ // TODO: check continuation token
+ }
+
Y_UNIT_TEST(ShouldHandleReadAck) {
TTestHelper helper;
@@ -1109,6 +1325,280 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
UNIT_ASSERT_VALUES_EQUAL(continueCounter, 4);
}
+ Y_UNIT_TEST(ShouldReverseReadMultipleRanges) {
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1);
+ AddRangeQuery<ui32>(
+ *request,
+ {1, 0, 0},
+ true,
+ {5, 5, 5},
+ true
+ );
+ AddRangeQuery<ui32>(
+ *request,
+ {8, 1, 1},
+ true,
+ {11, 11, 11},
+ true
+ );
+
+ request->Record.SetReverse(true);
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult, {
+ {11, 11, 11, 1111},
+ {8, 1, 1, 803},
+ {5, 5, 5, 500},
+ {3, 3, 3, 300},
+ {1, 1, 1, 100},
+ });
+ }
+
+ Y_UNIT_TEST(ShouldReverseReadMultipleRangesOneByOneWithAcks) {
+ TTestHelper helper;
+
+ auto request = helper.GetBaseReadRequest("table-1", 1);
+ AddRangeQuery<ui32>(
+ *request,
+ {1, 0, 0},
+ true,
+ {5, 5, 5},
+ true
+ );
+ AddRangeQuery<ui32>(
+ *request,
+ {8, 1, 1},
+ true,
+ {11, 11, 11},
+ true
+ );
+
+ request->Record.SetReverse(true);
+ request->Record.SetMaxRows(1);
+
+ std::vector<std::vector<ui32>> gold = {
+ {11, 11, 11, 1111},
+ {8, 1, 1, 803},
+ {5, 5, 5, 500},
+ {3, 3, 3, 300},
+ {1, 1, 1, 100},
+ };
+
+ auto readResult = helper.SendRead("table-1", request.release());
+ UNIT_ASSERT(readResult);
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult, {
+ gold[0]
+ });
+
+ for (size_t i = 1; i < gold.size(); ++i) {
+ helper.SendReadAck("table-1", readResult->Record, 1, 10000);
+ readResult = helper.WaitReadResult();
+ UNIT_ASSERT(readResult);
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult, {
+ gold[i]
+ });
+ }
+ }
+
+ Y_UNIT_TEST(ShouldRangeReadReverseLeftInclusive) {
+ TTestHelper helper;
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1);
+ request1->Record.SetReverse(true);
+ AddRangeQuery<ui32>(
+ *request1,
+ {8, 0, 0},
+ true,
+ {11, 11, 11},
+ true
+ );
+
+ // limit quota (enough to read all rows)
+ request1->Record.SetMaxRows(8);
+
+ ui32 continueCounter = 0;
+ helper.Server->GetRuntime()->SetObserverFunc([&continueCounter](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::EvReadContinue) {
+ ++continueCounter;
+ }
+
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+
+ auto readResult1 = helper.SendRead("table-1", request1.release());
+ UNIT_ASSERT(readResult1);
+ UNIT_ASSERT_VALUES_EQUAL(readResult1->GetRowsCount(), 5);
+ UNIT_ASSERT(readResult1->Record.GetFinished());
+
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult1, {
+ {11, 11, 11, 1111},
+ {8, 1, 1, 803},
+ {8, 1, 0, 802},
+ {8, 0, 1, 801},
+ {8, 0, 0, 800}
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 0);
+ }
+
+ Y_UNIT_TEST(ShouldRangeReadReverseLeftNonInclusive) {
+ // Regression test for KIKIMR-17253
+ // Version with no ACK: only reverse and left not inclusive like in ReadContinue
+
+ TTestHelper helper;
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1);
+ request1->Record.SetReverse(true);
+ AddRangeQuery<ui32>(
+ *request1,
+ {8, 0, 0},
+ false,
+ {11, 11, 11},
+ true
+ );
+
+ // limit quota (enough to read all rows)
+ request1->Record.SetMaxRows(8);
+
+ ui32 continueCounter = 0;
+ helper.Server->GetRuntime()->SetObserverFunc([&continueCounter](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::EvReadContinue) {
+ ++continueCounter;
+ }
+
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+
+ auto readResult1 = helper.SendRead("table-1", request1.release());
+ UNIT_ASSERT(readResult1);
+ UNIT_ASSERT_VALUES_EQUAL(readResult1->GetRowsCount(), 4);
+ UNIT_ASSERT(readResult1->Record.GetFinished());
+
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult1, {
+ {11, 11, 11, 1111},
+ {8, 1, 1, 803},
+ {8, 1, 0, 802},
+ {8, 0, 1, 801},
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 0);
+ }
+
+ Y_UNIT_TEST(ShouldHandleReadAckWhenExhaustedRangeRead) {
+ // Regression test for KIKIMR-17253
+
+ TTestHelper helper;
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1);
+ AddRangeQuery<ui32>(
+ *request1,
+ {1, 1, 1},
+ true,
+ {11, 11, 11},
+ true
+ );
+
+ // limit quota
+ request1->Record.SetMaxRows(5);
+
+ ui32 continueCounter = 0;
+ helper.Server->GetRuntime()->SetObserverFunc([&continueCounter](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::EvReadContinue) {
+ ++continueCounter;
+ }
+
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+
+ auto readResult1 = helper.SendRead("table-1", request1.release());
+ UNIT_ASSERT(readResult1);
+ UNIT_ASSERT_VALUES_EQUAL(readResult1->GetRowsCount(), 5);
+ UNIT_ASSERT(!readResult1->Record.GetFinished());
+
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult1, {
+ {1, 1, 1, 100},
+ {3, 3, 3, 300},
+ {5, 5, 5, 500},
+ {8, 0, 0, 800},
+ {8, 0, 1, 801},
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 0);
+
+ helper.SendReadAck("table-1", readResult1->Record, 8, 10000);
+
+ auto readResult2 = helper.WaitReadResult();
+ UNIT_ASSERT(readResult2);
+ UNIT_ASSERT_VALUES_EQUAL(readResult2->GetRowsCount(), 3);
+ UNIT_ASSERT(readResult2->Record.GetFinished());
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult2, {
+ {8, 1, 0, 802},
+ {8, 1, 1, 803},
+ {11, 11, 11, 1111}
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 1);
+ }
+
+ Y_UNIT_TEST(ShouldHandleReadAckWhenExhaustedRangeReadReverse) {
+ // Regression test for KIKIMR-17253
+
+ TTestHelper helper;
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1);
+ request1->Record.SetReverse(true);
+ AddRangeQuery<ui32>(
+ *request1,
+ {1, 1, 1},
+ true,
+ {11, 11, 11},
+ true
+ );
+
+ // limit quota
+ request1->Record.SetMaxRows(5);
+
+ ui32 continueCounter = 0;
+ helper.Server->GetRuntime()->SetObserverFunc([&continueCounter](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ if (ev->GetTypeRewrite() == TEvDataShard::EvReadContinue) {
+ ++continueCounter;
+ }
+
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+
+ auto readResult1 = helper.SendRead("table-1", request1.release());
+ UNIT_ASSERT(readResult1);
+ UNIT_ASSERT_VALUES_EQUAL(readResult1->GetRowsCount(), 5);
+ UNIT_ASSERT(!readResult1->Record.GetFinished());
+
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult1, {
+ {11, 11, 11, 1111},
+ {8, 1, 1, 803},
+ {8, 1, 0, 802},
+ {8, 0, 1, 801},
+ {8, 0, 0, 800}
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 0);
+
+ helper.SendReadAck("table-1", readResult1->Record, 8, 10000);
+
+ auto readResult2 = helper.WaitReadResult();
+ UNIT_ASSERT(readResult2);
+ UNIT_ASSERT_VALUES_EQUAL(readResult2->GetRowsCount(), 3);
+ UNIT_ASSERT(readResult2->Record.GetFinished());
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult2, {
+ {5, 5, 5, 500},
+ {3, 3, 3, 300},
+ {1, 1, 1, 100}
+ });
+
+ UNIT_ASSERT_VALUES_EQUAL(continueCounter, 1);
+ }
+
Y_UNIT_TEST(ShouldNotReadAfterCancel) {
TTestHelper helper;
@@ -1789,7 +2279,6 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
const ui64 shardCount = 1;
@@ -1800,14 +2289,13 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
AddKeyQuery(*request, {3, 3, 3});
auto readResult = helper.SendRead("table-1", request.release());
const auto& record = readResult->Record;
- UNIT_ASSERT_VALUES_EQUAL(record.GetStatus().GetCode(), Ydb::StatusIds::NOT_FOUND);
+ UNIT_ASSERT_VALUES_EQUAL(record.GetStatus().GetCode(), Ydb::StatusIds::PRECONDITION_FAILED);
}
Y_UNIT_TEST(ShouldNotReadHeadFromFollower) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
const ui64 shardCount = 1;
@@ -1822,36 +2310,70 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
UNIT_ASSERT_VALUES_EQUAL(record.GetStatus().GetCode(), Ydb::StatusIds::UNSUPPORTED);
}
- Y_UNIT_TEST(ShouldStopWhenDisconnected) {
+ Y_UNIT_TEST(ShouldStopWhenNodeDisconnected) {
+ const ui32 nodeCount = 2;
+
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetNodeCount(20);
+ .SetNodeCount(nodeCount);
- const ui32 node = 13;
TTestHelper helper(serverSettings);
+ auto &runtime = *helper.Server->GetRuntime();
+
+ ui32 node = 0;
ui32 continueCounter = 0;
- helper.Server->GetRuntime()->SetObserverFunc([&continueCounter](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
- if (ev->GetTypeRewrite() == TEvDataShard::EvReadContinue) {
+ bool connectedFromDifferentNode = false;
+ ui32 serverConnectedCount = 0;
+ runtime.SetObserverFunc([&continueCounter, &connectedFromDifferentNode, &serverConnectedCount](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::EvReadContinue:
++continueCounter;
+ break;
+ case TEvTabletPipe::EvServerConnected: {
+ auto* typedEvent = dynamic_cast<TEvTabletPipe::TEvServerConnected*>(ev->GetBase());
+ ++serverConnectedCount;
+ if (typedEvent->ClientId.NodeId() != typedEvent->ServerId.NodeId()) {
+ connectedFromDifferentNode = true;
+ }
+ break;
+ }
}
return TTestActorRuntime::EEventAction::PROCESS;
});
+ auto waitFor = [&](const auto& condition, const TString& description) {
+ if (!condition()) {
+ Cerr << "... waiting for " << description << Endl;
+ TDispatchOptions options;
+ options.CustomFinalCondition = [&]() {
+ return condition();
+ };
+ helper.Server->GetRuntime()->DispatchEvents(options);
+ UNIT_ASSERT_C(condition(), "... failed to wait for " << description);
+ }
+ };
+
auto& table = helper.Tables["table-1"];
- auto prevClient = table.ClientId;
- auto &runtime = *helper.Server->GetRuntime();
auto sender = runtime.AllocateEdgeActor(node);
// we need to connect from another node
table.ClientId = runtime.ConnectToPipe(table.TabletId, sender, node, GetPipeConfigWithRetries());
UNIT_ASSERT(table.ClientId);
+ waitFor([&]{ return serverConnectedCount != 0; }, "intercepted EvServerConnected");
+ if (!connectedFromDifferentNode) {
+ ++node;
+ table.ClientId = runtime.ConnectToPipe(table.TabletId, sender, node, GetPipeConfigWithRetries());
+ UNIT_ASSERT(table.ClientId);
+ }
+ UNIT_ASSERT(connectedFromDifferentNode);
+
auto request1 = helper.GetBaseReadRequest("table-1", 1);
AddKeyQuery(*request1, {3, 3, 3});
AddKeyQuery(*request1, {1, 1, 1});
@@ -1860,15 +2382,22 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
auto readResult1 = helper.SendRead("table-1", request1.release(), node, sender);
- runtime.DisconnectNodes(node, node + 1, false);
+ auto exhaustedCount = helper.GetSimpleCounter("table-1", "DataShard/ReadIteratorsExhaustedCount", node);
+ auto iteratorsCount = helper.GetSimpleCounter("table-1", "DataShard/ReadIteratorsCount", node);
+ UNIT_ASSERT_VALUES_EQUAL(exhaustedCount, 1UL);
+ UNIT_ASSERT_VALUES_EQUAL(iteratorsCount, 1UL);
- // restore our nodeId=0 client
- table.ClientId = prevClient;
- helper.SendReadAck("table-1", readResult1->Record, 3, 10000); // DS must ignore it
+ runtime.DisconnectNodes(0, 1);
+ table.ClientId = runtime.ConnectToPipe(table.TabletId, sender, node, GetPipeConfigWithRetries());
- auto readResult2 = helper.WaitReadResult(TDuration::MilliSeconds(10));
- UNIT_ASSERT(!readResult2);
- UNIT_ASSERT_VALUES_EQUAL(continueCounter, 0);
+ exhaustedCount = helper.GetSimpleCounter("table-1", "DataShard/ReadIteratorsExhaustedCount", 0);
+ while (exhaustedCount != 0) {
+ SimulateSleep(helper.Server, TDuration::Seconds(1));
+ exhaustedCount = helper.GetSimpleCounter("table-1", "DataShard/ReadIteratorsExhaustedCount", 0);
+ }
+
+ iteratorsCount = helper.GetSimpleCounter("table-1", "DataShard/ReadIteratorsCount", node);
+ UNIT_ASSERT_VALUES_EQUAL(iteratorsCount, 0UL);
}
Y_UNIT_TEST(ShouldReadFromHead) {
@@ -1894,7 +2423,6 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
const ui64 shardCount = 1;
@@ -1949,7 +2477,6 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
const ui64 shardCount = 1;
@@ -2045,7 +2572,6 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
const ui64 shardCount = 1;
@@ -2200,7 +2726,6 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(true)
.SetUseRealThreads(false);
TTestHelper helper(serverSettings);
@@ -2320,6 +2845,113 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
UNIT_ASSERT_VALUES_EQUAL(record3.GetSeqNo(), 3UL);
}
+ Y_UNIT_TEST(ShouldCancelMvccSnapshotFromFuture) {
+ // checks that when snapshot is in the future, we can cancel it
+
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false);
+
+ TTestHelper helper(serverSettings);
+
+ auto waitFor = [&](const auto& condition, const TString& description) {
+ if (!condition()) {
+ Cerr << "... waiting for " << description << Endl;
+ TDispatchOptions options;
+ options.CustomFinalCondition = [&]() {
+ return condition();
+ };
+ helper.Server->GetRuntime()->DispatchEvents(options);
+ UNIT_ASSERT_C(condition(), "... failed to wait for " << description);
+ }
+ };
+
+ bool captureTimecast = false;
+ bool captureWaitNotify = false;
+
+ TRowVersion snapshot = TRowVersion::Min();
+ ui64 lastStep = 0;
+ ui64 waitPlanStep = 0;
+ ui64 notifyPlanStep = 0;
+ size_t readResults = 0;
+
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle> &event) -> auto {
+ switch (event->GetTypeRewrite()) {
+ case TEvMediatorTimecast::EvUpdate: {
+ if (captureTimecast) {
+ auto update = event->Get<TEvMediatorTimecast::TEvUpdate>();
+ lastStep = update->Record.GetTimeBarrier();
+ Cerr << "---- dropped EvUpdate ----" << Endl;
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ break;
+ }
+ case TEvMediatorTimecast::EvWaitPlanStep: {
+ if (captureWaitNotify) {
+ auto waitEvent = event->Get<TEvMediatorTimecast::TEvWaitPlanStep>();
+ waitPlanStep = waitEvent->PlanStep;
+ }
+ break;
+ }
+ case TEvMediatorTimecast::EvNotifyPlanStep: {
+ if (captureWaitNotify) {
+ auto notifyEvent = event->Get<TEvMediatorTimecast::TEvNotifyPlanStep>();
+ notifyPlanStep = notifyEvent->PlanStep;
+ }
+ break;
+ }
+ case TEvDataShard::EvReadResult: {
+ ++readResults;
+ break;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = helper.Server->GetRuntime()->SetObserverFunc(captureEvents);
+
+ // check transaction waits for proper plan step
+ captureTimecast = true;
+
+ // note that we need this to capture snapshot version
+ ExecSQL(helper.Server, helper.Sender, R"(
+ UPSERT INTO `/Root/table-1`
+ (key1, key2, key3, value)
+ VALUES
+ (3, 3, 3, 300);
+ )");
+
+ waitFor([&]{ return lastStep != 0; }, "intercepted TEvUpdate");
+
+ captureTimecast = false;
+ captureWaitNotify = true;
+
+ // future snapshot
+ snapshot = TRowVersion(lastStep + 1000, Max<ui64>());
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1, NKikimrTxDataShard::ARROW, snapshot);
+ AddKeyQuery(*request1, {3, 3, 3});
+ AddKeyQuery(*request1, {1, 1, 1});
+ AddKeyQuery(*request1, {5, 5, 5});
+ request1->Record.SetMaxRowsInResult(1);
+
+ helper.SendReadAsync("table-1", request1.release());
+
+ waitFor([&]{ return waitPlanStep != 0; }, "intercepted TEvWaitPlanStep");
+ UNIT_ASSERT_VALUES_EQUAL(waitPlanStep, snapshot.Step);
+ UNIT_ASSERT_VALUES_EQUAL(notifyPlanStep, 0);
+
+ helper.SendCancel("table-1", 1);
+
+ waitFor([&]{ return notifyPlanStep != 0; }, "intercepted TEvNotifyPlanStep");
+ UNIT_ASSERT_VALUES_EQUAL(waitPlanStep, snapshot.Step);
+ UNIT_ASSERT_VALUES_EQUAL(notifyPlanStep, snapshot.Step);
+
+ SimulateSleep(helper.Server, TDuration::Seconds(2));
+
+ UNIT_ASSERT_VALUES_EQUAL(readResults, 0);
+ }
+
Y_UNIT_TEST(ShouldReturnBrokenLockWhenReadKey) {
TTestHelper helper;
@@ -2461,6 +3093,61 @@ Y_UNIT_TEST_SUITE(DataShardReadIterator) {
helper.CheckLockBroken("table-1", 10, {11, 11, 11}, lockTxId, *readResult1);
}
+ Y_UNIT_TEST(ShouldReturnBrokenLockWhenReadRangeInvisibleRowSkips2) {
+ // Almost the same as ShouldReturnBrokenLockWhenReadRangeInvisibleRowSkips:
+ // 1. tx1: read some **non-existing** range1
+ // 2. tx2: upsert into range2 > range1 range and commit.
+ // 3. tx1: read range2 -> lock should be broken
+
+ TTestHelper helper;
+
+ auto readVersion = CreateVolatileSnapshot(
+ helper.Server,
+ {"/Root/movies", "/Root/table-1"},
+ TDuration::Hours(1));
+
+ const ui64 lockTxId = 1011121314;
+
+ auto request1 = helper.GetBaseReadRequest("table-1", 1, NKikimrTxDataShard::ARROW, readVersion);
+ request1->Record.SetLockTxId(lockTxId);
+ AddRangeQuery<ui32>(
+ *request1,
+ {100, 0, 0},
+ true,
+ {200, 0, 0},
+ true
+ );
+
+ auto readResult1 = helper.SendRead("table-1", request1.release());
+ CheckResult(helper.Tables["table-1"].UserTable, *readResult1, {});
+ UNIT_ASSERT_VALUES_EQUAL(readResult1->Record.TxLocksSize(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(readResult1->Record.BrokenTxLocksSize(), 0);
+
+ // write new data above snapshot
+ ExecSQL(helper.Server, helper.Sender, R"(
+ SELECT * FROM `/Root/table-1` WHERE key1 == 300;
+ UPSERT INTO `/Root/table-1`
+ (key1, key2, key3, value)
+ VALUES
+ (300, 0, 0, 3000);
+ )");
+
+ auto request2 = helper.GetBaseReadRequest("table-1", 2, NKikimrTxDataShard::ARROW, readVersion);
+ request2->Record.SetLockTxId(lockTxId);
+ AddRangeQuery<ui32>(
+ *request2,
+ {300, 0, 0},
+ true,
+ {300, 0, 0},
+ true
+ );
+
+ auto readResult2 = helper.SendRead("table-1", request2.release());
+ UNIT_ASSERT_VALUES_EQUAL(readResult2->Record.TxLocksSize(), 0);
+ UNIT_ASSERT_VALUES_EQUAL(readResult2->Record.BrokenTxLocksSize(), 1);
+ helper.CheckLockBroken("table-1", 10, {300, 0, 0}, lockTxId, *readResult2);
+ }
+
Y_UNIT_TEST(ShouldReturnBrokenLockWhenReadRangeLeftBorder) {
TTestHelper helper;
diff --git a/ydb/core/tx/datashard/datashard_ut_read_table.cpp b/ydb/core/tx/datashard/datashard_ut_read_table.cpp
index a118fa1a82..7cc5392a8d 100644
--- a/ydb/core/tx/datashard/datashard_ut_read_table.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_read_table.cpp
@@ -11,11 +11,10 @@ using namespace NDataShardReadTableTest;
Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
- Y_UNIT_TEST_WITH_MVCC(ReadTableSnapshot) {
+ Y_UNIT_TEST(ReadTableSnapshot) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -55,11 +54,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
"key = 3, value = 3\n");
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableSplitAfter) {
+ Y_UNIT_TEST(ReadTableSplitAfter) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -106,11 +104,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
"key = 4, value = 44\n");
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableSplitBefore) {
+ Y_UNIT_TEST(ReadTableSplitBefore) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -159,11 +156,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
"key = 4, value = 44\n");
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableSplitFinished) {
+ Y_UNIT_TEST(ReadTableSplitFinished) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -242,11 +238,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
"key = 6, value = 66\n");
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableDropColumn) {
+ Y_UNIT_TEST(ReadTableDropColumn) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -296,11 +291,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
"ERROR: ResolveError\n");
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableDropColumnLatePropose) {
+ Y_UNIT_TEST(ReadTableDropColumnLatePropose) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -389,11 +383,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
"ERROR: ResolveError\n");
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableMaxRows) {
+ Y_UNIT_TEST(ReadTableMaxRows) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -461,11 +454,10 @@ Y_UNIT_TEST_SUITE(DataShardReadTableSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(rowLimits[5], 1u);
}
- Y_UNIT_TEST_WITH_MVCC(ReadTableSplitNewTxIdResolveResultReorder) {
+ Y_UNIT_TEST(ReadTableSplitNewTxIdResolveResultReorder) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
diff --git a/ydb/core/tx/datashard/datashard_ut_replication.cpp b/ydb/core/tx/datashard/datashard_ut_replication.cpp
index 54bae39cb5..ef98ed6619 100644
--- a/ydb/core/tx/datashard/datashard_ut_replication.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_replication.cpp
@@ -11,11 +11,10 @@ using namespace Tests;
Y_UNIT_TEST_SUITE(DataShardReplication) {
- Y_UNIT_TEST_WITH_MVCC(SimpleApplyChanges) {
+ Y_UNIT_TEST(SimpleApplyChanges) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -82,11 +81,10 @@ Y_UNIT_TEST_SUITE(DataShardReplication) {
}
}
- void DoSplitMergeChanges(bool withMvcc, bool withReboots) {
+ void DoSplitMergeChanges(bool withReboots) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(withMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -208,12 +206,12 @@ Y_UNIT_TEST_SUITE(DataShardReplication) {
}
}
- Y_UNIT_TEST_WITH_MVCC(SplitMergeChanges) {
- DoSplitMergeChanges(WithMvcc, false);
+ Y_UNIT_TEST(SplitMergeChanges) {
+ DoSplitMergeChanges(false);
}
- Y_UNIT_TEST_WITH_MVCC(SplitMergeChangesReboots) {
- DoSplitMergeChanges(WithMvcc, true);
+ Y_UNIT_TEST(SplitMergeChangesReboots) {
+ DoSplitMergeChanges(true);
}
}
diff --git a/ydb/core/tx/datashard/datashard_ut_snapshot.cpp b/ydb/core/tx/datashard/datashard_ut_snapshot.cpp
index a8366d36bb..552f2fc9e2 100644
--- a/ydb/core/tx/datashard/datashard_ut_snapshot.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_snapshot.cpp
@@ -160,11 +160,10 @@ namespace {
Y_UNIT_TEST_SUITE(DataShardSnapshots) {
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotSplit) {
+ Y_UNIT_TEST(VolatileSnapshotSplit) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
RegisterFormats(serverSettings);
@@ -217,11 +216,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(table1headAfterSplit, "key = 1, value = 11\nkey = 2, value = 22\nkey = 3, value = 33\nkey = 4, value = 44\n");
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotMerge) {
+ Y_UNIT_TEST(VolatileSnapshotMerge) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
RegisterFormats(serverSettings);
@@ -284,11 +282,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(table1snapshotAfterMerge, "key = 1, value = 1\nkey = 2, value = 2\nkey = 3, value = 3\n");
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotAndLocalMKQLUpdate) {
+ Y_UNIT_TEST(VolatileSnapshotAndLocalMKQLUpdate) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
RegisterFormats(serverSettings);
@@ -348,11 +345,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
"key = 3, value = 3\n");
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotReadTable) {
+ Y_UNIT_TEST(VolatileSnapshotReadTable) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -435,11 +431,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(table1snapshotdiscarded, "ERROR: WrongRequest\n");
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotRefreshDiscard) {
+ Y_UNIT_TEST(VolatileSnapshotRefreshDiscard) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -486,11 +481,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT(!DiscardVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, snapshot));
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotTimeout) {
+ Y_UNIT_TEST(VolatileSnapshotTimeout) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false)
.SetDomainPlanResolution(1000);
@@ -529,11 +523,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
"ERROR: WrongRequest\n");
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotTimeoutRefresh) {
+ Y_UNIT_TEST(VolatileSnapshotTimeoutRefresh) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false)
.SetDomainPlanResolution(1000);
@@ -601,11 +594,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 1u);
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotCleanupOnReboot) {
+ Y_UNIT_TEST(VolatileSnapshotCleanupOnReboot) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false)
.SetDomainPlanResolution(1000);
@@ -665,11 +657,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 0u);
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotCleanupOnFinish) {
+ Y_UNIT_TEST(VolatileSnapshotCleanupOnFinish) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false)
.SetDomainPlanResolution(1000);
@@ -728,256 +719,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 0u);
}
- // Regression test for KIKIMR-12289
- Y_UNIT_TEST(VolatileSnapshotCleanupOnReboot_KIKIMR_12289) {
- TPortManager pm;
- TServerSettings serverSettings(pm.GetPort(2134));
- serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false)
- .SetEnableMvcc(false)
- .SetDomainPlanResolution(1000);
-
- Tests::TServer::TPtr server = new TServer(serverSettings);
- auto &runtime = *server->GetRuntime();
- auto sender = runtime.AllocateEdgeActor();
-
- runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
- runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
- runtime.GetAppData().AllowReadTableImmediate = true;
-
- InitRoot(server, sender);
-
- CreateShardedTable(server, sender, "/Root", "table-1", 1);
- CreateShardedTable(server, sender, "/Root", "table-2", 1);
-
- const auto shards1 = GetTableShards(server, sender, "/Root/table-1");
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1), (2, 2), (3, 3);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10), (20, 20), (30, 30);");
-
- auto snapshot = CreateVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, TDuration::MilliSeconds(10000));
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 11), (2, 22), (3, 33), (4, 44);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 11), (20, 22), (30, 33), (40, 44);");
-
- // Snapshots table must have 1 row
- UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 1u);
-
- auto table1snapshot1 = ReadShardedTable(server, "/Root/table-1", snapshot);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot1,
- "key = 1, value = 1\n"
- "key = 2, value = 2\n"
- "key = 3, value = 3\n");
-
- // Start ReadTable using snapshot and pause on quota requests
- StartReadShardedTable(server, "/Root/table-1", snapshot);
-
- auto table1snapshot2 = ReadShardedTable(server, "/Root/table-1", snapshot);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot2,
- "key = 1, value = 1\n"
- "key = 2, value = 2\n"
- "key = 3, value = 3\n");
-
- UNIT_ASSERT(DiscardVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, snapshot));
-
- auto table1snapshot3 = ReadShardedTable(server, "/Root/table-1", snapshot);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot3,
- "ERROR: WrongRequest\n");
-
- // Snapshots table must still have snapshot (used by paused ReadTable)
- UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 1u);
-
- // Verify snapshot is not among removed versions at the first shard
- for (TString table : { "/Root/table-1" }) {
- auto shards = GetTableShards(server, sender, table);
- auto ranges = GetRemovedRowVersions(server, shards.at(0));
- UNIT_ASSERT(ranges.size() >= 1);
- UNIT_ASSERT_VALUES_EQUAL(ranges.begin()->Lower, TRowVersion::Min());
- UNIT_ASSERT_VALUES_EQUAL(ranges.begin()->Upper, snapshot);
- }
-
- RebootTablet(runtime, shards1[0], sender);
-
- // Snapshots table should be cleaned up on reboot
- UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 0u);
-
- // Verify snapshot is removed at the first shard
- for (TString table : { "/Root/table-1" }) {
- auto shards = GetTableShards(server, sender, table);
- auto ranges = GetRemovedRowVersions(server, shards.at(0));
- UNIT_ASSERT(ranges.size() >= 1);
- UNIT_ASSERT_VALUES_EQUAL(ranges.begin()->Lower, TRowVersion::Min());
- UNIT_ASSERT(ranges.begin()->Upper > snapshot);
- }
- }
-
- // Regression test for KIKIMR-12289
- Y_UNIT_TEST(VolatileSnapshotCleanupOnFinish_KIKIMR_12289) {
- TPortManager pm;
- TServerSettings serverSettings(pm.GetPort(2134));
- serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false)
- .SetEnableMvcc(false)
- .SetDomainPlanResolution(1000);
-
- Tests::TServer::TPtr server = new TServer(serverSettings);
- auto &runtime = *server->GetRuntime();
- auto sender = runtime.AllocateEdgeActor();
-
- runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
- runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
- runtime.GetAppData().AllowReadTableImmediate = true;
-
- InitRoot(server, sender);
-
- CreateShardedTable(server, sender, "/Root", "table-1", 1);
- CreateShardedTable(server, sender, "/Root", "table-2", 1);
-
- const auto shards1 = GetTableShards(server, sender, "/Root/table-1");
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1), (2, 2), (3, 3);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10), (20, 20), (30, 30);");
-
- auto snapshot = CreateVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, TDuration::MilliSeconds(10000));
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 11), (2, 22), (3, 33), (4, 44);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 11), (20, 22), (30, 33), (40, 44);");
-
- // Snapshots table must have 1 row
- UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 1u);
-
- auto table1snapshot1 = ReadShardedTable(server, "/Root/table-1", snapshot);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot1,
- "key = 1, value = 1\n"
- "key = 2, value = 2\n"
- "key = 3, value = 3\n");
-
- // Start ReadTable using snapshot and pause on quota requests
- auto state = StartReadShardedTable(server, "/Root/table-1", snapshot);
-
- UNIT_ASSERT(DiscardVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, snapshot));
-
- auto table1snapshot2 = ReadShardedTable(server, "/Root/table-1", snapshot);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot2,
- "ERROR: WrongRequest\n");
-
- // Snapshots table must still have snapshot (used by paused ReadTable)
- UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 1u);
-
- // Verify snapshot is not among removed versions at the first shard
- for (TString table : { "/Root/table-1" }) {
- auto shards = GetTableShards(server, sender, table);
- auto ranges = GetRemovedRowVersions(server, shards.at(0));
- UNIT_ASSERT(ranges.size() >= 1);
- UNIT_ASSERT_VALUES_EQUAL(ranges.begin()->Lower, TRowVersion::Min());
- UNIT_ASSERT_VALUES_EQUAL(ranges.begin()->Upper, snapshot);
- }
-
- // Resume paused ReadTable and check the result
- ResumeReadShardedTable(server, state);
- UNIT_ASSERT_VALUES_EQUAL(state.Result,
- "key = 1, value = 1\n"
- "key = 2, value = 2\n"
- "key = 3, value = 3\n");
-
- // Snapshots table should be cleaned up after ReadTable has finished
- UNIT_ASSERT_VALUES_EQUAL(GetSnapshotCount(runtime, shards1[0]), 0u);
-
- // Verify snapshot is removed at the first shard
- for (TString table : { "/Root/table-1" }) {
- auto shards = GetTableShards(server, sender, table);
- auto ranges = GetRemovedRowVersions(server, shards.at(0));
- UNIT_ASSERT(ranges.size() >= 1);
- UNIT_ASSERT_VALUES_EQUAL(ranges.begin()->Lower, TRowVersion::Min());
- UNIT_ASSERT(ranges.begin()->Upper > snapshot);
- }
- }
-
- Y_UNIT_TEST(SwitchMvccSnapshots) {
- TPortManager pm;
- TServerSettings serverSettings(pm.GetPort(2134));
- serverSettings.SetDomainName("Root")
- .SetUseRealThreads(false)
- .SetEnableMvcc(false)
- .SetDomainPlanResolution(1000);
-
- Tests::TServer::TPtr server = new TServer(serverSettings);
- auto &runtime = *server->GetRuntime();
- auto sender = runtime.AllocateEdgeActor();
-
- runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
- runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
- runtime.GetAppData().AllowReadTableImmediate = true;
-
- InitRoot(server, sender);
-
- CreateShardedTable(server, sender, "/Root", "table-1", 1);
- CreateShardedTable(server, sender, "/Root", "table-2", 1);
-
- auto shards1 = GetTableShards(server, sender, "/Root/table-1");
- auto shards2 = GetTableShards(server, sender, "/Root/table-2");
- auto tableId1 = ResolveTableId(server, sender, "/Root/table-1");
- auto tableId2 = ResolveTableId(server, sender, "/Root/table-2");
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1), (2, 2), (3, 3);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10), (20, 20), (30, 30);");
-
- auto snapshot1 = CreateVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, TDuration::MilliSeconds(30000));
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 11), (2, 22), (3, 33), (4, 44);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 11), (20, 22), (30, 33), (40, 44);");
-
- runtime.GetAppData().FeatureFlags.SetEnableMvccForTest(true);
- RebootTablet(runtime, shards1.at(0), sender);
- RebootTablet(runtime, shards2.at(0), sender);
-
- auto snapshot2 = CreateVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, TDuration::MilliSeconds(30000));
-
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 111), (2, 222), (3, 333), (4, 444);");
- ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 111), (20, 222), (30, 333), (40, 444);");
-
- auto snapshot3 = CreateVolatileSnapshot(server, { "/Root/table-1", "/Root/table-2" }, TDuration::MilliSeconds(30000));
-
- {
- const auto result = CompactTable(runtime, shards1.at(0), tableId1);
- UNIT_ASSERT(result.GetStatus() == NKikimrTxDataShard::TEvCompactTableResult::OK);
- }
- {
- const auto result = CompactTable(runtime, shards2.at(0), tableId2);
- UNIT_ASSERT(result.GetStatus() == NKikimrTxDataShard::TEvCompactTableResult::OK);
- }
-
- // None of created snapshots should be removed
- auto removed1 = GetRemovedRowVersions(server, shards1.at(0));
- UNIT_ASSERT(!removed1.Contains(snapshot1, snapshot1.Next()));
- UNIT_ASSERT(!removed1.Contains(snapshot2, snapshot2.Next()));
- UNIT_ASSERT(!removed1.Contains(snapshot3, snapshot3.Next()));
-
- // Versions to the left and to the right of the first snapshot must be removed
- UNIT_ASSERT(removed1.Contains(snapshot1.Prev(), snapshot1));
- UNIT_ASSERT(removed1.Contains(snapshot1.Next(), snapshot1.Next().Next()));
-
- auto table1snapshot3 = ReadShardedTable(server, "/Root/table-1", snapshot3);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot3,
- "key = 1, value = 111\n"
- "key = 2, value = 222\n"
- "key = 3, value = 333\n"
- "key = 4, value = 444\n");
-
- auto table1snapshot2 = ReadShardedTable(server, "/Root/table-1", snapshot2);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot2,
- "key = 1, value = 11\n"
- "key = 2, value = 22\n"
- "key = 3, value = 33\n"
- "key = 4, value = 44\n");
-
- auto table1snapshot1 = ReadShardedTable(server, "/Root/table-1", snapshot1);
- UNIT_ASSERT_VALUES_EQUAL(table1snapshot1,
- "key = 1, value = 1\n"
- "key = 2, value = 2\n"
- "key = 3, value = 3\n");
- }
-
Y_UNIT_TEST(MvccSnapshotTailCleanup) {
TPortManager pm;
TServerSettings::TControls controls;
@@ -986,8 +727,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetKeepSnapshotTimeout(TDuration::Seconds(2))
.SetControls(controls);
@@ -1072,8 +811,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1240,8 +977,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1440,6 +1175,31 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TTestActorRuntime::EEventAction Process(TAutoPtr<IEventHandle>& ev) {
switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::TEvRead::EventType: {
+ auto& record = ev->Get<TEvDataShard::TEvRead>()->Record;
+ Cerr << "TEvRead:" << Endl;
+ Cerr << record.DebugString() << Endl;
+ Last = {};
+ if (record.GetLockTxId()) {
+ Last.LockId = record.GetLockTxId();
+ Last.LockNodeId = record.GetLockNodeId();
+ } else if (Inject.LockId) {
+ record.SetLockTxId(Inject.LockId);
+ if (Inject.LockNodeId) {
+ record.SetLockNodeId(Inject.LockNodeId);
+ }
+ Cerr << "TEvRead: injected LockId" << Endl;
+ }
+ if (record.HasSnapshot()) {
+ Last.MvccSnapshot.Step = record.GetSnapshot().GetStep();
+ Last.MvccSnapshot.TxId = record.GetSnapshot().GetTxId();
+ } else if (Inject.MvccSnapshot) {
+ record.MutableSnapshot()->SetStep(Inject.MvccSnapshot.Step);
+ record.MutableSnapshot()->SetTxId(Inject.MvccSnapshot.TxId);
+ Cerr << "TEvRead: injected MvccSnapshot" << Endl;
+ }
+ break;
+ }
case TEvDataShard::TEvProposeTransaction::EventType: {
auto& record = ev->Get<TEvDataShard::TEvProposeTransaction>()->Record;
Cerr << "TEvProposeTransaction:" << Endl;
@@ -1595,8 +1355,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1691,8 +1449,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1794,8 +1550,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -1925,8 +1679,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2093,8 +1845,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2250,12 +2000,13 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
controls.MutableDataShardControls()->SetUnprotectedMvccSnapshotReads(1);
controls.MutableDataShardControls()->SetEnableLockedWrites(1);
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
- .SetControls(controls);
+ .SetControls(controls)
+ .SetAppConfig(app);
Tests::TServer::TPtr server = new TServer(serverSettings);
auto &runtime = *server->GetRuntime();
@@ -2401,8 +2152,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2501,8 +2250,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2588,8 +2335,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2697,8 +2442,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2811,8 +2554,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -2933,8 +2674,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3109,8 +2848,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3208,8 +2945,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3332,8 +3067,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3470,8 +3203,6 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
.SetUseRealThreads(false)
- .SetEnableMvcc(true)
- .SetEnableMvccSnapshotReads(true)
.SetControls(controls);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -3607,11 +3338,10 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
"{ items { uint32_value: 3 } items { uint32_value: 31 } }");
}
- Y_UNIT_TEST_WITH_MVCC(VolatileSnapshotRenameTimeout) {
+ Y_UNIT_TEST(VolatileSnapshotRenameTimeout) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false)
.SetDomainPlanResolution(1000);
diff --git a/ydb/core/tx/datashard/datashard_ut_upload_rows.cpp b/ydb/core/tx/datashard/datashard_ut_upload_rows.cpp
index d770cf0308..ce54103122 100644
--- a/ydb/core/tx/datashard/datashard_ut_upload_rows.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_upload_rows.cpp
@@ -124,11 +124,10 @@ static void DoUploadRows(
Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
- Y_UNIT_TEST_WITH_MVCC(TestUploadRows) {
+ Y_UNIT_TEST(TestUploadRows) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -148,11 +147,10 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
DoUploadTestRows(server, sender, "/Root/table-1", Ydb::Type::INT32, Ydb::StatusIds::SCHEME_ERROR);
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadRowsDropColumnRace) {
+ Y_UNIT_TEST(TestUploadRowsDropColumnRace) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -207,11 +205,14 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
DoWaitUploadTestRows(server, sender, Ydb::StatusIds::SCHEME_ERROR);
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadRowsLocks) {
+ Y_UNIT_TEST_TWIN(TestUploadRowsLocks, StreamLookup) {
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamLookup(StreamLookup);
+
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
+ .SetAppConfig(appConfig)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -252,11 +253,10 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
}
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadShadowRows) {
+ Y_UNIT_TEST(TestUploadShadowRows) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -317,11 +317,10 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
"key = 10, value = (empty maybe)\n");
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadShadowRowsShadowData) {
+ Y_UNIT_TEST(TestUploadShadowRowsShadowData) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -398,11 +397,10 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
"key = 10, value = (empty maybe)\n");
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadShadowRowsShadowDataSplitThenPublish) {
+ Y_UNIT_TEST(TestUploadShadowRowsShadowDataSplitThenPublish) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -497,11 +495,10 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
"key = 10, value = (empty maybe)\n");
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadShadowRowsShadowDataPublishThenSplit) {
+ Y_UNIT_TEST(TestUploadShadowRowsShadowDataPublishThenSplit) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
@@ -599,11 +596,10 @@ Y_UNIT_TEST_SUITE(TTxDataShardUploadRows) {
"key = 10, value = (empty maybe)\n");
}
- Y_UNIT_TEST_WITH_MVCC(TestUploadShadowRowsShadowDataAlterSplitThenPublish) {
+ Y_UNIT_TEST(TestUploadShadowRowsShadowDataAlterSplitThenPublish) {
TPortManager pm;
TServerSettings serverSettings(pm.GetPort(2134));
serverSettings.SetDomainName("Root")
- .SetEnableMvcc(WithMvcc)
.SetUseRealThreads(false);
Tests::TServer::TPtr server = new TServer(serverSettings);
diff --git a/ydb/core/tx/datashard/datashard_ut_volatile.cpp b/ydb/core/tx/datashard/datashard_ut_volatile.cpp
index 54987228d5..7bb0f02fd6 100644
--- a/ydb/core/tx/datashard/datashard_ut_volatile.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_volatile.cpp
@@ -2,6 +2,8 @@
#include "datashard_ut_common_kqp.h"
#include "datashard_active_transaction.h"
+#include <ydb/core/kqp/executer_actor/kqp_executer.h>
+
namespace NKikimr {
using namespace NKikimr::NDataShard;
@@ -303,6 +305,1047 @@ Y_UNIT_TEST_SUITE(DataShardVolatile) {
"{ items { uint32_value: 10 } items { uint32_value: 10 } }");
}
+ Y_UNIT_TEST(DistributedWriteEarlierSnapshotNotBlocked) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ TString sessionIdSnapshot, txIdSnapshot;
+ UNIT_ASSERT_VALUES_EQUAL(
+ KqpSimpleBegin(runtime, sessionIdSnapshot, txIdSnapshot, R"(
+ SELECT key, value FROM `/Root/table-1`
+ UNION ALL
+ SELECT key, value FROM `/Root/table-2`
+ ORDER BY key
+ )"),
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
+ "{ items { uint32_value: 10 } items { uint32_value: 10 } }");
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+ runtime.SetLogPriority(NKikimrServices::TABLET_EXECUTOR, NLog::PRI_DEBUG);
+
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest()
+ << " with flags " << msg->Record.GetFlags() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ Cerr << "!!! distributed write begin" << Endl;
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ // Make sure snapshot transaction cannot see uncommitted changes and doesn't block on them
+ UNIT_ASSERT_VALUES_EQUAL(
+ KqpSimpleContinue(runtime, sessionIdSnapshot, txIdSnapshot, R"(
+ SELECT key, value FROM `/Root/table-1`
+ UNION ALL
+ SELECT key, value FROM `/Root/table-2`
+ ORDER BY key
+ )"),
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
+ "{ items { uint32_value: 10 } items { uint32_value: 10 } }");
+ }
+
+ Y_UNIT_TEST(DistributedWriteLaterSnapshotBlockedThenCommit) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+ runtime.SetLogPriority(NKikimrServices::TABLET_EXECUTOR, NLog::PRI_DEBUG);
+
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest()
+ << " with flags " << msg->Record.GetFlags() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ Cerr << "!!! distributed write begin" << Endl;
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ TString sessionIdSnapshot = CreateSessionRPC(runtime, "/Root");
+ auto snapshotReadFuture = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ SELECT key, value FROM `/Root/table-1`
+ UNION ALL
+ SELECT key, value FROM `/Root/table-2`
+ ORDER BY key
+ )", sessionIdSnapshot, "", false /* commitTx */), "/Root");
+
+ // Let some virtual time pass
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ // Read should be blocked, so we don't expect a reply
+ UNIT_ASSERT(!snapshotReadFuture.HasValue());
+
+ // Unblock readsets and sleep some more
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ // We expect successful commit and read including that data
+ UNIT_ASSERT(snapshotReadFuture.HasValue());
+ UNIT_ASSERT(future.HasValue());
+ UNIT_ASSERT_VALUES_EQUAL(
+ FormatResult(future.ExtractValue()),
+ "<empty>");
+ UNIT_ASSERT_VALUES_EQUAL(
+ FormatResult(snapshotReadFuture.ExtractValue()),
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
+ "{ items { uint32_value: 2 } items { uint32_value: 2 } }, "
+ "{ items { uint32_value: 10 } items { uint32_value: 10 } }, "
+ "{ items { uint32_value: 20 } items { uint32_value: 20 } }");
+ }
+
+ Y_UNIT_TEST(DistributedWriteLaterSnapshotBlockedThenAbort) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ const auto shard1 = GetTableShards(server, sender, "/Root/table-1").at(0);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+ runtime.SetLogPriority(NKikimrServices::TABLET_EXECUTOR, NLog::PRI_DEBUG);
+
+ size_t observedPlans = 0;
+ TVector<THolder<IEventHandle>> capturedPlans;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvPlanStep::EventType: {
+ ++observedPlans;
+ const auto* msg = ev->Get<TEvTxProcessing::TEvPlanStep>();
+ if (msg->Record.GetTabletID() == shard1) {
+ Cerr << "... captured TEvPlanStep for " << msg->Record.GetTabletID() << Endl;
+ capturedPlans.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ break;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ Cerr << "!!! distributed write begin" << Endl;
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return observedPlans >= 2; }, "observed both plans");
+ UNIT_ASSERT_VALUES_EQUAL(capturedPlans.size(), 1u);
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ // Start reading from table-2
+ TString sessionIdSnapshot = CreateSessionRPC(runtime, "/Root");
+ auto snapshotReadFuture = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ SELECT key, value FROM `/Root/table-2`
+ ORDER BY key
+ )", sessionIdSnapshot, "", false /* commitTx */), "/Root");
+
+ // Let some virtual time pass
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ // Read should be blocked, so we don't expect a reply
+ UNIT_ASSERT(!snapshotReadFuture.HasValue());
+ UNIT_ASSERT(!future.HasValue());
+
+ // Reboot table-1 tablet and sleep a little, this will abort the write
+ RebootTablet(runtime, shard1, sender);
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ // We expect aborted commit and read without that data
+ UNIT_ASSERT(snapshotReadFuture.HasValue());
+ UNIT_ASSERT(future.HasValue());
+ UNIT_ASSERT_VALUES_EQUAL(
+ FormatResult(future.ExtractValue()),
+ "ERROR: UNDETERMINED");
+ UNIT_ASSERT_VALUES_EQUAL(
+ FormatResult(snapshotReadFuture.ExtractValue()),
+ "{ items { uint32_value: 10 } items { uint32_value: 10 } }");
+ }
+
+ Y_UNIT_TEST(DistributedWriteAsymmetricExecute) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ const auto shard1 = GetTableShards(server, sender, "/Root/table-1").at(0);
+
+ size_t observedPlans = 0;
+ TVector<THolder<IEventHandle>> capturedPlans;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvPlanStep::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvPlanStep>();
+ ++observedPlans;
+ if (msg->Record.GetTabletID() == shard1) {
+ Cerr << "... captured TEvPlanStep for " << msg->Record.GetTabletID() << Endl;
+ capturedPlans.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ break;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return observedPlans >= 2; }, "observed plans");
+ UNIT_ASSERT_VALUES_EQUAL(capturedPlans.size(), 1u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ // Wait until it completes at shard2
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ // Unblock plan at shard1
+ runtime.SetObserverFunc(prevObserverFunc);
+ for (auto& ev : capturedPlans) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ UNIT_ASSERT_VALUES_EQUAL(
+ FormatResult(AwaitResponse(runtime, std::move(future))),
+ "<empty>");
+ Cerr << "!!! distributed write end" << Endl;
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenDropTable) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ size_t observedPropose = 0;
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::TEvProposeTransaction::EventType: {
+ ++observedPropose;
+ Cerr << "... observed TEvProposeTransaction" << Endl;
+ break;
+ }
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ observedPropose = 0;
+ ui64 txId = AsyncDropTable(server, sender, "/Root", "table-1");
+ WaitFor(runtime, [&]{ return observedPropose > 0; }, "observed propose");
+
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ WaitTxNotification(server, sender, txId);
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenImmediateUpsert) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ auto opts = TShardedTableOptions()
+ .Shards(1)
+ .Columns({
+ {"key", "Uint32", true, false},
+ {"value", "Uint32", false, false},
+ {"value2", "Uint32", false, false}});
+ CreateShardedTable(server, sender, "/Root", "table-1", opts);
+ CreateShardedTable(server, sender, "/Root", "table-2", opts);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ const auto shard1 = GetTableShards(server, sender, "/Root/table-1").at(0);
+ const auto tableId1 = ResolveTableId(server, sender, "/Root/table-1");
+
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value, value2) VALUES (2, 2, 42);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ // Note: this upsert happens over the upsert into the value column
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value2) VALUES (2, 51);");
+
+ // This compaction verifies there's no commit race with the waiting
+ // distributed transaction. If commits happen in incorrect order we
+ // would observe unexpected results.
+ CompactTable(runtime, shard1, tableId1, false);
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ UNIT_ASSERT_VALUES_EQUAL(
+ FormatResult(AwaitResponse(runtime, std::move(future))),
+ "<empty>");
+
+ // Verify the result
+ UNIT_ASSERT_VALUES_EQUAL(
+ KqpSimpleExec(runtime, R"(
+ SELECT key, value, value2 FROM `/Root/table-1`
+ UNION ALL
+ SELECT key, value, value2 FROM `/Root/table-2`
+ ORDER BY key
+ )"),
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } items { null_flag_value: NULL_VALUE } }, "
+ "{ items { uint32_value: 2 } items { uint32_value: 2 } items { uint32_value: 51 } }, "
+ "{ items { uint32_value: 10 } items { uint32_value: 10 } items { null_flag_value: NULL_VALUE } }, "
+ "{ items { uint32_value: 20 } items { uint32_value: 20 } items { null_flag_value: NULL_VALUE } }");
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenCopyTable) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ size_t observedPropose = 0;
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::TEvProposeTransaction::EventType: {
+ ++observedPropose;
+ Cerr << "... observed TEvProposeTransaction" << Endl;
+ break;
+ }
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ observedPropose = 0;
+ ui64 txId = AsyncCreateCopyTable(server, sender, "/Root", "table-1-copy", "/Root/table-1");
+ WaitFor(runtime, [&]{ return observedPropose > 0; }, "observed propose");
+
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ // Wait for copy table to finish
+ WaitTxNotification(server, sender, txId);
+
+ // Verify table copy has above changes committed
+ UNIT_ASSERT_VALUES_EQUAL(
+ KqpSimpleExec(runtime, R"(
+ SELECT key, value FROM `/Root/table-1-copy`
+ ORDER BY key
+ )"),
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
+ "{ items { uint32_value: 2 } items { uint32_value: 2 } }");
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenSplit) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ CreateShardedTable(server, sender, "/Root", "table-1", 1);
+ CreateShardedTable(server, sender, "/Root", "table-2", 1);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ size_t observedSplit = 0;
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::TEvSplit::EventType: {
+ ++observedSplit;
+ Cerr << "... observed TEvSplit" << Endl;
+ break;
+ }
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ SetSplitMergePartCountLimit(server->GetRuntime(), -1);
+ auto shards1before = GetTableShards(server, sender, "/Root/table-1");
+ ui64 txId = AsyncSplitTable(server, sender, "/Root/table-1", shards1before.at(0), 2);
+ WaitFor(runtime, [&]{ return observedSplit > 0; }, "observed split");
+
+ SimulateSleep(runtime, TDuration::Seconds(1));
+
+ runtime.SetObserverFunc(prevObserverFunc);
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ // Wait for split to finish
+ WaitTxNotification(server, sender, txId);
+
+ // Verify table has changes committed
+ UNIT_ASSERT_VALUES_EQUAL(
+ KqpSimpleExec(runtime, R"(
+ SELECT key, value FROM `/Root/table-1`
+ ORDER BY key
+ )"),
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
+ "{ items { uint32_value: 2 } items { uint32_value: 2 } }");
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenReadIterator) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ auto opts = TShardedTableOptions()
+ .Shards(1)
+ .Columns({
+ {"key", "Uint32", true, false},
+ {"value", "Uint32", false, false},
+ {"value2", "Uint32", false, false}});
+ CreateShardedTable(server, sender, "/Root", "table-1", opts);
+ CreateShardedTable(server, sender, "/Root", "table-2", opts);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ ui64 maxReadSetStep = 0;
+ bool captureReadSets = true;
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ maxReadSetStep = Max(maxReadSetStep, msg->Record.GetStep());
+ if (captureReadSets) {
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ break;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value, value2) VALUES (2, 2, 42);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ const auto shard1 = GetTableShards(server, sender, "/Root/table-1").at(0);
+ const auto tableId1 = ResolveTableId(server, sender, "/Root/table-1");
+
+ // Note: observer works strangely with edge actor results, so we use a normal actor here
+ TVector<THolder<IEventHandle>> readResults;
+ auto readSender = runtime.Register(new TLambdaActor([&](TAutoPtr<IEventHandle>& ev) {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::TEvReadResult::EventType: {
+ Cerr << "... observed TEvReadResult:" << Endl;
+ Cerr << ev->Get<TEvDataShard::TEvReadResult>()->Record.DebugString() << Endl;
+ readResults.emplace_back(ev.Release());
+ break;
+ }
+ default: {
+ Cerr << "... ignore event " << ev->GetTypeRewrite() << Endl;
+ }
+ }
+ }));
+
+ {
+ auto msg = std::make_unique<TEvDataShard::TEvRead>();
+ msg->Record.SetReadId(1);
+ msg->Record.MutableTableId()->SetOwnerId(tableId1.PathId.OwnerId);
+ msg->Record.MutableTableId()->SetTableId(tableId1.PathId.LocalPathId);
+ msg->Record.MutableTableId()->SetSchemaVersion(tableId1.SchemaVersion);
+ msg->Record.MutableSnapshot()->SetStep(maxReadSetStep);
+ msg->Record.MutableSnapshot()->SetTxId(Max<ui64>());
+ msg->Record.AddColumns(1);
+ msg->Record.AddColumns(2);
+ msg->Record.SetResultFormat(NKikimrTxDataShard::ARROW);
+
+ TVector<TCell> fromKeyCells = { TCell::Make(ui32(0)) };
+ TVector<TCell> toKeyCells = { TCell::Make(ui32(10)) };
+ auto fromBuf = TSerializedCellVec::Serialize(fromKeyCells);
+ auto toBuf = TSerializedCellVec::Serialize(toKeyCells);
+ msg->Ranges.emplace_back(fromBuf, toBuf, true, true);
+
+ ForwardToTablet(runtime, shard1, readSender, msg.release());
+ }
+
+ // Since key=2 is not committed we must not observe results yet
+ SimulateSleep(runtime, TDuration::Seconds(2));
+ UNIT_ASSERT_VALUES_EQUAL(readResults.size(), 0u);
+
+ captureReadSets = false;
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ WaitFor(runtime, [&]{ return readResults.size() > 0; }, "read result");
+ UNIT_ASSERT_VALUES_EQUAL(readResults.size(), 1u);
+
+ {
+ auto* msg = readResults[0]->Get<TEvDataShard::TEvReadResult>();
+ UNIT_ASSERT_VALUES_EQUAL(msg->Record.GetStatus().GetCode(), Ydb::StatusIds::SUCCESS);
+ UNIT_ASSERT_VALUES_EQUAL(msg->GetArrowBatch()->ToString(),
+ "key: [\n"
+ " 1,\n"
+ " 2\n"
+ " ]\n"
+ "value: [\n"
+ " 1,\n"
+ " 2\n"
+ " ]\n");
+ UNIT_ASSERT_VALUES_EQUAL(msg->Record.GetFinished(), true);
+ }
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenReadIteratorStream) {
+ TPortManager pm;
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ auto opts = TShardedTableOptions()
+ .Shards(1)
+ .Columns({
+ {"key", "Uint32", true, false},
+ {"value", "Uint32", false, false},
+ {"value2", "Uint32", false, false}});
+ CreateShardedTable(server, sender, "/Root", "table-1", opts);
+ CreateShardedTable(server, sender, "/Root", "table-2", opts);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ ui64 maxReadSetStep = 0;
+ bool captureReadSets = true;
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ maxReadSetStep = Max(maxReadSetStep, msg->Record.GetStep());
+ if (captureReadSets) {
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ break;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value, value2) VALUES (2, 2, 42);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ const auto shard1 = GetTableShards(server, sender, "/Root/table-1").at(0);
+ const auto tableId1 = ResolveTableId(server, sender, "/Root/table-1");
+
+ // Note: observer works strangely with edge actor results, so we use a normal actor here
+ TVector<THolder<IEventHandle>> readResults;
+ auto readSender = runtime.Register(new TLambdaActor([&](TAutoPtr<IEventHandle>& ev) {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::TEvReadResult::EventType: {
+ Cerr << "... observed TEvReadResult:" << Endl;
+ Cerr << ev->Get<TEvDataShard::TEvReadResult>()->Record.DebugString() << Endl;
+ readResults.emplace_back(ev.Release());
+ break;
+ }
+ default: {
+ Cerr << "... ignore event " << ev->GetTypeRewrite() << Endl;
+ }
+ }
+ }));
+
+ {
+ auto msg = std::make_unique<TEvDataShard::TEvRead>();
+ msg->Record.SetReadId(1);
+ msg->Record.MutableTableId()->SetOwnerId(tableId1.PathId.OwnerId);
+ msg->Record.MutableTableId()->SetTableId(tableId1.PathId.LocalPathId);
+ msg->Record.MutableTableId()->SetSchemaVersion(tableId1.SchemaVersion);
+ msg->Record.MutableSnapshot()->SetStep(maxReadSetStep);
+ msg->Record.MutableSnapshot()->SetTxId(Max<ui64>());
+ msg->Record.AddColumns(1);
+ msg->Record.AddColumns(2);
+ msg->Record.SetResultFormat(NKikimrTxDataShard::ARROW);
+ msg->Record.SetMaxRowsInResult(1);
+
+ TVector<TCell> fromKeyCells = { TCell::Make(ui32(0)) };
+ TVector<TCell> toKeyCells = { TCell::Make(ui32(10)) };
+ auto fromBuf = TSerializedCellVec::Serialize(fromKeyCells);
+ auto toBuf = TSerializedCellVec::Serialize(toKeyCells);
+ msg->Ranges.emplace_back(fromBuf, toBuf, true, true);
+
+ ForwardToTablet(runtime, shard1, readSender, msg.release());
+ }
+
+ // We expect to receive key=1 as soon as possible since it's committed
+ // However further data should not be available so soon
+ SimulateSleep(runtime, TDuration::Seconds(2));
+ UNIT_ASSERT_VALUES_EQUAL(readResults.size(), 1u);
+
+ // Verify we actually receive key=1
+ {
+ auto* msg = readResults[0]->Get<TEvDataShard::TEvReadResult>();
+ UNIT_ASSERT_VALUES_EQUAL(msg->Record.GetStatus().GetCode(), Ydb::StatusIds::SUCCESS);
+ UNIT_ASSERT_VALUES_EQUAL(msg->GetArrowBatch()->ToString(),
+ "key: [\n"
+ " 1\n"
+ " ]\n"
+ "value: [\n"
+ " 1\n"
+ " ]\n");
+ readResults.clear();
+ }
+
+ // Unblock readsets and let key=2 to commit
+ captureReadSets = false;
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ WaitFor(runtime, [&]{ return readResults.size() > 0; }, "read result");
+ UNIT_ASSERT_GE(readResults.size(), 1u);
+
+ {
+ auto* msg = readResults[0]->Get<TEvDataShard::TEvReadResult>();
+ UNIT_ASSERT_VALUES_EQUAL(msg->Record.GetStatus().GetCode(), Ydb::StatusIds::SUCCESS);
+ UNIT_ASSERT_VALUES_EQUAL(msg->GetArrowBatch()->ToString(),
+ "key: [\n"
+ " 2\n"
+ " ]\n"
+ "value: [\n"
+ " 2\n"
+ " ]\n");
+
+ msg = readResults.back()->Get<TEvDataShard::TEvReadResult>();
+ UNIT_ASSERT_VALUES_EQUAL(msg->Record.GetStatus().GetCode(), Ydb::StatusIds::SUCCESS);
+ UNIT_ASSERT_VALUES_EQUAL(msg->Record.GetFinished(), true);
+ }
+ }
+
+ Y_UNIT_TEST(DistributedWriteThenScanQuery) {
+ TPortManager pm;
+ NKikimrConfig::TAppConfig app;
+ app.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(false);
+ TServerSettings serverSettings(pm.GetPort(2134));
+ serverSettings.SetDomainName("Root")
+ .SetUseRealThreads(false)
+ .SetDomainPlanResolution(1000)
+ .SetAppConfig(app);
+
+ Tests::TServer::TPtr server = new TServer(serverSettings);
+ auto &runtime = *server->GetRuntime();
+ auto sender = runtime.AllocateEdgeActor();
+
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::TX_PROXY, NLog::PRI_DEBUG);
+
+ InitRoot(server, sender);
+
+ auto opts = TShardedTableOptions()
+ .Shards(1)
+ .Columns({
+ {"key", "Uint32", true, false},
+ {"value", "Uint32", false, false}});
+ CreateShardedTable(server, sender, "/Root", "table-1", opts);
+ CreateShardedTable(server, sender, "/Root", "table-2", opts);
+
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-1` (key, value) VALUES (1, 1);");
+ ExecSQL(server, sender, "UPSERT INTO `/Root/table-2` (key, value) VALUES (10, 10);");
+
+ ui64 maxReadSetStep = 0;
+ bool captureReadSets = true;
+ TVector<THolder<IEventHandle>> capturedReadSets;
+ auto captureEvents = [&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) -> auto {
+ switch (ev->GetTypeRewrite()) {
+ case TEvTxProcessing::TEvReadSet::EventType: {
+ const auto* msg = ev->Get<TEvTxProcessing::TEvReadSet>();
+ maxReadSetStep = Max(maxReadSetStep, msg->Record.GetStep());
+ if (captureReadSets) {
+ Cerr << "... captured TEvReadSet for " << msg->Record.GetTabletDest() << Endl;
+ capturedReadSets.emplace_back(ev.Release());
+ return TTestActorRuntime::EEventAction::DROP;
+ }
+ break;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ };
+ auto prevObserverFunc = runtime.SetObserverFunc(captureEvents);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(true);
+
+ TString sessionId = CreateSessionRPC(runtime, "/Root");
+
+ auto future = SendRequest(runtime, MakeSimpleRequestRPC(R"(
+ UPSERT INTO `/Root/table-1` (key, value) VALUES (2, 2);
+ UPSERT INTO `/Root/table-2` (key, value) VALUES (20, 20);
+ )", sessionId, "", true /* commitTx */), "/Root");
+
+ WaitFor(runtime, [&]{ return capturedReadSets.size() >= 4; }, "captured readsets");
+ UNIT_ASSERT_VALUES_EQUAL(capturedReadSets.size(), 4u);
+
+ runtime.GetAppData(0).FeatureFlags.SetEnableDataShardVolatileTransactions(false);
+
+ TVector<TString> observedResults;
+ TMaybe<Ydb::StatusIds::StatusCode> observedStatus;
+ auto scanSender = runtime.Register(new TLambdaActor([&](TAutoPtr<IEventHandle>& ev, const TActorContext& ctx) {
+ switch (ev->GetTypeRewrite()) {
+ case NKqp::TEvKqpExecuter::TEvStreamData::EventType: {
+ auto* msg = ev->Get<NKqp::TEvKqpExecuter::TEvStreamData>();
+ Cerr << "... observed stream data" << Endl;
+ observedResults.push_back(FormatResult(msg->Record.GetResultSet()));
+ auto resp = MakeHolder<NKqp::TEvKqpExecuter::TEvStreamDataAck>();
+ resp->Record.SetSeqNo(msg->Record.GetSeqNo());
+ resp->Record.SetFreeSpace(1);
+ ctx.Send(ev->Sender, resp.Release());
+ break;
+ }
+ case NKqp::TEvKqp::TEvQueryResponse::EventType: {
+ auto* msg = ev->Get<NKqp::TEvKqp::TEvQueryResponse>();
+ Cerr << "... observed query result" << Endl;
+ observedStatus = msg->Record.GetRef().GetYdbStatus();
+ break;
+ }
+ default: {
+ Cerr << "... ignored event " << ev->GetTypeRewrite();
+ if (ev->GetBase()) {
+ Cerr << " " << ev->GetBase()->ToString();
+ }
+ Cerr << Endl;
+ }
+ }
+ }));
+
+ SendRequest(runtime, scanSender, MakeStreamRequest(scanSender, R"(
+ SELECT key, value FROM `/Root/table-1`
+ ORDER BY key;
+ )"));
+
+ SimulateSleep(runtime, TDuration::Seconds(2));
+
+ UNIT_ASSERT_VALUES_EQUAL(observedResults.size(), 0u);
+
+ captureReadSets = false;
+ for (auto& ev : capturedReadSets) {
+ runtime.Send(ev.Release(), 0, true);
+ }
+
+ SimulateSleep(runtime, TDuration::Seconds(2));
+
+ UNIT_ASSERT_VALUES_EQUAL(observedResults.size(), 1u);
+ UNIT_ASSERT_VALUES_EQUAL(
+ observedResults[0],
+ "{ items { uint32_value: 1 } items { uint32_value: 1 } }, "
+ "{ items { uint32_value: 2 } items { uint32_value: 2 } }");
+ UNIT_ASSERT_VALUES_EQUAL(observedStatus, Ydb::StatusIds::SUCCESS);
+ }
+
} // Y_UNIT_TEST_SUITE(DataShardVolatile)
} // namespace NKikimr
diff --git a/ydb/core/tx/datashard/drop_cdc_stream_unit.cpp b/ydb/core/tx/datashard/drop_cdc_stream_unit.cpp
index 67b676e4e5..597ca1664f 100644
--- a/ydb/core/tx/datashard/drop_cdc_stream_unit.cpp
+++ b/ydb/core/tx/datashard/drop_cdc_stream_unit.cpp
@@ -46,6 +46,21 @@ public:
DataShard.AddSchemaSnapshot(pathId, version, op->GetStep(), op->GetTxId(), txc, ctx);
}
+ if (params.HasDropSnapshot()) {
+ const auto& snapshot = params.GetDropSnapshot();
+ Y_VERIFY(snapshot.GetStep() != 0);
+
+ const TSnapshotKey key(pathId, snapshot.GetStep(), snapshot.GetTxId());
+ DataShard.GetSnapshotManager().RemoveSnapshot(txc.DB, key);
+ }
+
+ auto& scanManager = DataShard.GetCdcStreamScanManager();
+ scanManager.Forget(txc.DB, pathId, streamPathId);
+ if (const auto* info = scanManager.Get(streamPathId)) {
+ DataShard.CancelScan(tableInfo->LocalTid, info->ScanId);
+ scanManager.Complete(streamPathId);
+ }
+
RemoveSender.Reset(new TEvChangeExchange::TEvRemoveSender(streamPathId));
BuildResult(op, NKikimrTxDataShard::TEvProposeTransactionResult::COMPLETE);
diff --git a/ydb/core/tx/datashard/execute_data_tx_unit.cpp b/ydb/core/tx/datashard/execute_data_tx_unit.cpp
index 33a1e8caaf..18955ee931 100644
--- a/ydb/core/tx/datashard/execute_data_tx_unit.cpp
+++ b/ydb/core/tx/datashard/execute_data_tx_unit.cpp
@@ -178,6 +178,7 @@ EExecutionStatus TExecuteDataTxUnit::Execute(TOperation::TPtr op,
engine->ReleaseUnusedMemory();
txc.RequestMemory(txc.GetMemoryLimit() * MEMORY_REQUEST_FACTOR);
+ tx->GetDataTx()->ResetCollectedChanges();
tx->ReleaseTxData(txc, ctx);
return EExecutionStatus::Restart;
@@ -187,6 +188,7 @@ EExecutionStatus TExecuteDataTxUnit::Execute(TOperation::TPtr op,
DataShard.IncCounter(COUNTER_TX_TABLET_NOT_READY);
+ tx->GetDataTx()->ResetCollectedChanges();
tx->ReleaseTxData(txc, ctx);
return EExecutionStatus::Restart;
@@ -194,6 +196,7 @@ EExecutionStatus TExecuteDataTxUnit::Execute(TOperation::TPtr op,
LOG_TRACE_S(ctx, NKikimrServices::TX_DATASHARD, "Tablet " << DataShard.TabletID()
<< " needs to reschedule " << *op << " for dependencies");
+ tx->GetDataTx()->ResetCollectedChanges();
tx->ReleaseTxData(txc, ctx);
txc.Reschedule();
diff --git a/ydb/core/tx/datashard/execute_distributed_erase_tx_unit.cpp b/ydb/core/tx/datashard/execute_distributed_erase_tx_unit.cpp
index 033d2516f8..318b422f87 100644
--- a/ydb/core/tx/datashard/execute_distributed_erase_tx_unit.cpp
+++ b/ydb/core/tx/datashard/execute_distributed_erase_tx_unit.cpp
@@ -46,14 +46,7 @@ public:
if (eraseTx->HasDependents()) {
TDataShardUserDb userDb(DataShard, txc.DB, readVersion);
- THolder<IChangeCollector> changeCollector{CreateChangeCollector(DataShard, userDb, txc.DB, request.GetTableId(), false)};
-
- if (changeCollector) {
- changeCollector->SetWriteVersion(writeVersion);
- if (changeCollector->NeedToReadKeys()) {
- changeCollector->SetReadVersion(readVersion);
- }
- }
+ THolder<IDataShardChangeCollector> changeCollector{CreateChangeCollector(DataShard, userDb, txc.DB, request.GetTableId(), false)};
auto presentRows = TDynBitMap().Set(0, request.KeyColumnsSize());
if (!Execute(txc, request, presentRows, eraseTx->GetConfirmedRows(), writeVersion, changeCollector.Get())) {
@@ -104,7 +97,7 @@ public:
bool Execute(TTransactionContext& txc, const NKikimrTxDataShard::TEvEraseRowsRequest& request,
const TDynBitMap& presentRows, const TDynBitMap& confirmedRows, const TRowVersion& writeVersion,
- IChangeCollector* changeCollector = nullptr)
+ IDataShardChangeCollector* changeCollector = nullptr)
{
const ui64 tableId = request.GetTableId();
const TTableId fullTableId(DataShard.GetPathOwnerId(), tableId);
@@ -135,8 +128,7 @@ public:
}
if (changeCollector) {
- if (!changeCollector->Collect(fullTableId, NTable::ERowOp::Erase, key, {})) {
- changeCollector->Reset();
+ if (!changeCollector->OnUpdate(fullTableId, tableInfo.LocalTid, NTable::ERowOp::Erase, key, {}, writeVersion)) {
pageFault = true;
}
}
@@ -155,6 +147,10 @@ public:
txc.DB.Update(tableInfo.LocalTid, NTable::ERowOp::Erase, key, {}, writeVersion);
}
+ if (pageFault && changeCollector) {
+ changeCollector->OnRestart();
+ }
+
return !pageFault;
}
diff --git a/ydb/core/tx/datashard/execute_kqp_data_tx_unit.cpp b/ydb/core/tx/datashard/execute_kqp_data_tx_unit.cpp
index 34fbed0888..4c20ff9f2a 100644
--- a/ydb/core/tx/datashard/execute_kqp_data_tx_unit.cpp
+++ b/ydb/core/tx/datashard/execute_kqp_data_tx_unit.cpp
@@ -166,6 +166,17 @@ EExecutionStatus TExecuteKqpDataTxUnit::Execute(TOperation::TPtr op, TTransactio
}
}
+ bool keepOutReadSets = !op->HasVolatilePrepareFlag();
+
+ Y_DEFER {
+ // We need to clear OutReadSets and AwaitingDecisions for
+ // volatile transactions, except when we commit them.
+ if (!keepOutReadSets) {
+ tx->OutReadSets().clear();
+ tx->AwaitingDecisions().clear();
+ }
+ };
+
const bool validated = op->HasVolatilePrepareFlag()
? KqpValidateVolatileTx(tabletId, tx, DataShard.SysLocksTable())
: KqpValidateLocks(tabletId, tx, DataShard.SysLocksTable());
@@ -207,7 +218,7 @@ EExecutionStatus TExecuteKqpDataTxUnit::Execute(TOperation::TPtr op, TTransactio
dataTx->SetVolatileTxId(tx->GetTxId());
}
- KqpCommitLocks(tabletId, tx, writeVersion, DataShard, txc);
+ KqpCommitLocks(tabletId, tx, writeVersion, DataShard);
auto& computeCtx = tx->GetDataTx()->GetKqpComputeCtx();
@@ -264,6 +275,28 @@ EExecutionStatus TExecuteKqpDataTxUnit::Execute(TOperation::TPtr op, TTransactio
return OnTabletNotReady(*tx, *dataTx, txc, ctx);
}
+ if (!result && computeCtx.HasVolatileReadDependencies()) {
+ for (ui64 txId : computeCtx.GetVolatileReadDependencies()) {
+ op->AddVolatileDependency(txId);
+ bool ok = DataShard.GetVolatileTxManager().AttachBlockedOperation(txId, op->GetTxId());
+ Y_VERIFY_S(ok, "Unexpected failure to attach TxId# " << op->GetTxId() << " to volatile tx " << txId);
+ }
+
+ allocGuard.Release();
+
+ dataTx->ResetCollectedChanges();
+
+ tx->ReleaseTxData(txc, ctx);
+
+ // Rollback database changes, if any
+ if (txc.DB.HasChanges()) {
+ txc.Reschedule();
+ return EExecutionStatus::Restart;
+ }
+
+ return EExecutionStatus::Continue;
+ }
+
if (Pipeline.AddLockDependencies(op, guardLocks)) {
allocGuard.Release();
dataTx->ResetCollectedChanges();
@@ -304,17 +337,14 @@ EExecutionStatus TExecuteKqpDataTxUnit::Execute(TOperation::TPtr op, TTransactio
if (!op->OutReadSets().empty()) {
DataShard.PrepareAndSaveOutReadSets(op->GetStep(), op->GetTxId(), op->OutReadSets(), op->PreparedOutReadSets(), txc, ctx);
}
+ keepOutReadSets = true;
}
// Note: may erase persistent locks, must be after we persist volatile tx
AddLocksToResult(op, ctx);
if (auto changes = std::move(dataTx->GetCollectedChanges())) {
- if (commitTxIds || guardLocks.LockTxId) {
- DataShard.AddLockChangeRecords(commitTxIds ? tx->GetTxId() : guardLocks.LockTxId, std::move(changes));
- } else {
- op->ChangeRecords() = std::move(changes);
- }
+ op->ChangeRecords() = std::move(changes);
}
KqpUpdateDataShardStatCounters(DataShard, dataTx->GetCounters());
diff --git a/ydb/core/tx/datashard/finalize_build_index_unit.cpp b/ydb/core/tx/datashard/finalize_build_index_unit.cpp
index aa48ad5bc7..6815b4a266 100644
--- a/ydb/core/tx/datashard/finalize_build_index_unit.cpp
+++ b/ydb/core/tx/datashard/finalize_build_index_unit.cpp
@@ -71,7 +71,7 @@ public:
DataShard.GetBuildIndexManager().Drop(params.GetBuildIndexId());
}
- const TSnapshotKey key(pathId.OwnerId, pathId.LocalPathId, step, txId);
+ const TSnapshotKey key(pathId, step, txId);
DataShard.GetSnapshotManager().RemoveSnapshot(txc.DB, key);
BuildResult(op, NKikimrTxDataShard::TEvProposeTransactionResult::COMPLETE);
diff --git a/ydb/core/tx/datashard/initiate_build_index_unit.cpp b/ydb/core/tx/datashard/initiate_build_index_unit.cpp
index 06312591cc..d0518cb70f 100644
--- a/ydb/core/tx/datashard/initiate_build_index_unit.cpp
+++ b/ydb/core/tx/datashard/initiate_build_index_unit.cpp
@@ -63,7 +63,7 @@ public:
ui64 txId = tx->GetTxId();
Y_VERIFY(step != 0);
- const TSnapshotKey key(pathId.OwnerId, pathId.LocalPathId, step, txId);
+ const TSnapshotKey key(pathId, step, txId);
const ui64 flags = TSnapshot::FlagScheme;
DataShard.GetSnapshotManager().AddSnapshot(
diff --git a/ydb/core/tx/datashard/move_index_unit.cpp b/ydb/core/tx/datashard/move_index_unit.cpp
index 8750fcc4a7..72366265d5 100644
--- a/ydb/core/tx/datashard/move_index_unit.cpp
+++ b/ydb/core/tx/datashard/move_index_unit.cpp
@@ -6,7 +6,7 @@ namespace NKikimr {
namespace NDataShard {
class TMoveIndexUnit : public TExecutionUnit {
- TVector<NMiniKQL::IChangeCollector::TChange> ChangeRecords;
+ TVector<IDataShardChangeCollector::TChange> ChangeRecords;
public:
TMoveIndexUnit(TDataShard& dataShard, TPipeline& pipeline)
@@ -17,7 +17,7 @@ public:
return true;
}
- void MoveChangeRecords(NIceDb::TNiceDb& db, const NKikimrTxDataShard::TMoveIndex& move, TVector<NMiniKQL::IChangeCollector::TChange>& changeRecords) {
+ void MoveChangeRecords(NIceDb::TNiceDb& db, const NKikimrTxDataShard::TMoveIndex& move, TVector<IDataShardChangeCollector::TChange>& changeRecords) {
const auto remapPrevId = PathIdFromPathId(move.GetReMapIndex().GetSrcPathId());
const auto remapNewId = PathIdFromPathId(move.GetReMapIndex().GetDstPathId());
@@ -33,7 +33,7 @@ public:
}
for (auto& pr : DataShard.GetLockChangeRecords()) {
- for (auto& record : pr.second) {
+ for (auto& record : pr.second.Changes) {
if (record.PathId == remapPrevId) {
record.PathId = remapNewId;
DataShard.MoveChangeRecord(db, record.LockId, record.LockOffset, record.PathId);
diff --git a/ydb/core/tx/datashard/move_table_unit.cpp b/ydb/core/tx/datashard/move_table_unit.cpp
index dae1331ff7..562b7c330f 100644
--- a/ydb/core/tx/datashard/move_table_unit.cpp
+++ b/ydb/core/tx/datashard/move_table_unit.cpp
@@ -6,7 +6,7 @@ namespace NKikimr {
namespace NDataShard {
class TMoveTableUnit : public TExecutionUnit {
- TVector<NMiniKQL::IChangeCollector::TChange> ChangeRecords;
+ TVector<IDataShardChangeCollector::TChange> ChangeRecords;
public:
TMoveTableUnit(TDataShard& dataShard, TPipeline& pipeline)
@@ -17,7 +17,7 @@ public:
return true;
}
- void MoveChangeRecords(NIceDb::TNiceDb& db, const NKikimrTxDataShard::TMoveTable& move, TVector<NMiniKQL::IChangeCollector::TChange>& changeRecords) {
+ void MoveChangeRecords(NIceDb::TNiceDb& db, const NKikimrTxDataShard::TMoveTable& move, TVector<IDataShardChangeCollector::TChange>& changeRecords) {
const THashMap<TPathId, TPathId> remap = DataShard.GetRemapIndexes(move);
for (auto& record: changeRecords) {
@@ -33,7 +33,7 @@ public:
}
for (auto& pr : DataShard.GetLockChangeRecords()) {
- for (auto& record : pr.second) {
+ for (auto& record : pr.second.Changes) {
if (remap.contains(record.PathId)) {
record.PathId = remap.at(record.PathId);
DataShard.MoveChangeRecord(db, record.LockId, record.LockOffset, record.PathId);
diff --git a/ydb/core/tx/datashard/operation.cpp b/ydb/core/tx/datashard/operation.cpp
index d681acf292..1b09efee40 100644
--- a/ydb/core/tx/datashard/operation.cpp
+++ b/ydb/core/tx/datashard/operation.cpp
@@ -181,6 +181,18 @@ void TOperation::ClearImmediateConflicts() {
ImmediateConflicts.clear();
}
+void TOperation::AddVolatileDependency(ui64 txId) {
+ VolatileDependencies.insert(txId);
+}
+
+void TOperation::RemoveVolatileDependency(ui64 txId, bool success) {
+ if (VolatileDependencies.erase(txId)) {
+ if (!success) {
+ VolatileDependenciesAborted = true;
+ }
+ }
+}
+
TString TOperation::DumpDependencies() const
{
TStringStream ss;
@@ -267,7 +279,7 @@ TString TOperation::ExecutionProfileLogString(ui64 tabletId) const
bool TOperation::HasRuntimeConflicts() const noexcept
{
// We may acquire some new dependencies at runtime
- return !Dependencies.empty();
+ return !Dependencies.empty() || !VolatileDependencies.empty();
}
void TOperation::SetFinishProposeTs() noexcept
diff --git a/ydb/core/tx/datashard/operation.h b/ydb/core/tx/datashard/operation.h
index 1a575f02e9..004d10a406 100644
--- a/ydb/core/tx/datashard/operation.h
+++ b/ydb/core/tx/datashard/operation.h
@@ -6,6 +6,7 @@
#include "datashard_outreadset.h"
#include "datashard_snapshots.h"
#include "execution_unit_kind.h"
+#include "change_collector.h"
#include <ydb/core/engine/mkql_engine_flat.h>
#include <ydb/core/engine/minikql/change_collector_iface.h>
@@ -444,7 +445,7 @@ struct TOutputOpData {
using TResultPtr = THolder<TEvDataShard::TEvProposeTransactionResult>;
using TDelayedAcks = TVector<THolder<IEventHandle>>;
using TOutReadSets = TMap<std::pair<ui64, ui64>, TString>; // source:target -> body
- using TChangeRecord = NMiniKQL::IChangeCollector::TChange;
+ using TChangeRecord = IDataShardChangeCollector::TChange;
using TExpectedReadSets = TMap<std::pair<ui64, ui64>, TStackVec<TActorId, 1>>;
TResultPtr Result;
@@ -651,6 +652,9 @@ public:
const NFH::TFlatHashSet<TOperation::TPtr> &GetSpecialDependencies() const { return SpecialDependencies; }
const NFH::TFlatHashSet<TOperation::TPtr> &GetPlannedConflicts() const { return PlannedConflicts; }
const NFH::TFlatHashSet<TOperation::TPtr> &GetImmediateConflicts() const { return ImmediateConflicts; }
+ const absl::flat_hash_set<ui64> &GetVolatileDependencies() const { return VolatileDependencies; }
+ bool HasVolatileDependencies() const { return !VolatileDependencies.empty(); }
+ bool GetVolatileDependenciesAborted() const { return VolatileDependenciesAborted; }
void AddDependency(const TOperation::TPtr &op);
void AddSpecialDependency(const TOperation::TPtr &op);
@@ -665,6 +669,10 @@ public:
void ClearSpecialDependents();
void ClearSpecialDependencies();
+ void AddVolatileDependency(ui64 txId);
+ void RemoveVolatileDependency(ui64 txId, bool success);
+ void ClearVolatileDependenciesAborted() { VolatileDependenciesAborted = false; }
+
TString DumpDependencies() const;
/**
@@ -831,6 +839,8 @@ private:
NFH::TFlatHashSet<TOperation::TPtr> SpecialDependencies;
NFH::TFlatHashSet<TOperation::TPtr> PlannedConflicts;
NFH::TFlatHashSet<TOperation::TPtr> ImmediateConflicts;
+ absl::flat_hash_set<ui64> VolatileDependencies;
+ bool VolatileDependenciesAborted = false;
TVector<EExecutionUnitKind> ExecutionPlan;
// Index of current execution unit.
size_t CurrentUnit;
diff --git a/ydb/core/tx/datashard/read_iterator.h b/ydb/core/tx/datashard/read_iterator.h
index 478753baa4..c2fae3e0cd 100644
--- a/ydb/core/tx/datashard/read_iterator.h
+++ b/ydb/core/tx/datashard/read_iterator.h
@@ -17,7 +17,7 @@ namespace NKikimr::NDataShard {
struct TReadIteratorId {
TActorId Sender;
- ui64 ReadId = 0;
+ ui64 ReadId;
TReadIteratorId(const TActorId& sender, ui64 readId)
: Sender(sender)
diff --git a/ydb/core/tx/datashard/read_table_scan_unit.cpp b/ydb/core/tx/datashard/read_table_scan_unit.cpp
index c020c6c6ab..9fc30ad9d2 100644
--- a/ydb/core/tx/datashard/read_table_scan_unit.cpp
+++ b/ydb/core/tx/datashard/read_table_scan_unit.cpp
@@ -48,7 +48,7 @@ bool TReadTableScanUnit::IsReadyToExecute(TOperation::TPtr op) const
return true;
if (!op->IsWaitingForScan())
- return true;
+ return !op->HasRuntimeConflicts();
if (op->HasScanResult())
return true;
@@ -97,6 +97,25 @@ EExecutionStatus TReadTableScanUnit::Execute(TOperation::TPtr op,
if (record.HasSnapshotStep() && record.HasSnapshotTxId()) {
Y_VERIFY(op->HasAcquiredSnapshotKey(), "Missing snapshot reference in ReadTable tx");
+
+ bool wait = false;
+ TRowVersion snapshot(record.GetSnapshotStep(), record.GetSnapshotTxId());
+ for (auto* info : DataShard.GetVolatileTxManager().GetVolatileTxByVersion()) {
+ if (!(info->Version <= snapshot)) {
+ break;
+ }
+ op->AddVolatileDependency(info->TxId);
+ bool ok = DataShard.GetVolatileTxManager().AttachWaitingRemovalOperation(info->TxId, op->GetTxId());
+ Y_VERIFY_S(ok, "Unexpected failure to attach TxId# " << op->GetTxId() << " to volatile tx " << info->TxId);
+ wait = true;
+ }
+
+ if (wait) {
+ // Wait until all volatile transactions below snapshot are removed
+ // This guarantees they are either committed or aborted and will
+ // be visible without any special tx map.
+ return EExecutionStatus::Continue;
+ }
} else if (!DataShard.IsMvccEnabled()) {
Y_VERIFY(tx->GetScanSnapshotId(), "Missing snapshot in ReadTable tx");
}
@@ -114,6 +133,7 @@ EExecutionStatus TReadTableScanUnit::Execute(TOperation::TPtr op,
auto readVersion = TRowVersion(record.GetSnapshotStep(), record.GetSnapshotTxId());
options.SetSnapshotRowVersion(readVersion);
} else if (DataShard.IsMvccEnabled()) {
+ // Note: this mode is only used in legacy tests and may not work with volatile transactions
// With mvcc we have to mark all preceding transactions as logically complete
auto readVersion = DataShard.GetReadWriteVersions(tx).ReadVersion;
hadWrites |= Pipeline.MarkPlannedLogicallyCompleteUpTo(readVersion, txc);
diff --git a/ydb/core/tx/datashard/remove_lock_change_records.cpp b/ydb/core/tx/datashard/remove_lock_change_records.cpp
index e5b09bcd3a..b387c02f5a 100644
--- a/ydb/core/tx/datashard/remove_lock_change_records.cpp
+++ b/ydb/core/tx/datashard/remove_lock_change_records.cpp
@@ -35,15 +35,16 @@ public:
continue;
}
- while (!it->second.empty() && removed < MaxRecordsToRemove) {
- auto& record = it->second.back();
+ while (!it->second.Changes.empty() && removed < MaxRecordsToRemove) {
+ auto& record = it->second.Changes.back();
db.Table<Schema::LockChangeRecords>().Key(record.LockId, record.LockOffset).Delete();
db.Table<Schema::LockChangeRecordDetails>().Key(record.LockId, record.LockOffset).Delete();
- it->second.pop_back();
+ it->second.Changes.pop_back();
+ it->second.PersistentCount = it->second.Changes.size();
++removed;
}
- if (!it->second.empty()) {
+ if (!it->second.Changes.empty()) {
// We couldn't remove everything, continue in the next transaction
break;
}
diff --git a/ydb/core/tx/datashard/snapshot_key.h b/ydb/core/tx/datashard/snapshot_key.h
index 63c1ea44d7..3efaf46fd5 100644
--- a/ydb/core/tx/datashard/snapshot_key.h
+++ b/ydb/core/tx/datashard/snapshot_key.h
@@ -70,6 +70,10 @@ struct TDataSnapshotKey
, TxId(txId)
{ }
+ TDataSnapshotKey(const TPathId& pathId, ui64 step, ui64 txId)
+ : TDataSnapshotKey(pathId.OwnerId, pathId.LocalPathId, step, txId)
+ { }
+
auto ToTuple() const {
return std::tuple_cat(TSnapshotTableKey::ToTuple(), std::make_tuple(Step, TxId));
}
diff --git a/ydb/core/tx/datashard/ut_kqp/CMakeLists.darwin.txt b/ydb/core/tx/datashard/ut_kqp/CMakeLists.darwin.txt
index 1131f0a23c..584c792f94 100644
--- a/ydb/core/tx/datashard/ut_kqp/CMakeLists.darwin.txt
+++ b/ydb/core/tx/datashard/ut_kqp/CMakeLists.darwin.txt
@@ -41,6 +41,7 @@ target_link_options(ydb-core-tx-datashard-ut_kqp PRIVATE
target_sources(ydb-core-tx-datashard-ut_kqp PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_common.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_kqp.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp
)
add_test(
NAME
diff --git a/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux-aarch64.txt b/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux-aarch64.txt
index 7a5d54a82b..ade03957b0 100644
--- a/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux-aarch64.txt
@@ -44,6 +44,7 @@ target_link_options(ydb-core-tx-datashard-ut_kqp PRIVATE
target_sources(ydb-core-tx-datashard-ut_kqp PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_common.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_kqp.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp
)
add_test(
NAME
diff --git a/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux.txt b/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux.txt
index 065f9dc22c..41d7bef358 100644
--- a/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux.txt
+++ b/ydb/core/tx/datashard/ut_kqp/CMakeLists.linux.txt
@@ -46,6 +46,7 @@ target_link_options(ydb-core-tx-datashard-ut_kqp PRIVATE
target_sources(ydb-core-tx-datashard-ut_kqp PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_common.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_kqp.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/datashard/datashard_ut_kqp_stream_lookup.cpp
)
add_test(
NAME
diff --git a/ydb/core/tx/datashard/volatile_tx.cpp b/ydb/core/tx/datashard/volatile_tx.cpp
index d73639cf76..0f079b37df 100644
--- a/ydb/core/tx/datashard/volatile_tx.cpp
+++ b/ydb/core/tx/datashard/volatile_tx.cpp
@@ -13,7 +13,7 @@ namespace NKikimr::NDataShard {
TTxType GetTxType() const override { return TXTYPE_VOLATILE_TX_COMMIT; }
- bool Execute(NTabletFlatExecutor::TTransactionContext& txc, const TActorContext&) override {
+ bool Execute(NTabletFlatExecutor::TTransactionContext& txc, const TActorContext& ctx) override {
Y_VERIFY(Self->VolatileTxManager.PendingCommitTxScheduled);
Self->VolatileTxManager.PendingCommitTxScheduled = false;
@@ -40,22 +40,38 @@ namespace NKikimr::NDataShard {
Self->VolatileTxManager.PersistRemoveVolatileTx(TxId, txc);
- Self->VolatileTxManager.RemoveFromTxMap(info);
+ if (info->AddCommitted) {
+ OnCommitted(ctx);
+ } else {
+ Delayed = true;
+ }
+
+ return true;
+ }
+
+ void Complete(const TActorContext& ctx) override {
+ if (Delayed) {
+ OnCommitted(ctx);
+ }
+ }
+
+ void OnCommitted(const TActorContext& ctx) {
+ auto* info = Self->VolatileTxManager.FindByTxId(TxId);
+ Y_VERIFY(info && info->State == EVolatileTxState::Committed);
+ Y_VERIFY(info->AddCommitted);
Self->VolatileTxManager.UnblockDependents(info);
- // TODO: unblock waiting operations?
+ Self->VolatileTxManager.RemoveFromTxMap(info);
Self->VolatileTxManager.RemoveVolatileTx(TxId);
- return true;
- }
- void Complete(const TActorContext&) override {
- // nothing
+ Self->CheckSplitCanStart(ctx);
}
private:
ui64 TxId;
+ bool Delayed = false;
};
class TDataShard::TTxVolatileTxAbort
@@ -80,7 +96,7 @@ namespace NKikimr::NDataShard {
Self->VolatileTxManager.RunPendingAbortTx();
auto* info = Self->VolatileTxManager.FindByTxId(TxId);
- Y_VERIFY(info && info->State == EVolatileTxState::Aborted);
+ Y_VERIFY(info && info->State == EVolatileTxState::Aborting);
for (auto& pr : Self->GetUserTables()) {
auto tid = pr.second->LocalTid;
@@ -94,21 +110,24 @@ namespace NKikimr::NDataShard {
// TODO: abort change records
Self->VolatileTxManager.PersistRemoveVolatileTx(TxId, txc);
-
- Self->VolatileTxManager.UnblockDependents(info);
-
- // TODO: restart waiting operations before commit?
return true;
}
- void Complete(const TActorContext&) override {
+ void Complete(const TActorContext& ctx) override {
auto* info = Self->VolatileTxManager.FindByTxId(TxId);
- Y_VERIFY(info && info->State == EVolatileTxState::Aborted);
+ Y_VERIFY(info && info->State == EVolatileTxState::Aborting);
+ Y_VERIFY(info->AddCommitted);
// Run callbacks only after we successfully persist aborted tx
Self->VolatileTxManager.RunAbortCallbacks(info);
+ Self->VolatileTxManager.UnblockDependents(info);
+
+ Self->VolatileTxManager.RemoveFromTxMap(info);
+
Self->VolatileTxManager.RemoveVolatileTx(TxId);
+
+ Self->CheckSplitCanStart(ctx);
}
private:
@@ -133,6 +152,7 @@ namespace NKikimr::NDataShard {
void TVolatileTxManager::Clear() {
VolatileTxs.clear();
+ VolatileTxByVersion.clear();
VolatileTxByCommitTxId.clear();
TxMap.Reset();
}
@@ -140,7 +160,11 @@ namespace NKikimr::NDataShard {
bool TVolatileTxManager::Load(NIceDb::TNiceDb& db) {
using Schema = TDataShard::Schema;
- Y_VERIFY(VolatileTxs.empty() && VolatileTxByCommitTxId.empty() && !TxMap,
+ Y_VERIFY(
+ VolatileTxs.empty() &&
+ VolatileTxByVersion.empty() &&
+ VolatileTxByCommitTxId.empty() &&
+ !TxMap,
"Unexpected Load into non-empty volatile tx manager");
// Tables may not exist in some inactive shards, which cannot have transactions
@@ -174,8 +198,9 @@ namespace NKikimr::NDataShard {
case EVolatileTxState::Committed:
PendingCommits.push_back(pr.first);
break;
- case EVolatileTxState::Aborted:
+ case EVolatileTxState::Aborting:
PendingAborts.push_back(pr.first);
+ Y_FAIL("FIXME: unexpected persistent aborting state");
break;
}
}
@@ -226,7 +251,7 @@ namespace NKikimr::NDataShard {
}
// Waiting and Committed transactions need to be added to TxMap until they are fully resolved
- // Note that aborted transactions are removed from TxMap and don't need to be re-added
+ // Note that aborting transactions are deleted and we should never observe it as a persistent state
for (ui64 commitTxId : info->CommitTxIds) {
auto res2 = VolatileTxByCommitTxId.emplace(commitTxId, info);
Y_VERIFY_S(res2.second, "Unexpected duplicate commitTxId# " << commitTxId);
@@ -236,8 +261,8 @@ namespace NKikimr::NDataShard {
for (auto it = info->Dependencies.begin(); it != info->Dependencies.end(); /* nothing */) {
ui64 dependencyTxId = *it;
auto* dependency = FindByTxId(dependencyTxId);
- if (!dependency || dependency->State == EVolatileTxState::Aborted) {
- // Skip dependencies that have been aborted already
+ if (!dependency) {
+ // Skip dependencies that have been removed already
info->Dependencies.erase(it++);
continue;
}
@@ -248,9 +273,10 @@ namespace NKikimr::NDataShard {
return;
}
- case EVolatileTxState::Aborted: {
- // Aborted transactions don't have dependencies
+ case EVolatileTxState::Aborting: {
+ // Aborting transactions don't have dependencies
info->Dependencies.clear();
+ Y_FAIL("FIXME: unexpected persistent aborting state");
return;
}
}
@@ -260,6 +286,7 @@ namespace NKikimr::NDataShard {
for (auto& pr : VolatileTxs) {
postProcessTxInfo(pr.second.get());
+ VolatileTxByVersion.insert(pr.second.get());
}
return true;
@@ -351,6 +378,8 @@ namespace NKikimr::NDataShard {
info->State = EVolatileTxState::Committed;
}
+ VolatileTxByVersion.insert(info);
+
if (!TxMap) {
TxMap = MakeIntrusive<TTxMap>();
}
@@ -366,9 +395,6 @@ namespace NKikimr::NDataShard {
auto* dependency = FindByTxId(dependencyTxId);
Y_VERIFY_S(dependency, "Cannot find dependency txId# " << dependencyTxId
<< " for volatile txId# " << txId << " @" << version);
- Y_VERIFY_S(dependency->State != EVolatileTxState::Aborted,
- "Unexpected aborted dependency txId# " << dependencyTxId
- << " for volatile txId# " << txId << " @" << version);
dependency->Dependents.insert(txId);
}
@@ -398,7 +424,7 @@ namespace NKikimr::NDataShard {
db.Table<Schema::TxVolatileParticipants>().Key(info->TxId, shardId).Update();
}
- txc.OnCommit([this, txId]() {
+ txc.OnCommitted([this, txId]() {
auto* info = FindByTxId(txId);
Y_VERIFY_S(info, "Unexpected failure to find volatile txId# " << txId);
Y_VERIFY_S(!info->AddCommitted, "Unexpected commit of a committed volatile txId# " << txId);
@@ -406,7 +432,6 @@ namespace NKikimr::NDataShard {
if (info->State == EVolatileTxState::Committed) {
RunCommitCallbacks(info);
}
- // TODO: unblock waiting operations?
});
txc.OnRollback([txId]() {
Y_VERIFY_S(false, "Unexpected rollback of volatile txId# " << txId);
@@ -439,10 +464,27 @@ namespace NKikimr::NDataShard {
Y_VERIFY_S(info->Dependencies.empty(), "Unexpected remove of volatile tx " << txId << " with dependencies");
Y_VERIFY_S(info->Dependents.empty(), "Unexpected remove of volatile tx " << txId << " with dependents");
+ UnblockWaitingRemovalOperations(info);
+
for (ui64 commitTxId : info->CommitTxIds) {
VolatileTxByCommitTxId.erase(commitTxId);
}
+ VolatileTxByVersion.erase(info);
VolatileTxs.erase(txId);
+
+ if (!WaitingSnapshotEvents.empty()) {
+ TVolatileTxInfo* next = !VolatileTxByVersion.empty() ? *VolatileTxByVersion.begin() : nullptr;
+ while (!WaitingSnapshotEvents.empty()) {
+ auto& top = WaitingSnapshotEvents.front();
+ if (next && next->Version <= top.Snapshot) {
+ // Still waiting
+ break;
+ }
+ TActivationContext::Send(std::move(top.Event));
+ std::pop_heap(WaitingSnapshotEvents.begin(), WaitingSnapshotEvents.end());
+ WaitingSnapshotEvents.pop_back();
+ }
+ }
}
bool TVolatileTxManager::AttachVolatileTxCallback(ui64 txId, IVolatileTxCallback::TPtr callback) {
@@ -461,13 +503,13 @@ namespace NKikimr::NDataShard {
case EVolatileTxState::Committed:
// We call commit callbacks only when effects are committed
if (it->second->AddCommitted) {
- callback->OnCommit();
+ callback->OnCommit(txId);
} else {
it->second->Callbacks.push_back(std::move(callback));
}
break;
- case EVolatileTxState::Aborted:
+ case EVolatileTxState::Aborting:
// The rollback transaction will handle callbacks
it->second->Callbacks.push_back(std::move(callback));
break;
@@ -476,16 +518,49 @@ namespace NKikimr::NDataShard {
return true;
}
+ bool TVolatileTxManager::AttachBlockedOperation(ui64 txId, ui64 dependentTxId) {
+ auto it = VolatileTxs.find(txId);
+ if (it == VolatileTxs.end()) {
+ return false;
+ }
+
+ switch (it->second->State) {
+ case EVolatileTxState::Waiting:
+ case EVolatileTxState::Aborting:
+ it->second->BlockedOperations.insert(dependentTxId);
+ return true;
+
+ case EVolatileTxState::Committed:
+ break;
+ }
+
+ return false;
+ }
+
+ bool TVolatileTxManager::AttachWaitingRemovalOperation(ui64 txId, ui64 dependentTxId) {
+ auto it = VolatileTxs.find(txId);
+ if (it == VolatileTxs.end()) {
+ return false;
+ }
+
+ it->second->WaitingRemovalOperations.insert(dependentTxId);
+ return true;
+ }
+
+ void TVolatileTxManager::AttachWaitingSnapshotEvent(const TRowVersion& snapshot, std::unique_ptr<IEventHandle>&& event) {
+ Y_VERIFY(!VolatileTxByVersion.empty() && (*VolatileTxByVersion.begin())->Version <= snapshot);
+
+ WaitingSnapshotEvents.emplace_back(snapshot, std::move(event));
+ std::push_heap(WaitingSnapshotEvents.begin(), WaitingSnapshotEvents.end());
+ }
+
void TVolatileTxManager::AbortWaitingTransaction(TVolatileTxInfo* info) {
Y_VERIFY(info && info->State == EVolatileTxState::Waiting);
ui64 txId = info->TxId;
- // Move tx to aborted, but don't persist yet, we need a separate transaction for that
- info->State = EVolatileTxState::Aborted;
-
- // We don't need aborted transactions in tx map
- RemoveFromTxMap(info);
+ // Move tx to aborting, but don't persist yet, we need a separate transaction for that
+ info->State = EVolatileTxState::Aborting;
// Aborted transactions don't have dependencies
for (ui64 dependencyTxId : info->Dependencies) {
@@ -571,6 +646,7 @@ namespace NKikimr::NDataShard {
NIceDb::TNiceDb db(txc.DB);
db.Table<Schema::TxVolatileParticipants>().Key(txId, srcTabletId).Delete();
+ Self->RemoveExpectation(srcTabletId, txId);
if (info->Participants.empty()) {
// Move tx to committed.
@@ -586,7 +662,6 @@ namespace NKikimr::NDataShard {
if (info->Dependencies.empty()) {
AddPendingCommit(txId);
}
- // TODO: unblock waiting operations?
}
}
@@ -594,16 +669,18 @@ namespace NKikimr::NDataShard {
auto callbacks = std::move(info->Callbacks);
info->Callbacks.clear();
for (auto& callback : callbacks) {
- callback->OnCommit();
+ callback->OnCommit(info->TxId);
}
+ UnblockOperations(info, true);
}
void TVolatileTxManager::RunAbortCallbacks(TVolatileTxInfo* info) {
auto callbacks = std::move(info->Callbacks);
info->Callbacks.clear();
for (auto& callback : callbacks) {
- callback->OnAbort();
+ callback->OnAbort(info->TxId);
}
+ UnblockOperations(info, false);
}
void TVolatileTxManager::RemoveFromTxMap(TVolatileTxInfo* info) {
@@ -620,13 +697,61 @@ namespace NKikimr::NDataShard {
Y_VERIFY_S(dependent, "Unexpected failure to find dependent tx "
<< dependentTxId << " that depended on " << info->TxId);
dependent->Dependencies.erase(info->TxId);
- if (dependent->Dependencies.empty() && dependent->State == EVolatileTxState::Committed) {
- AddPendingCommit(dependentTxId);
+ if (dependent->Dependencies.empty()) {
+ switch (dependent->State) {
+ case EVolatileTxState::Waiting:
+ break;
+ case EVolatileTxState::Committed:
+ AddPendingCommit(dependentTxId);
+ break;
+ case EVolatileTxState::Aborting:
+ Y_FAIL("FIXME: unexpected dependency removed from aborting tx");
+ break;
+ }
}
}
info->Dependents.clear();
}
+ void TVolatileTxManager::UnblockOperations(TVolatileTxInfo* info, bool success) {
+ bool added = false;
+ for (ui64 dependentTxId : info->BlockedOperations) {
+ // Note: operation may have been cancelled, it's ok when missing
+ if (auto op = Self->Pipeline.FindOp(dependentTxId)) {
+ op->RemoveVolatileDependency(info->TxId, success);
+ if (!op->HasVolatileDependencies() && !op->HasRuntimeConflicts()) {
+ Self->Pipeline.AddCandidateOp(op);
+ added = true;
+ }
+ }
+ }
+ info->BlockedOperations.clear();
+
+ if (added && Self->Pipeline.CanRunAnotherOp()) {
+ auto ctx = TActivationContext::ActorContextFor(Self->SelfId());
+ Self->PlanQueue.Progress(ctx);
+ }
+ }
+
+ void TVolatileTxManager::UnblockWaitingRemovalOperations(TVolatileTxInfo* info) {
+ bool added = false;
+ for (ui64 dependentTxId : info->WaitingRemovalOperations) {
+ if (auto op = Self->Pipeline.FindOp(dependentTxId)) {
+ op->RemoveVolatileDependency(info->TxId, info->State == EVolatileTxState::Committed);
+ if (!op->HasVolatileDependencies() && !op->HasRuntimeConflicts()) {
+ Self->Pipeline.AddCandidateOp(op);
+ added = true;
+ }
+ }
+ }
+ info->WaitingRemovalOperations.clear();
+
+ if (added && Self->Pipeline.CanRunAnotherOp()) {
+ auto ctx = TActivationContext::ActorContextFor(Self->SelfId());
+ Self->PlanQueue.Progress(ctx);
+ }
+ }
+
void TVolatileTxManager::AddPendingCommit(ui64 txId) {
PendingCommits.push_back(txId);
RunPendingCommitTx();
diff --git a/ydb/core/tx/datashard/volatile_tx.h b/ydb/core/tx/datashard/volatile_tx.h
index 613843e51c..be6202a8d1 100644
--- a/ydb/core/tx/datashard/volatile_tx.h
+++ b/ydb/core/tx/datashard/volatile_tx.h
@@ -27,8 +27,8 @@ namespace NKikimr::NDataShard {
Waiting = 0,
// Volatile transaction is logically committed, but not yet committed in storage
Committed = 1,
- // Volatile transaction is aborted, waiting to be garbage collected
- Aborted = 2,
+ // Volatile transaction is aborting, waiting to be persistently removed
+ Aborting = 2,
};
class IVolatileTxCallback : public TThrRefBase {
@@ -36,8 +36,8 @@ namespace NKikimr::NDataShard {
using TPtr = TIntrusivePtr<IVolatileTxCallback>;
public:
- virtual void OnCommit() = 0;
- virtual void OnAbort() = 0;
+ virtual void OnCommit(ui64 txId) = 0;
+ virtual void OnAbort(ui64 txId) = 0;
};
struct TVolatileTxInfo {
@@ -49,7 +49,8 @@ namespace NKikimr::NDataShard {
absl::flat_hash_set<ui64> Dependents;
absl::flat_hash_set<ui64> Participants;
bool AddCommitted = false;
- absl::flat_hash_set<ui64> BlockedTransactions;
+ absl::flat_hash_set<ui64> BlockedOperations;
+ absl::flat_hash_set<ui64> WaitingRemovalOperations;
TStackVec<IVolatileTxCallback::TPtr, 2> Callbacks;
};
@@ -114,6 +115,41 @@ namespace NKikimr::NDataShard {
const TIntrusivePtr<TTxMap>& TxMap;
};
+ struct TCompareInfoByVersion {
+ using is_transparent = void;
+
+ bool operator()(const TVolatileTxInfo* a, const TVolatileTxInfo* b) const {
+ // Note: we may have multiple infos with the same version
+ return std::tie(a->Version, a) < std::tie(b->Version, b);
+ }
+
+ bool operator()(const TVolatileTxInfo* a, const TRowVersion& b) const {
+ return a->Version < b;
+ }
+
+ bool operator()(const TRowVersion& a, const TVolatileTxInfo* b) const {
+ return a < b->Version;
+ }
+ };
+
+ struct TWaitingSnapshotEvent {
+ TRowVersion Snapshot;
+ std::unique_ptr<IEventHandle> Event;
+
+ TWaitingSnapshotEvent(const TRowVersion& snapshot, std::unique_ptr<IEventHandle>&& event)
+ : Snapshot(snapshot)
+ , Event(std::move(event))
+ { }
+
+ bool operator<(const TWaitingSnapshotEvent& rhs) const {
+ // Note: inverted for max-heap
+ return rhs.Snapshot < Snapshot;
+ }
+ };
+
+ public:
+ using TVolatileTxByVersion = std::set<TVolatileTxInfo*, TCompareInfoByVersion>;
+
public:
TVolatileTxManager(TDataShard* self)
: Self(self)
@@ -126,6 +162,14 @@ namespace NKikimr::NDataShard {
TVolatileTxInfo* FindByTxId(ui64 txId) const;
TVolatileTxInfo* FindByCommitTxId(ui64 txId) const;
+ size_t GetTxInFlight() const { return VolatileTxs.size(); }
+
+ const TVolatileTxByVersion& GetVolatileTxByVersion() const { return VolatileTxByVersion; }
+
+ bool HasVolatileTxsAtSnapshot(const TRowVersion& snapshot) const {
+ return !VolatileTxByVersion.empty() && (*VolatileTxByVersion.begin())->Version <= snapshot;
+ }
+
void PersistAddVolatileTx(
ui64 txId, const TRowVersion& version,
TConstArrayRef<ui64> commitTxIds,
@@ -136,6 +180,15 @@ namespace NKikimr::NDataShard {
bool AttachVolatileTxCallback(
ui64 txId, IVolatileTxCallback::TPtr callback);
+ bool AttachBlockedOperation(
+ ui64 txId, ui64 dependentTxId);
+
+ bool AttachWaitingRemovalOperation(
+ ui64 txId, ui64 dependentTxId);
+
+ void AttachWaitingSnapshotEvent(
+ const TRowVersion& snapshot, std::unique_ptr<IEventHandle>&& event);
+
void AbortWaitingTransaction(TVolatileTxInfo* info);
void ProcessReadSet(
@@ -160,6 +213,8 @@ namespace NKikimr::NDataShard {
void RunAbortCallbacks(TVolatileTxInfo* info);
void RemoveFromTxMap(TVolatileTxInfo* info);
void UnblockDependents(TVolatileTxInfo* info);
+ void UnblockOperations(TVolatileTxInfo* info, bool success);
+ void UnblockWaitingRemovalOperations(TVolatileTxInfo* info);
void AddPendingCommit(ui64 txId);
void AddPendingAbort(ui64 txId);
void RunPendingCommitTx();
@@ -169,6 +224,8 @@ namespace NKikimr::NDataShard {
TDataShard* const Self;
absl::flat_hash_map<ui64, std::unique_ptr<TVolatileTxInfo>> VolatileTxs; // TxId -> Info
absl::flat_hash_map<ui64, TVolatileTxInfo*> VolatileTxByCommitTxId; // CommitTxId -> Info
+ TVolatileTxByVersion VolatileTxByVersion;
+ std::vector<TWaitingSnapshotEvent> WaitingSnapshotEvents;
TIntrusivePtr<TTxMap> TxMap;
std::deque<ui64> PendingCommits;
std::deque<ui64> PendingAborts;
diff --git a/ydb/core/tx/long_tx_service/commit_impl.cpp b/ydb/core/tx/long_tx_service/commit_impl.cpp
index 3a2872bad0..91e082f962 100644
--- a/ydb/core/tx/long_tx_service/commit_impl.cpp
+++ b/ydb/core/tx/long_tx_service/commit_impl.cpp
@@ -3,6 +3,7 @@
#include <ydb/core/base/tablet_pipecache.h>
#include <ydb/core/tx/tx_proxy/proxy.h>
#include <ydb/core/tx/columnshard/columnshard.h>
+#include <ydb/core/actorlib_impl/long_timer.h>
#include <library/cpp/actors/core/actor_bootstrapped.h>
@@ -14,6 +15,15 @@
namespace NKikimr {
namespace NLongTxService {
+ struct TRetryData {
+ static constexpr ui32 MaxPrepareRetriesPerShard = 100; // ~30 sec
+ static constexpr ui32 MaxPlanRetriesPerShard = 1000; // ~5 min
+ static constexpr ui32 RetryDelayMs = 300;
+
+ ui64 WriteId = 0;
+ TString TxBody;
+ ui32 NumRetries = 0;
+ };
class TLongTxServiceActor::TCommitActor : public TActorBootstrapped<TCommitActor> {
public:
@@ -64,7 +74,7 @@ namespace NLongTxService {
const auto* msg = ev->Get();
TxId = msg->TxId;
Services = msg->Services;
- LogPrefix = TStringBuilder() << LogPrefix << " TxId# " << TxId;
+ LogPrefix = TStringBuilder() << LogPrefix << " TxId# " << TxId << " ";
TXLOG_DEBUG("Allocated TxId");
PrepareTransaction();
}
@@ -79,15 +89,40 @@ namespace NLongTxService {
TString txBody;
Y_VERIFY(tx.SerializeToString(&txBody));
- TXLOG_DEBUG("Sending TEvProposeTransaction to ColumnShard# " << tabletId << " WriteId# " << writeId);
- SendToTablet(tabletId, MakeHolder<TEvColumnShard::TEvProposeTransaction>(
+ WaitingShards.emplace(tabletId, TRetryData{writeId, txBody, 0});
+ SendPrepareTransaction(tabletId);
+ }
+ Become(&TThis::StatePrepare);
+ }
+
+ bool SendPrepareTransaction(ui64 tabletId, bool delayed = false) {
+ auto it = WaitingShards.find(tabletId);
+ if (it == WaitingShards.end()) {
+ return false;
+ }
+
+ auto& data = it->second;
+ if (delayed) {
+ if (data.NumRetries >= TRetryData::MaxPrepareRetriesPerShard) {
+ return false;
+ }
+ ++data.NumRetries;
+ if (ToRetry.empty()) {
+ TimeoutTimerActorId = CreateLongTimer(TDuration::MilliSeconds(TRetryData::RetryDelayMs),
+ new IEventHandle(this->SelfId(), this->SelfId(), new TEvents::TEvWakeup()));
+ }
+ ToRetry.insert(tabletId);
+ return true;
+ }
+
+ TXLOG_DEBUG("Sending TEvProposeTransaction to ColumnShard# " << tabletId << " WriteId# " << data.WriteId);
+
+ SendToTablet(tabletId, MakeHolder<TEvColumnShard::TEvProposeTransaction>(
NKikimrTxColumnShard::TX_KIND_COMMIT,
SelfId(),
TxId,
- std::move(txBody)));
- WaitingShards.insert(tabletId);
- }
- Become(&TThis::StatePrepare);
+ data.TxBody));
+ return true;
}
STFUNC(StatePrepare) {
@@ -95,6 +130,7 @@ namespace NLongTxService {
switch (ev->GetTypeRewrite()) {
hFunc(TEvColumnShard::TEvProposeTransactionResult, HandlePrepare);
hFunc(TEvPipeCache::TEvDeliveryProblem, HandlePrepare);
+ CFunc(TEvents::TSystem::Wakeup, HandlePrepareTimeout);
}
}
@@ -126,7 +162,7 @@ namespace NLongTxService {
void HandlePrepare(TEvColumnShard::TEvProposeTransactionResult::TPtr& ev) {
const auto* msg = ev->Get();
const ui64 tabletId = msg->Record.GetOrigin();
- const auto status = msg->Record.GetStatus();
+ const NKikimrTxColumnShard::EResultStatus status = msg->Record.GetStatus();
TXLOG_DEBUG("Received TEvProposeTransactionResult from"
<< " ColumnShard# " << tabletId
@@ -155,9 +191,13 @@ namespace NLongTxService {
// Cancel transaction, since we didn't plan it
CancelProposal();
+ auto ydbStatus = NColumnShard::ConvertToYdbStatus(status);
NYql::TIssues issues;
- issues.AddIssue("TODO: need mapping from shard errors to api errors");
- return FinishWithError(Ydb::StatusIds::GENERIC_ERROR, std::move(issues));
+ issues.AddIssue(TStringBuilder() << "Cannot prepare transaction at shard " << tabletId);
+ if (msg->Record.HasStatusMessage()) {
+ issues.AddIssue(msg->Record.GetStatusMessage());
+ }
+ return FinishWithError(ydbStatus, std::move(issues));
}
}
}
@@ -165,11 +205,21 @@ namespace NLongTxService {
void HandlePrepare(TEvPipeCache::TEvDeliveryProblem::TPtr& ev) {
const auto* msg = ev->Get();
const ui64 tabletId = msg->TabletId;
+ Y_VERIFY(tabletId != SelectedCoordinator);
TXLOG_DEBUG("Delivery problem"
<< " TabletId# " << tabletId
<< " NotDelivered# " << msg->NotDelivered);
+ if (!WaitingShards.count(tabletId)) {
+ return;
+ }
+
+ // Delayed retry
+ if (SendPrepareTransaction(tabletId, true)) {
+ return;
+ }
+
// Cancel transaction, since we didn't plan it
CancelProposal();
@@ -178,10 +228,19 @@ namespace NLongTxService {
return FinishWithError(Ydb::StatusIds::UNAVAILABLE, std::move(issues));
}
+ void HandlePrepareTimeout(const TActorContext& /*ctx*/) {
+ TimeoutTimerActorId = {};
+ for (ui64 tabletId : ToRetry) {
+ SendPrepareTransaction(tabletId);
+ }
+ ToRetry.clear();
+ }
+
private:
void PlanTransaction() {
Y_VERIFY(SelectedCoordinator);
Y_VERIFY(WaitingShards.empty());
+ ToRetry.clear();
auto req = MakeHolder<TEvTxProxy::TEvProposeTransaction>(
SelectedCoordinator, TxId, 0, MinStep, MaxStep);
@@ -193,7 +252,7 @@ namespace NLongTxService {
auto* x = reqAffectedSet->Add();
x->SetTabletId(tabletId);
x->SetFlags(/* write */ 2);
- WaitingShards.insert(tabletId);
+ WaitingShards.emplace(tabletId, TRetryData{});
}
TXLOG_DEBUG("Sending TEvProposeTransaction to SelectedCoordinator# " << SelectedCoordinator);
@@ -207,6 +266,7 @@ namespace NLongTxService {
hFunc(TEvTxProxy::TEvProposeTransactionStatus, HandlePlan);
hFunc(TEvColumnShard::TEvProposeTransactionResult, HandlePlan);
hFunc(TEvPipeCache::TEvDeliveryProblem, HandlePlan);
+ CFunc(TEvents::TSystem::Wakeup, HandlePlanTimeout);
}
}
@@ -267,10 +327,23 @@ namespace NLongTxService {
return Finish();
}
+ case NKikimrTxColumnShard::OUTDATED: {
+ if (!WaitingShards.count(tabletId)) {
+ return;
+ }
+ NYql::TIssues issues;
+ issues.AddIssue(TStringBuilder() << "Shard " << tabletId << " has no info about tx " << TxId);
+ return FinishWithError(Ydb::StatusIds::UNDETERMINED, std::move(issues));
+ }
+
default: {
+ auto ydbStatus = NColumnShard::ConvertToYdbStatus(status);
NYql::TIssues issues;
- issues.AddIssue("TODO: need mapping from shard errors to api errors");
- return FinishWithError(Ydb::StatusIds::GENERIC_ERROR, std::move(issues));
+ issues.AddIssue(TStringBuilder() << "Cannot plan transaction at shard " << tabletId);
+ if (msg->Record.HasStatusMessage()) {
+ issues.AddIssue(msg->Record.GetStatusMessage());
+ }
+ return FinishWithError(ydbStatus, std::move(issues));
}
}
}
@@ -296,9 +369,17 @@ namespace NLongTxService {
issues.AddIssue("Coordinator not available, transaction was not committed");
return FinishWithError(Ydb::StatusIds::UNAVAILABLE, std::move(issues));
}
- } else if (!WaitingShards.contains(tabletId)) {
- // We are not waiting for results from this shard
- return;
+ } else {
+ if (!PlanStep) {
+ // Waiting for PlanStep. Do not break transaction.
+ return;
+ }
+ // It's planned, not completed. We could check TEvProposeTransactionResult by PlanStep.
+ // - tx is completed if PlanStep:TxId at tablet is greater then ours
+ // - tx is not completed otherwise. Keep waiting TEvProposeTransactionResult for it.
+ if (SendCheckPlannedTransaction(tabletId, true)) {
+ return;
+ }
}
NYql::TIssues issues;
@@ -306,6 +387,48 @@ namespace NLongTxService {
return FinishWithError(Ydb::StatusIds::UNDETERMINED, std::move(issues));
}
+ void HandlePlanTimeout(const TActorContext& /*ctx*/) {
+ TimeoutTimerActorId = {};
+ for (ui64 tabletId : ToRetry) {
+ SendCheckPlannedTransaction(tabletId);
+ }
+ ToRetry.clear();
+ }
+
+ bool SendCheckPlannedTransaction(ui64 tabletId, bool delayed = false) {
+ Y_VERIFY(PlanStep);
+
+ if (delayed) {
+ auto it = WaitingShards.find(tabletId);
+ if (it == WaitingShards.end()) {
+ // We are not waiting for results from this shard
+ return true;
+ }
+
+ auto& numRetries = it->second.NumRetries;
+ if (numRetries >= TRetryData::MaxPlanRetriesPerShard) {
+ return false;
+ }
+ ++numRetries;
+
+ if (ToRetry.empty()) {
+ TimeoutTimerActorId = CreateLongTimer(TDuration::MilliSeconds(TRetryData::RetryDelayMs),
+ new IEventHandle(this->SelfId(), this->SelfId(), new TEvents::TEvWakeup()));
+ }
+ ToRetry.insert(tabletId);
+ return true;
+ }
+
+ TXLOG_DEBUG("Ask TEvProposeTransactionResult from ColumnShard# " << tabletId
+ << " for PlanStep# " << PlanStep << " TxId# " << TxId);
+
+ SendToTablet(tabletId, MakeHolder<TEvColumnShard::TEvCheckPlannedTransaction>(
+ SelfId(),
+ PlanStep,
+ TxId));
+ return true;
+ }
+
private:
void CancelProposal() {
for (const auto& pr : Params.ColumnShardWrites) {
@@ -336,11 +459,13 @@ namespace NLongTxService {
TString LogPrefix;
ui64 TxId = 0;
NTxProxy::TTxProxyServices Services;
- THashSet<ui64> WaitingShards;
+ THashMap<ui64, TRetryData> WaitingShards;
ui64 SelectedCoordinator = 0;
ui64 MinStep = 0;
ui64 MaxStep = Max<ui64>();
ui64 PlanStep = 0;
+ THashSet<ui64> ToRetry;
+ TActorId TimeoutTimerActorId;
};
void TLongTxServiceActor::StartCommitActor(TTransaction& tx) {
diff --git a/ydb/core/tx/scheme_board/cache.cpp b/ydb/core/tx/scheme_board/cache.cpp
index f862770500..016a9a40b9 100644
--- a/ydb/core/tx/scheme_board/cache.cpp
+++ b/ydb/core/tx/scheme_board/cache.cpp
@@ -270,7 +270,7 @@ namespace {
SetErrorAndClear(Context.Get(), entry);
}
}
-
+
if (Context->Request->UserToken) {
auto securityObject = GetSecurityObject(entry);
if (securityObject == nullptr) {
@@ -809,6 +809,9 @@ class TSchemeCache: public TMonitorableActor<TSchemeCache> {
column.PType = NScheme::TypeInfoFromProtoColumnType(columnDesc.GetTypeId(),
columnDesc.HasTypeInfo() ? &columnDesc.GetTypeInfo() : nullptr);
nameToId[column.Name] = column.Id;
+ if (columnDesc.GetNotNull()) {
+ NotNullColumns.insert(columnDesc.GetName());
+ }
}
KeyColumnTypes.resize(schemaDesc.KeyColumnNamesSize());
@@ -1667,11 +1670,13 @@ class TSchemeCache: public TMonitorableActor<TSchemeCache> {
}
const bool isTable = Kind == TNavigate::KindTable || Kind == TNavigate::KindColumnTable;
+ const bool isTopic = Kind == TNavigate::KindTopic || Kind == TNavigate::KindCdcStream;
+
if (entry.Operation == TNavigate::OpTable && !isTable) {
return SetError(context, entry, TNavigate::EStatus::PathNotTable);
}
- if (!Created && isTable) {
+ if (!Created && (isTable || isTopic)) {
return SetError(context, entry, TNavigate::EStatus::PathErrorUnknown);
}
diff --git a/ydb/core/tx/scheme_board/events.h b/ydb/core/tx/scheme_board/events.h
index 018ebbff7d..506fb5beca 100644
--- a/ydb/core/tx/scheme_board/events.h
+++ b/ydb/core/tx/scheme_board/events.h
@@ -50,6 +50,44 @@ struct TSchemeBoardEvents {
static_assert(EvEnd < EventSpaceEnd(TKikimrEvents::ES_SCHEME_BOARD), "expect End < EventSpaceEnd(ES_SCHEME_BOARD)");
+ template <typename T>
+ static TStringBuilder& PrintOwnerGeneration(TStringBuilder& out, const T& record) {
+ return out
+ << " Owner: " << record.GetOwner()
+ << " Generation: " << record.GetGeneration();
+ }
+
+ template <typename T>
+ static TString PrintOwnerGeneration(const IEventBase* ev, const T& record) {
+ auto out = TStringBuilder() << ev->ToStringHeader() << " {";
+ PrintOwnerGeneration(out, record);
+ return out << " }";
+ }
+
+ template <typename T>
+ static TStringBuilder& PrintPath(TStringBuilder& out, const T& record) {
+ if (record.HasPath() && record.HasPathOwnerId() && record.HasLocalPathId()) {
+ out << " Path: " << record.GetPath()
+ << " PathId: " << TPathId(record.GetPathOwnerId(), record.GetLocalPathId());
+ } else if (record.HasPath()) {
+ out << " Path: " << record.GetPath();
+ } else if (record.HasPathOwnerId() && record.HasLocalPathId()) {
+ out << " PathId: " << TPathId(record.GetPathOwnerId(), record.GetLocalPathId());
+ } else {
+ out << " Path: <empty>"
+ << " PathId: <empty>";
+ }
+
+ return out;
+ }
+
+ template <typename T>
+ static TString PrintPath(const IEventBase* ev, const T& record) {
+ auto out = TStringBuilder() << ev->ToStringHeader() << " {";
+ PrintPath(out, record);
+ return out << " }";
+ }
+
// populator events
struct TEvRequestDescribe: public TEventLocal<TEvRequestDescribe, EvRequestDescribe> {
const TPathId PathId;
@@ -62,6 +100,13 @@ struct TSchemeBoardEvents {
, Replica(replica)
{
}
+
+ TString ToString() const override {
+ return TStringBuilder() << ToStringHeader() << " {"
+ << " PathId: " << PathId
+ << " Replica: " << Replica
+ << " }";
+ }
};
struct TEvDescribeResult: public TEventLocal<TEvDescribeResult, EvDescribeResult> {
@@ -136,6 +181,12 @@ struct TSchemeBoardEvents {
: PathId(pathId)
{
}
+
+ TString ToString() const override {
+ return TStringBuilder() << ToStringHeader() << " {"
+ << " PathId: " << PathId
+ << " }";
+ }
};
// replica <--> populator events
@@ -146,6 +197,10 @@ struct TSchemeBoardEvents {
Record.SetOwner(owner);
Record.SetGeneration(generation);
}
+
+ TString ToString() const override {
+ return PrintOwnerGeneration(this, Record);
+ }
};
struct TEvHandshakeResponse: public TEventPB<TEvHandshakeResponse, NKikimrSchemeBoard::TEvHandshake, EvHandshakeResponse> {
@@ -155,6 +210,10 @@ struct TSchemeBoardEvents {
Record.SetOwner(owner);
Record.SetGeneration(generation);
}
+
+ TString ToString() const override {
+ return PrintOwnerGeneration(this, Record);
+ }
};
struct TEvUpdate: public TEventPreSerializedPB<TEvUpdate, NKikimrSchemeBoard::TEvUpdate, EvUpdate> {
@@ -170,6 +229,10 @@ struct TSchemeBoardEvents {
Record.GetLocalPathId()
);
}
+
+ TString ToString() const override {
+ return PrintOwnerGeneration(this, Record);
+ }
};
struct TEvUpdateBuilder: public TEvUpdate {
@@ -253,6 +316,15 @@ struct TSchemeBoardEvents {
Record.GetLocalPathId()
);
}
+
+ TString ToString() const override {
+ auto out = TStringBuilder() << ToStringHeader() << " {";
+ PrintOwnerGeneration(out, Record);
+ return out
+ << " PathId: " << GetPathId()
+ << " Version: " << Record.GetVersion()
+ << " }";
+ }
};
struct TEvCommitRequest: public TEventPB<TEvCommitRequest, NKikimrSchemeBoard::TEvCommitGeneration, EvCommitRequest> {
@@ -262,6 +334,10 @@ struct TSchemeBoardEvents {
Record.SetOwner(owner);
Record.SetGeneration(generation);
}
+
+ TString ToString() const override {
+ return PrintOwnerGeneration(this, Record);
+ }
};
struct TEvCommitResponse: public TEventPB<TEvCommitResponse, NKikimrSchemeBoard::TEvCommitGeneration, EvCommitResponse> {
@@ -271,6 +347,10 @@ struct TSchemeBoardEvents {
Record.SetOwner(owner);
Record.SetGeneration(generation);
}
+
+ TString ToString() const override {
+ return PrintOwnerGeneration(this, Record);
+ }
};
// subscriber <--> replica events
@@ -290,6 +370,12 @@ struct TSchemeBoardEvents {
FillCapabilities(Record);
}
+ TString ToString() const override {
+ auto out = TStringBuilder() << ToStringHeader() << " {";
+ PrintPath(out, Record);
+ return out << " DomainOwnerId: " << Record.GetDomainOwnerId() << " }";
+ }
+
static void FillCapabilities(NKikimrSchemeBoard::TEvSubscribe& record) {
record.MutableCapabilities()->SetAckNotifications(true);
}
@@ -306,10 +392,18 @@ struct TSchemeBoardEvents {
Record.SetPathOwnerId(pathId.OwnerId);
Record.SetLocalPathId(pathId.LocalPathId);
}
+
+ TString ToString() const override {
+ return PrintPath(this, Record);
+ }
};
struct TEvNotify: public TEventPreSerializedPB<TEvNotify, NKikimrSchemeBoard::TEvNotify, EvNotify> {
TEvNotify() = default;
+
+ TString ToString() const override {
+ return PrintPath(this, Record);
+ }
};
struct TEvNotifyBuilder: public TEvNotify {
@@ -351,6 +445,12 @@ struct TSchemeBoardEvents {
explicit TEvNotifyAck(ui64 version) {
Record.SetVersion(version);
}
+
+ TString ToString() const override {
+ return TStringBuilder() << ToStringHeader() << " {"
+ << " Version: " << Record.GetVersion()
+ << " }";
+ }
};
struct TEvSyncVersionRequest: public TEventPB<TEvSyncVersionRequest, NKikimrSchemeBoard::TEvSyncVersionRequest, EvSyncVersionRequest> {
@@ -364,6 +464,10 @@ struct TSchemeBoardEvents {
Record.SetPathOwnerId(pathId.OwnerId);
Record.SetLocalPathId(pathId.LocalPathId);
}
+
+ TString ToString() const override {
+ return PrintPath(this, Record);
+ }
};
struct TEvSyncVersionResponse: public TEventPB<TEvSyncVersionResponse, NKikimrSchemeBoard::TEvSyncVersionResponse, EvSyncVersionResponse> {
@@ -373,6 +477,13 @@ struct TSchemeBoardEvents {
Record.SetVersion(version);
Record.SetPartial(partial);
}
+
+ TString ToString() const override {
+ return TStringBuilder() << ToStringHeader() << " {"
+ << " Version: " << Record.GetVersion()
+ << " Partial: " << Record.GetPartial()
+ << " }";
+ }
};
// cache <--> subscriber events
diff --git a/ydb/core/tx/scheme_board/populator.cpp b/ydb/core/tx/scheme_board/populator.cpp
index f860bb88cb..a002989612 100644
--- a/ydb/core/tx/scheme_board/populator.cpp
+++ b/ydb/core/tx/scheme_board/populator.cpp
@@ -29,11 +29,11 @@
namespace NKikimr {
namespace NSchemeBoard {
-#define SBP_LOG_T(stream) SB_LOG_T(SCHEME_BOARD_POPULATOR, stream)
-#define SBP_LOG_D(stream) SB_LOG_D(SCHEME_BOARD_POPULATOR, stream)
-#define SBP_LOG_N(stream) SB_LOG_N(SCHEME_BOARD_POPULATOR, stream)
-#define SBP_LOG_E(stream) SB_LOG_E(SCHEME_BOARD_POPULATOR, stream)
-#define SBP_LOG_CRIT(stream) SB_LOG_CRIT(SCHEME_BOARD_POPULATOR, stream)
+#define SBP_LOG_T(stream) SB_LOG_T(SCHEME_BOARD_POPULATOR, "" << SelfId() << " " << stream)
+#define SBP_LOG_D(stream) SB_LOG_D(SCHEME_BOARD_POPULATOR, "" << SelfId() << " " << stream)
+#define SBP_LOG_N(stream) SB_LOG_N(SCHEME_BOARD_POPULATOR, "" << SelfId() << " " << stream)
+#define SBP_LOG_E(stream) SB_LOG_E(SCHEME_BOARD_POPULATOR, "" << SelfId() << " " << stream)
+#define SBP_LOG_CRIT(stream) SB_LOG_CRIT(SCHEME_BOARD_POPULATOR, "" << SelfId() << " " << stream)
namespace {
@@ -80,12 +80,10 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
auto& record = msg->Description.Record;
if (!record.HasStatus()) {
- SBP_LOG_E("Ignore description without status"
- << ": self# " << SelfId());
+ SBP_LOG_E("Ignore description without status");
} else if (record.GetStatus() != NKikimrScheme::StatusSuccess) {
SBP_LOG_E("Ignore description"
- << ": self# " << SelfId()
- << ", status# " << record.GetStatus()
+ << ": status# " << record.GetStatus()
<< ", msg# " << record.ShortDebugString());
} else {
CurPathId = GetPathId(record);
@@ -95,10 +93,9 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
if (msg->HasMigratedPath()) {
SBP_LOG_D("Ignore description of migrated path"
- << ": self# " << SelfId()
- << ", owner# " << Owner
+ << ": owner# " << Owner
<< ", localPathId# " << msg->MigratedPathId);
- //this path should be described by another owner (tenant schemeshard)
+ // this path should be described by another owner (tenant schemeshard)
auto& migratedLocalPathIds = *update->Record.MutableMigratedLocalPathIds();
migratedLocalPathIds.SetBegin(msg->MigratedPathId);
migratedLocalPathIds.SetEnd(msg->MigratedPathId);
@@ -215,8 +212,7 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
bool Check(TEvent& ev, T this_, T that, const TString& what) {
if (this_ != that) {
SBP_LOG_E("Suspicious " << TypeName<TEvent>()
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", " << what << "# " << this_
<< ", other " << what << "# " << that);
return false;
@@ -236,9 +232,8 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
}
void Handle(TSchemeBoardEvents::TEvHandshakeResponse::TPtr& ev) {
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvHandshakeResponse"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender);
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
if (!CheckOwner(ev)) {
return;
@@ -246,23 +241,19 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
const ui64 generation = ev->Get()->Record.GetGeneration();
if (generation > Generation) {
- SBP_LOG_CRIT("I MUST DIE"
- << ": self# " << SelfId());
+ SBP_LOG_CRIT("Keep calm");
Become(&TThis::StateCalm);
} else {
SBP_LOG_N("Successful handshake"
- << ": self# " << SelfId()
- << ", replica# " << ev->Sender);
+ << ": replica# " << ev->Sender);
if (generation < Generation) {
SBP_LOG_N("Start full sync"
- << ": self# " << SelfId()
- << ", replica# " << ev->Sender);
+ << ": replica# " << ev->Sender);
ProcessSync();
} else {
SBP_LOG_N("Resume sync"
- << ": self# " << SelfId()
- << ", replica# " << ev->Sender
+ << ": replica# " << ev->Sender
<< ", fromPathId# " << LastAckedPathId.NextId());
ResumeSync(LastAckedPathId.NextId());
}
@@ -273,30 +264,24 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
}
void Handle(TSchemeBoardEvents::TEvDescribeResult::TPtr& ev) {
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvDescribeResult"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender);
- SBP_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 1000));
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
ProcessSync(ev->Get());
}
void Handle(TSchemeBoardEvents::TEvUpdate::TPtr& ev) {
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvUpdate"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
- SBP_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 1000));
EnqueueUpdate(ev, true);
}
void Handle(TSchemeBoardEvents::TEvUpdateAck::TPtr& ev) {
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvUpdateAck (replica)"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
- SBP_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 1000));
if (!CheckOwner(ev) || !CheckGeneration(ev)) {
return;
@@ -313,10 +298,8 @@ class TReplicaPopulator: public TMonitorableActor<TReplicaPopulator> {
}
void Handle(TSchemeBoardEvents::TEvCommitResponse::TPtr& ev) {
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvCommitResponse"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender);
- SBP_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 1000));
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
if (!CheckOwner(ev) || !CheckGeneration(ev)) {
return;
@@ -544,18 +527,15 @@ class TPopulator: public TMonitorableActor<TPopulator> {
}
void Handle(TSchemeBoardEvents::TEvRequestDescribe::TPtr& ev) {
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvRequestDescribe"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", pathId# " << ev->Get()->PathId);
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
const TActorId replicaPopulator = ev->Sender;
const TActorId replica = ev->Get()->Replica;
if (ReplicaToReplicaPopulator[replica] != replicaPopulator) {
SBP_LOG_CRIT("Inconsistent replica populator"
- << ": self# " << SelfId()
- << ", replica# " << replica
+ << ": replica# " << replica
<< ", replicaPopulator# " << replicaPopulator);
return;
}
@@ -643,13 +623,10 @@ class TPopulator: public TMonitorableActor<TPopulator> {
}
void Handle(TSchemeBoardEvents::TEvRequestUpdate::TPtr& ev) {
- const TPathId pathId = ev->Get()->PathId;
-
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvRequestUpdate"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", pathId# " << pathId);
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
+ const TPathId pathId = ev->Get()->PathId;
THolder<TSchemeBoardEvents::TEvUpdateBuilder> update;
auto it = Descriptions.find(pathId);
@@ -665,28 +642,23 @@ class TPopulator: public TMonitorableActor<TPopulator> {
}
void DelayUpdate(NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult::TPtr& ev) {
- SBP_LOG_D("DelayUpdate TEvSchemeShard::TEvDescribeSchemeResult"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ SBP_LOG_D("DelayUpdate " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
- SBP_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 1000));
DelayedUpdates.emplace_back(ev.Release());
}
void Handle(NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResult::TPtr& ev) {
- SBP_LOG_D("Handle TEvSchemeShard::TEvDescribeSchemeResult"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
- SBP_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 1000));
auto* msg = static_cast<NSchemeShard::TEvSchemeShard::TEvDescribeSchemeResultBuilder*>(ev->Get());
auto& record = msg->Record;
if (!record.HasStatus()) {
- SBP_LOG_E("Description without status"
- << ": self# " << SelfId());
+ SBP_LOG_E("Description without status");
return;
}
@@ -695,8 +667,7 @@ class TPopulator: public TMonitorableActor<TPopulator> {
const ui64 version = isDeletion ? Max<ui64>() : GetPathVersion(record);
SBP_LOG_N("Update description"
- << ": self# " << SelfId()
- << ", owner# " << Owner
+ << ": owner# " << Owner
<< ", pathId# " << pathId
<< ", cookie# " << ev->Cookie
<< ", is deletion# " << (isDeletion ? "true" : "false"));
@@ -704,8 +675,7 @@ class TPopulator: public TMonitorableActor<TPopulator> {
if (isDeletion) {
if (!Descriptions.contains(pathId)) {
SBP_LOG_N("Immediate ack for deleted path"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie
<< ", pathId# " << pathId);
@@ -736,17 +706,14 @@ class TPopulator: public TMonitorableActor<TPopulator> {
void Handle(TSchemeBoardEvents::TEvUpdateAck::TPtr& ev) {
const auto& record = ev->Get()->Record;
- SBP_LOG_D("Handle TSchemeBoardEvents::TEvUpdateAck (main)"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
- SBP_LOG_T("Message:\n" << record.ShortDebugString());
auto it = UpdateAcks.find(ev->Cookie);
if (it == UpdateAcks.end()) {
SBP_LOG_D("Ack for unknown update (already acked?)"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
return;
}
@@ -760,8 +727,7 @@ class TPopulator: public TMonitorableActor<TPopulator> {
&& pathIt->first.second <= version) {
if (++pathIt->second > (GroupInfo->NToSelect / 2)) {
SBP_LOG_N("Ack update"
- << ": self# " << SelfId()
- << ", ack to# " << it->second.AckTo
+ << ": ack to# " << it->second.AckTo
<< ", cookie# " << ev->Cookie
<< ", pathId# " << pathId
<< ", version# " << pathIt->first.second);
@@ -784,16 +750,14 @@ class TPopulator: public TMonitorableActor<TPopulator> {
}
void Handle(TEvStateStorage::TEvListSchemeBoardResult::TPtr& ev) {
- SBP_LOG_D("Handle TEvStateStorage::TEvListSchemeBoardResult"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender);
+ SBP_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
const auto& info = ev->Get()->Info;
if (!info) {
SBP_LOG_E("Publish on unconfigured SchemeBoard"
- << ": self# " << SelfId()
- << ", StateStorage group# " << StateStorageGroup);
+ << ": StateStorage group# " << StateStorageGroup);
Become(&TThis::StateCalm);
return;
}
@@ -880,8 +844,7 @@ class TPopulator: public TMonitorableActor<TPopulator> {
void HandleUndelivered() {
SBP_LOG_E("Publish on unavailable SchemeBoard"
- << ": self# " << SelfId()
- << ", StateStorage group# " << StateStorageGroup);
+ << ": StateStorage group# " << StateStorageGroup);
Become(&TThis::StateCalm);
}
diff --git a/ydb/core/tx/scheme_board/replica.cpp b/ydb/core/tx/scheme_board/replica.cpp
index dfdd36ff18..4771206aa0 100644
--- a/ydb/core/tx/scheme_board/replica.cpp
+++ b/ydb/core/tx/scheme_board/replica.cpp
@@ -26,11 +26,11 @@
namespace NKikimr {
namespace NSchemeBoard {
-#define SBR_LOG_T(stream) SB_LOG_T(SCHEME_BOARD_REPLICA, stream)
-#define SBR_LOG_D(stream) SB_LOG_D(SCHEME_BOARD_REPLICA, stream)
-#define SBR_LOG_I(stream) SB_LOG_I(SCHEME_BOARD_REPLICA, stream)
-#define SBR_LOG_N(stream) SB_LOG_N(SCHEME_BOARD_REPLICA, stream)
-#define SBR_LOG_E(stream) SB_LOG_E(SCHEME_BOARD_REPLICA, stream)
+#define SBR_LOG_T(stream) SB_LOG_T(SCHEME_BOARD_REPLICA, "" << SelfId() << " " << stream)
+#define SBR_LOG_D(stream) SB_LOG_D(SCHEME_BOARD_REPLICA, "" << SelfId() << " " << stream)
+#define SBR_LOG_I(stream) SB_LOG_I(SCHEME_BOARD_REPLICA, "" << SelfId() << " " << stream)
+#define SBR_LOG_N(stream) SB_LOG_N(SCHEME_BOARD_REPLICA, "" << SelfId() << " " << stream)
+#define SBR_LOG_E(stream) SB_LOG_E(SCHEME_BOARD_REPLICA, "" << SelfId() << " " << stream)
class TReplica: public TMonitorableActor<TReplica> {
using TDescribeSchemeResult = NKikimrScheme::TEvDescribeSchemeResult;
@@ -53,6 +53,12 @@ class TReplica: public TMonitorableActor<TReplica> {
: Owner(owner)
{
}
+
+ TString ToString() const override {
+ return TStringBuilder() << ToStringHeader() << " {"
+ << " Owner: " << Owner
+ << " }";
+ }
};
};
@@ -226,6 +232,10 @@ public:
other.TrackMemory();
}
+ auto SelfId() const {
+ return Owner->SelfId();
+ }
+
public:
explicit TDescription(TReplica* owner, const TString& path)
: Owner(owner)
@@ -288,8 +298,7 @@ public:
TDescription(const TDescription& other) = delete;
TDescription& operator=(const TDescription& other) = delete;
- ~TDescription()
- {
+ ~TDescription() {
UntrackMemory();
}
@@ -321,13 +330,8 @@ public:
<< ", other# " << other.ToString());
SBR_LOG_T("Merge descriptions"
- << ": self# " << Owner->SelfId()
- << ", left path# " << Path
- << ", left pathId# " << PathId
- << ", left version# " << GetVersion()
- << ", rigth path# " << other.Path
- << ", rigth pathId# " << other.PathId
- << ", rigth version# " << other.GetVersion());
+ << ": self# " << ToLogString()
+ << ", other# " << other.ToLogString());
UntrackMemory();
other.UntrackMemory();
@@ -374,6 +378,15 @@ public:
<< " }";
}
+ TString ToLogString() const {
+ return TStringBuilder() << "{"
+ << " Path# " << Path
+ << " PathId# " << PathId
+ << " Version# " << GetVersion()
+ << " ExplicitlyDeleted# " << (ExplicitlyDeleted ? "true" : "false")
+ << " }";
+ }
+
const TString& GetPath() const {
return Path;
}
@@ -534,26 +547,24 @@ private:
template <typename TPath>
TDescription& UpsertDescription(const TPath& path) {
SBR_LOG_I("Upsert description"
- << ": self# " << SelfId()
- << ", path# " << path);
+ << ": path# " << path);
return Descriptions.Upsert(path, TDescription(this, path));
}
TDescription& UpsertDescription(const TString& path, const TPathId& pathId) {
SBR_LOG_I("Upsert description"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId);
return Descriptions.Upsert(path, pathId, TDescription(this, path, pathId));
}
template <typename TPath>
- TDescription& UpsertDescription(const TPath path, TDescription&& description) {
+ TDescription& UpsertDescription(const TPath& path, TDescription&& description) {
SBR_LOG_I("Upsert description"
- << ": self# " << SelfId()
- << ", path# " << path);
+ << ": path# " << path
+ << ", desc# " << description.ToLogString());
return Descriptions.Upsert(path, std::move(description));
}
@@ -564,8 +575,7 @@ private:
TDescribeSchemeResult&& describeSchemeResult
) {
SBR_LOG_I("Upsert description"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId);
return Descriptions.Upsert(path, pathId, TDescription(this, path, pathId, std::move(describeSchemeResult)));
@@ -590,8 +600,7 @@ private:
auto path = desc->GetPath();
SBR_LOG_I("Delete description"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId);
if (TDescription* descByPath = Descriptions.FindPtr(path)) {
@@ -601,10 +610,9 @@ private:
auto curDomainId = descByPath->GetDomainId();
auto domainId = desc->GetDomainId();
- if (curDomainId == pathId) { //Deletion from GSS
+ if (curDomainId == pathId) { // Deletion from GSS
SBR_LOG_N("Delete description by GSS"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId
<< ", domainId# " << domainId
<< ", curPathId# " << curPathId
@@ -660,9 +668,8 @@ private:
TDescription* desc = Descriptions.FindPtr(path);
Y_VERIFY(desc);
- SBR_LOG_N("Subscribe"
- << ": self# " << SelfId()
- << ", subscriber# " << subscriber
+ SBR_LOG_I("Subscribe"
+ << ": subscriber# " << subscriber
<< ", path# " << path
<< ", domainOwnerId# " << domainOwnerId
<< ", capabilities# " << capabilities.ShortDebugString());
@@ -679,9 +686,8 @@ private:
TDescription* desc = Descriptions.FindPtr(path);
Y_VERIFY(desc);
- SBR_LOG_N("Unsubscribe"
- << ": self# " << SelfId()
- << ", subscriber# " << subscriber
+ SBR_LOG_I("Unsubscribe"
+ << ": subscriber# " << subscriber
<< ", path# " << path);
desc->Unsubscribe(subscriber);
@@ -770,22 +776,17 @@ private:
}
void Handle(TSchemeBoardEvents::TEvHandshakeRequest::TPtr& ev) {
- const auto& record = ev->Get()->Record;
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
+ const auto& record = ev->Get()->Record;
const ui64 owner = record.GetOwner();
const ui64 generation = record.GetGeneration();
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvHandshakeRequest"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", owner# " << owner
- << ", generation# " << generation);
-
TPopulatorInfo& info = Populators[owner];
if (generation < info.PendingGeneration) {
SBR_LOG_E("Reject handshake from stale populator"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", owner# " << owner
<< ", generation# " << generation
<< ", pending generation# " << info.PendingGeneration);
@@ -793,8 +794,7 @@ private:
}
SBR_LOG_N("Successful handshake"
- << ": self# " << SelfId()
- << ", owner# " << owner
+ << ": owner# " << owner
<< ", generation# " << generation);
info.PendingGeneration = generation;
@@ -804,32 +804,25 @@ private:
}
void Handle(TSchemeBoardEvents::TEvUpdate::TPtr& ev) {
- auto& record = *ev->Get()->MutableRecord();
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
+ << ", cookie# " << ev->Cookie);
+ auto& record = *ev->Get()->MutableRecord();
const ui64 owner = record.GetOwner();
const ui64 generation = record.GetGeneration();
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvUpdate"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", cookie# " << ev->Cookie
- << ", owner# " << owner
- << ", generation# " << generation);
- SBR_LOG_T("Message:\n" << ev->Get()->ToString().substr(0, 10000));
-
const auto populatorIt = Populators.find(owner);
if (populatorIt == Populators.end()) {
SBR_LOG_E("Reject update from unknown populator"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", owner# " << owner
<< ", generation# " << generation);
return;
}
if (generation != populatorIt->second.PendingGeneration) {
SBR_LOG_E("Reject update from stale populator"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", owner# " << owner
<< ", generation# " << generation
<< ", pending generation# " << populatorIt->second.PendingGeneration);
@@ -850,8 +843,7 @@ private:
const TPathId pathId = ev->Get()->GetPathId();
SBR_LOG_N("Update description"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId
<< ", deletion# " << (record.GetIsDeletion() ? "true" : "false"));
@@ -863,8 +855,7 @@ private:
if (TDescription* desc = Descriptions.FindPtr(pathId)) {
if (desc->IsExplicitlyDeleted()) {
SBR_LOG_N("Path was explicitly deleted, ignoring"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId);
return AckUpdate(ev);
@@ -899,97 +890,64 @@ private:
return AckUpdate(ev);
}
- Y_VERIFY_S(desc->IsFilled(), "desc :"
- << ": path# " << desc->GetPath()
- << ", pathId# " << desc->GetPathId()
- << ", domainId# " << desc->GetDomainId()
- << ", version# " << desc->GetVersion());
+ Y_VERIFY_S(desc->IsFilled(), "Description is not filled"
+ << ": desc# " << desc->ToLogString());
auto curDomainId = desc->GetDomainId();
auto domainId = GetDomainId(record.GetDescribeSchemeResult());
- if (curPathId == domainId) { //Update from TSS, GSS->TSS
+ auto log = [&](const TString& message) {
+ SBR_LOG_N("" << message
+ << ": path# " << path
+ << ", pathId# " << pathId
+ << ", domainId# " << domainId
+ << ", curPathId# " << curPathId
+ << ", curDomainId# " << curDomainId);
+ };
+ if (curPathId == domainId) { // Update from TSS, GSS->TSS
// it is only because we need to manage undo of upgrade subdomain, finally remove it
auto abandonedSchemeShards = desc->GetAbandonedSchemeShardIds();
- if (abandonedSchemeShards.contains(pathId.OwnerId)) { //TSS is ignored, present GSS reverted it
- SBR_LOG_N("Replace GSS by TSS description is rejected, GSS implicitly knows that TSS has been reverted"
- ", but still inject description only by pathId for safe"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
+ if (abandonedSchemeShards.contains(pathId.OwnerId)) { // TSS is ignored, present GSS reverted it
+ log("Replace GSS by TSS description is rejected, GSS implicitly knows that TSS has been reverted"
+ ", but still inject description only by pathId for safe");
UpsertDescription(pathId, TDescription(this, path, pathId, std::move(*record.MutableDescribeSchemeResult())));
return AckUpdate(ev);
}
- SBR_LOG_N("Replace GSS by TSS description"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
- //unlick GSS desc by path
+ log("Replace GSS by TSS description");
+ // unlick GSS desc by path
Descriptions.DeleteIndex(path);
RelinkSubscribers(desc, path);
UpsertDescription(path, pathId, std::move(*record.MutableDescribeSchemeResult()));
return AckUpdate(ev);
}
- if (curDomainId == pathId) { //Update from GSS, TSS->GSS
-
+ if (curDomainId == pathId) { // Update from GSS, TSS->GSS
// it is only because we need to manage undo of upgrade subdomain, finally remove it
auto abandonedSchemeShards = GetAbandonedSchemeShardIds(record.GetDescribeSchemeResult());
- if (abandonedSchemeShards.contains(curPathId.OwnerId)) { //GSS reverts TSS
- SBR_LOG_N("Replace TSS by GSS description, TSS was implicitly reverted by GSS"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
- //unlick TSS desc by path
+ if (abandonedSchemeShards.contains(curPathId.OwnerId)) { // GSS reverts TSS
+ log("Replace TSS by GSS description, TSS was implicitly reverted by GSS");
+ // unlick TSS desc by path
Descriptions.DeleteIndex(path);
RelinkSubscribers(desc, path);
UpsertDescription(path, pathId, std::move(*record.MutableDescribeSchemeResult()));
return AckUpdate(ev);
}
- SBR_LOG_N("Inject description only by pathId, it is update from GSS"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
+ log("Inject description only by pathId, it is update from GSS");
UpsertDescription(pathId, TDescription(this, path, pathId, std::move(*record.MutableDescribeSchemeResult())));
return AckUpdate(ev);
}
if (curDomainId == domainId) {
if (curPathId > pathId) {
- SBR_LOG_N("Totally ignore description, path with obsolete pathId"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
+ log("Totally ignore description, path with obsolete pathId");
return AckUpdate(ev);
}
if (curPathId < pathId) {
- SBR_LOG_N("Update description by newest path form tenant schemeshard"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
-
+ log("Update description by newest path form tenant schemeshard");
SoftDeleteDescription(desc->GetPathId());
Descriptions.DeleteIndex(path);
RelinkSubscribers(desc, path);
@@ -998,31 +956,18 @@ private:
UpsertDescription(path, pathId, std::move(*record.MutableDescribeSchemeResult()));
return AckUpdate(ev);
} else if (curDomainId < domainId) {
- SBR_LOG_N("Update description by newest path with newer domainId"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
+ log("Update description by newest path with newer domainId");
Descriptions.DeleteIndex(path);
RelinkSubscribers(desc, path);
UpsertDescription(path, pathId, std::move(*record.MutableDescribeSchemeResult()));
return AckUpdate(ev);
} else {
- SBR_LOG_N("Totally ignore description, path with obsolete domainId"
- << ": self# " << SelfId()
- << ", path# " << path
- << ", pathId# " << pathId
- << ", domainId# " << domainId
- << ", curPathId# " << curPathId
- << ", curDomainId# " << curDomainId);
+ log("Totally ignore description, path with obsolete domainId");
return AckUpdate(ev);
}
Y_FAIL_S("Can't insert old description, no relation between obj"
- << ": self# " << SelfId()
- << ", path# " << path
+ << ": path# " << path
<< ", pathId# " << pathId
<< ", domainId# " << domainId
<< ", curPathId# " << curPathId
@@ -1030,22 +975,17 @@ private:
}
void Handle(TSchemeBoardEvents::TEvCommitRequest::TPtr& ev) {
- const auto& record = ev->Get()->Record;
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
+ const auto& record = ev->Get()->Record;
const ui64 owner = record.GetOwner();
const ui64 generation = record.GetGeneration();
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvCommitRequest"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", owner# " << owner
- << ", generation# " << generation);
-
auto it = Populators.find(owner);
if (it == Populators.end()) {
SBR_LOG_E("Reject commit from unknown populator"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", owner# " << owner
<< ", generation# " << generation);
return;
@@ -1054,8 +994,7 @@ private:
TPopulatorInfo& info = it->second;
if (generation != info.PendingGeneration) {
SBR_LOG_E("Reject commit from stale populator"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
+ << ": sender# " << ev->Sender
<< ", owner# " << owner
<< ", generation# " << generation
<< ", pending generation# " << info.PendingGeneration);
@@ -1063,8 +1002,7 @@ private:
}
SBR_LOG_N("Commit generation"
- << ": self# " << SelfId()
- << ", owner# " << owner
+ << ": owner# " << owner
<< ", generation# " << generation);
info.Generation = info.PendingGeneration;
@@ -1076,25 +1014,19 @@ private:
}
void Handle(TEvPrivate::TEvSendStrongNotifications::TPtr& ev) {
- const auto limit = ev->Get()->BatchSize;
- const auto owner = ev->Get()->Owner;
-
- SBR_LOG_D("Handle TEvPrivate::TEvSendStrongNotifications"
- << ": self# " << SelfId()
- << ", owner# " << owner);
+ SBR_LOG_D("Handle " << ev->Get()->ToString());
+ const auto owner = ev->Get()->Owner;
if (!IsPopulatorCommited(owner)) {
SBR_LOG_N("Populator is not commited"
- << ": self# " << SelfId()
- << ", owner# " << owner);
+ << ": owner# " << owner);
return;
}
auto itSubscribers = WaitStrongNotifications.find(owner);
if (itSubscribers == WaitStrongNotifications.end()) {
SBR_LOG_E("Invalid owner"
- << ": self# " << SelfId()
- << ", owner# " << owner);
+ << ": owner# " << owner);
return;
}
@@ -1102,6 +1034,7 @@ private:
auto it = subscribers.begin();
ui32 count = 0;
+ const auto limit = ev->Get()->BatchSize;
while (count++ < limit && it != subscribers.end()) {
const TActorId subscriber = *it;
it = subscribers.erase(it);
@@ -1141,15 +1074,12 @@ private:
void Handle(TSchemeBoardEvents::TEvSubscribe::TPtr& ev) {
const auto& record = ev->Get()->Record;
-
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvSubscribe"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", record# " << record.ShortDebugString());
-
const ui64 domainOwnerId = record.GetDomainOwnerId();
const auto& capabilities = record.GetCapabilities();
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
+
if (record.HasPath()) {
SubscribeBy(ev->Sender, record.GetPath(), domainOwnerId, capabilities);
} else {
@@ -1161,10 +1091,8 @@ private:
void Handle(TSchemeBoardEvents::TEvUnsubscribe::TPtr& ev) {
const auto& record = ev->Get()->Record;
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvUnsubscribe"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", record# " << record.ShortDebugString());
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
if (record.HasPath()) {
UnsubscribeBy(ev->Sender, record.GetPath());
@@ -1177,10 +1105,8 @@ private:
void Handle(TSchemeBoardEvents::TEvNotifyAck::TPtr& ev) {
const auto& record = ev->Get()->Record;
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvNotifyAck"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", record# " << record.ShortDebugString());
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
auto it = Subscribers.find(ev->Sender);
if (it == Subscribers.end()) {
@@ -1217,11 +1143,9 @@ private:
void Handle(TSchemeBoardEvents::TEvSyncVersionRequest::TPtr& ev) {
const auto& record = ev->Get()->Record;
- SBR_LOG_D("Handle TSchemeBoardEvents::TEvSyncVersionRequest"
- << ": self# " << SelfId()
- << ", sender# " << ev->Sender
- << ", cookie# " << ev->Cookie
- << ", record# " << record.ShortDebugString());
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender
+ << ", cookie# " << ev->Cookie);
auto it = Subscribers.find(ev->Sender);
if (it == Subscribers.end()) {
@@ -1330,9 +1254,8 @@ private:
void Handle(TEvInterconnect::TEvNodeDisconnected::TPtr& ev) {
const ui32 nodeId = ev->Get()->NodeId;
- SBR_LOG_D("Handle TEvInterconnect::TEvNodeDisconnected"
- << ": self# " << SelfId()
- << ", nodeId# " << nodeId);
+ SBR_LOG_D("Handle " << ev->Get()->ToString()
+ << ": nodeId# " << nodeId);
auto it = Subscribers.lower_bound(TActorId(nodeId, 0, 0, 0));
while (it != Subscribers.end() && it->first.NodeId() == nodeId) {
diff --git a/ydb/core/tx/scheme_board/subscriber.cpp b/ydb/core/tx/scheme_board/subscriber.cpp
index 70f6909a69..840a842796 100644
--- a/ydb/core/tx/scheme_board/subscriber.cpp
+++ b/ydb/core/tx/scheme_board/subscriber.cpp
@@ -28,12 +28,12 @@ using EDeletionPolicy = ESchemeBoardSubscriberDeletionPolicy;
namespace NSchemeBoard {
-#define SBS_LOG_T(stream) SB_LOG_T(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "] " << this->SelfId() << " [" << Path << "] " << stream)
-#define SBS_LOG_D(stream) SB_LOG_D(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "] " << this->SelfId() << " [" << Path << "] " << stream)
-#define SBS_LOG_I(stream) SB_LOG_I(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "] " << this->SelfId() << " [" << Path << "] " << stream)
-#define SBS_LOG_N(stream) SB_LOG_N(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "] " << this->SelfId() << " [" << Path << "] " << stream)
-#define SBS_LOG_W(stream) SB_LOG_W(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "] " << this->SelfId() << " [" << Path << "] " << stream)
-#define SBS_LOG_E(stream) SB_LOG_E(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "] " << this->SelfId() << " [" << Path << "] " << stream)
+#define SBS_LOG_T(stream) SB_LOG_T(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "]" << this->SelfId() << "[" << Path << "] " << stream)
+#define SBS_LOG_D(stream) SB_LOG_D(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "]" << this->SelfId() << "[" << Path << "] " << stream)
+#define SBS_LOG_I(stream) SB_LOG_I(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "]" << this->SelfId() << "[" << Path << "] " << stream)
+#define SBS_LOG_N(stream) SB_LOG_N(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "]" << this->SelfId() << "[" << Path << "] " << stream)
+#define SBS_LOG_W(stream) SB_LOG_W(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "]" << this->SelfId() << "[" << Path << "] " << stream)
+#define SBS_LOG_E(stream) SB_LOG_E(SCHEME_BOARD_SUBSCRIBER, "[" << LogPrefix() << "]" << this->SelfId() << "[" << Path << "] " << stream)
namespace {
@@ -225,8 +225,8 @@ namespace {
// it is only because we need to manage undo of upgrade subdomain, finally remove it
- if (Version.PathId == other.DomainId) { //Update from TSS, GSS->TSS
- if (AbandonedSchemeShards.contains(other.Version.PathId.OwnerId)) { //TSS is ignored, present GSS reverted that TSS
+ if (Version.PathId == other.DomainId) { // Update from TSS, GSS->TSS
+ if (AbandonedSchemeShards.contains(other.Version.PathId.OwnerId)) { // TSS is ignored, present GSS reverted that TSS
reason = "Update was ignored, GSS implisytly banned that TSS";
return false;
}
@@ -235,8 +235,8 @@ namespace {
return true;
}
- if (DomainId == other.Version.PathId) { //Update from GSS, TSS->GSS
- if (other.AbandonedSchemeShards.contains(Version.PathId.OwnerId)) { //GSS reverts TSS
+ if (DomainId == other.Version.PathId) { // Update from GSS, TSS->GSS
+ if (other.AbandonedSchemeShards.contains(Version.PathId.OwnerId)) { // GSS reverts TSS
reason = "Path was updated as a replacement from GSS, GSS implicitly reverts TSS";
return true;
}
@@ -294,17 +294,14 @@ class TReplicaSubscriber: public TMonitorableActor<TDerived> {
void Handle(TSchemeBoardEvents::TEvNotify::TPtr& ev) {
auto& record = *ev->Get()->MutableRecord();
- SBS_LOG_D("Handle TSchemeBoardEvents::TEvNotify"
+ SBS_LOG_D("Handle " << ev->Get()->ToString()
<< ": sender# " << ev->Sender);
- SBS_LOG_T("Message:\n" << record.ShortDebugString());
this->Send(ev->Sender, new TSchemeBoardEvents::TEvNotifyAck(record.GetVersion()));
if (!IsValidNotification(Path, record)) {
- SBS_LOG_E("Suspicious notification"
- << ": sender# " << ev->Sender
- << ", other path# " << record.GetPath()
- << ", other pathId# " << TPathId(record.GetPathOwnerId(), record.GetLocalPathId()));
+ SBS_LOG_E("Suspicious " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
return;
}
@@ -312,7 +309,7 @@ class TReplicaSubscriber: public TMonitorableActor<TDerived> {
}
void Handle(TSchemeBoardEvents::TEvSyncVersionRequest::TPtr& ev) {
- SBS_LOG_D("Handle TSchemeBoardEvents::TEvSyncVersionRequest"
+ SBS_LOG_D("Handle " << ev->Get()->ToString()
<< ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
@@ -321,7 +318,7 @@ class TReplicaSubscriber: public TMonitorableActor<TDerived> {
}
void Handle(TSchemeBoardEvents::TEvSyncVersionResponse::TPtr& ev) {
- SBS_LOG_D("Handle TSchemeBoardEvents::TEvSyncVersionResponse"
+ SBS_LOG_D("Handle " << ev->Get()->ToString()
<< ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
@@ -726,15 +723,12 @@ class TSubscriber: public TMonitorableActor<TDerived> {
void Handle(TSchemeBoardEvents::TEvNotify::TPtr& ev) {
auto& record = *ev->Get()->MutableRecord();
- SBS_LOG_D("Handle TSchemeBoardEvents::TEvNotify"
+ SBS_LOG_D("Handle " << ev->Get()->ToString()
<< ": sender# " << ev->Sender);
- SBS_LOG_T("Message:\n" << record.ShortDebugString());
if (!IsValidNotification(Path, record)) {
- SBS_LOG_E("Suspicious notification"
- << ": sender# " << ev->Sender
- << ", other path# " << record.GetPath()
- << ", other pathId# " << TPathId(record.GetPathOwnerId(), record.GetLocalPathId()));
+ SBS_LOG_E("Suspicious " << ev->Get()->ToString()
+ << ": sender# " << ev->Sender);
return;
}
@@ -785,12 +779,12 @@ class TSubscriber: public TMonitorableActor<TDerived> {
}
void Handle(TSchemeBoardEvents::TEvSyncRequest::TPtr& ev) {
- SBS_LOG_D("Handle TSchemeBoardEvents::TEvSyncRequest"
+ SBS_LOG_D("Handle " << ev->Get()->ToString()
<< ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
if (ev->Sender != Owner) {
- SBS_LOG_W("Suspicious sync version request"
+ SBS_LOG_W("Suspicious " << ev->Get()->ToString()
<< ": sender# " << ev->Sender
<< ", owner# " << Owner);
return;
@@ -806,7 +800,7 @@ class TSubscriber: public TMonitorableActor<TDerived> {
}
void Handle(TSchemeBoardEvents::TEvSyncVersionResponse::TPtr& ev) {
- SBS_LOG_D("Handle TSchemeBoardEvents::TEvSyncVersionResponse"
+ SBS_LOG_D("Handle " << ev->Get()->ToString()
<< ": sender# " << ev->Sender
<< ", cookie# " << ev->Cookie);
@@ -876,7 +870,7 @@ class TSubscriber: public TMonitorableActor<TDerived> {
}
void Handle(TEvStateStorage::TEvResolveReplicasList::TPtr& ev) {
- SBS_LOG_D("Handle TEvStateStorage::TEvResolveReplicasList");
+ SBS_LOG_D("Handle " << ev->Get()->ToString());
const auto& replicas = ev->Get()->Replicas;
diff --git a/ydb/core/tx/scheme_cache/scheme_cache.h b/ydb/core/tx/scheme_cache/scheme_cache.h
index 4786dd0887..d8a174d221 100644
--- a/ydb/core/tx/scheme_cache/scheme_cache.h
+++ b/ydb/core/tx/scheme_cache/scheme_cache.h
@@ -264,7 +264,7 @@ struct TSchemeCacheNavigate {
using TResultSet = TVector<TEntry>;
TResultSet ResultSet;
- TAutoPtr<const NACLib::TUserToken> UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TString DatabaseName;
ui64 DomainOwnerId = 0;
ui64 ErrorCount = 0;
@@ -335,7 +335,7 @@ struct TSchemeCacheRequest {
using TResultSet = TVector<TEntry>;
TResultSet ResultSet;
- TAutoPtr<const NACLib::TUserToken> UserToken;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TString DatabaseName;
ui64 DomainOwnerId = 0;
ui64 ErrorCount = 0;
diff --git a/ydb/core/tx/schemeshard/CMakeLists.darwin.txt b/ydb/core/tx/schemeshard/CMakeLists.darwin.txt
index b5c3ab6270..2c2f31c9bd 100644
--- a/ydb/core/tx/schemeshard/CMakeLists.darwin.txt
+++ b/ydb/core/tx/schemeshard/CMakeLists.darwin.txt
@@ -189,6 +189,7 @@ target_sources(core-tx-schemeshard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__publish_to_scheme_board.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__state_changed_reply.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
@@ -197,8 +198,10 @@ target_sources(core-tx-schemeshard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__upgrade_access_database.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__make_access_database_no_inheritable.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_audit_log.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_domain_links.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_effective_acl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_identificators.cpp
diff --git a/ydb/core/tx/schemeshard/CMakeLists.linux-aarch64.txt b/ydb/core/tx/schemeshard/CMakeLists.linux-aarch64.txt
index 6995ad9351..6e714991fc 100644
--- a/ydb/core/tx/schemeshard/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/tx/schemeshard/CMakeLists.linux-aarch64.txt
@@ -190,6 +190,7 @@ target_sources(core-tx-schemeshard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__publish_to_scheme_board.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__state_changed_reply.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
@@ -198,8 +199,10 @@ target_sources(core-tx-schemeshard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__upgrade_access_database.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__make_access_database_no_inheritable.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_audit_log.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_domain_links.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_effective_acl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_identificators.cpp
diff --git a/ydb/core/tx/schemeshard/CMakeLists.linux.txt b/ydb/core/tx/schemeshard/CMakeLists.linux.txt
index 6995ad9351..6e714991fc 100644
--- a/ydb/core/tx/schemeshard/CMakeLists.linux.txt
+++ b/ydb/core/tx/schemeshard/CMakeLists.linux.txt
@@ -190,6 +190,7 @@ target_sources(core-tx-schemeshard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__publish_to_scheme_board.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__state_changed_reply.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
@@ -198,8 +199,10 @@ target_sources(core-tx-schemeshard PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__upgrade_access_database.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard__make_access_database_no_inheritable.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_audit_log.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_impl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_domain_links.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_effective_acl.cpp
${CMAKE_SOURCE_DIR}/ydb/core/tx/schemeshard/schemeshard_identificators.cpp
diff --git a/ydb/core/tx/schemeshard/operation_queue_timer.h b/ydb/core/tx/schemeshard/operation_queue_timer.h
index 37da4095d7..794c936866 100644
--- a/ydb/core/tx/schemeshard/operation_queue_timer.h
+++ b/ydb/core/tx/schemeshard/operation_queue_timer.h
@@ -19,14 +19,14 @@ namespace NKikimr {
// TODO: make part of util?
namespace NOperationQueue {
-template <typename T, typename TQueue, int Ev, int LogServiceId>
+template <typename T, typename TQueue, int Ev, int LogServiceId, ui32 ActivityType>
class TOperationQueueWithTimer
- : public TActor<TOperationQueueWithTimer<T, TQueue, Ev, LogServiceId>>
+ : public TActor<TOperationQueueWithTimer<T, TQueue, Ev, LogServiceId, ActivityType>>
, public ITimer
, public TOperationQueue<T, TQueue>
{
- using TThis = ::NKikimr::NOperationQueue::TOperationQueueWithTimer<T, TQueue, Ev, LogServiceId>;
- using TActorBase = TActor<TOperationQueueWithTimer<T, TQueue, Ev, LogServiceId>>;
+ using TThis = ::NKikimr::NOperationQueue::TOperationQueueWithTimer<T, TQueue, Ev, LogServiceId, ActivityType>;
+ using TActorBase = TActor<TOperationQueueWithTimer<T, TQueue, Ev, LogServiceId, ActivityType>>;
using TBase = TOperationQueue<T, TQueue>;
struct TEvWakeupQueue : public TEventLocal<TEvWakeupQueue, Ev> {
@@ -53,6 +53,10 @@ public:
, TBase(config, queueConfig, starter, *this)
{}
+ static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
+ return NKikimrServices::TActivity::EType(ActivityType);
+ }
+
void Shutdown(const TActorContext &ctx) {
if (LongTimerId)
ctx.Send(LongTimerId, new TEvents::TEvPoison);
@@ -72,7 +76,8 @@ private:
When = this->Now() + delta;
auto ctx = TActivationContext::ActorContextFor(TActorBase::SelfId());
LongTimerId = CreateLongTimer(ctx, delta,
- new IEventHandle(TActorBase::SelfId(), TActorBase::SelfId(), new TEvWakeupQueue));
+ new IEventHandle(TActorBase::SelfId(), TActorBase::SelfId(), new TEvWakeupQueue),
+ AppData(ctx)->UserPoolId);
LOG_DEBUG_S(ctx, ServiceId,
"Operation queue set wakeup after delta# " << delta.Seconds() << " seconds");
diff --git a/ydb/core/tx/schemeshard/schemeshard.h b/ydb/core/tx/schemeshard/schemeshard.h
index 0f6ccf5049..ef07d4412a 100644
--- a/ydb/core/tx/schemeshard/schemeshard.h
+++ b/ydb/core/tx/schemeshard/schemeshard.h
@@ -58,6 +58,7 @@ struct TEvSchemeShard {
EvDescribeSchemeResult,
EvFindTabletSubDomainPathId,
EvFindTabletSubDomainPathIdResult,
+ EvSubDomainPathIdFound,
EvInitRootShard = EvModifySchemeTransaction + 5 * 512,
EvInitRootShardResult,
@@ -595,6 +596,18 @@ struct TEvSchemeShard {
}
};
+ struct TEvSubDomainPathIdFound : public TEventLocal<TEvSubDomainPathIdFound, EvSubDomainPathIdFound> {
+ TEvSubDomainPathIdFound(ui64 schemeShardId, ui64 localPathId)
+ : SchemeShardId(schemeShardId)
+ , LocalPathId(localPathId)
+ { }
+
+ const ui64 SchemeShardId;
+ const ui64 LocalPathId;
+ };
+
+
+
struct TEvLogin : TEventPB<TEvLogin, NKikimrScheme::TEvLogin, EvLogin> {
TEvLogin() = default;
};
@@ -608,6 +621,7 @@ struct TEvSchemeShard {
IActor* CreateFlatTxSchemeShard(const TActorId &tablet, TTabletStorageInfo *info);
bool PartitionConfigHasExternalBlobsEnabled(const NKikimrSchemeOp::TPartitionConfig &partitionConfig);
+IActor* CreateFindSubDomainPathIdActor(const TActorId& parent, ui64 tabletId, ui64 schemeShardId, bool delayFirstRequest, TDuration maxFindSubDomainPathIdDelay = TDuration::Minutes(10));
}
template<>
diff --git a/ydb/core/tx/schemeshard/schemeshard__find_subdomain_path_id.cpp b/ydb/core/tx/schemeshard/schemeshard__find_subdomain_path_id.cpp
index 5ae559ad6e..b6550abf75 100644
--- a/ydb/core/tx/schemeshard/schemeshard__find_subdomain_path_id.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__find_subdomain_path_id.cpp
@@ -62,5 +62,123 @@ void TSchemeShard::Handle(TEvSchemeShard::TEvFindTabletSubDomainPathId::TPtr& ev
Execute(new TTxFindTabletSubDomainPathId(this, ev), ctx);
}
+
+/**
+ * It is client for SchemeShard TEvFindTabletSubDomainPathId event.
+ *
+ * Allows you to time-distribute a large number of requests from Topics and DataShared actors during a cluster reboot.
+ */
+class TFindSubDomainPathIdActor : public TActorBootstrapped<TFindSubDomainPathIdActor> {
+ using TBase = TActorBootstrapped<TFindSubDomainPathIdActor>;
+
+public:
+ TFindSubDomainPathIdActor(const TActorId& parent, ui64 tabletId, ui64 schemeShardId, bool delayFirstRequest, TDuration maxFindSubDomainPathIdDelay)
+ : Parent(parent)
+ , TabletId(tabletId)
+ , SchemeShardId(schemeShardId)
+ , DelayNextRequest(delayFirstRequest)
+ , MaxFindSubDomainPathIdDelay(maxFindSubDomainPathIdDelay)
+ { }
+
+ void Bootstrap() {
+ if (DelayNextRequest) {
+ // Wait up to a large delay, so requests from shards spread over time
+ auto delay = TDuration::MicroSeconds(RandomNumber(MaxFindSubDomainPathIdDelay.MicroSeconds()));
+ Timer = CreateLongTimer(TActivationContext::AsActorContext(), delay,
+ new IEventHandle(SelfId(), SelfId(), new TEvents::TEvWakeup));
+ Become(&TThis::StateSleep);
+ } else {
+ DelayNextRequest = true;
+ WakeUp();
+ }
+ }
+
+ void PassAway() override {
+ if (Timer) {
+ Send(Timer, new TEvents::TEvPoison);
+ }
+ NTabletPipe::CloseAndForgetClient(SelfId(), SchemeShardPipe);
+ TBase::PassAway();
+ }
+
+private:
+ STFUNC(StateSleep) {
+ Y_UNUSED(ctx);
+ switch (ev->GetTypeRewrite()) {
+ sFunc(TEvents::TEvPoison, PassAway);
+ sFunc(TEvents::TEvWakeup, WakeUp);
+ }
+ }
+
+ void WakeUp() {
+ Timer = { };
+ SchemeShardPipe = Register(NTabletPipe::CreateClient(SelfId(), SchemeShardId));
+ NTabletPipe::SendData(SelfId(), SchemeShardPipe,
+ new NSchemeShard::TEvSchemeShard::TEvFindTabletSubDomainPathId(TabletId));
+ Become(&TThis::StateWork);
+ }
+
+private:
+ STFUNC(StateWork) {
+ Y_UNUSED(ctx);
+ switch (ev->GetTypeRewrite()) {
+ sFunc(TEvents::TEvPoison, PassAway);
+ hFunc(TEvTabletPipe::TEvClientConnected, Handle);
+ hFunc(TEvTabletPipe::TEvClientDestroyed, Handle);
+ hFunc(NSchemeShard::TEvSchemeShard::TEvFindTabletSubDomainPathIdResult, Handle);
+ }
+ }
+
+ void Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev) {
+ const auto* msg = ev->Get();
+
+ if (msg->Status != NKikimrProto::OK) {
+ // We could not connect to schemeshard, try again
+ SchemeShardPipe = { };
+ Bootstrap();
+ return;
+ }
+ }
+
+ void Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev) {
+ const auto* msg = ev->Get();
+
+ if (msg->ClientId == SchemeShardPipe) {
+ // We lost connection to schemeshard, try again
+ SchemeShardPipe = { };
+ Bootstrap();
+ return;
+ }
+ }
+
+ void Handle(NSchemeShard::TEvSchemeShard::TEvFindTabletSubDomainPathIdResult::TPtr& ev) {
+ const auto* msg = ev->Get();
+
+ if (msg->Record.GetStatus() != NKikimrScheme::TEvFindTabletSubDomainPathIdResult::SUCCESS) {
+ // The request failed for some reason, we just stop trying in that case
+ PassAway();
+ return;
+ }
+
+ Send(Parent, new NSchemeShard::TEvSchemeShard::TEvSubDomainPathIdFound(msg->Record.GetSchemeShardId(), msg->Record.GetSubDomainPathId()));
+ PassAway();
+ }
+
+private:
+ const TActorId Parent;
+ const ui64 TabletId;
+ const ui64 SchemeShardId;
+ bool DelayNextRequest;
+ TActorId Timer;
+ TActorId SchemeShardPipe;
+ TDuration MaxFindSubDomainPathIdDelay;
+};
+
+
} // namespace NSchemeShard
+
+IActor* CreateFindSubDomainPathIdActor(const TActorId& parent, ui64 tabletId, ui64 schemeShardId, bool delayFirstRequest, TDuration maxFindSubDomainPathIdDelay) {
+ return new NSchemeShard::TFindSubDomainPathIdActor(parent, tabletId, schemeShardId, delayFirstRequest, maxFindSubDomainPathIdDelay);
+}
+
} // namespace NKikimr
diff --git a/ydb/core/tx/schemeshard/schemeshard__init.cpp b/ydb/core/tx/schemeshard/schemeshard__init.cpp
index 734335427d..6447ebd13f 100644
--- a/ydb/core/tx/schemeshard/schemeshard__init.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__init.cpp
@@ -3,6 +3,7 @@
#include <ydb/core/scheme/scheme_types_proto.h>
#include <ydb/core/tablet/tablet_exception.h>
#include <ydb/core/tablet_flat/flat_cxx_database.h>
+#include <ydb/core/tx/schemeshard/schemeshard_utils.h>
#include <ydb/core/util/pb.h>
namespace NKikimr {
@@ -19,6 +20,7 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
TDeque<TPathId> BlockStoreVolumesToClean;
TVector<ui64> ExportsToResume;
TVector<ui64> ImportsToResume;
+ THashMap<TPathId, TVector<TPathId>> CdcStreamScansToResume;
bool Broken = false;
explicit TTxInit(TSelf *self)
@@ -1534,7 +1536,7 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
if (row.IsValid()) {
version = row.GetValue<Schema::SubDomains::AlterVersion>();
rootLimits.MaxDepth = row.GetValueOrDefault<Schema::SubDomains::DepthLimit>(rootLimits.MaxDepth);
- rootLimits.MaxPaths = row.GetValueOrDefault<Schema::SubDomains::PathsLimit>(rootLimits.MaxPaths);
+ rootLimits.MaxPaths = row.GetValueOrDefault<Schema::SubDomains::PathsLimit>(rootLimits.MaxPathsCompat);
rootLimits.MaxChildrenInDir = row.GetValueOrDefault<Schema::SubDomains::ChildrenLimit>(rootLimits.MaxChildrenInDir);
rootLimits.MaxAclBytesSize = row.GetValueOrDefault<Schema::SubDomains::AclByteSizeLimit>(rootLimits.MaxAclBytesSize);
rootLimits.MaxTableColumns = row.GetValueOrDefault<Schema::SubDomains::TableColumnsLimit>(rootLimits.MaxTableColumns);
@@ -2305,7 +2307,7 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
TLocalPathId localPathId = rowset.GetValue<Schema::PersQueueGroups::PathId>();
TPathId pathId(selfId, localPathId);
- TPersQueueGroupInfo::TPtr pqGroup = new TPersQueueGroupInfo();
+ TTopicInfo::TPtr pqGroup = new TTopicInfo();
pqGroup->TabletConfig = rowset.GetValue<Schema::PersQueueGroups::TabletConfig>();
pqGroup->MaxPartsPerTablet = rowset.GetValue<Schema::PersQueueGroups::MaxPQPerShard>();
pqGroup->AlterVersion = rowset.GetValue<Schema::PersQueueGroups::AlterVersion>();
@@ -2315,7 +2317,7 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
const bool ok = pqGroup->FillKeySchema(pqGroup->TabletConfig);
Y_VERIFY(ok);
- Self->PersQueueGroups[pathId] = pqGroup;
+ Self->Topics[pathId] = pqGroup;
Self->IncrementPathDbRefCount(pathId);
auto it = pqBalancers.find(pathId);
@@ -2338,7 +2340,7 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
if (!rowset.IsReady())
return false;
while (!rowset.EndOfSet()) {
- TPQShardInfo::TPersQueueInfo pqInfo;
+ TTopicTabletInfo::TTopicPartitionInfo pqInfo;
TLocalPathId localPathId = rowset.GetValue<Schema::PersQueues::PathId>();
TPathId pathId(selfId, localPathId);
pqInfo.PqId = rowset.GetValue<Schema::PersQueues::PqId>();
@@ -2363,10 +2365,10 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
pqInfo.KeyRange->ToBound = rowset.GetValue<Schema::PersQueues::RangeEnd>();
}
- auto it = Self->PersQueueGroups.find(pathId);
- Y_VERIFY(it != Self->PersQueueGroups.end());
+ auto it = Self->Topics.find(pathId);
+ Y_VERIFY(it != Self->Topics.end());
Y_VERIFY(it->second);
- TPersQueueGroupInfo::TPtr pqGroup = it->second;
+ TTopicInfo::TPtr pqGroup = it->second;
if (pqInfo.AlterVersion <= pqGroup->AlterVersion)
++pqGroup->TotalPartitionCount;
if (pqInfo.PqId >= pqGroup->NextPartitionId) {
@@ -2374,11 +2376,11 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
pqGroup->TotalGroupCount = pqInfo.PqId + 1;
}
- TPQShardInfo::TPtr& pqShard = pqGroup->Shards[shardIdx];
+ TTopicTabletInfo::TPtr& pqShard = pqGroup->Shards[shardIdx];
if (!pqShard) {
- pqShard.Reset(new TPQShardInfo());
+ pqShard.Reset(new TTopicTabletInfo());
}
- pqShard->PQInfos.push_back(pqInfo);
+ pqShard->Partitions.push_back(pqInfo);
if (!rowset.Next())
return false;
@@ -2394,7 +2396,7 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
TLocalPathId localPathId = rowset.GetValue<Schema::PersQueueGroupAlters::PathId>();
TPathId pathId(selfId, localPathId);
- TPersQueueGroupInfo::TPtr alterData = new TPersQueueGroupInfo();
+ TTopicInfo::TPtr alterData = new TTopicInfo();
alterData->TabletConfig = rowset.GetValue<Schema::PersQueueGroupAlters::TabletConfig>();
alterData->MaxPartsPerTablet = rowset.GetValue<Schema::PersQueueGroupAlters::MaxPQPerShard>();
alterData->AlterVersion = rowset.GetValue<Schema::PersQueueGroupAlters::AlterVersion>();
@@ -2405,8 +2407,8 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
const bool ok = alterData->FillKeySchema(alterData->TabletConfig);
Y_VERIFY(ok);
- auto it = Self->PersQueueGroups.find(pathId);
- Y_VERIFY(it != Self->PersQueueGroups.end());
+ auto it = Self->Topics.find(pathId);
+ Y_VERIFY(it != Self->Topics.end());
alterData->TotalPartitionCount = it->second->GetTotalPartitionCountWithAlter();
alterData->BalancerTabletID = it->second->BalancerTabletID;
@@ -2418,6 +2420,37 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
}
}
+ // Read PersQueue groups stats
+ {
+ auto rowset = db.Table<Schema::PersQueueGroupStats>().Range().Select();
+ if (!rowset.IsReady()) {
+ return false;
+ }
+ while (!rowset.EndOfSet()) {
+ TLocalPathId localPathId = rowset.GetValue<Schema::PersQueueGroupStats::PathId>();
+ TPathId pathId(selfId, localPathId);
+
+ auto it = Self->Topics.find(pathId);
+ if (it != Self->Topics.end()) {
+ auto& topic = it->second;
+
+ auto dataSize = rowset.GetValue<Schema::PersQueueGroupStats::DataSize>();
+ auto usedReserveSize = rowset.GetValue<Schema::PersQueueGroupStats::UsedReserveSize>();
+ if (dataSize >= usedReserveSize) {
+ topic->Stats.SeqNo = TMessageSeqNo(rowset.GetValue<Schema::PersQueueGroupStats::SeqNoGeneration>(), rowset.GetValue<Schema::PersQueueGroupStats::SeqNoRound>());
+ topic->Stats.DataSize = dataSize;
+ topic->Stats.UsedReserveSize = usedReserveSize;
+
+ Self->ResolveDomainInfo(pathId)->AggrDiskSpaceUsage(topic->Stats, {});
+ }
+ }
+
+ if (!rowset.Next()) {
+ return false;
+ }
+ }
+ }
+
// Read RTMR volumes
{
@@ -2825,6 +2858,13 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
Self->CdcStreams[pathId] = new TCdcStreamInfo(alterVersion, mode, format, vt, state);
Self->IncrementPathDbRefCount(pathId);
+ if (state == NKikimrSchemeOp::ECdcStreamStateScan) {
+ Y_VERIFY_S(Self->PathsById.contains(path->ParentPathId), "Parent path is not found"
+ << ", cdc stream pathId: " << pathId
+ << ", parent pathId: " << path->ParentPathId);
+ CdcStreamScansToResume[path->ParentPathId].push_back(pathId);
+ }
+
if (!rowset.Next()) {
return false;
}
@@ -2886,6 +2926,38 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
}
}
+ // Read CdcStreamScanShardStatus
+ {
+ auto rowset = db.Table<Schema::CdcStreamScanShardStatus>().Range().Select();
+ if (!rowset.IsReady()) {
+ return false;
+ }
+
+ while (!rowset.EndOfSet()) {
+ auto pathId = TPathId(
+ rowset.GetValue<Schema::CdcStreamScanShardStatus::OwnerPathId>(),
+ rowset.GetValue<Schema::CdcStreamScanShardStatus::LocalPathId>()
+ );
+ auto shardIdx = TShardIdx(
+ rowset.GetValue<Schema::CdcStreamScanShardStatus::OwnerShardIdx>(),
+ rowset.GetValue<Schema::CdcStreamScanShardStatus::LocalShardIdx>()
+ );
+ auto status = rowset.GetValue<Schema::CdcStreamScanShardStatus::Status>();
+
+ Y_VERIFY_S(Self->CdcStreams.contains(pathId), "Cdc stream not found"
+ << ": pathId# " << pathId);
+
+ auto stream = Self->CdcStreams.at(pathId);
+ stream->ScanShards.emplace(shardIdx, status);
+
+ if (status != NKikimrTxDataShard::TEvCdcStreamScanResponse::DONE) {
+ stream->PendingShards.insert(shardIdx);
+ } else {
+ stream->DoneShards.insert(shardIdx);
+ }
+ }
+ }
+
// Read DomainsPools
{
auto rowset = db.Table<Schema::StoragePools>().Range().Select();
@@ -3327,6 +3399,10 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
// Remember which paths are still under operation
pathsUnderOperation.insert(txState.TargetPathId);
+ if (CdcStreamScansToResume.contains(txState.TargetPathId)) {
+ CdcStreamScansToResume.erase(txState.TargetPathId);
+ }
+
LOG_DEBUG_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
"Adjusted PathState"
<< ", pathId: " << txState.TargetPathId
@@ -3853,8 +3929,8 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
Self->TabletCounters->Simple()[COUNTER_USER_ATTRIBUTES_COUNT].Add(path->UserAttrs->Size());
if (path->IsPQGroup()) {
- auto pqGroup = Self->PersQueueGroups.at(path->PathId);
- auto delta = pqGroup->AlterData ? pqGroup->AlterData->TotalGroupCount : pqGroup->TotalGroupCount;
+ auto pqGroup = Self->Topics.at(path->PathId);
+ auto delta = pqGroup->AlterData ? pqGroup->AlterData->TotalPartitionCount : pqGroup->TotalPartitionCount;
auto tabletConfig = pqGroup->AlterData ? (pqGroup->AlterData->TabletConfig.empty() ? pqGroup->TabletConfig : pqGroup->AlterData->TabletConfig)
: pqGroup->TabletConfig;
NKikimrPQ::TPQTabletConfig config;
@@ -3862,15 +3938,14 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
bool parseOk = ParseFromStringNoSizeLimit(config, tabletConfig);
Y_VERIFY(parseOk);
- ui64 throughput = ((ui64)delta) * config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
- ui64 storage = throughput * config.GetPartitionConfig().GetLifetimeSeconds();
+ const PQGroupReserve reserve(config, delta);
inclusiveDomainInfo->IncPQPartitionsInside(delta);
- inclusiveDomainInfo->IncPQReservedStorage(storage);
+ inclusiveDomainInfo->IncPQReservedStorage(reserve.Storage);
Self->TabletCounters->Simple()[COUNTER_STREAM_SHARDS_COUNT].Add(delta);
- Self->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(throughput);
- Self->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(storage);
+ Self->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(reserve.Throughput);
+ Self->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(reserve.Storage);
}
if (path->PlannedToDrop()) {
@@ -4727,12 +4802,20 @@ struct TSchemeShard::TTxInit : public TTransactionBase<TSchemeShard> {
return;
}
- Self->ActivateAfterInitialization(
- ctx,
- std::move(delayPublications),
- ExportsToResume, ImportsToResume,
- std::move(TablesToClean), std::move(BlockStoreVolumesToClean)
- );
+ // flatten
+ TVector<TPathId> cdcStreamScansToResume;
+ for (auto& [_, v] : CdcStreamScansToResume) {
+ std::move(v.begin(), v.end(), std::back_inserter(cdcStreamScansToResume));
+ }
+
+ Self->ActivateAfterInitialization(ctx, {
+ .DelayPublications = std::move(delayPublications),
+ .ExportIds = ExportsToResume,
+ .ImportsIds = ImportsToResume,
+ .CdcStreamScans = std::move(cdcStreamScansToResume),
+ .TablesToClean = std::move(TablesToClean),
+ .BlockStoreVolumesToClean = std::move(BlockStoreVolumesToClean),
+ });
}
};
diff --git a/ydb/core/tx/schemeshard/schemeshard__init_root.cpp b/ydb/core/tx/schemeshard/schemeshard__init_root.cpp
index 5201abd44b..47247d1f95 100644
--- a/ydb/core/tx/schemeshard/schemeshard__init_root.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__init_root.cpp
@@ -132,6 +132,7 @@ struct TSchemeShard::TTxInitRoot : public TSchemeShard::TRwTxBase {
Self->PersistUpdateNextPathId(db);
Self->PersistUpdateNextShardIdx(db);
Self->PersistStoragePools(db, Self->RootPathId(), *newDomain);
+ Self->PersistSchemeLimit(db, Self->RootPathId(), *newDomain);
Self->PersistACL(db, newPath);
Self->InitState = TTenantInitState::Done;
@@ -144,8 +145,7 @@ struct TSchemeShard::TTxInitRoot : public TSchemeShard::TRwTxBase {
<< ", at schemeshard: " << Self->TabletID());
Self->SignalTabletActive(ctx);
-
- Self->ActivateAfterInitialization(ctx);
+ Self->ActivateAfterInitialization(ctx, {});
}
};
@@ -440,7 +440,9 @@ struct TSchemeShard::TTxInitTenantSchemeShard : public TSchemeShard::TRwTxBase {
auto publications = TSideEffects::TPublications();
publications[TTxId()] = TSideEffects::TPublications::mapped_type{Self->RootPathId()};
- Self->ActivateAfterInitialization(ctx, std::move(publications));
+ Self->ActivateAfterInitialization(ctx, {
+ .DelayPublications = std::move(publications),
+ });
}
};
@@ -732,7 +734,7 @@ struct TSchemeShard::TTxMigrate : public TSchemeShard::TRwTxBase {
NIceDb::TUpdate<Schema::MigratedKesusInfos::Version>(kesusDescr.GetVersion()));
}
-// PersQueueGroups,
+// Topics,
// PersQueues,
// RtmrVolumes,
// RTMRPartitions,
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation.cpp b/ydb/core/tx/schemeshard/schemeshard__operation.cpp
index 3514444a26..f597e74b1e 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation.cpp
@@ -5,9 +5,7 @@
#include "schemeshard__operation_memory_changes.h"
#include "schemeshard__operation_db_changes.h"
-#include "schemeshard_audit_log_fragment.h"
-#include "ydb/core/audit/audit_log.h"
-
+#include "schemeshard_audit_log.h"
#include "schemeshard_impl.h"
#include <ydb/core/tablet/tablet_exception.h>
@@ -36,40 +34,6 @@ std::tuple<TMaybe<NACLib::TUserToken>, bool> ParseUserToken(const TString& token
return std::make_tuple(result, parseError);
}
-TString RenderPaths(const TVector<TString>& paths) {
- auto result = TStringBuilder();
- result << "[" << JoinStrings(paths.begin(), paths.end(), ", ") << "]";
- return result;
-}
-
-void AuditLogModifySchemeTransaction(const NKikimrScheme::TEvModifySchemeTransaction& request, const NKikimrScheme::TEvModifySchemeTransactionResult& response, TSchemeShard* SS, const TString& userSID) {
- // Each TEvModifySchemeTransaction.Transaction is a self sufficient operation and should be logged independently
- // (even if it was packed into a single TxProxy transaction with some other operations).
-
- //NOTE: UserSIDNone couldn't be an empty string as "subject" field is a required one,
- // but AUDIT_PART() skips any part with an empty value
- static const TString EmptyValue = "{none}";
-
- for (const auto& operation : request.GetTransaction()) {
- auto logEntry = MakeAuditLogFragment(operation);
-
- auto databasePath = TPath::Resolve(operation.GetWorkingDir(), SS);
- if (!databasePath.IsResolved()) {
- databasePath.RiseUntilFirstResolvedParent();
- }
-
- AUDIT_LOG(
- AUDIT_PART("txId", std::to_string(request.GetTxId()))
- AUDIT_PART("subject", (!userSID.empty() ? userSID : EmptyValue))
- AUDIT_PART("database", (!databasePath.IsEmpty() ? databasePath.GetDomainPathString() : EmptyValue))
- AUDIT_PART("operation", logEntry.Operation)
- AUDIT_PART("paths", RenderPaths(logEntry.Paths), !logEntry.Paths.empty())
- AUDIT_PART("status", NKikimrScheme::EStatus_Name(response.GetStatus()))
- AUDIT_PART("reason", response.GetReason(), response.HasReason())
- );
- }
-}
-
struct TSchemeShard::TTxOperationProposeCancelTx: public NTabletFlatExecutor::TTransactionBase<TSchemeShard> {
TEvSchemeShard::TEvCancelTx::TPtr Ev;
@@ -969,7 +933,9 @@ ISubOperationBase::TPtr TOperation::RestorePart(TTxState::ETxType txType, TTxSta
case TTxState::ETxType::TxDropCdcStream:
return CreateDropCdcStreamImpl(NextPartId(), txState);
case TTxState::ETxType::TxDropCdcStreamAtTable:
- return CreateDropCdcStreamAtTable(NextPartId(), txState);
+ return CreateDropCdcStreamAtTable(NextPartId(), txState, false);
+ case TTxState::ETxType::TxDropCdcStreamAtTableDropSnapshot:
+ return CreateDropCdcStreamAtTable(NextPartId(), txState, true);
// Sequences
case TTxState::ETxType::TxCreateSequence:
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp
index 31265149ae..c898dd3c8e 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_allocate_pq.cpp
@@ -135,7 +135,7 @@ public:
return result;
}
- TPersQueueGroupInfo::TPtr pqGroupInfo = new TPersQueueGroupInfo;
+ TTopicInfo::TPtr pqGroupInfo = new TTopicInfo;
pqGroupInfo->TotalGroupCount = allocateDesc.GetTotalGroupCount();
if (pqGroupInfo->TotalGroupCount == 0 || pqGroupInfo->TotalGroupCount > TSchemeShard::MaxPQGroupPartitionsCount) {
@@ -262,15 +262,7 @@ public:
const ui64 shardsToCreate = pqGroupInfo->ExpectedShardCount() + 1;
const ui64 partitionsToCreate = pqGroupInfo->TotalPartitionCount;
- const ui64 throughput = ((ui64)partitionsToCreate) *
- tabletConfig.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
-
- ui64 storage = 0;
- if (tabletConfig.GetPartitionConfig().HasStorageLimitBytes()) {
- storage = tabletConfig.GetPartitionConfig().GetStorageLimitBytes();
- } else {
- storage = throughput * tabletConfig.GetPartitionConfig().GetLifetimeSeconds();
- }
+ const PQGroupReserve reserve(tabletConfig, partitionsToCreate);
{
NSchemeShard::TPath::TChecker checks = dstPath.Check();
@@ -278,7 +270,7 @@ public:
.ShardsLimit(shardsToCreate)
.PathShardsLimit(shardsToCreate)
.PQPartitionsLimit(partitionsToCreate)
- .PQReservedStorageLimit(storage);
+ .PQReservedStorageLimit(reserve.Storage);
if (!checks) {
result->SetError(checks.GetStatus(), checks.GetError());
@@ -363,8 +355,8 @@ public:
context.SS->TabletIdToShardIdx[tabletId] = idx;
- TPQShardInfo::TPtr pqShard = new TPQShardInfo();
- pqShard->PQInfos.reserve(pqGroupInfo->MaxPartsPerTablet);
+ TTopicTabletInfo::TPtr pqShard = new TTopicTabletInfo();
+ pqShard->Partitions.reserve(pqGroupInfo->MaxPartsPerTablet);
pqGroupInfo->Shards[idx] = pqShard;
}
@@ -374,13 +366,13 @@ public:
auto tabletId = item.second.second;
auto idx = context.SS->TabletIdToShardIdx.at(tabletId);
- TPQShardInfo::TPtr pqShard = pqGroupInfo->Shards.at(idx);
+ TTopicTabletInfo::TPtr pqShard = pqGroupInfo->Shards.at(idx);
- TPQShardInfo::TPersQueueInfo pqInfo;
+ TTopicTabletInfo::TTopicPartitionInfo pqInfo;
pqInfo.PqId = partId;
pqInfo.GroupId = groupId;
pqInfo.AlterVersion = pqGroupInfo->AlterVersion;
- pqShard->PQInfos.push_back(pqInfo);
+ pqShard->Partitions.push_back(pqInfo);
}
{
@@ -401,17 +393,17 @@ public:
for (auto& shard : pqGroupInfo->Shards) {
auto shardIdx = shard.first;
- for (const auto& pqInfo : shard.second->PQInfos) {
+ for (const auto& pqInfo : shard.second->Partitions) {
context.SS->PersistPersQueue(db, pathId, shardIdx, pqInfo);
}
}
- TPersQueueGroupInfo::TPtr emptyGroup = new TPersQueueGroupInfo;
+ TTopicInfo::TPtr emptyGroup = new TTopicInfo;
emptyGroup->Shards.swap(pqGroupInfo->Shards);
- context.SS->PersQueueGroups[pathId] = emptyGroup;
- context.SS->PersQueueGroups[pathId]->AlterData = pqGroupInfo;
- context.SS->PersQueueGroups[pathId]->AlterVersion = pqGroupInfo->AlterVersion;
+ context.SS->Topics[pathId] = emptyGroup;
+ context.SS->Topics[pathId]->AlterData = pqGroupInfo;
+ context.SS->Topics[pathId]->AlterVersion = pqGroupInfo->AlterVersion;
context.SS->IncrementPathDbRefCount(pathId);
@@ -465,12 +457,12 @@ public:
dstPath.DomainInfo()->IncPathsInside();
dstPath.DomainInfo()->AddInternalShards(txState);
dstPath.DomainInfo()->IncPQPartitionsInside(partitionsToCreate);
- dstPath.DomainInfo()->IncPQReservedStorage(storage);
+ dstPath.DomainInfo()->IncPQReservedStorage(reserve.Storage);
dstPath.Base()->IncShardsInside(shardsToCreate);
parentPath.Base()->IncAliveChildren();
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(throughput);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(storage);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(reserve.Throughput);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(reserve.Storage);
context.SS->TabletCounters->Simple()[COUNTER_STREAM_SHARDS_COUNT].Add(partitionsToCreate);
SetState(NextState());
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_alter_cdc_stream.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_alter_cdc_stream.cpp
index 2050f0a05f..754f1efe4f 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_alter_cdc_stream.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_alter_cdc_stream.cpp
@@ -150,20 +150,20 @@ public:
Y_VERIFY(context.SS->CdcStreams.contains(streamPath.Base()->PathId));
auto stream = context.SS->CdcStreams.at(streamPath.Base()->PathId);
+ TCdcStreamInfo::EState requiredState = TCdcStreamInfo::EState::ECdcStreamStateInvalid;
TCdcStreamInfo::EState newState = TCdcStreamInfo::EState::ECdcStreamStateInvalid;
switch (op.GetActionCase()) {
case NKikimrSchemeOp::TAlterCdcStream::kDisable:
- newState = TCdcStreamInfo::EState::ECdcStreamStateDisabled;
+ requiredState = TCdcStreamInfo::EState::ECdcStreamStateDisabled;
+ if (stream->State == TCdcStreamInfo::EState::ECdcStreamStateReady) {
+ newState = requiredState;
+ }
break;
case NKikimrSchemeOp::TAlterCdcStream::kGetReady:
+ requiredState = TCdcStreamInfo::EState::ECdcStreamStateReady;
if (stream->State == TCdcStreamInfo::EState::ECdcStreamStateScan) {
- newState = TCdcStreamInfo::EState::ECdcStreamStateReady;
- } else {
- result->SetError(NKikimrScheme::StatusPreconditionFailed, TStringBuilder()
- << "Cannot switch to ready state"
- << ": current# " << stream->State);
- return result;
+ newState = requiredState;
}
break;
default:
@@ -172,6 +172,14 @@ public:
return result;
}
+ if (newState == TCdcStreamInfo::EState::ECdcStreamStateInvalid) {
+ result->SetError(NKikimrScheme::StatusPreconditionFailed, TStringBuilder()
+ << "Cannot switch state"
+ << ": from# " << stream->State
+ << ", to# " << requiredState);
+ return result;
+ }
+
auto guard = context.DbGuard();
context.MemChanges.GrabPath(context.SS, streamPath.Base()->PathId);
context.MemChanges.GrabCdcStream(context.SS, streamPath.Base()->PathId);
@@ -183,8 +191,6 @@ public:
auto streamAlter = stream->CreateNextVersion();
Y_VERIFY(streamAlter);
-
- Y_VERIFY(newState != TCdcStreamInfo::EState::ECdcStreamStateInvalid);
streamAlter->State = newState;
Y_VERIFY(!context.SS->FindTx(OperationId));
@@ -278,40 +284,6 @@ public:
}; // TConfigurePartsAtTableDropSnapshot
-class TProposeAtTableDropSnapshot: public NCdcStreamState::TProposeAtTable {
-public:
- using NCdcStreamState::TProposeAtTable::TProposeAtTable;
-
- bool HandleReply(TEvPrivate::TEvOperationPlan::TPtr& ev, TOperationContext& context) override {
- NCdcStreamState::TProposeAtTable::HandleReply(ev, context);
-
- const auto* txState = context.SS->FindTx(OperationId);
- Y_VERIFY(txState);
- const auto& pathId = txState->TargetPathId;
-
- Y_VERIFY(context.SS->TablesWithSnapshots.contains(pathId));
- const auto snapshotTxId = context.SS->TablesWithSnapshots.at(pathId);
-
- auto it = context.SS->SnapshotTables.find(snapshotTxId);
- if (it != context.SS->SnapshotTables.end()) {
- it->second.erase(pathId);
- if (it->second.empty()) {
- context.SS->SnapshotTables.erase(it);
- }
- }
-
- context.SS->SnapshotsStepIds.erase(snapshotTxId);
- context.SS->TablesWithSnapshots.erase(pathId);
-
- NIceDb::TNiceDb db(context.GetDB());
- context.SS->PersistDropSnapshot(db, snapshotTxId, pathId);
-
- context.SS->TabletCounters->Simple()[COUNTER_SNAPSHOTS_COUNT].Sub(1);
- return true;
- }
-
-}; // TProposeAtTableDropSnapshot
-
class TAlterCdcStreamAtTable: public TSubOperation {
static TTxState::ETxState NextState() {
return TTxState::ConfigureParts;
@@ -344,7 +316,7 @@ class TAlterCdcStreamAtTable: public TSubOperation {
}
case TTxState::Propose:
if (DropSnapshot) {
- return MakeHolder<TProposeAtTableDropSnapshot>(OperationId);
+ return MakeHolder<NCdcStreamState::TProposeAtTableDropSnapshot>(OperationId);
} else {
return MakeHolder<NCdcStreamState::TProposeAtTable>(OperationId);
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp
index 213add43c8..e9bca793e5 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp
@@ -570,7 +570,7 @@ public:
TTxState& txState = context.SS->CreateTx(OperationId, TTxState::TxAlterExtSubDomainCreateHive, basenameId);
// Create subdomain alter
- TSubDomainInfo::TPtr alter = new TSubDomainInfo(*subdomainInfo, 0, 0);
+ TSubDomainInfo::TPtr alter = new TSubDomainInfo(*subdomainInfo, 0, 0, delta.StoragePoolsAdded);
LOG_D("TAlterExtSubDomainCreateHive Propose"
<< ", opId: " << OperationId
@@ -583,7 +583,7 @@ public:
// Create shard for the hive to-be.
{
TChannelsBindings channelsBinding;
- if (!context.SS->ResolveSubdomainsChannels(delta.StoragePoolsAdded, channelsBinding)) {
+ if (!context.SS->ResolveSubdomainsChannels(alter->GetStoragePools(), channelsBinding)) {
result->SetError(NKikimrScheme::StatusInvalidParameter, "failed to construct channels binding");
return result;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_alter_pq.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_alter_pq.cpp
index 2c0180ac14..729e50e4dc 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_alter_pq.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_alter_pq.cpp
@@ -49,13 +49,13 @@ class TAlterPQ: public TSubOperation {
public:
using TSubOperation::TSubOperation;
- TPersQueueGroupInfo::TPtr ParseParams(
+ TTopicInfo::TPtr ParseParams(
TOperationContext& context,
NKikimrPQ::TPQTabletConfig* tabletConfig,
const NKikimrSchemeOp::TPersQueueGroupDescription& alter,
TString& errStr)
{
- TPersQueueGroupInfo::TPtr params = new TPersQueueGroupInfo();
+ TTopicInfo::TPtr params = new TTopicInfo();
const bool hasKeySchema = tabletConfig->PartitionKeySchemaSize();
if (alter.HasTotalGroupCount()) {
@@ -182,7 +182,7 @@ public:
TTxState& PrepareChanges(
TOperationId operationId,
const TPath& path,
- TPersQueueGroupInfo::TPtr pqGroup,
+ TTopicInfo::TPtr pqGroup,
ui64 shardsToCreate,
const TChannelsBindings& rbChannelsBinding,
const TChannelsBindings& pqChannelsBinding,
@@ -204,7 +204,7 @@ public:
for (auto& shard : pqGroup->Shards) {
auto shardIdx = shard.first;
- for (const auto& pqInfo : shard.second->PQInfos) {
+ for (const auto& pqInfo : shard.second->Partitions) {
context.SS->PersistPersQueue(db, item->PathId, shardIdx, pqInfo);
}
}
@@ -262,7 +262,7 @@ public:
bool ApplySharding(
TTxId txId,
const TPathId& pathId,
- TPersQueueGroupInfo::TPtr pqGroup,
+ TTopicInfo::TPtr pqGroup,
TTxState& txState,
const TChannelsBindings& rbBindedChannels,
const TChannelsBindings& pqBindedChannels,
@@ -318,7 +318,7 @@ public:
txState.Shards.emplace_back(idx, ETabletType::PersQueue, TTxState::CreateParts);
context.SS->RegisterShardInfo(idx, defaultShardInfo);
- pqGroup->Shards[idx] = new TPQShardInfo();
+ pqGroup->Shards[idx] = new TTopicTabletInfo();
}
if (!hasBalancer) {
@@ -344,7 +344,7 @@ public:
return shardsToCreate > 0;
}
- void ReassignIds(TPersQueueGroupInfo::TPtr pqGroup) {
+ void ReassignIds(TTopicInfo::TPtr pqGroup) {
Y_VERIFY(pqGroup->TotalPartitionCount >= pqGroup->TotalGroupCount);
ui32 numOld = pqGroup->TotalPartitionCount;
ui32 numNew = pqGroup->AlterData->PartitionsToAdd.size() + numOld;
@@ -357,15 +357,15 @@ public:
auto it = pqGroup->Shards.begin();
for (const auto& p : pqGroup->AlterData->PartitionsToAdd) {
- TPQShardInfo::TPersQueueInfo pqInfo;
+ TTopicTabletInfo::TTopicPartitionInfo pqInfo;
pqInfo.PqId = p.PartitionId;
pqInfo.GroupId = p.GroupId;
pqInfo.KeyRange = p.KeyRange;
pqInfo.AlterVersion = alterVersion;
- while (it->second->PQInfos.size() >= average) {
+ while (it->second->Partitions.size() >= average) {
++it;
}
- it->second->PQInfos.push_back(pqInfo);
+ it->second->Partitions.push_back(pqInfo);
}
}
@@ -421,7 +421,7 @@ public:
}
}
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups.at(path.Base()->PathId);
+ TTopicInfo::TPtr pqGroup = context.SS->Topics.at(path.Base()->PathId);
Y_VERIFY(pqGroup);
if (pqGroup->AlterVersion == 0) {
@@ -440,7 +440,7 @@ public:
}
newTabletConfig = tabletConfig;
- TPersQueueGroupInfo::TPtr alterData = ParseParams(context, &newTabletConfig, alter, errStr);
+ TTopicInfo::TPtr alterData = ParseParams(context, &newTabletConfig, alter, errStr);
if (!alterData) {
result->SetError(NKikimrScheme::StatusInvalidParameter, errStr);
@@ -519,23 +519,10 @@ public:
return result;
}
- auto getStorageLimit = [](auto &config, ui64 throughput) {
- if (config.GetPartitionConfig().HasStorageLimitBytes()) {
- return config.GetPartitionConfig().GetStorageLimitBytes();
- } else {
- return throughput * config.GetPartitionConfig().GetLifetimeSeconds();
- }
- };
-
- const ui64 throughput = ((ui64)(newTabletConfig.GetPartitionConfig().GetWriteSpeedInBytesPerSecond())) *
- (alterData->TotalGroupCount);
- const ui64 oldThroughput = ((ui64)(tabletConfig.GetPartitionConfig().GetWriteSpeedInBytesPerSecond())) *
- (pqGroup->TotalGroupCount);
-
- const ui64 storage = getStorageLimit(newTabletConfig, throughput);
- const ui64 oldStorage = getStorageLimit(tabletConfig, oldThroughput);
+ const PQGroupReserve reserve(newTabletConfig, alterData->TotalPartitionCount);
+ const PQGroupReserve oldReserve(tabletConfig, pqGroup->TotalPartitionCount);
- const ui64 storageToReserve = storage > oldStorage ? storage - oldStorage : 0;
+ const ui64 storageToReserve = reserve.Storage > oldReserve.Storage ? reserve.Storage - oldReserve.Storage : 0;
{
TPath::TChecker checks = path.Check();
@@ -604,14 +591,14 @@ public:
path.DomainInfo()->AddInternalShards(txState);
path.DomainInfo()->IncPQPartitionsInside(partitionsToCreate);
- path.DomainInfo()->UpdatePQReservedStorage(oldStorage, storage);
+ path.DomainInfo()->UpdatePQReservedStorage(oldReserve.Storage, reserve.Storage);
path.Base()->IncShardsInside(shardsToCreate);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(throughput);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Sub(oldThroughput);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(reserve.Throughput);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Sub(oldReserve.Throughput);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(storage);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Sub(oldStorage);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(reserve.Storage);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Sub(oldReserve.Storage);
context.SS->TabletCounters->Simple()[COUNTER_STREAM_SHARDS_COUNT].Add(partitionsToCreate);
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_common.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_common.cpp
index 218c0c921b..af2e16c89e 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_common.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_common.cpp
@@ -359,6 +359,8 @@ void NTableState::UpdatePartitioningForTableModification(TOperationId operationI
commonShardOp = TTxState::ConfigureParts;
} else if (txState.TxType == TTxState::TxDropCdcStreamAtTable) {
commonShardOp = TTxState::ConfigureParts;
+ } else if (txState.TxType == TTxState::TxDropCdcStreamAtTableDropSnapshot) {
+ commonShardOp = TTxState::ConfigureParts;
} else {
Y_FAIL("UNREACHABLE");
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_common.h b/ydb/core/tx/schemeshard/schemeshard__operation_common.h
index 6ae047a6a1..5485c519d5 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_common.h
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_common.h
@@ -416,7 +416,7 @@ public:
class TDone: public TSubOperationState {
-private:
+protected:
TOperationId OperationId;
TString DebugHint() const override {
@@ -584,7 +584,7 @@ public:
"topicName is empty"
<<", pathId: " << txState->TargetPathId);
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups[txState->TargetPathId];
+ TTopicInfo::TPtr pqGroup = context.SS->Topics[txState->TargetPathId];
Y_VERIFY_S(pqGroup,
"pqGroup is null"
<< ", pathId " << txState->TargetPathId);
@@ -616,14 +616,14 @@ public:
TTabletId tabletId = context.SS->ShardInfos.at(idx).TabletID;
if (shard.TabletType == ETabletType::PersQueue) {
- TPQShardInfo::TPtr pqShard = pqGroup->Shards.at(idx);
+ TTopicTabletInfo::TPtr pqShard = pqGroup->Shards.at(idx);
Y_VERIFY_S(pqShard, "pqShard is null, idx is " << idx << " has was "<< THash<TShardIdx>()(idx));
LOG_DEBUG_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
"Propose configure PersQueue"
<< ", opId: " << OperationId
<< ", tabletId: " << tabletId
- << ", PQInfos size: " << pqShard->PQInfos.size()
+ << ", Partitions size: " << pqShard->Partitions.size()
<< ", at schemeshard: " << ssId);
TAutoPtr<TEvPersQueue::TEvUpdateConfig> event(new TEvPersQueue::TEvUpdateConfig());
@@ -643,7 +643,7 @@ public:
event->Record.MutableTabletConfig()->SetVersion(pqGroup->AlterData->AlterVersion);
- for (const auto& pq : pqShard->PQInfos) {
+ for (const auto& pq : pqShard->Partitions) {
event->Record.MutableTabletConfig()->AddPartitionIds(pq.PqId);
auto& partition = *event->Record.MutableTabletConfig()->AddPartitions();
@@ -713,7 +713,7 @@ public:
tablet->SetTabletId(ui64(tabletId));
tablet->SetOwner(context.SS->TabletID());
tablet->SetIdx(ui64(p.first.GetLocalId()));
- for (const auto& pq : pqShard->PQInfos) {
+ for (const auto& pq : pqShard->Partitions) {
auto info = event->Record.AddPartitions();
info->SetPartition(pq.PqId);
info->SetTabletId(ui64(tabletId));
@@ -721,6 +721,10 @@ public:
}
}
+ if (const ui64 subDomainPathId = context.SS->ResolvePathIdForDomain(txState->TargetPathId).LocalPathId) {
+ event->Record.SetSubDomainPathId(subDomainPathId);
+ }
+
LOG_DEBUG_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
"Propose configure PersQueueReadBalancer"
<< ", opId: " << OperationId
@@ -791,7 +795,7 @@ public:
context.SS->ClearDescribePathCaches(path);
context.OnComplete.PublishToSchemeBoard(OperationId, pathId);
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups[pathId];
+ TTopicInfo::TPtr pqGroup = context.SS->Topics[pathId];
pqGroup->FinishAlter();
context.SS->PersistPersQueueGroup(db, pathId, pqGroup);
context.SS->PersistRemovePersQueueGroupAlter(db, pathId);
@@ -1052,6 +1056,7 @@ class TConfigurePartsAtTable: public TSubOperationState {
case TTxState::TxAlterCdcStreamAtTable:
case TTxState::TxAlterCdcStreamAtTableDropSnapshot:
case TTxState::TxDropCdcStreamAtTable:
+ case TTxState::TxDropCdcStreamAtTableDropSnapshot:
return true;
default:
return false;
@@ -1131,6 +1136,7 @@ class TProposeAtTable: public TSubOperationState {
case TTxState::TxAlterCdcStreamAtTable:
case TTxState::TxAlterCdcStreamAtTableDropSnapshot:
case TTxState::TxDropCdcStreamAtTable:
+ case TTxState::TxDropCdcStreamAtTableDropSnapshot:
return true;
default:
return false;
@@ -1207,6 +1213,40 @@ protected:
}; // TProposeAtTable
+class TProposeAtTableDropSnapshot: public TProposeAtTable {
+public:
+ using TProposeAtTable::TProposeAtTable;
+
+ bool HandleReply(TEvPrivate::TEvOperationPlan::TPtr& ev, TOperationContext& context) override {
+ TProposeAtTable::HandleReply(ev, context);
+
+ const auto* txState = context.SS->FindTx(OperationId);
+ Y_VERIFY(txState);
+ const auto& pathId = txState->TargetPathId;
+
+ Y_VERIFY(context.SS->TablesWithSnapshots.contains(pathId));
+ const auto snapshotTxId = context.SS->TablesWithSnapshots.at(pathId);
+
+ auto it = context.SS->SnapshotTables.find(snapshotTxId);
+ if (it != context.SS->SnapshotTables.end()) {
+ it->second.erase(pathId);
+ if (it->second.empty()) {
+ context.SS->SnapshotTables.erase(it);
+ }
+ }
+
+ context.SS->SnapshotsStepIds.erase(snapshotTxId);
+ context.SS->TablesWithSnapshots.erase(pathId);
+
+ NIceDb::TNiceDb db(context.GetDB());
+ context.SS->PersistDropSnapshot(db, snapshotTxId, pathId);
+
+ context.SS->TabletCounters->Simple()[COUNTER_SNAPSHOTS_COUNT].Sub(1);
+ return true;
+ }
+
+}; // TProposeAtTableDropSnapshot
+
} // NCdcStreamState
namespace NForceDrop {
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_consistent_copy_tables.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_consistent_copy_tables.cpp
index 99ea34bf60..1410a10f61 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_consistent_copy_tables.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_consistent_copy_tables.cpp
@@ -1,13 +1,14 @@
#include "schemeshard__operation_part.h"
#include "schemeshard__operation_common.h"
-#include "schemeshard_path_element.h"
-
#include "schemeshard_impl.h"
+#include "schemeshard_path_element.h"
#include <ydb/core/base/path.h>
#include <ydb/core/protos/flat_tx_scheme.pb.h>
#include <ydb/core/protos/flat_scheme_op.pb.h>
+#include <util/generic/algorithm.h>
+
NKikimrSchemeOp::TModifyScheme CopyTableTask(NKikimr::NSchemeShard::TPath& src, NKikimr::NSchemeShard::TPath& dst, bool omitFollowers, bool isBackup) {
using namespace NKikimr::NSchemeShard;
@@ -23,7 +24,6 @@ NKikimrSchemeOp::TModifyScheme CopyTableTask(NKikimr::NSchemeShard::TPath& src,
return scheme;
}
-
NKikimrSchemeOp::TModifyScheme CreateIndexTask(NKikimr::NSchemeShard::TTableIndexInfo::TPtr indexInfo, NKikimr::NSchemeShard::TPath& dst) {
using namespace NKikimr::NSchemeShard;
@@ -45,21 +45,19 @@ NKikimrSchemeOp::TModifyScheme CreateIndexTask(NKikimr::NSchemeShard::TTableInde
return scheme;
}
-
-namespace NKikimr {
-namespace NSchemeShard {
+namespace NKikimr::NSchemeShard {
TVector<ISubOperationBase::TPtr> CreateConsistentCopyTables(TOperationId nextId, const TTxTransaction& tx, TOperationContext& context) {
Y_VERIFY(tx.GetOperationType() == NKikimrSchemeOp::EOperationType::ESchemeOpCreateConsistentCopyTables);
- auto consistentCopying = tx.GetCreateConsistentCopyTables();
+ const auto& op = tx.GetCreateConsistentCopyTables();
- if (0 == consistentCopying.CopyTableDescriptionsSize()) {
+ if (0 == op.CopyTableDescriptionsSize()) {
TString msg = TStringBuilder() << "no task to do, empty list CopyTableDescriptions";
return {CreateReject(nextId, NKikimrScheme::EStatus::StatusInvalidParameter, msg)};
}
- TPath firstPath = TPath::Resolve(consistentCopying.GetCopyTableDescriptions(0).GetSrcPath(), context.SS);
+ TPath firstPath = TPath::Resolve(op.GetCopyTableDescriptions(0).GetSrcPath(), context.SS);
{
auto checks = TPath::TChecker(firstPath);
checks
@@ -72,26 +70,33 @@ TVector<ISubOperationBase::TPtr> CreateConsistentCopyTables(TOperationId nextId,
}
}
- TSubDomainInfo::TPtr domainInfo = firstPath.DomainInfo();
- if (consistentCopying.CopyTableDescriptionsSize() > domainInfo->GetSchemeLimits().MaxConsistentCopyTargets) {
- auto msg = TStringBuilder() << "Targets count has reached maximum value"
- << ", limit for consistent copying in domain: " << domainInfo->GetSchemeLimits().MaxConsistentCopyTargets
- << ", intention to consistent copy: " << consistentCopying.CopyTableDescriptionsSize();
- return {CreateReject(nextId, NKikimrScheme::EStatus::StatusInvalidParameter, msg)};
+ const auto allForBackup = AllOf(op.GetCopyTableDescriptions(), [](const auto& item) {
+ return item.GetIsBackup();
+ });
+
+ const auto& limits = firstPath.DomainInfo()->GetSchemeLimits();
+ const auto limit = allForBackup
+ ? Max(limits.MaxObjectsInBackup, limits.MaxConsistentCopyTargets)
+ : limits.MaxConsistentCopyTargets;
+
+ if (op.CopyTableDescriptionsSize() > limit) {
+ return {CreateReject(nextId, NKikimrScheme::EStatus::StatusInvalidParameter, TStringBuilder()
+ << "Consistent copy object count limit exceeded"
+ << ", limit: " << limit
+ << ", objects: " << op.CopyTableDescriptionsSize()
+ )};
}
- {
- TString errStr;
- if (!context.SS->CheckApplyIf(tx, errStr)) {
- return {CreateReject(nextId, NKikimrScheme::EStatus::StatusPreconditionFailed, errStr)};
- }
+ TString errStr;
+ if (!context.SS->CheckApplyIf(tx, errStr)) {
+ return {CreateReject(nextId, NKikimrScheme::EStatus::StatusPreconditionFailed, errStr)};
}
TVector<ISubOperationBase::TPtr> result;
- for (auto& descr: consistentCopying.GetCopyTableDescriptions()) {
- auto& srcStr = descr.GetSrcPath();
- auto& dstStr = descr.GetDstPath();
+ for (const auto& descr: op.GetCopyTableDescriptions()) {
+ const auto& srcStr = descr.GetSrcPath();
+ const auto& dstStr = descr.GetDstPath();
TPath srcPath = TPath::Resolve(srcStr, context.SS);
{
@@ -110,9 +115,8 @@ TVector<ISubOperationBase::TPtr> CreateConsistentCopyTables(TOperationId nextId,
TPath dstPath = TPath::Resolve(dstStr, context.SS);
TPath dstParentPath = dstPath.Parent();
- result.push_back(CreateCopyTable(TOperationId(nextId.GetTxId(),
- nextId.GetSubTxId() + result.size()),
- CopyTableTask(srcPath, dstPath, descr.GetOmitFollowers(), descr.GetIsBackup())));
+ result.push_back(CreateCopyTable(NextPartId(nextId, result),
+ CopyTableTask(srcPath, dstPath, descr.GetOmitFollowers(), descr.GetIsBackup())));
if (descr.GetOmitIndexes()) {
continue;
@@ -153,4 +157,3 @@ TVector<ISubOperationBase::TPtr> CreateConsistentCopyTables(TOperationId nextId,
}
}
-}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp
index 1dc4a69f17..de9d29af56 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp
@@ -291,7 +291,7 @@ protected:
Y_VERIFY(stream->AlterData);
context.SS->DescribeCdcStream(childPathId, childName, stream->AlterData, *notice.MutableStreamDescription());
- if (stream->AlterData->State == NKikimrSchemeOp::ECdcStreamStateScan) {
+ if (stream->AlterData->State == TCdcStreamInfo::EState::ECdcStreamStateScan) {
notice.SetSnapshotName("ChangefeedInitialScan");
}
}
@@ -307,7 +307,9 @@ public:
using NCdcStreamState::TProposeAtTable::TProposeAtTable;
bool HandleReply(TEvPrivate::TEvOperationPlan::TPtr& ev, TOperationContext& context) override {
- NCdcStreamState::TProposeAtTable::HandleReply(ev, context);
+ if (!NCdcStreamState::TProposeAtTable::HandleReply(ev, context)) {
+ return false;
+ }
const auto step = TStepId(ev->Get()->StepId);
NIceDb::TNiceDb db(context.GetDB());
@@ -320,6 +322,55 @@ public:
}; // TProposeAtTableWithInitialScan
+class TDoneWithInitialScan: public TDone {
+public:
+ using TDone::TDone;
+
+ bool ProgressState(TOperationContext& context) override {
+ if (!TDone::ProgressState(context)) {
+ return false;
+ }
+
+ const auto* txState = context.SS->FindTx(OperationId);
+ Y_VERIFY(txState);
+ Y_VERIFY(txState->TxType == TTxState::TxCreateCdcStreamAtTableWithInitialScan);
+ const auto& pathId = txState->TargetPathId;
+
+ Y_VERIFY(context.SS->PathsById.contains(pathId));
+ auto path = context.SS->PathsById.at(pathId);
+
+ TMaybe<TPathId> streamPathId;
+ for (const auto& [_, childPathId] : path->GetChildren()) {
+ Y_VERIFY(context.SS->PathsById.contains(childPathId));
+ auto childPath = context.SS->PathsById.at(childPathId);
+
+ if (childPath->CreateTxId != OperationId.GetTxId()) {
+ continue;
+ }
+
+ Y_VERIFY(childPath->IsCdcStream() && !childPath->Dropped());
+ Y_VERIFY(context.SS->CdcStreams.contains(childPathId));
+ auto stream = context.SS->CdcStreams.at(childPathId);
+
+ Y_VERIFY(stream->State == TCdcStreamInfo::EState::ECdcStreamStateScan);
+ Y_VERIFY_S(!streamPathId, "Too many cdc streams are planned to fill with initial scan"
+ << ": found# " << *streamPathId
+ << ", another# " << childPathId);
+ streamPathId = childPathId;
+ }
+
+ if (AppData()->DisableCdcAutoSwitchingToReadyStateForTests) {
+ return true;
+ }
+
+ Y_VERIFY(streamPathId);
+ context.OnComplete.Send(context.SS->SelfId(), new TEvPrivate::TEvRunCdcStreamScan(*streamPathId));
+
+ return true;
+ }
+
+}; // TDoneWithInitialScan
+
class TNewCdcStreamAtTable: public TSubOperation {
static TTxState::ETxState NextState() {
return TTxState::ConfigureParts;
@@ -353,7 +404,11 @@ class TNewCdcStreamAtTable: public TSubOperation {
case TTxState::ProposedWaitParts:
return MakeHolder<NTableState::TProposedWaitParts>(OperationId);
case TTxState::Done:
- return MakeHolder<TDone>(OperationId);
+ if (InitialScan) {
+ return MakeHolder<TDoneWithInitialScan>(OperationId);
+ } else {
+ return MakeHolder<TDone>(OperationId);
+ }
default:
return nullptr;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_create_pq.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_create_pq.cpp
index 4f08d93fac..907516c400 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_create_pq.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_create_pq.cpp
@@ -12,11 +12,11 @@ namespace {
using namespace NKikimr;
using namespace NSchemeShard;
-TPersQueueGroupInfo::TPtr CreatePersQueueGroup(TOperationContext& context,
+TTopicInfo::TPtr CreatePersQueueGroup(TOperationContext& context,
const NKikimrSchemeOp::TPersQueueGroupDescription& op,
TEvSchemeShard::EStatus& status, TString& errStr)
{
- TPersQueueGroupInfo::TPtr pqGroupInfo = new TPersQueueGroupInfo;
+ TTopicInfo::TPtr pqGroupInfo = new TTopicInfo;
ui32 partitionCount = 0;
if (op.HasTotalGroupCount()) {
@@ -93,7 +93,7 @@ TPersQueueGroupInfo::TPtr CreatePersQueueGroup(TOperationContext& context,
TString prevBound;
for (ui32 i = 0; i < partitionCount; ++i) {
- using TKeyRange = TPQShardInfo::TKeyRange;
+ using TKeyRange = TTopicTabletInfo::TKeyRange;
TMaybe<TKeyRange> keyRange;
if (op.PartitionBoundariesSize()) {
@@ -176,7 +176,7 @@ TPersQueueGroupInfo::TPtr CreatePersQueueGroup(TOperationContext& context,
void ApplySharding(TTxId txId,
TPathId pathId,
- TPersQueueGroupInfo::TPtr pqGroup,
+ TTopicInfo::TPtr pqGroup,
TTxState& txState,
const TChannelsBindings& rbBindedChannels,
const TChannelsBindings& pqBindedChannels,
@@ -193,8 +193,8 @@ void ApplySharding(TTxId txId,
ss->RegisterShardInfo(idx, shardInfo);
txState.Shards.emplace_back(idx, ETabletType::PersQueue, TTxState::CreateParts);
- TPQShardInfo::TPtr pqShard = new TPQShardInfo();
- pqShard->PQInfos.reserve(pqGroup->MaxPartsPerTablet);
+ TTopicTabletInfo::TPtr pqShard = new TTopicTabletInfo();
+ pqShard->Partitions.reserve(pqGroup->MaxPartsPerTablet);
pqGroup->Shards[idx] = pqShard;
}
@@ -208,14 +208,14 @@ void ApplySharding(TTxId txId,
auto it = pqGroup->PartitionsToAdd.begin();
for (ui32 pqId = 0; pqId < pqGroup->TotalGroupCount; ++pqId, ++it) {
auto idx = ss->NextShardIdx(startShardIdx, pqId / pqGroup->MaxPartsPerTablet);
- TPQShardInfo::TPtr pqShard = pqGroup->Shards[idx];
+ TTopicTabletInfo::TPtr pqShard = pqGroup->Shards[idx];
- TPQShardInfo::TPersQueueInfo pqInfo;
+ TTopicTabletInfo::TTopicPartitionInfo pqInfo;
pqInfo.PqId = it->PartitionId;
pqInfo.GroupId = it->GroupId;
pqInfo.KeyRange = it->KeyRange;
pqInfo.AlterVersion = 1;
- pqShard->PQInfos.push_back(pqInfo);
+ pqShard->Partitions.push_back(pqInfo);
}
}
@@ -347,7 +347,7 @@ public:
return result;
}
- TPersQueueGroupInfo::TPtr pqGroup = CreatePersQueueGroup(
+ TTopicInfo::TPtr pqGroup = CreatePersQueueGroup(
context, createDEscription, status, errStr);
if (!pqGroup.Get()) {
@@ -365,15 +365,7 @@ public:
bool parseOk = ParseFromStringNoSizeLimit(config, tabletConfig);
Y_VERIFY(parseOk);
- const ui64 throughput = ((ui64)partitionsToCreate) *
- config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
- const ui64 storage = [&config, &throughput]() {
- if (config.GetPartitionConfig().HasStorageLimitBytes()) {
- return config.GetPartitionConfig().GetStorageLimitBytes();
- } else {
- return throughput * config.GetPartitionConfig().GetLifetimeSeconds();
- }
- }();
+ const PQGroupReserve reserve(config, partitionsToCreate);
{
NSchemeShard::TPath::TChecker checks = dstPath.Check();
@@ -381,7 +373,7 @@ public:
.ShardsLimit(shardsToCreate)
.PathShardsLimit(shardsToCreate)
.PQPartitionsLimit(partitionsToCreate)
- .PQReservedStorageLimit(storage);
+ .PQReservedStorageLimit(reserve.Storage);
if (!checks) {
result->SetError(checks.GetStatus(), checks.GetError());
@@ -455,16 +447,16 @@ public:
for (auto& shard : pqGroup->Shards) {
auto shardIdx = shard.first;
- for (const auto& pqInfo : shard.second->PQInfos) {
+ for (const auto& pqInfo : shard.second->Partitions) {
context.SS->PersistPersQueue(db, pathId, shardIdx, pqInfo);
}
}
- TPersQueueGroupInfo::TPtr emptyGroup = new TPersQueueGroupInfo;
+ TTopicInfo::TPtr emptyGroup = new TTopicInfo;
emptyGroup->Shards.swap(pqGroup->Shards);
- context.SS->PersQueueGroups[pathId] = emptyGroup;
- context.SS->PersQueueGroups[pathId]->AlterData = pqGroup;
+ context.SS->Topics[pathId] = emptyGroup;
+ context.SS->Topics[pathId]->AlterData = pqGroup;
context.SS->IncrementPathDbRefCount(pathId);
context.SS->PersistPersQueueGroup(db, pathId, emptyGroup);
@@ -515,10 +507,10 @@ public:
dstPath.DomainInfo()->IncPathsInside();
dstPath.DomainInfo()->AddInternalShards(txState);
dstPath.DomainInfo()->IncPQPartitionsInside(partitionsToCreate);
- dstPath.DomainInfo()->IncPQReservedStorage(storage);
+ dstPath.DomainInfo()->IncPQReservedStorage(reserve.Storage);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(throughput);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(storage);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Add(reserve.Throughput);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Add(reserve.Storage);
context.SS->TabletCounters->Simple()[COUNTER_STREAM_SHARDS_COUNT].Add(partitionsToCreate);
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_create_subdomain.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_create_subdomain.cpp
index e39e265d20..068ad75d75 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_create_subdomain.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_create_subdomain.cpp
@@ -86,7 +86,7 @@ public:
LOG_NOTICE_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
"TCreateSubDomain Propose"
- << ", path" << parentPathStr << "/" << name
+ << ", path: " << parentPathStr << "/" << name
<< ", opId: " << OperationId
<< ", at schemeshard: " << ssId);
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp
index a5bc8b34ce..9a4fcc5578 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_deallocate_pq.cpp
@@ -88,7 +88,7 @@ public:
}
auto pathId = path.Base()->PathId;
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups.at(pathId);
+ TTopicInfo::TPtr pqGroup = context.SS->Topics.at(pathId);
Y_VERIFY(pqGroup);
if (pqGroup->AlterData) {
@@ -111,23 +111,16 @@ public:
bool parseOk = ParseFromStringNoSizeLimit(config, tabletConfig);
Y_VERIFY(parseOk);
- ui64 throughput = ((ui64)pqGroup->TotalPartitionCount) * config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
+ const PQGroupReserve reserve(config, pqGroup->TotalPartitionCount);
- const ui64 storage = [&config, &throughput]() {
- if (config.GetPartitionConfig().HasStorageLimitBytes()) {
- return config.GetPartitionConfig().GetStorageLimitBytes();
- } else {
- return throughput * config.GetPartitionConfig().GetLifetimeSeconds();
- }
- }();
-
auto domainInfo = context.SS->ResolveDomainInfo(pathId);
domainInfo->DecPathsInside();
domainInfo->DecPQPartitionsInside(pqGroup->TotalPartitionCount);
- domainInfo->DecPQReservedStorage(storage);
+ domainInfo->DecPQReservedStorage(reserve.Storage);
+ domainInfo->AggrDiskSpaceUsage({}, pqGroup->Stats);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Sub(throughput);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Sub(storage);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Sub(reserve.Throughput);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Sub(reserve.Storage);
context.SS->TabletCounters->Simple()[COUNTER_STREAM_SHARDS_COUNT].Sub(pqGroup->TotalPartitionCount);
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_bsv.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_bsv.cpp
index 6e13f379bd..f09fc6e892 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_bsv.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_bsv.cpp
@@ -6,6 +6,9 @@
namespace {
+constexpr char RateLimiterRateAttrName[] = "drop_blockstore_volume_rate_limiter_rate";
+constexpr char RateLimiterCapacityAttrName[] = "drop_blockstore_volume_rate_limiter_capacity";
+
using namespace NKikimr;
using namespace NSchemeShard;
@@ -220,6 +223,36 @@ public:
return result;
}
+ {
+ auto& rateLimiter = context.SS->DropBlockStoreVolumeRateLimiter;
+
+ // update rate limiter params
+ auto domainDir = context.SS->PathsById.at(path.GetPathIdForDomain());
+ double rate = 0;
+ double capacity = 0;
+ auto& attrs = domainDir->UserAttrs->Attrs;
+ if (TryFromString(attrs[RateLimiterRateAttrName], rate) &&
+ TryFromString(attrs[RateLimiterCapacityAttrName], capacity))
+ {
+ rateLimiter.SetRate(rate);
+ rateLimiter.SetCapacity(capacity);
+ }
+
+ if (rate > 0.0 && capacity > 0.0) {
+ rateLimiter.Fill(AppData()->TimeProvider->Now());
+
+ if (rateLimiter.Available() >= 1.0) {
+ rateLimiter.Take(1.0);
+ } else {
+ // TODO: should use separate status?
+ result->SetError(
+ NKikimrScheme::StatusNotAvailable,
+ "Too many requests");
+ return result;
+ }
+ }
+ }
+
TTxState& txState = context.SS->CreateTx(OperationId, TTxState::TxDropBlockStoreVolume, path.Base()->PathId);
// Dirty hack: drop step must not be zero because 0 is treated as "hasn't been dropped"
txState.MinStep = TStepId(1);
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp
index c0355b08f7..7884c523dc 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp
@@ -225,6 +225,29 @@ public:
}; // TConfigurePartsAtTable
+class TConfigurePartsAtTableDropSnapshot: public TConfigurePartsAtTable {
+protected:
+ void FillNotice(const TPathId& pathId, NKikimrTxDataShard::TFlatSchemeTransaction& tx, TOperationContext& context) const override {
+ TConfigurePartsAtTable::FillNotice(pathId, tx, context);
+
+ Y_VERIFY(context.SS->TablesWithSnapshots.contains(pathId));
+ const auto snapshotTxId = context.SS->TablesWithSnapshots.at(pathId);
+
+ Y_VERIFY(context.SS->SnapshotsStepIds.contains(snapshotTxId));
+ const auto snapshotStep = context.SS->SnapshotsStepIds.at(snapshotTxId);
+
+ Y_VERIFY(tx.HasDropCdcStreamNotice());
+ auto& notice = *tx.MutableDropCdcStreamNotice();
+
+ notice.MutableDropSnapshot()->SetStep(ui64(snapshotStep));
+ notice.MutableDropSnapshot()->SetTxId(ui64(snapshotTxId));
+ }
+
+public:
+ using TConfigurePartsAtTable::TConfigurePartsAtTable;
+
+}; // TConfigurePartsAtTableDropSnapshot
+
class TDropCdcStreamAtTable: public TSubOperation {
static TTxState::ETxState NextState() {
return TTxState::ConfigureParts;
@@ -248,9 +271,17 @@ class TDropCdcStreamAtTable: public TSubOperation {
switch (state) {
case TTxState::Waiting:
case TTxState::ConfigureParts:
- return MakeHolder<TConfigurePartsAtTable>(OperationId);
+ if (DropSnapshot) {
+ return MakeHolder<TConfigurePartsAtTableDropSnapshot>(OperationId);
+ } else {
+ return MakeHolder<TConfigurePartsAtTable>(OperationId);
+ }
case TTxState::Propose:
- return MakeHolder<NCdcStreamState::TProposeAtTable>(OperationId);
+ if (DropSnapshot) {
+ return MakeHolder<NCdcStreamState::TProposeAtTableDropSnapshot>(OperationId);
+ } else {
+ return MakeHolder<NCdcStreamState::TProposeAtTable>(OperationId);
+ }
case TTxState::ProposedWaitParts:
return MakeHolder<NTableState::TProposedWaitParts>(OperationId);
case TTxState::Done:
@@ -261,7 +292,17 @@ class TDropCdcStreamAtTable: public TSubOperation {
}
public:
- using TSubOperation::TSubOperation;
+ explicit TDropCdcStreamAtTable(TOperationId id, const TTxTransaction& tx, bool dropSnapshot)
+ : TSubOperation(id, tx)
+ , DropSnapshot(dropSnapshot)
+ {
+ }
+
+ explicit TDropCdcStreamAtTable(TOperationId id, TTxState::ETxState state, bool dropSnapshot)
+ : TSubOperation(id, state)
+ , DropSnapshot(dropSnapshot)
+ {
+ }
THolder<TProposeResponse> Propose(const TString&, TOperationContext& context) override {
const auto& workingDir = Transaction.GetWorkingDir();
@@ -325,6 +366,17 @@ public:
return result;
}
+ if (DropSnapshot && !context.SS->TablesWithSnapshots.contains(tablePath.Base()->PathId)) {
+ result->SetError(NKikimrScheme::StatusPreconditionFailed, TStringBuilder() << "Table has no snapshots"
+ << ": pathId# " << tablePath.Base()->PathId);
+ return result;
+ }
+
+ auto guard = context.DbGuard();
+ context.MemChanges.GrabPath(context.SS, tablePath.Base()->PathId);
+ context.MemChanges.GrabNewTxState(context.SS, OperationId);
+
+ context.DbChanges.PersistPath(tablePath.Base()->PathId);
context.DbChanges.PersistTxState(OperationId);
Y_VERIFY(context.SS->Tables.contains(tablePath.Base()->PathId));
@@ -339,8 +391,12 @@ public:
Y_VERIFY(stream->AlterVersion != 0);
Y_VERIFY(!stream->AlterData);
+ const auto txType = DropSnapshot
+ ? TTxState::TxDropCdcStreamAtTableDropSnapshot
+ : TTxState::TxDropCdcStreamAtTable;
+
Y_VERIFY(!context.SS->FindTx(OperationId));
- auto& txState = context.SS->CreateTx(OperationId, TTxState::TxDropCdcStreamAtTable, tablePath.Base()->PathId);
+ auto& txState = context.SS->CreateTx(OperationId, txType, tablePath.Base()->PathId);
txState.State = TTxState::ConfigureParts;
tablePath.Base()->PathState = NKikimrSchemeOp::EPathStateAlter;
@@ -356,8 +412,9 @@ public:
return result;
}
- void AbortPropose(TOperationContext&) override {
- Y_FAIL("no AbortPropose for TDropCdcStreamAtTable");
+ void AbortPropose(TOperationContext& context) override {
+ LOG_N("TDropCdcStreamAtTable AbortPropose"
+ << ": opId# " << OperationId);
}
void AbortUnsafe(TTxId txId, TOperationContext& context) override {
@@ -367,6 +424,9 @@ public:
context.OnComplete.DoneOperation(OperationId);
}
+private:
+ const bool DropSnapshot;
+
}; // TDropCdcStreamAtTable
} // anonymous
@@ -379,12 +439,12 @@ ISubOperationBase::TPtr CreateDropCdcStreamImpl(TOperationId id, TTxState::ETxSt
return MakeSubOperation<TDropCdcStream>(id, state);
}
-ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, const TTxTransaction& tx) {
- return MakeSubOperation<TDropCdcStreamAtTable>(id, tx);
+ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, const TTxTransaction& tx, bool dropSnapshot) {
+ return MakeSubOperation<TDropCdcStreamAtTable>(id, tx, dropSnapshot);
}
-ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, TTxState::ETxState state) {
- return MakeSubOperation<TDropCdcStreamAtTable>(id, state);
+ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, TTxState::ETxState state, bool dropSnapshot) {
+ return MakeSubOperation<TDropCdcStreamAtTable>(id, state, dropSnapshot);
}
TVector<ISubOperationBase::TPtr> CreateDropCdcStream(TOperationId opId, const TTxTransaction& tx, TOperationContext& context) {
@@ -442,7 +502,13 @@ TVector<ISubOperationBase::TPtr> CreateDropCdcStream(TOperationId opId, const TT
return {CreateReject(opId, NKikimrScheme::StatusPreconditionFailed, errStr)};
}
- if (!context.SS->CheckLocks(tablePath.Base()->PathId, tx, errStr)) {
+ Y_VERIFY(context.SS->CdcStreams.contains(streamPath.Base()->PathId));
+ auto stream = context.SS->CdcStreams.at(streamPath.Base()->PathId);
+
+ const auto lockTxId = stream->State == TCdcStreamInfo::EState::ECdcStreamStateScan
+ ? streamPath.Base()->CreateTxId
+ : InvalidTxId;
+ if (!context.SS->CheckLocks(tablePath.Base()->PathId, lockTxId, errStr)) {
return {CreateReject(opId, NKikimrScheme::StatusMultipleModifications, errStr)};
}
@@ -452,13 +518,31 @@ TVector<ISubOperationBase::TPtr> CreateDropCdcStream(TOperationId opId, const TT
auto outTx = TransactionTemplate(workingDirPath.PathString(), NKikimrSchemeOp::EOperationType::ESchemeOpDropCdcStreamAtTable);
outTx.MutableDropCdcStream()->CopyFrom(op);
- result.push_back(CreateDropCdcStreamAtTable(NextPartId(opId, result), outTx));
+ if (lockTxId != InvalidTxId) {
+ outTx.MutableLockGuard()->SetOwnerTxId(ui64(lockTxId));
+ }
+
+ result.push_back(CreateDropCdcStreamAtTable(NextPartId(opId, result), outTx, lockTxId != InvalidTxId));
+ }
+
+ if (lockTxId != InvalidTxId) {
+ auto outTx = TransactionTemplate(workingDirPath.PathString(), NKikimrSchemeOp::EOperationType::ESchemeOpDropLock);
+ outTx.SetFailOnExist(true);
+ outTx.SetInternal(true);
+ outTx.MutableLockConfig()->SetName(tablePath.LeafName());
+ outTx.MutableLockGuard()->SetOwnerTxId(ui64(lockTxId));
+
+ result.push_back(DropLock(NextPartId(opId, result), outTx));
}
{
auto outTx = TransactionTemplate(tablePath.PathString(), NKikimrSchemeOp::EOperationType::ESchemeOpDropCdcStreamImpl);
outTx.MutableDrop()->SetName(streamPath.Base()->Name);
+ if (lockTxId != InvalidTxId) {
+ outTx.MutableLockGuard()->SetOwnerTxId(ui64(lockTxId));
+ }
+
result.push_back(CreateDropCdcStreamImpl(NextPartId(opId, result), outTx));
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_extsubdomain.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_extsubdomain.cpp
index 34114c2ddb..6583cc3cb8 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_extsubdomain.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_extsubdomain.cpp
@@ -138,7 +138,7 @@ public:
return true;
}
- TTabletId hiveToRequest = context.SS->ResolveHive(txState->TargetPathId, context.Ctx);
+ TTabletId hiveToRequest = context.SS->ResolveHive(txState->TargetPathId, context.Ctx, TSchemeShard::EHiveSelection::IGNORE_TENANT);
auto event = MakeHolder<TEvHive::TEvDeleteOwnerTablets>(ui64(tenantSchemeshard), ui64(OperationId.GetTxId()));
context.OnComplete.BindMsgToPipe(OperationId, hiveToRequest, TPipeMessageId(0, 0), event.Release());
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp
index e7b445d445..b7127cc228 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp
@@ -85,7 +85,7 @@ public:
TString topicName = context.SS->PathsById.at(txState->TargetPathId)->Name;
Y_VERIFY_S(topicName.size(), "topicName is empty. PathId: " << txState->TargetPathId);
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups.at(txState->TargetPathId);
+ TTopicInfo::TPtr pqGroup = context.SS->Topics.at(txState->TargetPathId);
Y_VERIFY_S(pqGroup, "pqGroup is null. PathId: " << txState->TargetPathId);
bool haveWork = false;
@@ -195,7 +195,7 @@ public:
Y_VERIFY(!path->Dropped());
path->SetDropped(step, OperationId.GetTxId());
context.SS->PersistDropStep(db, pathId, step, OperationId);
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups.at(pathId);
+ TTopicInfo::TPtr pqGroup = context.SS->Topics.at(pathId);
Y_VERIFY(pqGroup);
// KIKIMR-13173
@@ -211,22 +211,21 @@ public:
bool parseOk = ParseFromStringNoSizeLimit(config, tabletConfig);
Y_VERIFY(parseOk);
- ui64 throughput = ((ui64)pqGroup->TotalPartitionCount) * config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond();
- const ui64 storage = [&config, &throughput]() {
- if (config.GetPartitionConfig().HasStorageLimitBytes()) {
- return config.GetPartitionConfig().GetStorageLimitBytes();
- } else {
- return throughput * config.GetPartitionConfig().GetLifetimeSeconds();
- }
- }();
+ const PQGroupReserve reserve(config, pqGroup->TotalPartitionCount);
auto domainInfo = context.SS->ResolveDomainInfo(pathId);
domainInfo->DecPathsInside();
domainInfo->DecPQPartitionsInside(pqGroup->TotalPartitionCount);
- domainInfo->DecPQReservedStorage(storage);
+ domainInfo->DecPQReservedStorage(reserve.Storage);
+ domainInfo->AggrDiskSpaceUsage({}, pqGroup->Stats);
+ if (domainInfo->CheckDiskSpaceQuotas(context.SS)) {
+ auto subDomainId = context.SS->ResolvePathIdForDomain(pathId);
+ context.SS->PersistSubDomainState(db, subDomainId, *domainInfo);
+ context.OnComplete.PublishToSchemeBoard(OperationId, subDomainId);
+ }
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Sub(throughput);
- context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Sub(storage);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_THROUGHPUT].Sub(reserve.Throughput);
+ context.SS->TabletCounters->Simple()[COUNTER_STREAM_RESERVED_STORAGE].Sub(reserve.Storage);
context.SS->TabletCounters->Simple()[COUNTER_STREAM_SHARDS_COUNT].Sub(pqGroup->TotalPartitionCount);
@@ -309,7 +308,7 @@ class TDropPQ: public TSubOperation {
public:
using TSubOperation::TSubOperation;
- void SetPQBalancer(TPersQueueGroupInfo::TPtr pqGroup, TTxState& txState, TOperationContext& context) {
+ void SetPQBalancer(TTopicInfo::TPtr pqGroup, TTxState& txState, TOperationContext& context) {
auto shardId = pqGroup->BalancerShardIdx;
auto tabletId = pqGroup->BalancerTabletID;
@@ -325,11 +324,11 @@ public:
}
}
- void SetPQShards(TPersQueueGroupInfo::TPtr pqGroup, TTxState& txState, TOperationContext& context) {
+ void SetPQShards(TTopicInfo::TPtr pqGroup, TTxState& txState, TOperationContext& context) {
ui32 drops = 0;
for (auto shard : pqGroup->Shards) {
auto shardIdx = shard.first;
- TPQShardInfo::TPtr info = shard.second;
+ TTopicTabletInfo::TPtr info = shard.second;
auto tabletId = context.SS->ShardInfos[shardIdx].TabletID;
@@ -434,7 +433,7 @@ public:
return result;
}
- TPersQueueGroupInfo::TPtr pqGroup = context.SS->PersQueueGroups.at(path.Base()->PathId);
+ TTopicInfo::TPtr pqGroup = context.SS->Topics.at(path.Base()->PathId);
Y_VERIFY(pqGroup);
if (pqGroup->AlterData) {
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_modify_acl.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_modify_acl.cpp
index 9fd70b27f8..e830989407 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_modify_acl.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_modify_acl.cpp
@@ -14,21 +14,21 @@ public:
const TTabletId ssId = context.SS->SelfTabletId();
const TString& parentPathStr = Transaction.GetWorkingDir();
- const TString& name = Transaction.GetModifyACL().GetName();
+ const auto& op = Transaction.GetModifyACL();
+ const auto& name = op.GetName();
+ const auto& acl = op.GetDiffACL();
+ const auto& owner = op.GetNewOwner();
- LOG_NOTICE_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
- "TModifyACL Propose"
- << ", path: " << parentPathStr << "/" << name
- << ", operationId: " << OperationId
- << ", at schemeshard: " << ssId);
+ LOG_NOTICE_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "TModifyACL Propose"
+ << ", path: " << parentPathStr << "/" << name
+ << ", operationId: " << OperationId
+ << ", at schemeshard: " << ssId);
auto result = MakeHolder<TProposeResponse>(NKikimrScheme::StatusSuccess, ui64(OperationId.GetTxId()), ui64(ssId));
- const TString acl = Transaction.GetModifyACL().GetDiffACL();
-
- TPath path = TPath::Resolve(parentPathStr, context.SS).Dive(name);
+ const auto path = TPath::Resolve(parentPathStr, context.SS).Dive(name);
{
- TPath::TChecker checks = path.Check();
+ const auto checks = path.Check();
checks
.NotEmpty()
.NotUnderDomainUpgrade()
@@ -46,62 +46,72 @@ public:
}
TString errStr;
-
if (!context.SS->CheckApplyIf(Transaction, errStr)) {
result->SetError(NKikimrScheme::StatusPreconditionFailed, errStr);
return result;
}
- NIceDb::TNiceDb db(context.GetDB());
+ THashSet<TPathId> subTree;
+ if (acl || (owner && path.Base()->IsTable())) {
+ subTree = context.SS->ListSubTree(path.Base()->PathId, context.Ctx);
+ }
- const TString owner = Transaction.GetModifyACL().GetNewOwner();
+ THashSet<TPathId> affectedPaths;
+ NIceDb::TNiceDb db(context.GetDB());
- if (!acl.empty()) {
+ if (acl) {
++path.Base()->ACLVersion;
path.Base()->ApplyACL(acl);
context.SS->PersistACL(db, path.Base());
- auto subtree = context.SS->ListSubTree(path.Base()->PathId, context.Ctx);
- for (const TPathId pathId : subtree) {
+ for (const auto& pathId : subTree) {
if (context.SS->PathsById.at(pathId)->IsMigrated()) {
continue;
}
context.OnComplete.PublishToSchemeBoard(OperationId, pathId);
}
- if (!path.Base()->IsPQGroup()) {
- // YDBOPS-1328
- // its better we do not republish parent but
- // it is possible when we do not show ALC for children
- TPath parent = path.Parent();
- ++parent.Base()->DirAlterVersion;
- context.SS->PersistPathDirAlterVersion(db, parent.Base());
- context.SS->ClearDescribePathCaches(parent.Base());
- context.OnComplete.PublishToSchemeBoard(OperationId, parent.Base()->PathId);
+ affectedPaths.insert(subTree.begin(), subTree.end());
+ }
+
+ if (owner) {
+ THashSet<TPathId> pathIds = {path.Base()->PathId};
+ if (path.Base()->IsTable()) {
+ pathIds = subTree;
}
- context.OnComplete.UpdateTenants(std::move(subtree));
- }
+ for (const auto& pathId : pathIds) {
+ if (!context.SS->PathsById.contains(pathId)) {
+ Y_VERIFY_DEBUG_S(false, "unreachable");
+ continue;
+ }
+
+ auto pathEl = context.SS->PathsById.at(pathId);
- if (!owner.empty()) {
- path.Base()->Owner = owner;
- context.SS->PersistOwner(db, path.Base());
+ pathEl->Owner = owner;
+ context.SS->PersistOwner(db, pathEl);
- ++path.Base()->DirAlterVersion;
- context.SS->PersistPathDirAlterVersion(db, path.Base());
+ ++pathEl->DirAlterVersion;
+ context.SS->PersistPathDirAlterVersion(db, pathEl);
+
+ context.SS->ClearDescribePathCaches(pathEl);
+ context.OnComplete.PublishToSchemeBoard(OperationId, pathId);
+ }
- context.OnComplete.PublishToSchemeBoard(OperationId, path.Base()->PathId);
+ affectedPaths.insert(pathIds.begin(), pathIds.end());
+ }
- TPath parent = path.Parent(); // we show owner in children listing, so we have to update it
+ if ((acl && !path.Base()->IsPQGroup()) || owner) {
+ const auto parent = path.Parent();
++parent.Base()->DirAlterVersion;
context.SS->PersistPathDirAlterVersion(db, parent.Base());
context.SS->ClearDescribePathCaches(parent.Base());
context.OnComplete.PublishToSchemeBoard(OperationId, parent.Base()->PathId);
-
- context.OnComplete.UpdateTenants({path.Base()->PathId});
}
+ context.OnComplete.UpdateTenants(std::move(affectedPaths));
context.OnComplete.DoneOperation(OperationId);
+
return result;
}
@@ -110,11 +120,11 @@ public:
}
void ProgressState(TOperationContext&) override {
- Y_FAIL("no progress state for modify acl");
+ Y_FAIL("no ProgressState for TModifyACL");
}
void AbortUnsafe(TTxId, TOperationContext&) override {
- Y_FAIL("no AbortUnsafe for modify acl");
+ Y_FAIL("no AbortUnsafe for TModifyACL");
}
};
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_move_index.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_move_index.cpp
index 02701c53b3..f90437e97e 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_move_index.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_move_index.cpp
@@ -589,9 +589,7 @@ TVector<ISubOperationBase::TPtr> CreateConsistentMoveIndex(TOperationId nextId,
}
}
- result.push_back(CreateMoveTableIndex(TOperationId(nextId.GetTxId(),
- nextId.GetSubTxId() + result.size()),
- MoveTableIndexTask(srcIndexPath, dstIndexPath)));
+ result.push_back(CreateMoveTableIndex(NextPartId(nextId, result), MoveTableIndexTask(srcIndexPath, dstIndexPath)));
TString srcImplTableName = srcIndexPath.Base()->GetChildren().begin()->first;
TPath srcImplTable = srcIndexPath.Child(srcImplTableName);
@@ -600,9 +598,7 @@ TVector<ISubOperationBase::TPtr> CreateConsistentMoveIndex(TOperationId nextId,
TPath dstImplTable = dstIndexPath.Child(srcImplTableName);
- result.push_back(CreateMoveTable(TOperationId(nextId.GetTxId(),
- nextId.GetSubTxId() + result.size()),
- MoveTableTask(srcImplTable, dstImplTable)));
+ result.push_back(CreateMoveTable(NextPartId(nextId, result), MoveTableTask(srcImplTable, dstImplTable)));
return result;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp
index f574961986..894b65d839 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp
@@ -50,9 +50,7 @@ TVector<ISubOperationBase::TPtr> CreateConsistentMoveTable(TOperationId nextId,
TPath dstPath = TPath::Resolve(dstStr, context.SS);
- result.push_back(CreateMoveTable(TOperationId(nextId.GetTxId(),
- nextId.GetSubTxId() + result.size()),
- MoveTableTask(srcPath, dstPath)));
+ result.push_back(CreateMoveTable(NextPartId(nextId, result), MoveTableTask(srcPath, dstPath)));
for (auto& child: srcPath.Base()->GetChildren()) {
auto name = child.first;
@@ -72,9 +70,7 @@ TVector<ISubOperationBase::TPtr> CreateConsistentMoveTable(TOperationId nextId,
Y_VERIFY_S(srcChildPath.Base()->GetChildren().size() == 1,
srcChildPath.PathString() << " has children " << srcChildPath.Base()->GetChildren().size());
- result.push_back(CreateMoveTableIndex(TOperationId(nextId.GetTxId(),
- nextId.GetSubTxId() + result.size()),
- MoveTableIndexTask(srcChildPath, dstIndexPath)));
+ result.push_back(CreateMoveTableIndex(NextPartId(nextId, result), MoveTableIndexTask(srcChildPath, dstIndexPath)));
TString srcImplTableName = srcChildPath.Base()->GetChildren().begin()->first;
TPath srcImplTable = srcChildPath.Child(srcImplTableName);
@@ -85,9 +81,7 @@ TVector<ISubOperationBase::TPtr> CreateConsistentMoveTable(TOperationId nextId,
TPath dstImplTable = dstIndexPath.Child(srcImplTableName);
- result.push_back(CreateMoveTable(TOperationId(nextId.GetTxId(),
- nextId.GetSubTxId() + result.size()),
- MoveTableTask(srcImplTable, dstImplTable)));
+ result.push_back(CreateMoveTable(NextPartId(nextId, result), MoveTableTask(srcImplTable, dstImplTable)));
}
return result;
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_part.h b/ydb/core/tx/schemeshard/schemeshard__operation_part.h
index 188d045df2..41526b52f5 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_part.h
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_part.h
@@ -386,8 +386,8 @@ ISubOperationBase::TPtr CreateAlterCdcStreamAtTable(TOperationId id, TTxState::E
TVector<ISubOperationBase::TPtr> CreateDropCdcStream(TOperationId id, const TTxTransaction& tx, TOperationContext& context);
ISubOperationBase::TPtr CreateDropCdcStreamImpl(TOperationId id, const TTxTransaction& tx);
ISubOperationBase::TPtr CreateDropCdcStreamImpl(TOperationId id, TTxState::ETxState state);
-ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, const TTxTransaction& tx);
-ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, TTxState::ETxState state);
+ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, const TTxTransaction& tx, bool dropSnapshot);
+ISubOperationBase::TPtr CreateDropCdcStreamAtTable(TOperationId id, TTxState::ETxState state, bool dropSnapshot);
ISubOperationBase::TPtr CreateBackup(TOperationId id, const TTxTransaction& tx);
ISubOperationBase::TPtr CreateBackup(TOperationId id, TTxState::ETxState state);
diff --git a/ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp b/ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp
new file mode 100644
index 0000000000..90ada5af23
--- /dev/null
+++ b/ydb/core/tx/schemeshard/schemeshard__pq_stats.cpp
@@ -0,0 +1,143 @@
+#include "schemeshard_impl.h"
+#include "schemeshard__stats_impl.h"
+
+#include <ydb/core/base/appdata.h>
+#include <ydb/core/base/cputime.h>
+#include <ydb/core/protos/sys_view.pb.h>
+
+namespace NKikimr {
+namespace NSchemeShard {
+
+class TTxStoreTopicStats: public TTxStoreStats<TEvPersQueue::TEvPeriodicTopicStats> {
+ TSideEffects MergeOpSideEffects;
+
+public:
+ TTxStoreTopicStats(TSchemeShard* ss, TStatsQueue<TEvPersQueue::TEvPeriodicTopicStats>& queue, bool& persistStatsPending)
+ : TTxStoreStats(ss, queue, persistStatsPending)
+ {
+ }
+
+ virtual ~TTxStoreTopicStats() = default;
+
+ void Complete(const TActorContext& ) override;
+
+ // returns true to continue batching
+ bool PersistSingleStats(const TPathId& pathId, const TStatsQueue<TEvPersQueue::TEvPeriodicTopicStats>::TItem& item, TTransactionContext& txc, const TActorContext& ctx) override;
+};
+
+
+bool TTxStoreTopicStats::PersistSingleStats(const TPathId& pathId, const TStatsQueueItem<TEvPersQueue::TEvPeriodicTopicStats>& item, TTransactionContext& txc, const TActorContext& ctx) {
+ const auto& rec = item.Ev->Get()->Record;
+
+ TTopicStats newStats;
+ newStats.SeqNo = TMessageSeqNo(rec.GetGeneration(), rec.GetRound());
+ newStats.DataSize = rec.GetDataSize();
+ newStats.UsedReserveSize = rec.GetUsedReserveSize();
+
+ if (newStats.DataSize < newStats.UsedReserveSize) {
+ LOG_WARN_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Got wrong periodic topic stats at partition " << pathId
+ << ". DataSize must be greater than or equal to UsedReserveSize but "
+ << " DataSize " << rec.GetDataSize()
+ << " UsedReserveSize " << rec.GetUsedReserveSize());
+ return true;
+ }
+
+ const auto it = Self->Topics.find(pathId);
+ if (it == Self->Topics.end()) {
+ return true;
+ }
+
+ auto& topic = it->second;
+ auto& oldStats = topic->Stats;
+
+ if (newStats.SeqNo <= oldStats.SeqNo) {
+ // Ignore outdated message
+ return true;
+ }
+
+ auto subDomainInfo = Self->ResolveDomainInfo(pathId);
+ subDomainInfo->AggrDiskSpaceUsage(newStats, oldStats);
+
+ oldStats = newStats;
+
+ NIceDb::TNiceDb db(txc.DB);
+
+ Self->PersistPersQueueGroupStats(db, pathId, newStats);
+
+ if (subDomainInfo->CheckDiskSpaceQuotas(Self)) {
+ auto subDomainId = Self->ResolvePathIdForDomain(pathId);
+ Self->PersistSubDomainState(db, subDomainId, *subDomainInfo);
+
+ // Publish is done in a separate transaction, so we may call this directly
+ TDeque<TPathId> toPublish;
+ toPublish.push_back(subDomainId);
+ Self->PublishToSchemeBoard(TTxId(), std::move(toPublish), ctx);
+ }
+
+ return true;
+}
+
+void TTxStoreTopicStats::Complete(const TActorContext&) {
+ Queue.WriteQueueSizeMetric();
+}
+
+
+void TSchemeShard::Handle(TEvPersQueue::TEvPeriodicTopicStats::TPtr& ev, const TActorContext& ctx) {
+ const auto& rec = ev->Get()->Record;
+
+ const TPathId pathId = TPathId(TabletID(), rec.GetPathId());
+
+ LOG_INFO_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Got periodic topic stats at partition " << pathId
+ << " DataSize " << rec.GetDataSize()
+ << " UsedReserveSize " << rec.GetUsedReserveSize());
+
+ TStatsId statsId(pathId);
+ switch(TopicStatsQueue.Add(statsId, ev.Release())) {
+ case READY:
+ ExecuteTopicStatsBatch(ctx);
+ break;
+
+ case NOT_READY:
+ ScheduleTopicStatsBatch(ctx);
+ break;
+
+ default:
+ Y_FAIL("Unknown batch status");
+ }
+}
+
+void TSchemeShard::Handle(TEvPrivate::TEvPersistTopicStats::TPtr&, const TActorContext& ctx) {
+ LOG_INFO_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Started TEvPersistStats at tablet " << TabletID() << ", queue size# " << TopicStatsQueue.Size());
+
+ TopicStatsBatchScheduled = false;
+ ExecuteTopicStatsBatch(ctx);
+}
+
+void TSchemeShard::ExecuteTopicStatsBatch(const TActorContext& ctx) {
+ if (!TopicPersistStatsPending && !TopicStatsQueue.Empty()) {
+ LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Will execute TTxStoreStats, queue# " << TopicStatsQueue.Size());
+
+ TopicPersistStatsPending = true;
+ Execute(new TTxStoreTopicStats(this, TopicStatsQueue, TopicPersistStatsPending), ctx);
+
+ ScheduleTopicStatsBatch(ctx);
+ }
+}
+
+void TSchemeShard::ScheduleTopicStatsBatch(const TActorContext& ctx) {
+ if (!TopicStatsBatchScheduled && !TopicStatsQueue.Empty()) {
+ TDuration delay = TopicStatsQueue.Delay();
+ LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Will delay TTxStoreTopicStats on# " << delay << ", queue# " << TopicStatsQueue.Size());
+
+ ctx.Schedule(delay, new TEvPrivate::TEvPersistTopicStats());
+ TopicStatsBatchScheduled = true;
+ }
+}
+
+} // NSchemeShard
+} // NKikimr
diff --git a/ydb/core/tx/schemeshard/schemeshard__stats.h b/ydb/core/tx/schemeshard/schemeshard__stats.h
new file mode 100644
index 0000000000..b9abf7ab34
--- /dev/null
+++ b/ydb/core/tx/schemeshard/schemeshard__stats.h
@@ -0,0 +1,132 @@
+#pragma once
+
+#include "schemeshard.h"
+#include "schemeshard_private.h"
+#include "schemeshard_tx_infly.h"
+#include "schemeshard__operation.h"
+
+#include <ydb/core/tablet_flat/tablet_flat_executed.h>
+
+namespace NKikimr {
+namespace NSchemeShard {
+
+struct TStatsId {
+ TPathId PathId;
+ TTabletId Datashard;
+
+ TStatsId(const TPathId& pathId, const TTabletId datashard = TTabletId(0))
+ : PathId(pathId)
+ , Datashard(datashard)
+ {
+ }
+
+ bool operator==(const TStatsId& rhs) const {
+ return PathId == rhs.PathId && Datashard == rhs.Datashard;
+ }
+
+ struct THash {
+ inline size_t operator()(const TStatsId& obj) const {
+ return MultiHash(obj.PathId.Hash(), obj.Datashard);
+ }
+ };
+};
+
+template<typename TEvPeriodicStats>
+struct TStatsQueueItem {
+ typename TEvPeriodicStats::TPtr Ev;
+ TStatsId Id;
+ TMonotonic Ts;
+
+ TStatsQueueItem(typename TEvPeriodicStats::TPtr ev, const TStatsId& id)
+ : Ev(ev)
+ , Id(id)
+ , Ts(AppData()->MonotonicTimeProvider->Now())
+ {}
+
+ TPathId PathId() {
+ return Id.PathId;
+ }
+};
+
+enum EStatsQueueStatus {
+ READY,
+ NOT_READY
+};
+
+template<typename TEvent>
+class TStatsQueue {
+public:
+ using TEventPtr = typename TEvent::TPtr;
+ using TItem = TStatsQueueItem<TEvent>;
+ using TStatsMap = THashMap<TStatsId, TItem*, TStatsId::THash>;
+ using TStatsQ = TStatsQueue<TEvent>;
+
+ TStatsQueue(TSchemeShard* ss, ESimpleCounters queueSizeCounter, ECumulativeCounters writtenCounter, EPercentileCounters latencyCounter)
+ : QueueSizeCounter(queueSizeCounter)
+ , WrittenCounter(writtenCounter)
+ , LatencyCounter(latencyCounter)
+ , SS(ss)
+ {}
+
+ EStatsQueueStatus Add(TStatsId statsId, TEventPtr ev);
+ TItem Next();
+
+ TDuration Age() const;
+ TDuration Delay() const;
+
+ bool Empty() const;
+ size_t Size() const;
+
+ bool BatchingEnabled() const;
+ TDuration BatchTimeout() const;
+ ui32 MaxBatchSize() const;
+ TDuration MaxExecuteTime() const;
+
+ void WriteLatencyMetric(const TItem& item);
+ void WriteQueueSizeMetric();
+
+ const ESimpleCounters QueueSizeCounter;
+ const ECumulativeCounters WrittenCounter;
+ const EPercentileCounters LatencyCounter;
+
+private:
+ EStatsQueueStatus Status() const;
+
+ TSchemeShard* SS;
+
+ TStatsMap Map;
+ TDeque<TItem> Queue;
+};
+
+
+template<typename TEvent>
+class TTxStoreStats: public NTabletFlatExecutor::TTransactionBase<TSchemeShard> {
+ using TStatsQ = TStatsQueue<TEvent>;
+ using TItem = TStatsQueueItem<TEvent>;
+
+protected:
+ TStatsQ& Queue;
+ bool& PersistStatsPending;
+
+public:
+ TTxStoreStats(TSchemeShard* ss, TStatsQ& queue, bool& persistStatsPending)
+ : TBase(ss)
+ , Queue(queue)
+ , PersistStatsPending(persistStatsPending)
+ {
+ }
+
+ virtual ~TTxStoreStats() = default;
+
+ TTxType GetTxType() const override {
+ return TXTYPE_STORE_PARTITION_STATS;
+ }
+
+ bool Execute(TTransactionContext& txc, const TActorContext& ctx) override;
+
+ // returns true to continue batching
+ virtual bool PersistSingleStats(const TPathId& pathId, const TItem& item, TTransactionContext& txc, const TActorContext& ctx) = 0;
+};
+
+} // NSchemeShard
+} // NKikimr
diff --git a/ydb/core/tx/schemeshard/schemeshard__stats_impl.h b/ydb/core/tx/schemeshard/schemeshard__stats_impl.h
new file mode 100644
index 0000000000..338de84899
--- /dev/null
+++ b/ydb/core/tx/schemeshard/schemeshard__stats_impl.h
@@ -0,0 +1,142 @@
+#pragma once
+
+#include "schemeshard_impl.h"
+
+namespace NKikimr {
+namespace NSchemeShard {
+
+template<typename TEvent>
+EStatsQueueStatus TStatsQueue<TEvent>::Add(TStatsId statsId, TEventPtr ev) {
+ typename TStatsMap::insert_ctx insertCtx;
+ auto it = Map.find(statsId, insertCtx);
+ if (it == Map.end()) {
+ Queue.emplace_back(ev, statsId);
+ Map.emplace_direct(insertCtx, statsId, &Queue.back());
+ } else {
+ // already in queue, just update
+ it->second->Ev = ev;
+ }
+
+ WriteQueueSizeMetric();
+
+ return Status();
+}
+
+template<typename TEvent>
+TDuration TStatsQueue<TEvent>::Age() const {
+ if (Empty()) {
+ return TDuration::Zero();
+ }
+ const auto& oldestItem = Queue.front();
+ return AppData()->MonotonicTimeProvider->Now() - oldestItem.Ts;
+}
+
+template<typename TEvent>
+bool TStatsQueue<TEvent>::BatchingEnabled() const {
+ return SS->StatsMaxBatchSize > 0;
+}
+
+template<typename TEvent>
+TDuration TStatsQueue<TEvent>::BatchTimeout() const {
+ return SS->StatsBatchTimeout;
+}
+
+template<typename TEvent>
+TDuration TStatsQueue<TEvent>::Delay() const {
+ return BatchTimeout() - Age();
+}
+
+template<typename TEvent>
+bool TStatsQueue<TEvent>::Empty() const {
+ return Queue.empty();
+}
+
+template<typename TEvent>
+ui32 TStatsQueue<TEvent>::MaxBatchSize() const {
+ return std::max<ui32>(SS->StatsMaxBatchSize, 1);
+}
+
+template<typename TEvent>
+TDuration TStatsQueue<TEvent>::MaxExecuteTime() const {
+ return SS->StatsMaxExecuteTime;
+}
+
+template<typename TEvent>
+TStatsQueueItem<TEvent> TStatsQueue<TEvent>::Next() {
+ auto item = Queue.front();
+ Queue.pop_front();
+
+ Map.erase(item.Id);
+
+ return item;
+}
+
+template<typename TEvent>
+EStatsQueueStatus TStatsQueue<TEvent>::Status() const {
+ if (Empty()) {
+ return NOT_READY;
+ }
+
+ if (!BatchingEnabled()) {
+ return READY;
+ }
+
+ if (Size() >= MaxBatchSize()) {
+ return READY;
+ }
+
+ if (!BatchTimeout() || Age() >= BatchTimeout()) {
+ return READY;
+ }
+
+ return NOT_READY;
+}
+
+template<typename TEvent>
+size_t TStatsQueue<TEvent>::Size() const {
+ return Queue.size();
+}
+
+template<typename TEvent>
+void TStatsQueue<TEvent>::WriteLatencyMetric(const TItem& item) {
+ auto timeInQueue = AppData()->MonotonicTimeProvider->Now() - item.Ts;
+ SS->TabletCounters->Percentile()[LatencyCounter].IncrementFor(timeInQueue.MicroSeconds());
+}
+
+template<typename TEvent>
+void TStatsQueue<TEvent>::WriteQueueSizeMetric() {
+ SS->TabletCounters->Simple()[QueueSizeCounter].Set(Size());
+}
+
+
+template<typename TEvent>
+bool TTxStoreStats<TEvent>::Execute(NTabletFlatExecutor::TTransactionContext& txc, const TActorContext& ctx) {
+ PersistStatsPending = false;
+
+ if (Queue.Empty()) {
+ LOG_DEBUG_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "TTxStoreStats::Execute empty");
+ return true;
+ }
+
+ TMonotonic start = TMonotonic::Now();
+ const ui32 maxBatchSize = Queue.MaxBatchSize();
+ ui32 batchSize = 0;
+ for (; batchSize < maxBatchSize && !Queue.Empty(); ++batchSize) {
+ auto item = Queue.Next();
+ Queue.WriteLatencyMetric(item);
+ if (!PersistSingleStats(item.PathId(), item, txc, ctx)) {
+ break;
+ }
+
+ if ((TMonotonic::Now() - start) >= Queue.MaxExecuteTime()) {
+ break;
+ }
+ }
+
+ Self->TabletCounters->Cumulative()[Queue.WrittenCounter].Increment(batchSize);
+
+ return true;
+}
+
+} // NSchemeShard
+} // NKikimr
diff --git a/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp b/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
index 0929d8bb89..30a6a0e114 100644
--- a/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
@@ -1,4 +1,6 @@
#include "schemeshard_impl.h"
+#include "schemeshard__stats_impl.h"
+
#include <ydb/core/base/appdata.h>
#include <ydb/core/base/cputime.h>
#include <ydb/core/protos/sys_view.pb.h>
@@ -61,7 +63,7 @@ auto TSchemeShard::BuildStatsForCollector(TPathId pathId, TShardIdx shardIdx, TT
return ev;
}
-class TTxStorePartitionStats: public NTabletFlatExecutor::TTransactionBase<TSchemeShard> {
+class TTxStoreTableStats: public TTxStoreStats<TEvDataShard::TEvPeriodicTableStats> {
TSideEffects MergeOpSideEffects;
struct TMessage {
@@ -77,24 +79,20 @@ class TTxStorePartitionStats: public NTabletFlatExecutor::TTransactionBase<TSche
TVector<TMessage> PendingMessages;
public:
- TTxStorePartitionStats(TSelf* self)
- : TBase(self)
+ TTxStoreTableStats(TSchemeShard* ss, TStatsQueue<TEvDataShard::TEvPeriodicTableStats>& queue, bool& persistStatsPending)
+ : TTxStoreStats(ss, queue, persistStatsPending)
{
}
- virtual ~TTxStorePartitionStats() = default;
-
- TTxType GetTxType() const override {
- return TXTYPE_STORE_PARTITION_STATS;
- }
+ virtual ~TTxStoreTableStats() = default;
- bool Execute(TTransactionContext& txc, const TActorContext& ctx) override;
void Complete(const TActorContext& ctx) override;
// returns true to continue batching
- bool PersistSingleStats(TTransactionContext& txc, const TActorContext& ctx);
+ bool PersistSingleStats(const TPathId& pathId, const TStatsQueue<TEvDataShard::TEvPeriodicTableStats>::TItem& item, TTransactionContext& txc, const TActorContext& ctx) override;
};
+
THolder<TProposeRequest> MergeRequest(
TSchemeShard* ss, TTxId& txId, TPathId& pathId, const TVector<TShardIdx>& shardsToMerge)
{
@@ -122,53 +120,10 @@ THolder<TProposeRequest> MergeRequest(
return std::move(request);
}
-bool TTxStorePartitionStats::Execute(TTransactionContext& txc, const TActorContext& ctx) {
- Self->PersistStatsPending = false;
-
- if (Self->StatsQueue.empty())
- return true;
-
- TMonotonic start = TMonotonic::Now();
-
- const ui32 maxBatchSize = Self->StatsMaxBatchSize ? Self->StatsMaxBatchSize : 1;
- ui32 batchSize = 0;
- while (batchSize < maxBatchSize && !Self->StatsQueue.empty()) {
- ++batchSize;
- if (!PersistSingleStats(txc, ctx))
- break;
-
- if ((TMonotonic::Now() - start) >= Self->StatsMaxExecuteTime)
- break;
- }
-
- Self->TabletCounters->Cumulative()[COUNTER_STATS_WRITTEN].Increment(batchSize);
-
- bool isBatchingDisabled = Self->StatsMaxBatchSize == 0;
- if (isBatchingDisabled) {
- // there will be per stat transaction, don't need to schedule additional one
- return true;
- }
-
- if (!Self->StatsQueue.empty()) {
- Self->ScheduleStatsBatch(ctx);
- }
-
- return true;
-}
-
-bool TTxStorePartitionStats::PersistSingleStats(TTransactionContext& txc, const TActorContext& ctx) {
- auto item = Self->StatsQueue.front();
- Self->StatsQueue.pop_front();
-
- auto timeInQueue = AppData()->MonotonicTimeProvider->Now() - item.Ts;
- Self->TabletCounters->Percentile()[COUNTER_STATS_BATCH_LATENCY].IncrementFor(timeInQueue.MicroSeconds());
-
+bool TTxStoreTableStats::PersistSingleStats(const TPathId& pathId,
+ const TStatsQueueItem<TEvDataShard::TEvPeriodicTableStats>& item, NTabletFlatExecutor::TTransactionContext& txc, const TActorContext& ctx) {
const auto& rec = item.Ev->Get()->Record;
auto datashardId = TTabletId(rec.GetDatashardId());
- const TPathId& pathId = item.PathId;
-
- TSchemeShard::TStatsId statsId(pathId, datashardId);
- Self->StatsMap.erase(statsId);
const auto& tableStats = rec.GetTableStats();
const auto& tabletMetrics = rec.GetTabletMetrics();
@@ -434,7 +389,7 @@ bool TTxStorePartitionStats::PersistSingleStats(TTransactionContext& txc, const
return true;
}
-void TTxStorePartitionStats::Complete(const TActorContext& ctx) {
+void TTxStoreTableStats::Complete(const TActorContext& ctx) {
MergeOpSideEffects.ApplyOnComplete(Self, ctx);
for (auto& m: PendingMessages) {
@@ -442,7 +397,7 @@ void TTxStorePartitionStats::Complete(const TActorContext& ctx) {
ctx.Send(m.Actor, m.Event.Release());
}
- Self->TabletCounters->Simple()[COUNTER_STATS_QUEUE_SIZE].Set(Self->StatsQueue.size());
+ Queue.WriteQueueSizeMetric();
}
void TSchemeShard::Handle(TEvDataShard::TEvPeriodicTableStats::TPtr& ev, const TActorContext& ctx) {
@@ -468,81 +423,48 @@ void TSchemeShard::Handle(TEvDataShard::TEvPeriodicTableStats::TPtr& ev, const T
<< " cpuUsage " << tabletMetrics.GetCPU()/10000.0);
TStatsId statsId(pathId, datashardId);
- TStatsMap::insert_ctx insertCtx;
- auto it = StatsMap.find(statsId, insertCtx);
- if (it == StatsMap.end()) {
- StatsQueue.emplace_back(ev.Release(), pathId);
- StatsMap.emplace_direct(insertCtx, statsId, &StatsQueue.back());
- } else {
- // already in queue, just update
- it->second->Ev = ev.Release();
- }
-
- TabletCounters->Simple()[COUNTER_STATS_QUEUE_SIZE].Set(StatsQueue.size());
- ScheduleStatsBatch(ctx);
-}
+
+ switch(TableStatsQueue.Add(statsId, ev.Release())) {
+ case READY:
+ ExecuteTableStatsBatch(ctx);
+ break;
-void TSchemeShard::ScheduleStatsBatch(const TActorContext& ctx) {
- if (StatsQueue.empty())
- return;
+ case NOT_READY:
+ ScheduleTableStatsBatch(ctx);
+ break;
- bool isBatchingDisabled = StatsMaxBatchSize == 0;
- if (isBatchingDisabled) {
- PersistStatsPending = true;
- Execute(new TTxStorePartitionStats(this), ctx);
- LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "Will execute TTxStorePartitionStats without batch");
- return;
+ default:
+ Y_FAIL("Unknown batch status");
}
+}
- if (PersistStatsPending)
- return;
+void TSchemeShard::Handle(TEvPrivate::TEvPersistTableStats::TPtr&, const TActorContext& ctx) {
+ LOG_INFO_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Started TEvPersistStats at tablet " << TabletID() << ", queue size# " << TableStatsQueue.Size());
- if (StatsQueue.size() >= StatsMaxBatchSize || !StatsBatchTimeout) {
- // note that we don't care if already scheduled
- PersistStatsPending = true;
- Execute(new TTxStorePartitionStats(this), ctx);
- LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
- "Will execute TTxStorePartitionStats, queue# " << StatsQueue.size());
- return;
- }
+ TableStatsBatchScheduled = false;
+ ExecuteTableStatsBatch(ctx);
+}
- const auto& oldestItem = StatsQueue.front();
- auto age = AppData()->MonotonicTimeProvider->Now() - oldestItem.Ts;
- if (age >= StatsBatchTimeout) {
- PersistStatsPending = true;
- Execute(new TTxStorePartitionStats(this), ctx);
+void TSchemeShard::ExecuteTableStatsBatch(const TActorContext& ctx) {
+ if (!TablePersistStatsPending && !TableStatsQueue.Empty()) {
+ TablePersistStatsPending = true;
+ Execute(new TTxStoreTableStats(this, TableStatsQueue, TablePersistStatsPending), ctx);
LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
- "Will execute TTxStorePartitionStats because of age, queue# " << StatsQueue.size());
- return;
+ "Will execute TTxStoreStats, queue# " << TableStatsQueue.Size());
+ ScheduleTableStatsBatch(ctx);
}
-
- if (StatsBatchScheduled)
- return;
-
- auto delay = StatsBatchTimeout - age;
- LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
- "Will delay TTxStorePartitionStats on# " << delay << ", queue# " << StatsQueue.size());
-
- ctx.Schedule(delay, new TEvPrivate::TEvPersistStats());
- StatsBatchScheduled = true;
}
-void TSchemeShard::Handle(TEvPrivate::TEvPersistStats::TPtr&, const TActorContext& ctx) {
- LOG_INFO_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
- "Started TEvPersistStats at tablet " << TabletID() << ", queue size# " << StatsQueue.size());
-
- StatsBatchScheduled = false;
-
- if (PersistStatsPending) {
- return;
- }
+void TSchemeShard::ScheduleTableStatsBatch(const TActorContext& ctx) {
+ if (!TableStatsBatchScheduled && !TableStatsQueue.Empty()) {
+ TDuration delay = TableStatsQueue.Delay();
+ LOG_TRACE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
+ "Will delay TTxStoreTableStats on# " << delay << ", queue# " << TableStatsQueue.Size());
- if (StatsQueue.empty()) {
- return;
+ ctx.Schedule(delay, new TEvPrivate::TEvPersistTableStats());
+ TableStatsBatchScheduled = true;
}
-
- PersistStatsPending = true;
- Execute(new TTxStorePartitionStats(this), ctx);
}
}}
diff --git a/ydb/core/tx/schemeshard/schemeshard_audit_log.cpp b/ydb/core/tx/schemeshard/schemeshard_audit_log.cpp
new file mode 100644
index 0000000000..a0a0145ac9
--- /dev/null
+++ b/ydb/core/tx/schemeshard/schemeshard_audit_log.cpp
@@ -0,0 +1,121 @@
+#include "schemeshard_audit_log.h"
+#include "schemeshard_path.h"
+#include "schemeshard_audit_log_fragment.h"
+
+#include <ydb/core/audit/audit_log.h>
+#include <ydb/core/protos/flat_tx_scheme.pb.h>
+#include <util/string/vector.h>
+
+namespace NKikimr::NSchemeShard {
+
+TString GeneralStatus(NKikimrScheme::EStatus actualStatus) {
+ switch(actualStatus) {
+ case NKikimrScheme::EStatus::StatusAlreadyExists:
+ case NKikimrScheme::EStatus::StatusSuccess:
+ return "SUCCESS";
+ case NKikimrScheme::EStatus::StatusAccepted:
+ //TODO: reclassify StatusAccepted as IN-PROCCESS when
+ // logging of operation completion points will be added
+ // return "IN-PROCCESS";
+ return "SUCCESS";
+ default:
+ return "ERROR";
+ }
+}
+
+TString RenderList(const TVector<TString>& list) {
+ auto result = TStringBuilder();
+ result << "[" << JoinStrings(list.begin(), list.end(), ", ") << "]";
+ return result;
+}
+
+std::tuple<TString, TString, TString> GetDatabaseCloudIds(const TPath &databasePath) {
+ if (databasePath.IsEmpty()) {
+ return {};
+ }
+ Y_VERIFY(databasePath->IsDomainRoot());
+ auto getAttr = [&databasePath](const TString &name) -> TString {
+ if (databasePath.Base()->UserAttrs->Attrs.contains(name)) {
+ return databasePath.Base()->UserAttrs->Attrs.at(name);
+ }
+ return {};
+ };
+ return std::make_tuple(
+ getAttr("cloud_id"),
+ getAttr("folder_id"),
+ getAttr("database_id")
+ );
+}
+
+TPath DatabasePathFromWorkingDir(TSchemeShard* SS, const TString &opWorkingDir) {
+ auto databasePath = TPath::Resolve(opWorkingDir, SS);
+ if (!databasePath.IsResolved()) {
+ databasePath.RiseUntilFirstResolvedParent();
+ }
+ //NOTE: operation working dir is usually set to a path of some database/subdomain,
+ // so the next lines is only a safety measure
+ if (!databasePath.IsEmpty() && !databasePath->IsDomainRoot()) {
+ databasePath = TPath::Init(databasePath.GetPathIdForDomain(), SS);
+ }
+ return databasePath;
+}
+
+void AuditLogModifySchemeTransaction(const NKikimrScheme::TEvModifySchemeTransaction& request, const NKikimrScheme::TEvModifySchemeTransactionResult& response, TSchemeShard* SS, const TString& userSID) {
+ static const TString SchemeshardComponentName = "schemeshard";
+
+ //NOTE: EmptyValue couldn't be an empty string as AUDIT_PART() skips parts with an empty values
+ static const TString EmptyValue = "{none}";
+
+ // Each TEvModifySchemeTransaction.Transaction is a self sufficient operation and should be logged independently
+ // (even if it was packed into a single TxProxy transaction with some other operations).
+ for (const auto& operation : request.GetTransaction()) {
+ auto logEntry = MakeAuditLogFragment(operation);
+
+ TPath databasePath = DatabasePathFromWorkingDir(SS, operation.GetWorkingDir());
+ auto [cloud_id, folder_id, database_id] = GetDatabaseCloudIds(databasePath);
+ auto peerName = request.GetPeerName();
+
+ AUDIT_LOG(
+ AUDIT_PART("component", SchemeshardComponentName)
+ AUDIT_PART("tx_id", std::to_string(request.GetTxId()))
+ AUDIT_PART("remote_address", (!peerName.empty() ? peerName : EmptyValue) )
+ AUDIT_PART("subject", (!userSID.empty() ? userSID : EmptyValue))
+ AUDIT_PART("database", (!databasePath.IsEmpty() ? databasePath.GetDomainPathString() : EmptyValue))
+ AUDIT_PART("operation", logEntry.Operation)
+ AUDIT_PART("paths", RenderList(logEntry.Paths), !logEntry.Paths.empty())
+ AUDIT_PART("status", GeneralStatus(response.GetStatus()))
+ AUDIT_PART("detailed_status", NKikimrScheme::EStatus_Name(response.GetStatus()))
+ AUDIT_PART("reason", response.GetReason(), response.HasReason())
+
+ AUDIT_PART("cloud_id", cloud_id, !cloud_id.empty());
+ AUDIT_PART("folder_id", folder_id, !folder_id.empty());
+ AUDIT_PART("resource_id", database_id, !database_id.empty());
+
+ // Additionally:
+
+ // ModifyACL.
+ // Technically, non-empty ModifyACL field could come with any ModifyScheme operation.
+ // In practice, ModifyACL will get processed only by:
+ // 1. explicit operation ESchemeOpModifyACL -- to modify ACL on a path
+ // 2. ESchemeOpMkDir or ESchemeOpCreate* operations -- to set rights to newly created paths/entities
+ // 3. ESchemeOpCopyTable -- to be checked against acl size limit, not to be applied in any way
+ AUDIT_PART("new_owner", logEntry.NewOwner, !logEntry.NewOwner.empty());
+ AUDIT_PART("acl_add", RenderList(logEntry.ACLAdd), !logEntry.ACLAdd.empty());
+ AUDIT_PART("acl_remove", RenderList(logEntry.ACLRemove), !logEntry.ACLRemove.empty());
+
+ // AlterUserAttributes.
+ // 1. explicit operation ESchemeOpAlterUserAttributes -- to modify user attributes on a path
+ // 2. ESchemeOpMkDir or some ESchemeOpCreate* operations -- to set user attributes for newly created paths/entities
+ AUDIT_PART("user_attrs_add", RenderList(logEntry.UserAttrsAdd), !logEntry.UserAttrsAdd.empty());
+ AUDIT_PART("user_attrs_remove", RenderList(logEntry.UserAttrsRemove), !logEntry.UserAttrsRemove.empty());
+
+ // AlterLogin.
+ // explicit operation ESchemeOpAlterLogin -- to modify user and groups
+ AUDIT_PART("login_user", logEntry.LoginUser);
+ AUDIT_PART("login_group", logEntry.LoginGroup);
+ AUDIT_PART("login_member", logEntry.LoginMember);
+ );
+ }
+}
+
+}
diff --git a/ydb/core/tx/schemeshard/schemeshard_audit_log.h b/ydb/core/tx/schemeshard/schemeshard_audit_log.h
new file mode 100644
index 0000000000..f9db15179f
--- /dev/null
+++ b/ydb/core/tx/schemeshard/schemeshard_audit_log.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <util/generic/string.h>
+
+namespace NKikimrScheme {
+class TEvModifySchemeTransaction;
+class TEvModifySchemeTransactionResult;
+}
+
+namespace NKikimr::NSchemeShard {
+
+class TSchemeShard;
+
+void AuditLogModifySchemeTransaction(const NKikimrScheme::TEvModifySchemeTransaction& request, const NKikimrScheme::TEvModifySchemeTransactionResult& response, TSchemeShard* SS, const TString& userSID);
+
+}
diff --git a/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp b/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp
index 9b4d522f15..e7e69ff367 100644
--- a/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.cpp
@@ -8,7 +8,8 @@
namespace {
-TString DefineUserOperationName(NKikimrSchemeOp::EOperationType type) {
+TString DefineUserOperationName(const NKikimrSchemeOp::TModifyScheme& tx) {
+ NKikimrSchemeOp::EOperationType type = tx.GetOperationType();
switch (type) {
// common
case NKikimrSchemeOp::EOperationType::ESchemeOpModifyACL:
@@ -21,8 +22,27 @@ TString DefineUserOperationName(NKikimrSchemeOp::EOperationType type) {
return "CREATE LOCK";
case NKikimrSchemeOp::EOperationType::ESchemeOpDropLock:
return "DROP LOCK";
+ // specify ESchemeOpAlterLogin with each separate case
+ // it looks a bit out of the scheme, but improve reading of audit logs
case NKikimrSchemeOp::EOperationType::ESchemeOpAlterLogin:
- return "ALTER LOGIN";
+ switch (tx.GetAlterLogin().GetAlterCase()) {
+ case NKikimrSchemeOp::TAlterLogin::kCreateUser:
+ return "CREATE USER";
+ case NKikimrSchemeOp::TAlterLogin::kModifyUser:
+ return "MODIFY USER";
+ case NKikimrSchemeOp::TAlterLogin::kRemoveUser:
+ return "REMOVE USER";
+ case NKikimrSchemeOp::TAlterLogin::kCreateGroup:
+ return "CREATE GROUP";
+ case NKikimrSchemeOp::TAlterLogin::kAddGroupMembership:
+ return "ADD GROUP MEMBERSHIP";
+ case NKikimrSchemeOp::TAlterLogin::kRemoveGroupMembership:
+ return "REMOVE GROUP MEMBERSHIP";
+ case NKikimrSchemeOp::TAlterLogin::kRemoveGroup:
+ return "REMOVE GROUP";
+ default:
+ Y_FAIL("switch should cover all operation types");
+ }
case NKikimrSchemeOp::EOperationType::ESchemeOp_DEPRECATED_35:
return "ESchemeOp_DEPRECATED_35";
// dir
@@ -450,14 +470,127 @@ TVector<TString> ExtractChangingPaths(const NKikimrSchemeOp::TModifyScheme& tx)
return result;
}
+TString ExtractNewOwner(const NKikimrSchemeOp::TModifyScheme& tx) {
+ bool hasNewOwner = tx.HasModifyACL() && tx.GetModifyACL().HasNewOwner();
+ if (hasNewOwner) {
+ return tx.GetModifyACL().GetNewOwner();
+ }
+ return {};
+}
+
+struct TChange {
+ TVector<TString> Add;
+ TVector<TString> Remove;
+};
+
+TChange ExtractACLChange(const NKikimrSchemeOp::TModifyScheme& tx) {
+ bool hasACL = tx.HasModifyACL() && tx.GetModifyACL().HasDiffACL();
+ if (hasACL) {
+ TChange result;
+
+ NACLib::TDiffACL diff(tx.GetModifyACL().GetDiffACL());
+ for (const auto& i : diff.GetDiffACE()) {
+ auto diffType = static_cast<NACLib::EDiffType>(i.GetDiffType());
+ const NACLibProto::TACE& ace = i.GetACE();
+ switch (diffType) {
+ case NACLib::EDiffType::Add:
+ result.Add.push_back(NACLib::TACL::ToString(ace));
+ break;
+ case NACLib::EDiffType::Remove:
+ result.Remove.push_back(NACLib::TACL::ToString(ace));
+ break;
+ }
+ }
+
+ return result;
+ }
+ return {};
+}
+
+TChange ExtractUserAttrChange(const NKikimrSchemeOp::TModifyScheme& tx) {
+ bool hasUserAttrs = tx.HasAlterUserAttributes() && (tx.GetAlterUserAttributes().UserAttributesSize() > 0);
+ if (hasUserAttrs) {
+ TChange result;
+ auto str = TStringBuilder();
+
+ for (const auto& i : tx.GetAlterUserAttributes().GetUserAttributes()) {
+ const auto& key = i.GetKey();
+ const auto& value = i.GetValue();
+ if (value.empty()) {
+ result.Remove.push_back(key);
+ } else {
+ str.clear();
+ str << key << ": " << value;
+ result.Add.push_back(str);
+ }
+ }
+
+ return result;
+ }
+ return {};
+}
+
+struct TChangeLogin {
+ TString LoginUser;
+ TString LoginGroup;
+ TString LoginMember;
+};
+
+TChangeLogin ExtractLoginChange(const NKikimrSchemeOp::TModifyScheme& tx) {
+ if (tx.HasAlterLogin()) {
+ TChangeLogin result;
+ switch (tx.GetAlterLogin().GetAlterCase()) {
+ case NKikimrSchemeOp::TAlterLogin::kCreateUser:
+ result.LoginUser = tx.GetAlterLogin().GetCreateUser().GetUser();
+ break;
+ case NKikimrSchemeOp::TAlterLogin::kModifyUser:
+ result.LoginUser = tx.GetAlterLogin().GetModifyUser().GetUser();
+ break;
+ case NKikimrSchemeOp::TAlterLogin::kRemoveUser:
+ result.LoginUser = tx.GetAlterLogin().GetRemoveUser().GetUser();
+ break;
+ case NKikimrSchemeOp::TAlterLogin::kCreateGroup:
+ result.LoginGroup = tx.GetAlterLogin().GetCreateGroup().GetGroup();
+ break;
+ case NKikimrSchemeOp::TAlterLogin::kAddGroupMembership:
+ result.LoginGroup = tx.GetAlterLogin().GetAddGroupMembership().GetGroup();
+ result.LoginMember = tx.GetAlterLogin().GetAddGroupMembership().GetMember();
+ break;
+ case NKikimrSchemeOp::TAlterLogin::kRemoveGroupMembership:
+ result.LoginGroup = tx.GetAlterLogin().GetRemoveGroupMembership().GetGroup();
+ result.LoginMember = tx.GetAlterLogin().GetRemoveGroupMembership().GetMember();
+ break;
+ case NKikimrSchemeOp::TAlterLogin::kRemoveGroup:
+ result.LoginGroup = tx.GetAlterLogin().GetRemoveGroup().GetGroup();
+ break;
+ default:
+ Y_FAIL("switch should cover all operation types");
+ }
+ return result;
+ }
+ return {};
+}
+
} // anonymous namespace
namespace NKikimr::NSchemeShard {
TAuditLogFragment MakeAuditLogFragment(const NKikimrSchemeOp::TModifyScheme& tx) {
+ auto [aclAdd, aclRemove] = ExtractACLChange(tx);
+ auto [userAttrsAdd, userAttrsRemove] = ExtractUserAttrChange(tx);
+ auto [loginUser, loginGroup, loginMember] = ExtractLoginChange(tx);
+
return {
- .Operation = DefineUserOperationName(tx.GetOperationType()),
+ .Operation = DefineUserOperationName(tx),
.Paths = ExtractChangingPaths(tx),
+ .NewOwner = ExtractNewOwner(tx),
+ .ACLAdd = aclAdd,
+ .ACLRemove = aclRemove,
+ .UserAttrsAdd = userAttrsAdd,
+ .UserAttrsRemove = userAttrsRemove,
+ .LoginUser = loginUser,
+ .LoginGroup = loginGroup,
+ .LoginMember = loginMember,
};
}
diff --git a/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.h b/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.h
index 57874086b4..e6347fb732 100644
--- a/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.h
+++ b/ydb/core/tx/schemeshard/schemeshard_audit_log_fragment.h
@@ -2,6 +2,7 @@
#include <util/generic/string.h>
#include <util/generic/vector.h>
+#include <util/generic/maybe.h>
namespace NKikimrSchemeOp {
class TModifyScheme;
@@ -12,6 +13,14 @@ namespace NKikimr::NSchemeShard {
struct TAuditLogFragment {
TString Operation;
TVector<TString> Paths;
+ TString NewOwner;
+ TVector<TString> ACLAdd;
+ TVector<TString> ACLRemove;
+ TVector<TString> UserAttrsAdd;
+ TVector<TString> UserAttrsRemove;
+ TString LoginUser;
+ TString LoginGroup;
+ TString LoginMember;
};
TAuditLogFragment MakeAuditLogFragment(const NKikimrSchemeOp::TModifyScheme& tx);
diff --git a/ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp b/ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp
new file mode 100644
index 0000000000..aec034e7ec
--- /dev/null
+++ b/ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp
@@ -0,0 +1,458 @@
+#include "schemeshard_billing_helpers.h"
+#include "schemeshard_impl.h"
+
+#include <ydb/core/metering/metering.h>
+#include <ydb/core/tx/tx_proxy/proxy.h>
+
+#include <util/generic/deque.h>
+
+#if defined LOG_D || \
+ defined LOG_W || \
+ defined LOG_E
+#error log macro redefinition
+#endif
+
+#define LOG_D(stream) LOG_DEBUG_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[CdcStreamScan] " << stream)
+#define LOG_N(stream) LOG_NOTICE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[CdcStreamScan] " << stream)
+#define LOG_W(stream) LOG_WARN_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[CdcStreamScan] " << stream)
+#define LOG_E(stream) LOG_ERROR_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[CdcStreamScan] " << stream)
+
+namespace NKikimr::NSchemeShard {
+
+using namespace NTabletFlatExecutor;
+
+class TCdcStreamScanFinalizer: public TActorBootstrapped<TCdcStreamScanFinalizer> {
+public:
+ static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
+ return NKikimrServices::TActivity::SCHEMESHARD_CDC_STREAM_SCAN_FINALIZER;
+ }
+
+ explicit TCdcStreamScanFinalizer(const TActorId& ssActorId, THolder<TEvSchemeShard::TEvModifySchemeTransaction>&& req)
+ : SSActorId(ssActorId)
+ , Request(std::move(req)) // template without txId
+ {
+ }
+
+ void Bootstrap() {
+ AllocateTxId();
+ Become(&TCdcStreamScanFinalizer::StateWork);
+ }
+
+ STATEFN(StateWork) {
+ switch (ev->GetTypeRewrite()) {
+ hFunc(TEvTxUserProxy::TEvAllocateTxIdResult, Handle)
+ sFunc(TEvents::TEvPoison, PassAway);
+ }
+ }
+
+private:
+ void AllocateTxId() {
+ Send(MakeTxProxyID(), new TEvTxUserProxy::TEvAllocateTxId);
+ }
+
+ void Handle(TEvTxUserProxy::TEvAllocateTxIdResult::TPtr& ev) {
+ Request->Record.SetTxId(ev->Get()->TxId);
+ Send(SSActorId, Request.Release());
+ }
+
+private:
+ const TActorId SSActorId;
+ THolder<TEvSchemeShard::TEvModifySchemeTransaction> Request;
+
+}; // TCdcStreamScanFinalizer
+
+struct TSchemeShard::TCdcStreamScan::TTxProgress: public TTransactionBase<TSchemeShard> {
+ // params
+ TEvPrivate::TEvRunCdcStreamScan::TPtr RunCdcStreamScan = nullptr;
+ TEvDataShard::TEvCdcStreamScanResponse::TPtr CdcStreamScanResponse = nullptr;
+ struct {
+ TPathId StreamPathId;
+ TTabletId TabletId;
+ explicit operator bool() const { return StreamPathId && TabletId; }
+ } PipeRetry;
+
+ // side effects
+ TDeque<std::tuple<TPathId, TTabletId, THolder<IEventBase>>> ScanRequests;
+ TPathId StreamToProgress;
+ THolder<NMetering::TEvMetering::TEvWriteMeteringJson> Metering;
+ THolder<TEvSchemeShard::TEvModifySchemeTransaction> Finalize;
+
+public:
+ explicit TTxProgress(TSelf* self, TEvPrivate::TEvRunCdcStreamScan::TPtr& ev)
+ : TBase(self)
+ , RunCdcStreamScan(ev)
+ {
+ }
+
+ explicit TTxProgress(TSelf* self, TEvDataShard::TEvCdcStreamScanResponse::TPtr& ev)
+ : TBase(self)
+ , CdcStreamScanResponse(ev)
+ {
+ }
+
+ explicit TTxProgress(TSelf* self, const TPathId& streamPathId, TTabletId tabletId)
+ : TBase(self)
+ , PipeRetry({streamPathId, tabletId})
+ {
+ }
+
+ TTxType GetTxType() const override {
+ return TXTYPE_CDC_STREAM_SCAN_PROGRESS;
+ }
+
+ bool Execute(TTransactionContext& txc, const TActorContext& ctx) override {
+ if (RunCdcStreamScan) {
+ return OnRunCdcStreamScan(txc, ctx);
+ } else if (CdcStreamScanResponse) {
+ return OnCdcStreamScanResponse(txc, ctx);
+ } else if (PipeRetry) {
+ return OnPipeRetry(txc, ctx);
+ } else {
+ Y_FAIL("unreachable");
+ }
+ }
+
+ void Complete(const TActorContext& ctx) override {
+ for (auto& [streamPathId, tabletId, ev] : ScanRequests) {
+ Self->CdcStreamScanPipes.Create(streamPathId, tabletId, std::move(ev), ctx);
+ }
+
+ if (StreamToProgress) {
+ ctx.Send(ctx.SelfID, new TEvPrivate::TEvRunCdcStreamScan(StreamToProgress));
+ }
+
+ if (Metering) {
+ ctx.Send(NMetering::MakeMeteringServiceID(), Metering.Release());
+ }
+
+ if (Finalize) {
+ Self->CdcStreamScanFinalizer = ctx.Register(new TCdcStreamScanFinalizer(ctx.SelfID, std::move(Finalize)));
+ }
+ }
+
+private:
+ bool OnRunCdcStreamScan(TTransactionContext& txc, const TActorContext& ctx) {
+ const auto& streamPathId = RunCdcStreamScan->Get()->StreamPathId;
+
+ LOG_D("Run"
+ << ": streamPathId# " << streamPathId);
+
+ if (!Self->CdcStreams.contains(streamPathId)) {
+ LOG_W("Cannot run"
+ << ": streamPathId# " << streamPathId
+ << ", reason# " << "stream doesn't exist");
+ return true;
+ }
+
+ auto streamInfo = Self->CdcStreams.at(streamPathId);
+ if (streamInfo->State != TCdcStreamInfo::EState::ECdcStreamStateScan) {
+ LOG_W("Cannot run"
+ << ": streamPathId# " << streamPathId
+ << ", reason# " << "unexpected state");
+ return true;
+ }
+
+ Y_VERIFY(Self->PathsById.contains(streamPathId));
+ auto streamPath = Self->PathsById.at(streamPathId);
+
+ Y_VERIFY(Self->PathsById.contains(streamPathId));
+ const auto& tablePathId = Self->PathsById.at(streamPathId)->ParentPathId;
+
+ Y_VERIFY(Self->Tables.contains(tablePathId));
+ auto table = Self->Tables.at(tablePathId);
+
+ if (streamInfo->ScanShards.empty()) {
+ NIceDb::TNiceDb db(txc.DB);
+ for (const auto& shard : table->GetPartitions()) {
+ const auto status = TCdcStreamInfo::TShardStatus(NKikimrTxDataShard::TEvCdcStreamScanResponse::PENDING);
+ streamInfo->ScanShards.emplace(shard.ShardIdx, status);
+ streamInfo->PendingShards.insert(shard.ShardIdx);
+ Self->PersistCdcStreamScanShardStatus(db, streamPathId, shard.ShardIdx, status);
+ }
+ }
+
+ while (!streamInfo->PendingShards.empty()) {
+ if (streamInfo->InProgressShards.size() >= streamInfo->MaxInProgressShards) {
+ break;
+ }
+
+ auto it = streamInfo->PendingShards.begin();
+
+ Y_VERIFY(Self->ShardInfos.contains(*it));
+ const auto tabletId = Self->ShardInfos.at(*it).TabletID;
+
+ streamInfo->InProgressShards.insert(*it);
+ streamInfo->PendingShards.erase(it);
+
+ auto ev = MakeHolder<TEvDataShard::TEvCdcStreamScanRequest>();
+ PathIdFromPathId(tablePathId, ev->Record.MutableTablePathId());
+ ev->Record.SetTableSchemaVersion(table->AlterVersion);
+ PathIdFromPathId(streamPathId, ev->Record.MutableStreamPathId());
+ ev->Record.SetSnapshotStep(ui64(streamPath->StepCreated));
+ ev->Record.SetSnapshotTxId(ui64(streamPath->CreateTxId));
+ ScanRequests.emplace_back(streamPathId, tabletId, std::move(ev));
+ }
+
+ if (streamInfo->DoneShards.size() == streamInfo->ScanShards.size()) {
+ const auto path = TPath::Init(streamPathId, Self);
+
+ Finalize = MakeHolder<TEvSchemeShard::TEvModifySchemeTransaction>();
+ auto& tx = *Finalize->Record.AddTransaction();
+ tx.SetOperationType(NKikimrSchemeOp::ESchemeOpAlterCdcStream);
+ tx.SetWorkingDir(path.Parent().Parent().PathString()); // stream -> table -> working dir
+ tx.SetFailOnExist(false);
+
+ auto& op = *tx.MutableAlterCdcStream();
+ op.SetTableName(path.Parent().LeafName());
+ op.SetStreamName(path.LeafName());
+ op.MutableGetReady()->SetLockTxId(ui64(streamPath->CreateTxId));
+ tx.MutableLockGuard()->SetOwnerTxId(ui64(streamPath->CreateTxId));
+ }
+
+ return true;
+ }
+
+ bool OnCdcStreamScanResponse(TTransactionContext& txc, const TActorContext& ctx) {
+ const auto& record = CdcStreamScanResponse->Get()->Record;
+
+ LOG_D("Response"
+ << ": ev# " << record.ShortDebugString());
+
+ const auto streamPathId = PathIdFromPathId(record.GetStreamPathId());
+ if (!Self->CdcStreams.contains(streamPathId)) {
+ LOG_W("Cannot process response"
+ << ": streamPathId# " << streamPathId
+ << ", reason# " << "stream doesn't exist");
+ return true;
+ }
+
+ auto streamInfo = Self->CdcStreams.at(streamPathId);
+ if (streamInfo->State != TCdcStreamInfo::EState::ECdcStreamStateScan) {
+ LOG_W("Cannot process response"
+ << ": streamPathId# " << streamPathId
+ << ", reason# " << "unexpected state");
+ return true;
+ }
+
+ const auto tabletId = TTabletId(record.GetTabletId());
+ const auto shardIdx = Self->GetShardIdx(tabletId);
+ if (shardIdx == InvalidShardIdx) {
+ LOG_E("Cannot process response"
+ << ": streamPathId# " << streamPathId
+ << ", tabletId# " << tabletId
+ << ", reason# " << "tablet not found");
+ return true;
+ }
+
+ auto it = streamInfo->ScanShards.find(shardIdx);
+ if (it == streamInfo->ScanShards.end()) {
+ LOG_E("Cannot process response"
+ << ": streamPathId# " << streamPathId
+ << ", shardIdx# " << shardIdx
+ << ", reason# " << "shard not found");
+ return true;
+ }
+
+ auto& status = it->second;
+ if (!streamInfo->InProgressShards.contains(shardIdx)) {
+ LOG_W("Shard status mismatch"
+ << ": streamPathId# " << streamPathId
+ << ", shardIdx# " << shardIdx
+ << ", got# " << record.GetStatus()
+ << ", current# " << status.Status);
+ return true;
+ }
+
+ switch (record.GetStatus()) {
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::ACCEPTED:
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::IN_PROGRESS:
+ break;
+
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::DONE:
+ status.Status = record.GetStatus();
+ streamInfo->DoneShards.insert(shardIdx);
+ streamInfo->InProgressShards.erase(shardIdx);
+ Self->CdcStreamScanPipes.Close(streamPathId, tabletId, ctx);
+ StreamToProgress = streamPathId;
+ Bill(streamPathId, shardIdx, TRUCalculator::ReadTable(record.GetStats().GetBytesProcessed()), ctx);
+ break;
+
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::OVERLOADED:
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::ABORTED:
+ streamInfo->PendingShards.insert(shardIdx);
+ streamInfo->InProgressShards.erase(shardIdx);
+ Self->CdcStreamScanPipes.Close(streamPathId, tabletId, ctx);
+ StreamToProgress = streamPathId;
+ break;
+
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::BAD_REQUEST:
+ case NKikimrTxDataShard::TEvCdcStreamScanResponse::SCHEME_ERROR:
+ Y_FAIL("unreachable");
+
+ default:
+ LOG_E("Unexpected response status"
+ << ": status# " << static_cast<int>(record.GetStatus())
+ << ", error# " << record.GetErrorDescription());
+ return true;
+ }
+
+ NIceDb::TNiceDb db(txc.DB);
+ Self->PersistCdcStreamScanShardStatus(db, streamPathId, shardIdx, status);
+
+ if (streamInfo->DoneShards.size() == streamInfo->ScanShards.size()) {
+ StreamToProgress = streamPathId;
+ }
+
+ return true;
+ }
+
+ bool OnPipeRetry(TTransactionContext&, const TActorContext& ctx) {
+ const auto& streamPathId = PipeRetry.StreamPathId;
+ const auto& tabletId = PipeRetry.TabletId;
+
+ LOG_D("Pipe retry"
+ << ": streamPathId# " << streamPathId
+ << ", tabletId# " << tabletId);
+
+ if (!Self->CdcStreams.contains(streamPathId)) {
+ LOG_W("Cannot retry"
+ << ": streamPathId# " << streamPathId
+ << ", reason# " << "stream doesn't exist");
+ return true;
+ }
+
+ auto streamInfo = Self->CdcStreams.at(streamPathId);
+ if (streamInfo->State != TCdcStreamInfo::EState::ECdcStreamStateScan) {
+ LOG_W("Cannot retry"
+ << ": streamPathId# " << streamPathId
+ << ", reason# " << "unexpected state");
+ return true;
+ }
+
+ const auto shardIdx = Self->GetShardIdx(tabletId);
+ if (shardIdx == InvalidShardIdx) {
+ LOG_E("Cannot retry"
+ << ": streamPathId# " << streamPathId
+ << ", tabletId# " << tabletId
+ << ", reason# " << "tablet not found");
+ return true;
+ }
+
+ auto it = streamInfo->InProgressShards.find(shardIdx);
+ if (it == streamInfo->InProgressShards.end()) {
+ LOG_E("Cannot retry"
+ << ": streamPathId# " << streamPathId
+ << ", shardIdx# " << shardIdx
+ << ", reason# " << "shard not found");
+ return true;
+ }
+
+ streamInfo->PendingShards.insert(*it);
+ streamInfo->InProgressShards.erase(it);
+ Self->CdcStreamScanPipes.Close(streamPathId, tabletId, ctx);
+ StreamToProgress = streamPathId;
+
+ return true;
+ }
+
+ void Bill(const TPathId& pathId, const TShardIdx& shardIdx, ui64 ru, const TActorContext& ctx) {
+ const auto domainPathId = Self->ResolvePathIdForDomain(pathId);
+
+ Y_VERIFY(Self->SubDomains.contains(domainPathId));
+ auto domainInfo = Self->SubDomains.at(domainPathId);
+
+ if (!Self->IsServerlessDomain(domainInfo)) {
+ LOG_D("Unable to make a bill"
+ << ": streamPathId# " << pathId
+ << ", reason# " << "domain is not a serverless db");
+ return;
+ }
+
+ Y_VERIFY(Self->PathsById.contains(domainPathId));
+ auto domainPath = Self->PathsById.at(domainPathId);
+
+ const auto& attrs = domainPath->UserAttrs->Attrs;
+ if (!attrs.contains("cloud_id")) {
+ LOG_D("Unable to make a bill"
+ << ": streamPathId# " << pathId
+ << ", reason# " << "'cloud_id' not found in user attributes");
+ return;
+ }
+
+ if (!attrs.contains("folder_id")) {
+ LOG_D("Unable to make a bill"
+ << ": streamPathId# " << pathId
+ << ", reason# " << "'folder_id' not found in user attributes");
+ return;
+ }
+
+ if (!attrs.contains("database_id")) {
+ LOG_D("Unable to make a bill"
+ << ": streamPathId# " << pathId
+ << ", reason# " << "'database_id' not found in user attributes");
+ return;
+ }
+
+ const auto now = ctx.Now();
+ const TString id = TStringBuilder() << "cdc_stream_scan"
+ << "-" << pathId.OwnerId << "-" << pathId.LocalPathId
+ << "-" << shardIdx.GetOwnerId() << "-" << shardIdx.GetLocalId();
+ const TString billRecord = TBillRecord()
+ .Id(id)
+ .CloudId(attrs.at("cloud_id"))
+ .FolderId(attrs.at("folder_id"))
+ .ResourceId(attrs.at("database_id"))
+ .SourceWt(now)
+ .Usage(TBillRecord::RequestUnits(Max(ui64(1), ru), now))
+ .ToString();
+
+ LOG_N("Make a bill"
+ << ": streamPathId# " << pathId
+ << ", record# " << billRecord);
+ Metering = MakeHolder<NMetering::TEvMetering::TEvWriteMeteringJson>(std::move(billRecord));
+ }
+};
+
+ITransaction* TSchemeShard::CreateTxProgressCdcStreamScan(TEvPrivate::TEvRunCdcStreamScan::TPtr& ev) {
+ return new TCdcStreamScan::TTxProgress(this, ev);
+}
+
+ITransaction* TSchemeShard::CreateTxProgressCdcStreamScan(TEvDataShard::TEvCdcStreamScanResponse::TPtr& ev) {
+ return new TCdcStreamScan::TTxProgress(this, ev);
+}
+
+ITransaction* TSchemeShard::CreatePipeRetry(const TPathId& streamPathId, TTabletId tabletId) {
+ return new TCdcStreamScan::TTxProgress(this, streamPathId, tabletId);
+}
+
+void TSchemeShard::Handle(TEvPrivate::TEvRunCdcStreamScan::TPtr& ev, const TActorContext& ctx) {
+ Execute(CreateTxProgressCdcStreamScan(ev), ctx);
+}
+
+void TSchemeShard::Handle(TEvDataShard::TEvCdcStreamScanResponse::TPtr& ev, const TActorContext& ctx) {
+ Execute(CreateTxProgressCdcStreamScan(ev), ctx);
+}
+
+void TSchemeShard::ResumeCdcStreamScans(const TVector<TPathId>& ids, const TActorContext& ctx) {
+ for (const auto& id : ids) {
+ Send(ctx.SelfID, new TEvPrivate::TEvRunCdcStreamScan(id));
+ }
+}
+
+void TSchemeShard::PersistCdcStreamScanShardStatus(NIceDb::TNiceDb& db, const TPathId& streamPathId,
+ const TShardIdx& shardIdx, const TCdcStreamInfo::TShardStatus& status)
+{
+ db.Table<Schema::CdcStreamScanShardStatus>()
+ .Key(streamPathId.OwnerId, streamPathId.LocalPathId, shardIdx.GetOwnerId(), shardIdx.GetLocalId())
+ .Update(
+ NIceDb::TUpdate<Schema::CdcStreamScanShardStatus::Status>(status.Status)
+ );
+}
+
+void TSchemeShard::RemoveCdcStreamScanShardStatus(NIceDb::TNiceDb& db, const TPathId& streamPathId, const TShardIdx& shardIdx) {
+ db.Table<Schema::CdcStreamScanShardStatus>()
+ .Key(streamPathId.OwnerId, streamPathId.LocalPathId, shardIdx.GetOwnerId(), shardIdx.GetLocalId())
+ .Delete();
+}
+
+}
diff --git a/ydb/core/tx/schemeshard/schemeshard_export.cpp b/ydb/core/tx/schemeshard/schemeshard_export.cpp
index 00eef5a0db..c02aab47d1 100644
--- a/ydb/core/tx/schemeshard/schemeshard_export.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_export.cpp
@@ -38,16 +38,10 @@ namespace {
Ydb::Export::ExportItemProgress& itemProgress) {
Y_VERIFY(itemIdx < exportInfo->Items.size());
-
const auto& item = exportInfo->Items.at(itemIdx);
- if (item.WaitTxId == InvalidTxId) {
- return;
- }
-
- const TOperationId opId(item.WaitTxId, FirstSubTxId);
- const TPath path = TPath::Resolve(ExportItemPathName(ss, exportInfo, itemIdx), ss);
- if (ss->TxInFlight.contains(opId)) {
+ const auto opId = TOperationId(item.WaitTxId, FirstSubTxId);
+ if (item.WaitTxId != InvalidTxId && ss->TxInFlight.contains(opId)) {
const auto& txState = ss->TxInFlight.at(opId);
if (txState.TxType != TTxState::TxBackup) {
return;
@@ -56,17 +50,25 @@ namespace {
itemProgress.set_parts_total(txState.Shards.size());
itemProgress.set_parts_completed(txState.Shards.size() - txState.ShardsInProgress.size());
*itemProgress.mutable_start_time() = SecondsToProtoTimeStamp(txState.StartTime.Seconds());
- } else if (path.IsResolved()) {
- if (!ss->Tables.contains(path.Base()->PathId)) {
+ } else {
+ const auto path = TPath::Resolve(ExportItemPathName(ss, exportInfo, itemIdx), ss);
+ if (!path.IsResolved() || !ss->Tables.contains(path.Base()->PathId)) {
return;
}
auto table = ss->Tables.at(path.Base()->PathId);
- if (!table->BackupHistory.contains(item.WaitTxId)) {
+ auto it = table->BackupHistory.end();
+ if (item.WaitTxId != InvalidTxId) {
+ it = table->BackupHistory.find(item.WaitTxId);
+ } else if (table->BackupHistory.size() == 1) {
+ it = table->BackupHistory.begin();
+ }
+
+ if (it == table->BackupHistory.end()) {
return;
}
- const auto& backupResult = table->BackupHistory.at(item.WaitTxId);
+ const auto& backupResult = it->second;
itemProgress.set_parts_total(backupResult.TotalShardCount);
itemProgress.set_parts_completed(backupResult.TotalShardCount);
*itemProgress.mutable_start_time() = SecondsToProtoTimeStamp(backupResult.StartDateTime);
diff --git a/ydb/core/tx/schemeshard/schemeshard_impl.cpp b/ydb/core/tx/schemeshard/schemeshard_impl.cpp
index 503bc848e7..926b6c4811 100644
--- a/ydb/core/tx/schemeshard/schemeshard_impl.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_impl.cpp
@@ -56,14 +56,7 @@ bool ResolvePoolNames(
const TSchemeLimits TSchemeShard::DefaultLimits = {};
-void TSchemeShard::ActivateAfterInitialization(const TActorContext& ctx,
- TSideEffects::TPublications&& delayPublications,
- const TVector<ui64>& exportIds,
- const TVector<ui64>& importsIds,
- TVector<TPathId>&& tablesToClean,
- TDeque<TPathId>&& blockStoreVolumesToClean
- )
-{
+void TSchemeShard::ActivateAfterInitialization(const TActorContext& ctx, TActivationOpts&& opts) {
TPathId subDomainPathId = GetCurrentSubDomainPathId();
TSubDomainInfo::TPtr domainPtr = ResolveDomainInfo(subDomainPathId);
LoginProvider.Audience = TPath::Init(subDomainPathId, this).PathString();
@@ -74,14 +67,14 @@ void TSchemeShard::ActivateAfterInitialization(const TActorContext& ctx,
GetDomainKey(subDomainPathId), sysViewProcessorId ? sysViewProcessorId.GetValue() : 0);
Send(SysPartitionStatsCollector, evInit.Release());
- Execute(CreateTxInitPopulator(std::move(delayPublications)), ctx);
+ Execute(CreateTxInitPopulator(std::move(opts.DelayPublications)), ctx);
- if (tablesToClean) {
- Execute(CreateTxCleanTables(std::move(tablesToClean)), ctx);
+ if (opts.TablesToClean) {
+ Execute(CreateTxCleanTables(std::move(opts.TablesToClean)), ctx);
}
- if (blockStoreVolumesToClean) {
- Execute(CreateTxCleanBlockStoreVolumes(std::move(blockStoreVolumesToClean)), ctx);
+ if (opts.BlockStoreVolumesToClean) {
+ Execute(CreateTxCleanBlockStoreVolumes(std::move(opts.BlockStoreVolumesToClean)), ctx);
}
if (IsDomainSchemeShard) {
@@ -114,8 +107,9 @@ void TSchemeShard::ActivateAfterInitialization(const TActorContext& ctx,
SVPMigrator = Register(CreateSVPMigrator(TabletID(), SelfId(), std::move(migrations)).Release());
}
- ResumeExports(exportIds, ctx);
- ResumeImports(importsIds, ctx);
+ ResumeExports(opts.ExportIds, ctx);
+ ResumeImports(opts.ImportsIds, ctx);
+ ResumeCdcStreamScans(opts.CdcStreamScans, ctx);
ParentDomainLink.SendSync(ctx);
@@ -345,7 +339,7 @@ void TSchemeShard::Clear() {
ShardsWithBorrowed.clear();
ShardsWithLoaned.clear();
- PersQueueGroups.clear();
+ Topics.clear();
RtmrVolumes.clear();
SubDomains.clear();
BlockStoreVolumes.clear();
@@ -511,8 +505,8 @@ void TSchemeShard::ClearDescribePathCaches(const TPathElement::TPtr node, bool f
node->PreSerializedChildrenListing.clear();
if (node->PathType == NKikimrSchemeOp::EPathType::EPathTypePersQueueGroup) {
- Y_VERIFY(PersQueueGroups.contains(node->PathId));
- TPersQueueGroupInfo::TPtr pqGroup = PersQueueGroups.at(node->PathId);
+ Y_VERIFY(Topics.contains(node->PathId));
+ TTopicInfo::TPtr pqGroup = Topics.at(node->PathId);
pqGroup->PreSerializedPathDescription.clear();
pqGroup->PreSerializedPartitionsDescription.clear();
} else if (node->PathType == NKikimrSchemeOp::EPathType::EPathTypeTable) {
@@ -1404,6 +1398,7 @@ TPathElement::EPathState TSchemeShard::CalcPathState(TTxState::ETxType txType, T
case TTxState::TxCreateCdcStreamAtTable:
case TTxState::TxCreateCdcStreamAtTableWithInitialScan:
case TTxState::TxDropCdcStreamAtTable:
+ case TTxState::TxDropCdcStreamAtTableDropSnapshot:
case TTxState::TxAlterSequence:
case TTxState::TxAlterReplication:
case TTxState::TxAlterBlobDepot:
@@ -1622,6 +1617,10 @@ void TSchemeShard::PersistRemoveCdcStream(NIceDb::TNiceDb &db, const TPathId& pa
db.Table<Schema::CdcStream>().Key(pathId.OwnerId, pathId.LocalPathId).Delete();
+ for (const auto& [shardIdx, _] : stream->ScanShards) {
+ RemoveCdcStreamScanShardStatus(db, pathId, shardIdx);
+ }
+
CdcStreams.erase(pathId);
DecrementPathDbRefCount(pathId);
}
@@ -2361,6 +2360,16 @@ void TSchemeShard::PersistTablePartitionStats(NIceDb::TNiceDb& db, const TPathId
}
}
+void TSchemeShard::PersistPersQueueGroupStats(NIceDb::TNiceDb &db, const TPathId pathId, const TTopicStats& stats) {
+ db.Table<Schema::PersQueueGroupStats>().Key(pathId.LocalPathId).Update(
+ NIceDb::TUpdate<Schema::PersQueueGroupStats::SeqNoGeneration>(stats.SeqNo.Generation),
+ NIceDb::TUpdate<Schema::PersQueueGroupStats::SeqNoRound>(stats.SeqNo.Round),
+
+ NIceDb::TUpdate<Schema::PersQueueGroupStats::DataSize>(stats.DataSize),
+ NIceDb::TUpdate<Schema::PersQueueGroupStats::UsedReserveSize>(stats.UsedReserveSize)
+ );
+}
+
void TSchemeShard::PersistTableAlterVersion(NIceDb::TNiceDb& db, const TPathId pathId, const TTableInfo::TPtr tableInfo) {
if (pathId.OwnerId == TabletID()) {
db.Table<Schema::Tables>().Key(pathId.LocalPathId).Update(
@@ -2494,7 +2503,7 @@ void TSchemeShard::PersistAddAlterTable(NIceDb::TNiceDb& db, TPathId pathId, con
}
}
-void TSchemeShard::PersistPersQueueGroup(NIceDb::TNiceDb& db, TPathId pathId, const TPersQueueGroupInfo::TPtr pqGroup) {
+void TSchemeShard::PersistPersQueueGroup(NIceDb::TNiceDb& db, TPathId pathId, const TTopicInfo::TPtr pqGroup) {
Y_VERIFY(IsLocalId(pathId));
db.Table<Schema::PersQueueGroups>().Key(pathId.LocalPathId).Update(
@@ -2508,28 +2517,29 @@ void TSchemeShard::PersistPersQueueGroup(NIceDb::TNiceDb& db, TPathId pathId, co
void TSchemeShard::PersistRemovePersQueueGroup(NIceDb::TNiceDb& db, TPathId pathId) {
Y_VERIFY(IsLocalId(pathId));
- auto it = PersQueueGroups.find(pathId);
- if (it != PersQueueGroups.end()) {
- TPersQueueGroupInfo::TPtr pqGroup = it->second;
+ auto it = Topics.find(pathId);
+ if (it != Topics.end()) {
+ TTopicInfo::TPtr pqGroup = it->second;
if (pqGroup->AlterData) {
PersistRemovePersQueueGroupAlter(db, pathId);
}
for (const auto& shard : pqGroup->Shards) {
- for (const auto& pqInfo : shard.second->PQInfos) {
+ for (const auto& pqInfo : shard.second->Partitions) {
PersistRemovePersQueue(db, pathId, pqInfo.PqId);
}
}
- PersQueueGroups.erase(it);
+ Topics.erase(it);
DecrementPathDbRefCount(pathId);
}
db.Table<Schema::PersQueueGroups>().Key(pathId.LocalPathId).Delete();
+ db.Table<Schema::PersQueueGroupStats>().Key(pathId.LocalPathId).Delete();
}
-void TSchemeShard::PersistAddPersQueueGroupAlter(NIceDb::TNiceDb& db, TPathId pathId, const TPersQueueGroupInfo::TPtr alterData) {
+void TSchemeShard::PersistAddPersQueueGroupAlter(NIceDb::TNiceDb& db, TPathId pathId, const TTopicInfo::TPtr alterData) {
Y_VERIFY(IsLocalId(pathId));
db.Table<Schema::PersQueueGroupAlters>().Key(pathId.LocalPathId).Update(
@@ -2547,7 +2557,7 @@ void TSchemeShard::PersistRemovePersQueueGroupAlter(NIceDb::TNiceDb& db, TPathId
db.Table<Schema::PersQueueGroupAlters>().Key(pathId.LocalPathId).Delete();
}
-void TSchemeShard::PersistPersQueue(NIceDb::TNiceDb &db, TPathId pathId, TShardIdx shardIdx, const TPQShardInfo::TPersQueueInfo& pqInfo) {
+void TSchemeShard::PersistPersQueue(NIceDb::TNiceDb &db, TPathId pathId, TShardIdx shardIdx, const TTopicTabletInfo::TTopicPartitionInfo& pqInfo) {
Y_VERIFY(IsLocalId(pathId));
db.Table<Schema::PersQueues>().Key(pathId.LocalPathId, pqInfo.PqId).Update(
@@ -3623,7 +3633,7 @@ TTabletTypes::EType TSchemeShard::GetTabletType(TTabletId tabletId) const {
return pShardInfo->TabletType;
}
-TTabletId TSchemeShard::ResolveHive(TPathId pathId, const TActorContext& ctx) const {
+TTabletId TSchemeShard::ResolveHive(TPathId pathId, const TActorContext& ctx, EHiveSelection selection) const {
if (!PathsById.contains(pathId)) {
return GetGlobalHive(ctx);
}
@@ -3631,7 +3641,8 @@ TTabletId TSchemeShard::ResolveHive(TPathId pathId, const TActorContext& ctx) co
TSubDomainInfo::TPtr subdomain = ResolveDomainInfo(pathId);
// for paths inside subdomain and their shards we choose Hive according to that order: tenant, shared, global
- if (subdomain->GetTenantHiveID()) {
+
+ if (selection != EHiveSelection::IGNORE_TENANT && subdomain->GetTenantHiveID()) {
return subdomain->GetTenantHiveID();
}
@@ -3642,12 +3653,16 @@ TTabletId TSchemeShard::ResolveHive(TPathId pathId, const TActorContext& ctx) co
return GetGlobalHive(ctx);
}
+TTabletId TSchemeShard::ResolveHive(TPathId pathId, const TActorContext& ctx) const {
+ return ResolveHive(pathId, ctx, EHiveSelection::ANY);
+}
+
TTabletId TSchemeShard::ResolveHive(TShardIdx shardIdx, const TActorContext& ctx) const {
if (!ShardInfos.contains(shardIdx)) {
return GetGlobalHive(ctx);
}
- return ResolveHive(ShardInfos.at(shardIdx).PathId, ctx);
+ return ResolveHive(ShardInfos.at(shardIdx).PathId, ctx, EHiveSelection::ANY);
}
void TSchemeShard::DoShardsDeletion(const THashSet<TShardIdx>& shardIdxs, const TActorContext& ctx) {
@@ -3717,8 +3732,8 @@ NKikimrSchemeOp::TPathVersion TSchemeShard::GetPathVersion(const TPath& path) co
generalVersion += result.GetTablePartitionVersion();
break;
case NKikimrSchemeOp::EPathType::EPathTypePersQueueGroup:
- Y_VERIFY(PersQueueGroups.contains(pathId));
- result.SetPQVersion(PersQueueGroups.at(pathId)->AlterVersion);
+ Y_VERIFY(Topics.contains(pathId));
+ result.SetPQVersion(Topics.at(pathId)->AlterVersion);
generalVersion += result.GetPQVersion();
break;
case NKikimrSchemeOp::EPathType::EPathTypeBlockStoreVolume:
@@ -3895,6 +3910,14 @@ TSchemeShard::TSchemeShard(const TActorId &tablet, TTabletStorageInfo *info)
, CompactionStarter(this)
, BorrowedCompactionStarter(this)
, ShardDeleter(info->TabletID)
+ , TableStatsQueue(this,
+ COUNTER_STATS_QUEUE_SIZE,
+ COUNTER_STATS_WRITTEN,
+ COUNTER_STATS_BATCH_LATENCY)
+ , TopicStatsQueue(this,
+ COUNTER_PQ_STATS_QUEUE_SIZE,
+ COUNTER_PQ_STATS_WRITTEN,
+ COUNTER_PQ_STATS_BATCH_LATENCY)
, AllowDataColumnForIndexTable(0, 0, 1)
{
TabletCountersPtr.Reset(new TProtobufTabletCounters<
@@ -3963,7 +3986,12 @@ void TSchemeShard::Die(const TActorContext &ctx) {
ctx.Send(SVPMigrator, new TEvents::TEvPoisonPill());
}
+ if (CdcStreamScanFinalizer) {
+ ctx.Send(CdcStreamScanFinalizer, new TEvents::TEvPoisonPill());
+ }
+
IndexBuildPipes.Shutdown(ctx);
+ CdcStreamScanPipes.Shutdown(ctx);
ShardDeleter.Shutdown(ctx);
ParentDomainLink.Shutdown(ctx);
@@ -4163,6 +4191,7 @@ void TSchemeShard::StateWork(STFUNC_SIG) {
HFuncTraced(TEvDataShard::TEvSplitAck, Handle);
HFuncTraced(TEvDataShard::TEvSplitPartitioningChangedAck, Handle);
HFuncTraced(TEvDataShard::TEvPeriodicTableStats, Handle);
+ HFuncTraced(TEvPersQueue::TEvPeriodicTopicStats, Handle);
HFuncTraced(TEvDataShard::TEvGetTableStatsResult, Handle);
//
@@ -4249,6 +4278,11 @@ void TSchemeShard::StateWork(STFUNC_SIG) {
HFuncTraced(TEvPrivate::TEvIndexBuildingMakeABill, Handle);
// } // NIndexBuilder
+ //namespace NCdcStreamScan {
+ HFuncTraced(TEvPrivate::TEvRunCdcStreamScan, Handle);
+ HFuncTraced(TEvDataShard::TEvCdcStreamScanResponse, Handle);
+ // } // NCdcStreamScan
+
// namespace NLongRunningCommon {
HFuncTraced(TEvTxAllocatorClient::TEvAllocateResult, Handle);
HFuncTraced(TEvSchemeShard::TEvModifySchemeTransactionResult, Handle);
@@ -4272,7 +4306,8 @@ void TSchemeShard::StateWork(STFUNC_SIG) {
HFuncTraced(TEvPrivate::TEvCleanDroppedSubDomains, Handle);
HFuncTraced(TEvPrivate::TEvSubscribeToShardDeletion, Handle);
- HFuncTraced(TEvPrivate::TEvPersistStats, Handle);
+ HFuncTraced(TEvPrivate::TEvPersistTableStats, Handle);
+ HFuncTraced(TEvPrivate::TEvPersistTopicStats, Handle);
HFuncTraced(TEvSchemeShard::TEvLogin, Handle);
@@ -4850,6 +4885,11 @@ void TSchemeShard::Handle(TEvTabletPipe::TEvClientConnected::TPtr &ev, const TAc
return;
}
+ if (CdcStreamScanPipes.Has(clientId)) {
+ Execute(CreatePipeRetry(CdcStreamScanPipes.GetOwnerId(clientId), CdcStreamScanPipes.GetTabletId(clientId)), ctx);
+ return;
+ }
+
if (ShardDeleter.Has(tabletId, clientId)) {
ShardDeleter.ResendDeleteRequests(TTabletId(ev->Get()->TabletId), ShardInfos, ctx);
return;
@@ -4894,6 +4934,11 @@ void TSchemeShard::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr &ev, const TAc
return;
}
+ if (CdcStreamScanPipes.Has(clientId)) {
+ Execute(CreatePipeRetry(CdcStreamScanPipes.GetOwnerId(clientId), CdcStreamScanPipes.GetTabletId(clientId)), ctx);
+ return;
+ }
+
if (ShardDeleter.Has(tabletId, clientId)) {
ShardDeleter.ResendDeleteRequests(tabletId, ShardInfos, ctx);
return;
@@ -6369,6 +6414,7 @@ void TSchemeShard::ConfigureBackgroundCompactionQueue(
compactionConfig.Timeout = TDuration::Seconds(config.GetTimeoutSeconds());
compactionConfig.WakeupInterval = TDuration::Seconds(config.GetWakeupIntervalSeconds());
+ compactionConfig.MinWakeupInterval = TDuration::MilliSeconds(config.GetMinWakeupIntervalMs());
compactionConfig.InflightLimit = config.GetInflightLimit();
compactionConfig.RoundInterval = TDuration::Seconds(config.GetRoundSeconds());
compactionConfig.MaxRate = config.GetMaxRate();
@@ -6403,6 +6449,7 @@ void TSchemeShard::ConfigureBorrowedCompactionQueue(
compactionConfig.IsCircular = false;
compactionConfig.Timeout = TDuration::Seconds(config.GetTimeoutSeconds());
+ compactionConfig.MinWakeupInterval = TDuration::MilliSeconds(config.GetMinWakeupIntervalMs());
compactionConfig.InflightLimit = config.GetInflightLimit();
compactionConfig.MaxRate = config.GetMaxRate();
diff --git a/ydb/core/tx/schemeshard/schemeshard_impl.h b/ydb/core/tx/schemeshard/schemeshard_impl.h
index 59b8714237..84d69b7927 100644
--- a/ydb/core/tx/schemeshard/schemeshard_impl.h
+++ b/ydb/core/tx/schemeshard/schemeshard_impl.h
@@ -17,6 +17,7 @@
#include "schemeshard_utils.h"
#include "schemeshard_schema.h"
#include "schemeshard__operation.h"
+#include "schemeshard__stats.h"
#include <ydb/core/base/hive.h>
#include <ydb/core/base/storage_pools.h>
@@ -44,6 +45,7 @@
#include <ydb/core/tx/sequenceshard/public/events.h>
#include <ydb/core/tx/tx_processing.h>
#include <ydb/core/util/pb.h>
+#include <ydb/core/util/token_bucket.h>
#include <ydb/core/ydb_convert/table_profiles.h>
#include <ydb/core/blockstore/core/blockstore.h>
@@ -82,7 +84,8 @@ private:
TShardCompactionInfo,
TCompactionQueueImpl,
TEvPrivate::EvRunBackgroundCompaction,
- NKikimrServices::FLAT_TX_SCHEMESHARD>;
+ NKikimrServices::FLAT_TX_SCHEMESHARD,
+ NKikimrServices::TActivity::SCHEMESHARD_BACKGROUND_COMPACTION>;
class TCompactionStarter : public TCompactionQueue::IStarter {
public:
@@ -106,7 +109,8 @@ private:
TShardIdx,
TFifoQueue<TShardIdx>,
TEvPrivate::EvRunBorrowedCompaction,
- NKikimrServices::FLAT_TX_SCHEMESHARD>;
+ NKikimrServices::FLAT_TX_SCHEMESHARD,
+ NKikimrServices::TActivity::SCHEMESHARD_BORROWED_COMPACTION>;
class TBorrowedCompactionStarter : public TBorrowedCompactionQueue::IStarter {
public:
@@ -199,7 +203,7 @@ public:
THashMap<TPathId, TTxId> LockedPaths;
- THashMap<TPathId, TPersQueueGroupInfo::TPtr> PersQueueGroups;
+ THashMap<TPathId, TTopicInfo::TPtr> Topics;
THashMap<TPathId, TRtmrVolumeInfo::TPtr> RtmrVolumes;
THashMap<TPathId, TSolomonVolumeInfo::TPtr> SolomonVolumes;
THashMap<TPathId, TSubDomainInfo::TPtr> SubDomains;
@@ -254,7 +258,7 @@ public:
bool EnableBackgroundCompaction = false;
bool EnableBackgroundCompactionServerless = false;
bool EnableBorrowedSplitCompaction = false;
- bool EnableMoveIndex = false;
+ bool EnableMoveIndex = true;
bool EnableAlterDatabaseCreateHiveFirst = false;
TShardDeleter ShardDeleter;
@@ -268,6 +272,7 @@ public:
TActorId SysPartitionStatsCollector;
TActorId SVPMigrator;
+ TActorId CdcStreamScanFinalizer;
TDuration StatsMaxExecuteTime;
TDuration StatsBatchTimeout;
@@ -275,47 +280,13 @@ public:
THashMap<TTxState::ETxType, ui32> InFlightLimits;
// time when we opened the batch
- TMonotonic StatsBatchStartTs;
- bool StatsBatchScheduled = false;
- bool PersistStatsPending = false;
-
- struct TStatsQueueItem {
- TEvDataShard::TEvPeriodicTableStats::TPtr Ev;
- TPathId PathId;
- TMonotonic Ts;
-
- TStatsQueueItem(TEvDataShard::TEvPeriodicTableStats::TPtr ev, const TPathId& pathId)
- : Ev(ev)
- , PathId(pathId)
- , Ts(AppData()->MonotonicTimeProvider->Now())
- {}
- };
-
- struct TStatsId {
- TPathId PathId;
- TTabletId Datashard;
-
- TStatsId(const TPathId& pathId, const TTabletId& datashard)
- : PathId(pathId)
- , Datashard(datashard)
- {
- }
+ bool TableStatsBatchScheduled = false;
+ bool TablePersistStatsPending = false;
+ TStatsQueue<TEvDataShard::TEvPeriodicTableStats> TableStatsQueue;
- bool operator==(const TStatsId& rhs) const {
- return PathId == rhs.PathId && Datashard == rhs.Datashard;
- }
-
- struct THash {
- inline size_t operator()(const TStatsId& obj) const {
- return MultiHash(obj.PathId.Hash(), obj.Datashard);
- }
- };
- };
-
- using TStatsMap = THashMap<TStatsId, TStatsQueueItem*, TStatsId::THash>;
-
- TStatsMap StatsMap;
- TDeque<TStatsQueueItem> StatsQueue;
+ bool TopicStatsBatchScheduled = false;
+ bool TopicPersistStatsPending = false;
+ TStatsQueue<TEvPersQueue::TEvPeriodicTopicStats> TopicStatsQueue;
TSet<TPathId> CleanDroppedPathsCandidates;
TSet<TPathId> CleanDroppedSubDomainsCandidates;
@@ -323,6 +294,8 @@ public:
bool CleanDroppedPathsDisabled = true;
bool CleanDroppedSubDomainsInFly = false;
+ TTokenBucket DropBlockStoreVolumeRateLimiter;
+
TActorId DelayedInitTenantDestination;
TAutoPtr<TEvSchemeShard::TEvInitTenantSchemeShardResult> DelayedInitTenantReply;
@@ -338,11 +311,15 @@ public:
return pId == RootPathId();
}
- bool IsServerlessDomain(const TPath& domain) const {
- const auto& resourcesDomainId = domain.DomainInfo()->GetResourcesDomainId();
+ bool IsServerlessDomain(TSubDomainInfo::TPtr domainInfo) const {
+ const auto& resourcesDomainId = domainInfo->GetResourcesDomainId();
return !IsDomainSchemeShard && resourcesDomainId && resourcesDomainId != ParentDomainId;
}
+ bool IsServerlessDomain(const TPath& domain) const {
+ return IsServerlessDomain(domain.DomainInfo());
+ }
+
TPathId MakeLocalId(const TLocalPathId& localPathId) const {
return TPathId(TabletID(), localPathId);
}
@@ -602,11 +579,12 @@ public:
void PersistTableAlterVersion(NIceDb::TNiceDb &db, const TPathId pathId, const TTableInfo::TPtr tableInfo);
void PersistTableAltered(NIceDb::TNiceDb &db, const TPathId pathId, const TTableInfo::TPtr tableInfo);
void PersistAddAlterTable(NIceDb::TNiceDb& db, TPathId pathId, const TTableInfo::TAlterDataPtr alter);
- void PersistPersQueueGroup(NIceDb::TNiceDb &db, TPathId pathId, const TPersQueueGroupInfo::TPtr);
+ void PersistPersQueueGroup(NIceDb::TNiceDb &db, TPathId pathId, const TTopicInfo::TPtr);
+ void PersistPersQueueGroupStats(NIceDb::TNiceDb &db, const TPathId pathId, const TTopicStats& stats);
void PersistRemovePersQueueGroup(NIceDb::TNiceDb &db, TPathId pathId);
- void PersistAddPersQueueGroupAlter(NIceDb::TNiceDb &db, TPathId pathId, const TPersQueueGroupInfo::TPtr);
+ void PersistAddPersQueueGroupAlter(NIceDb::TNiceDb &db, TPathId pathId, const TTopicInfo::TPtr);
void PersistRemovePersQueueGroupAlter(NIceDb::TNiceDb &db, TPathId pathId);
- void PersistPersQueue(NIceDb::TNiceDb &db, TPathId pathId, TShardIdx shardIdx, const TPQShardInfo::TPersQueueInfo& pqInfo);
+ void PersistPersQueue(NIceDb::TNiceDb &db, TPathId pathId, TShardIdx shardIdx, const TTopicTabletInfo::TTopicPartitionInfo& pqInfo);
void PersistRemovePersQueue(NIceDb::TNiceDb &db, TPathId pathId, ui32 pqId);
void PersistRtmrVolume(NIceDb::TNiceDb &db, TPathId pathId, const TRtmrVolumeInfo::TPtr rtmrVol);
void PersistRemoveRtmrVolume(NIceDb::TNiceDb &db, TPathId pathId);
@@ -723,6 +701,13 @@ public:
void PersistStorageBillingTime(NIceDb::TNiceDb& db);
TTabletId GetGlobalHive(const TActorContext& ctx) const;
+
+ enum class EHiveSelection : uint8_t {
+ ANY,
+ IGNORE_TENANT,
+ };
+
+ TTabletId ResolveHive(TPathId pathId, const TActorContext& ctx, EHiveSelection selection) const;
TTabletId ResolveHive(TPathId pathId, const TActorContext& ctx) const;
TTabletId ResolveHive(TShardIdx shardIdx, const TActorContext& ctx) const;
TShardIdx GetShardIdx(TTabletId tabletId) const;
@@ -744,13 +729,15 @@ public:
struct TTxInitTenantSchemeShard;
NTabletFlatExecutor::ITransaction* CreateTxInitTenantSchemeShard(TEvSchemeShard::TEvInitTenantSchemeShard::TPtr &ev);
- void ActivateAfterInitialization(const TActorContext &ctx,
- TSideEffects::TPublications&& delayPublications = {},
- const TVector<ui64>& exportIds = {},
- const TVector<ui64>& importsIds = {},
- TVector<TPathId>&& tablesToClean = {},
- TDeque<TPathId>&& blockStoreVolumesToClean = {}
- );
+ struct TActivationOpts {
+ TSideEffects::TPublications DelayPublications;
+ TVector<ui64> ExportIds;
+ TVector<ui64> ImportsIds;
+ TVector<TPathId> CdcStreamScans;
+ TVector<TPathId> TablesToClean;
+ TDeque<TPathId> BlockStoreVolumesToClean;
+ };
+ void ActivateAfterInitialization(const TActorContext& ctx, TActivationOpts&& opts);
struct TTxInitPopulator;
NTabletFlatExecutor::ITransaction* CreateTxInitPopulator(TSideEffects::TPublications&& publications);
@@ -980,11 +967,17 @@ public:
void Handle(TEvDataShard::TEvSplitAck::TPtr& ev, const TActorContext& ctx);
void Handle(TEvDataShard::TEvSplitPartitioningChangedAck::TPtr& ev, const TActorContext& ctx);
- void ScheduleStatsBatch(const TActorContext& ctx);
- void Handle(TEvPrivate::TEvPersistStats::TPtr& ev, const TActorContext& ctx);
+ void ExecuteTableStatsBatch(const TActorContext& ctx);
+ void ScheduleTableStatsBatch(const TActorContext& ctx);
+ void Handle(TEvPrivate::TEvPersistTableStats::TPtr& ev, const TActorContext& ctx);
void Handle(TEvDataShard::TEvPeriodicTableStats::TPtr& ev, const TActorContext& ctx);
void Handle(TEvDataShard::TEvGetTableStatsResult::TPtr& ev, const TActorContext& ctx);
+ void ExecuteTopicStatsBatch(const TActorContext& ctx);
+ void ScheduleTopicStatsBatch(const TActorContext& ctx);
+ void Handle(TEvPrivate::TEvPersistTopicStats::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvPersQueue::TEvPeriodicTopicStats::TPtr& ev, const TActorContext& ctx);
+
void Handle(TEvSchemeShard::TEvFindTabletSubDomainPathId::TPtr& ev, const TActorContext& ctx);
void ScheduleConditionalEraseRun(const TActorContext& ctx);
@@ -1186,7 +1179,6 @@ public:
NTabletFlatExecutor::ITransaction* CreatePipeRetry(TIndexBuildId indexBuildId, TTabletId tabletId);
NTabletFlatExecutor::ITransaction* CreateTxBilling(TEvPrivate::TEvIndexBuildingMakeABill::TPtr& ev);
-
void Handle(TEvIndexBuilder::TEvCreateRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvIndexBuilder::TEvGetRequest::TPtr& ev, const TActorContext& ctx);
void Handle(TEvIndexBuilder::TEvCancelRequest::TPtr& ev, const TActorContext& ctx);
@@ -1202,6 +1194,27 @@ public:
// } //NIndexBuilder
+ // namespace NCdcStreamScan {
+ struct TCdcStreamScan {
+ struct TTxProgress;
+ };
+
+ TDedicatedPipePool<TPathId> CdcStreamScanPipes;
+
+ NTabletFlatExecutor::ITransaction* CreateTxProgressCdcStreamScan(TEvPrivate::TEvRunCdcStreamScan::TPtr& ev);
+ NTabletFlatExecutor::ITransaction* CreateTxProgressCdcStreamScan(TEvDataShard::TEvCdcStreamScanResponse::TPtr& ev);
+ NTabletFlatExecutor::ITransaction* CreatePipeRetry(const TPathId& streamPathId, TTabletId tabletId);
+
+ void Handle(TEvPrivate::TEvRunCdcStreamScan::TPtr& ev, const TActorContext& ctx);
+ void Handle(TEvDataShard::TEvCdcStreamScanResponse::TPtr& ev, const TActorContext& ctx);
+
+ void ResumeCdcStreamScans(const TVector<TPathId>& ids, const TActorContext& ctx);
+
+ void PersistCdcStreamScanShardStatus(NIceDb::TNiceDb& db, const TPathId& streamPathId, const TShardIdx& shardIdx,
+ const TCdcStreamInfo::TShardStatus& status);
+ void RemoveCdcStreamScanShardStatus(NIceDb::TNiceDb& db, const TPathId& streamPathId, const TShardIdx& shardIdx);
+ // } // NCdcStreamScan
+
public:
void ChangeStreamShardsCount(i64 delta) override;
void ChangeStreamShardsQuota(i64 delta) override;
diff --git a/ydb/core/tx/schemeshard/schemeshard_info_types.cpp b/ydb/core/tx/schemeshard/schemeshard_info_types.cpp
index 5366f47b72..72ece68992 100644
--- a/ydb/core/tx/schemeshard/schemeshard_info_types.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_info_types.cpp
@@ -1591,29 +1591,32 @@ bool TTableInfo::CheckSplitByLoad(
if (!Shard2PartitionIdx.contains(shardIdx))
return false;
+ if (!IsSplitByLoadEnabled(mainTableForIndex)) {
+ return false;
+ }
+
// A shard can be overloaded by heavy reads of non-existing keys.
// So we want to be able to split it even if it has no data.
const ui64 MIN_ROWS_FOR_SPLIT_BY_LOAD = 0;
const ui64 MIN_SIZE_FOR_SPLIT_BY_LOAD = 0;
- const auto& partitionConfig = PartitionConfig();
- const auto& policy = partitionConfig.GetPartitioningPolicy();
+ const auto& policy = PartitionConfig().GetPartitioningPolicy();
+
+ const auto settings = GetEffectiveSplitByLoadSettings(mainTableForIndex);
+ const i64 cpuPercentage = settings.GetCpuPercentageThreshold();
+ const float cpuUsageThreshold = 0.01 * (cpuPercentage ? cpuPercentage : (i64)splitSettings.FastSplitCpuPercentageThreshold);
ui64 maxShards = policy.GetMaxPartitionsCount();
if (maxShards == 0) {
- // Don't want to trigger "too many shards" or "too many readsets" errors
- maxShards = splitSettings.SplitByLoadMaxShardsDefault;
- }
-
- if (!IsSplitByLoadEnabled(mainTableForIndex)) {
- return false;
+ if (mainTableForIndex) {
+ // For index table maxShards defaults to a number of partitions of its main table
+ maxShards = mainTableForIndex->GetPartitions().size();
+ } else {
+ // Don't want to trigger "too many shards" or "too many readsets" errors
+ maxShards = splitSettings.SplitByLoadMaxShardsDefault;
+ }
}
- const auto settings = GetEffectiveSplitByLoadSettings(mainTableForIndex);
- i64 cpuPercentage = settings.GetCpuPercentageThreshold();
-
- float cpuUsageThreshold = 0.01 * (cpuPercentage ? cpuPercentage : (i64)splitSettings.FastSplitCpuPercentageThreshold);
-
const auto& stats = *Stats.PartitionStats.FindPtr(shardIdx);
if (rowCount < MIN_ROWS_FOR_SPLIT_BY_LOAD ||
dataSize < MIN_SIZE_FOR_SPLIT_BY_LOAD ||
@@ -1860,7 +1863,7 @@ const TString &TColumnFamiliesMerger::CanonizeName(const TString &familyName) {
return familyName;
}
-void TPQShardInfo::TKeyRange::SerializeToProto(NKikimrPQ::TPartitionKeyRange& proto) const {
+void TTopicTabletInfo::TKeyRange::SerializeToProto(NKikimrPQ::TPartitionKeyRange& proto) const {
if (FromBound) {
proto.SetFromBound(*FromBound);
}
@@ -1870,7 +1873,7 @@ void TPQShardInfo::TKeyRange::SerializeToProto(NKikimrPQ::TPartitionKeyRange& pr
}
}
-bool TPersQueueGroupInfo::FillKeySchema(const NKikimrPQ::TPQTabletConfig& tabletConfig, TString& error) {
+bool TTopicInfo::FillKeySchema(const NKikimrPQ::TPQTabletConfig& tabletConfig, TString& error) {
KeySchema.clear();
KeySchema.reserve(tabletConfig.PartitionKeySchemaSize());
@@ -1889,7 +1892,7 @@ bool TPersQueueGroupInfo::FillKeySchema(const NKikimrPQ::TPQTabletConfig& tablet
return true;
}
-bool TPersQueueGroupInfo::FillKeySchema(const TString& tabletConfig) {
+bool TTopicInfo::FillKeySchema(const TString& tabletConfig) {
NKikimrPQ::TPQTabletConfig proto;
if (!proto.ParseFromString(tabletConfig)) {
return false;
diff --git a/ydb/core/tx/schemeshard/schemeshard_info_types.h b/ydb/core/tx/schemeshard/schemeshard_info_types.h
index 4292ead6b9..2d0dc9cadf 100644
--- a/ydb/core/tx/schemeshard/schemeshard_info_types.h
+++ b/ydb/core/tx/schemeshard/schemeshard_info_types.h
@@ -985,8 +985,22 @@ struct TColumnTableInfo : TSimpleRefCount<TColumnTableInfo> {
}
};
-struct TPQShardInfo : TSimpleRefCount<TPQShardInfo> {
- using TPtr = TIntrusivePtr<TPQShardInfo>;
+struct TTopicStats {
+ TMessageSeqNo SeqNo;
+
+ ui64 DataSize = 0;
+ ui64 UsedReserveSize = 0;
+
+ TString ToString() const {
+ return TStringBuilder() << "TTopicStats {"
+ << " DataSize: " << DataSize
+ << " UsedReserveSize: " << UsedReserveSize
+ << " }";
+ }
+};
+
+struct TTopicTabletInfo : TSimpleRefCount<TTopicTabletInfo> {
+ using TPtr = TIntrusivePtr<TTopicTabletInfo>;
using TKeySchema = TVector<NScheme::TTypeInfo>;
struct TKeyRange {
@@ -996,17 +1010,17 @@ struct TPQShardInfo : TSimpleRefCount<TPQShardInfo> {
void SerializeToProto(NKikimrPQ::TPartitionKeyRange& proto) const;
};
- struct TPersQueueInfo {
+ struct TTopicPartitionInfo {
ui32 PqId = 0;
ui32 GroupId = 0;
ui64 AlterVersion = 0;
TMaybe<TKeyRange> KeyRange;
};
- TVector<TPersQueueInfo> PQInfos;
+ TVector<TTopicPartitionInfo> Partitions;
size_t PartsCount() const {
- return PQInfos.size();
+ return Partitions.size();
}
};
@@ -1122,12 +1136,18 @@ struct TShardInfo {
}
};
-struct TPersQueueGroupInfo : TSimpleRefCount<TPersQueueGroupInfo> {
- using TPtr = TIntrusivePtr<TPersQueueGroupInfo>;
- using TKeySchema = TPQShardInfo::TKeySchema;
+/**
+ * TTopicInfo -> TTopicTabletInfo -> TTopicPartitionInfo
+ *
+ * Each topic may contains many tablets.
+ * Each tablet may serve many partitions.
+ */
+struct TTopicInfo : TSimpleRefCount<TTopicInfo> {
+ using TPtr = TIntrusivePtr<TTopicInfo>;
+ using TKeySchema = TTopicTabletInfo::TKeySchema;
struct TPartitionToAdd {
- using TKeyRange = TPQShardInfo::TKeyRange;
+ using TKeyRange = TTopicTabletInfo::TKeyRange;
ui32 PartitionId;
ui32 GroupId;
@@ -1162,15 +1182,17 @@ struct TPersQueueGroupInfo : TSimpleRefCount<TPersQueueGroupInfo> {
ui64 AlterVersion = 0;
TString TabletConfig;
TString BootstrapConfig;
- THashMap<TShardIdx, TPQShardInfo::TPtr> Shards; // key - shardIdx
+ THashMap<TShardIdx, TTopicTabletInfo::TPtr> Shards; // key - shardIdx
TKeySchema KeySchema;
- TPersQueueGroupInfo::TPtr AlterData; // changes to be applied
+ TTopicInfo::TPtr AlterData; // changes to be applied
TTabletId BalancerTabletID = InvalidTabletId;
TShardIdx BalancerShardIdx = InvalidShardIdx;
TString PreSerializedPathDescription; // Cached path description
TString PreSerializedPartitionsDescription; // Cached partition description
+ TTopicStats Stats;
+
bool FillKeySchema(const NKikimrPQ::TPQTabletConfig& tabletConfig, TString& error);
bool FillKeySchema(const TString& tabletConfig);
@@ -1201,7 +1223,7 @@ struct TPersQueueGroupInfo : TSimpleRefCount<TPersQueueGroupInfo> {
return Shards.size();
}
- void PrepareAlter(TPersQueueGroupInfo::TPtr alterData) {
+ void PrepareAlter(TTopicInfo::TPtr alterData) {
Y_VERIFY(alterData, "No alter data at Alter prepare");
alterData->AlterVersion = AlterVersion + 1;
Y_VERIFY(alterData->TotalGroupCount);
@@ -1316,6 +1338,11 @@ struct TSubDomainInfo: TSimpleRefCount<TSubDomainInfo> {
ui64 DataSize = 0;
ui64 IndexSize = 0;
} Tables;
+
+ struct TTopics {
+ ui64 DataSize = 0;
+ ui64 UsedReserveSize = 0;
+ } Topics;
};
struct TDiskSpaceQuotas {
@@ -1505,6 +1532,12 @@ struct TSubDomainInfo: TSimpleRefCount<TSubDomainInfo> {
return PQReservedStorage;
}
+ ui64 GetPQAccountStorage() const {
+ const auto& topics = DiskSpaceUsage.Topics;
+ return topics.DataSize - std::min(topics.UsedReserveSize, PQReservedStorage) + PQReservedStorage;
+
+ }
+
void SetPQReservedStorage(ui64 val) {
PQReservedStorage = val;
}
@@ -1659,7 +1692,8 @@ struct TSubDomainInfo: TSimpleRefCount<TSubDomainInfo> {
return false;
}
- if (DiskSpaceUsage.Tables.TotalSize > quotas.HardQuota) {
+ ui64 totalUsage = TotalDiskSpaceUsage();
+ if (totalUsage > quotas.HardQuota) {
if (!DiskQuotaExceeded) {
counters->ChangeDiskSpaceQuotaExceeded(+1);
DiskQuotaExceeded = true;
@@ -1669,7 +1703,7 @@ struct TSubDomainInfo: TSimpleRefCount<TSubDomainInfo> {
return false;
}
- if (DiskSpaceUsage.Tables.TotalSize < quotas.SoftQuota) {
+ if (totalUsage < quotas.SoftQuota) {
if (DiskQuotaExceeded) {
counters->ChangeDiskSpaceQuotaExceeded(-1);
DiskQuotaExceeded = false;
@@ -1682,6 +1716,20 @@ struct TSubDomainInfo: TSimpleRefCount<TSubDomainInfo> {
return false;
}
+ ui64 TotalDiskSpaceUsage() {
+ return DiskSpaceUsage.Tables.TotalSize + (AppData()->FeatureFlags.GetEnableTopicDiskSubDomainQuota() ? GetPQAccountStorage() : 0);
+ }
+
+ ui64 DiskSpaceQuotasAvailable() {
+ auto quotas = GetDiskSpaceQuotas();
+ if (!quotas) {
+ return Max<ui64>();
+ }
+
+ auto usage = TotalDiskSpaceUsage();
+ return usage < quotas.HardQuota ? quotas.HardQuota - usage : 0;
+ }
+
const TStoragePools& GetStoragePools() const {
return StoragePools ;
}
@@ -1843,6 +1891,12 @@ struct TSubDomainInfo: TSimpleRefCount<TSubDomainInfo> {
counters->ChangeDiskSpaceTablesTotalBytes(newTotalBytes - oldTotalBytes);
}
+ void AggrDiskSpaceUsage(const TTopicStats& newAggr, const TTopicStats& oldAggr = {}) {
+ auto& topics = DiskSpaceUsage.Topics;
+ topics.DataSize += (newAggr.DataSize - oldAggr.DataSize);
+ topics.UsedReserveSize += (newAggr.UsedReserveSize - oldAggr.UsedReserveSize);
+ }
+
const TDiskSpaceUsage& GetDiskSpaceUsage() const {
return DiskSpaceUsage;
}
@@ -2309,6 +2363,17 @@ struct TCdcStreamInfo : public TSimpleRefCount<TCdcStreamInfo> {
using EFormat = NKikimrSchemeOp::ECdcStreamFormat;
using EState = NKikimrSchemeOp::ECdcStreamState;
+ // shards of the table
+ struct TShardStatus {
+ NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus Status;
+
+ explicit TShardStatus(NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus status)
+ : Status(status)
+ {}
+ };
+
+ static constexpr ui32 MaxInProgressShards = 10;
+
TCdcStreamInfo(ui64 version, EMode mode, EFormat format, bool vt, EState state)
: AlterVersion(version)
, Mode(mode)
@@ -2349,6 +2414,11 @@ struct TCdcStreamInfo : public TSimpleRefCount<TCdcStreamInfo> {
EState State;
TCdcStreamInfo::TPtr AlterData = nullptr;
+
+ TMap<TShardIdx, TShardStatus> ScanShards;
+ THashSet<TShardIdx> PendingShards;
+ THashSet<TShardIdx> InProgressShards;
+ THashSet<TShardIdx> DoneShards;
};
struct TSequenceInfo : public TSimpleRefCount<TSequenceInfo> {
diff --git a/ydb/core/tx/schemeshard/schemeshard_path.cpp b/ydb/core/tx/schemeshard/schemeshard_path.cpp
index b94a2fb456..63f5ecde3c 100644
--- a/ydb/core/tx/schemeshard/schemeshard_path.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_path.cpp
@@ -739,6 +739,14 @@ const TPath::TChecker& TPath::TChecker::PQReservedStorageLimit(ui64 delta, EStat
}
}
+ ui64 quotasAvailable = domainInfo->DiskSpaceQuotasAvailable();
+ if (quotasAvailable < delta && AppData()->FeatureFlags.GetEnableTopicDiskSubDomainQuota()) {
+ return Fail(status, TStringBuilder() << "database size limit exceeded"
+ << ", limit: " << domainInfo->GetDiskSpaceQuotas().HardQuota << " bytes"
+ << ", available: " << quotasAvailable << " bytes"
+ << ", delta: " << delta << " bytes");
+ }
+
return *this;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp b/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
index bb6c2e20c5..ff99445a90 100644
--- a/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
@@ -77,10 +77,10 @@ void TPathDescriber::FillChildDescr(NKikimrSchemeOp::TDirEntry* descr, TPathElem
}
if (pathEl->PathType == NKikimrSchemeOp::EPathTypePersQueueGroup) {
- auto it = Self->PersQueueGroups.FindPtr(pathEl->PathId);
+ auto it = Self->Topics.FindPtr(pathEl->PathId);
Y_VERIFY(it, "PersQueueGroup is not found");
- TPersQueueGroupInfo::TPtr pqGroupInfo = *it;
+ TTopicInfo::TPtr pqGroupInfo = *it;
if (pqGroupInfo->HasBalancer()) {
descr->SetBalancerTabletID(ui64(pqGroupInfo->BalancerTabletID));
}
@@ -411,9 +411,9 @@ void TPathDescriber::DescribeColumnTable(TPathId pathId, TPathElement::TPtr path
}
void TPathDescriber::DescribePersQueueGroup(TPathId pathId, TPathElement::TPtr pathEl) {
- auto it = Self->PersQueueGroups.FindPtr(pathId);
+ auto it = Self->Topics.FindPtr(pathId);
Y_VERIFY(it, "PersQueueGroup is not found");
- TPersQueueGroupInfo::TPtr pqGroupInfo = *it;
+ TTopicInfo::TPtr pqGroupInfo = *it;
if (pqGroupInfo->PreSerializedPathDescription.empty()) {
NKikimrScheme::TEvDescribeSchemeResult preSerializedResult;
@@ -444,7 +444,7 @@ void TPathDescriber::DescribePersQueueGroup(TPathId pathId, TPathElement::TPtr p
struct TPartitionDesc {
TTabletId TabletId = InvalidTabletId;
- const TPQShardInfo::TPersQueueInfo* Info = nullptr;
+ const TTopicTabletInfo::TTopicPartitionInfo* Info = nullptr;
};
TVector<TPartitionDesc> descriptions; // index is pqId
@@ -454,7 +454,7 @@ void TPathDescriber::DescribePersQueueGroup(TPathId pathId, TPathElement::TPtr p
auto it = Self->ShardInfos.find(shardIdx);
Y_VERIFY_S(it != Self->ShardInfos.end(), "No shard with shardIdx: " << shardIdx);
- for (const auto& pq : pqShard->PQInfos) {
+ for (const auto& pq : pqShard->Partitions) {
if (pq.AlterVersion <= pqGroupInfo->AlterVersion) {
Y_VERIFY_S(pq.PqId < pqGroupInfo->NextPartitionId,
"Wrong pqId: " << pq.PqId << ", nextPqId: " << pqGroupInfo->NextPartitionId);
@@ -498,7 +498,7 @@ void TPathDescriber::DescribePersQueueGroup(TPathId pathId, TPathElement::TPtr p
for (const auto& [shardIdx, pqShard] : pqGroupInfo->Shards) {
const auto& shardInfo = Self->ShardInfos.at(shardIdx);
- for (const auto& pq : pqShard->PQInfos) {
+ for (const auto& pq : pqShard->Partitions) {
if (pq.AlterVersion <= pqGroupInfo->AlterVersion) {
auto partition = allocate->MutablePartitions()->Add();
partition->SetPartitionId(pq.PqId);
@@ -673,6 +673,10 @@ void TPathDescriber::DescribeDomainRoot(TPathElement::TPtr pathEl) {
diskSpaceUsage->MutableTables()->SetTotalSize(subDomainInfo->GetDiskSpaceUsage().Tables.TotalSize);
diskSpaceUsage->MutableTables()->SetDataSize(subDomainInfo->GetDiskSpaceUsage().Tables.DataSize);
diskSpaceUsage->MutableTables()->SetIndexSize(subDomainInfo->GetDiskSpaceUsage().Tables.IndexSize);
+ diskSpaceUsage->MutableTopics()->SetReserveSize(subDomainInfo->GetPQReservedStorage());
+ diskSpaceUsage->MutableTopics()->SetAccountSize(subDomainInfo->GetPQAccountStorage());
+ diskSpaceUsage->MutableTopics()->SetDataSize(subDomainInfo->GetDiskSpaceUsage().Topics.DataSize);
+ diskSpaceUsage->MutableTopics()->SetUsedReserveSize(subDomainInfo->GetDiskSpaceUsage().Topics.UsedReserveSize);
if (subDomainInfo->GetDeclaredSchemeQuotas()) {
entry->MutableDeclaredSchemeQuotas()->CopyFrom(*subDomainInfo->GetDeclaredSchemeQuotas());
diff --git a/ydb/core/tx/schemeshard/schemeshard_private.h b/ydb/core/tx/schemeshard/schemeshard_private.h
index feace05175..b1d7581f82 100644
--- a/ydb/core/tx/schemeshard/schemeshard_private.h
+++ b/ydb/core/tx/schemeshard/schemeshard_private.h
@@ -24,8 +24,10 @@ struct TEvPrivate {
EvRunBorrowedCompaction,
EvCompletePublication,
EvCompleteBarrier,
- EvPersistStats,
+ EvPersistTableStats,
EvConsoleConfigsTimeout,
+ EvRunCdcStreamScan,
+ EvPersistTopicStats,
EvEnd
};
@@ -158,13 +160,25 @@ struct TEvPrivate {
}
};
- struct TEvPersistStats: public TEventLocal<TEvPersistStats, EvPersistStats> {
- TEvPersistStats() = default;
+ struct TEvPersistTableStats: public TEventLocal<TEvPersistTableStats, EvPersistTableStats> {
+ TEvPersistTableStats() = default;
+ };
+
+ struct TEvPersistTopicStats: public TEventLocal<TEvPersistTopicStats, EvPersistTopicStats> {
+ TEvPersistTopicStats() = default;
};
struct TEvConsoleConfigsTimeout: public TEventLocal<TEvConsoleConfigsTimeout, EvConsoleConfigsTimeout> {
};
+ struct TEvRunCdcStreamScan: public TEventLocal<TEvRunCdcStreamScan, EvRunCdcStreamScan> {
+ const TPathId StreamPathId;
+
+ TEvRunCdcStreamScan(const TPathId& streamPathId)
+ : StreamPathId(streamPathId)
+ {}
+ };
+
}; // TEvPrivate
} // NSchemeShard
diff --git a/ydb/core/tx/schemeshard/schemeshard_schema.h b/ydb/core/tx/schemeshard/schemeshard_schema.h
index ed451025d6..49a7ff2425 100644
--- a/ydb/core/tx/schemeshard/schemeshard_schema.h
+++ b/ydb/core/tx/schemeshard/schemeshard_schema.h
@@ -1552,6 +1552,26 @@ struct Schema : NIceDb::Schema {
using TColumns = TableColumns<OwnerPathId, LocalPathId, AlterVersion, State, Mode, Format, VirtualTimestamps>;
};
+ struct CdcStreamScanShardStatus : Table<103> {
+ // path id of cdc stream
+ struct OwnerPathId : Column<1, NScheme::NTypeIds::Uint64> { using Type = TOwnerId; };
+ struct LocalPathId : Column<2, NScheme::NTypeIds::Uint64> { using Type = TLocalPathId; };
+ // shard idx of datashard
+ struct OwnerShardIdx : Column<3, NScheme::NTypeIds::Uint64> { using Type = TOwnerId; };
+ struct LocalShardIdx : Column<4, NScheme::NTypeIds::Uint64> { using Type = TLocalShardIdx; };
+
+ struct Status : Column<5, NScheme::NTypeIds::Uint32> { using Type = NKikimrTxDataShard::TEvCdcStreamScanResponse::EStatus; };
+
+ using TKey = TableKey<OwnerPathId, LocalPathId, OwnerShardIdx, LocalShardIdx>;
+ using TColumns = TableColumns<
+ OwnerPathId,
+ LocalPathId,
+ OwnerShardIdx,
+ LocalShardIdx,
+ Status
+ >;
+ };
+
struct Sequences : Table<97> {
struct PathId : Column<1, NScheme::NTypeIds::Uint64> { using Type = TLocalPathId; };
struct AlterVersion : Column<2, NScheme::NTypeIds::Uint64> {};
@@ -1599,6 +1619,19 @@ struct Schema : NIceDb::Schema {
using TColumns = TableColumns<PathId, AlterVersion, Description>;
};
+ struct PersQueueGroupStats : Table<106> {
+ struct PathId : Column<1, NScheme::NTypeIds::Uint64> {};
+
+ struct SeqNoGeneration : Column<2, NScheme::NTypeIds::Uint64> {};
+ struct SeqNoRound : Column<3, NScheme::NTypeIds::Uint64> {};
+
+ struct DataSize : Column<4, NScheme::NTypeIds::Uint64> {};
+ struct UsedReserveSize : Column<5, NScheme::NTypeIds::Uint64> {};
+
+ using TKey = TableKey<PathId>;
+ using TColumns = TableColumns<PathId, SeqNoGeneration, SeqNoRound, DataSize, UsedReserveSize>;
+ };
+
using TTables = SchemaTables<
Paths,
TxInFlight,
@@ -1700,7 +1733,9 @@ struct Schema : NIceDb::Schema {
SequencesAlters,
Replications,
ReplicationsAlterData,
- BlobDepots
+ BlobDepots,
+ CdcStreamScanShardStatus,
+ PersQueueGroupStats
>;
static constexpr ui64 SysParam_NextPathId = 1;
diff --git a/ydb/core/tx/schemeshard/schemeshard_tx_infly.h b/ydb/core/tx/schemeshard/schemeshard_tx_infly.h
index b4982edabd..c150e03b85 100644
--- a/ydb/core/tx/schemeshard/schemeshard_tx_infly.h
+++ b/ydb/core/tx/schemeshard/schemeshard_tx_infly.h
@@ -119,6 +119,7 @@ struct TTxState {
item(TxCreateCdcStreamAtTableWithInitialScan, 73) \
item(TxAlterExtSubDomainCreateHive, 74) \
item(TxAlterCdcStreamAtTableDropSnapshot, 75) \
+ item(TxDropCdcStreamAtTableDropSnapshot, 76) \
// TX_STATE_TYPE_ENUM
@@ -351,6 +352,7 @@ struct TTxState {
case TxDropTableIndexAtMainTable:
case TxDropCdcStream:
case TxDropCdcStreamAtTable:
+ case TxDropCdcStreamAtTableDropSnapshot:
case TxDropSequence:
case TxDropReplication:
case TxDropBlobDepot:
@@ -441,6 +443,7 @@ struct TTxState {
case TxFinalizeBuildIndex:
case TxDropTableIndexAtMainTable: // just increments schemaversion at main table
case TxDropCdcStreamAtTable:
+ case TxDropCdcStreamAtTableDropSnapshot:
case TxUpdateMainTableOnIndexMove:
return false;
case TxAlterPQGroup:
@@ -530,6 +533,7 @@ struct TTxState {
case TxDropLock:
case TxDropTableIndexAtMainTable:
case TxDropCdcStreamAtTable:
+ case TxDropCdcStreamAtTableDropSnapshot:
case TxUpdateMainTableOnIndexMove:
return false;
case TxAlterPQGroup:
diff --git a/ydb/core/tx/schemeshard/schemeshard_types.cpp b/ydb/core/tx/schemeshard/schemeshard_types.cpp
index fd3eb5afc5..cc3c439f5f 100644
--- a/ydb/core/tx/schemeshard/schemeshard_types.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_types.cpp
@@ -1,9 +1,8 @@
#include "schemeshard_types.h"
-namespace NKikimr {
-namespace NSchemeShard {
+namespace NKikimr::NSchemeShard {
-TSchemeLimits::TSchemeLimits(const NKikimrScheme::TSchemeLimits &proto) {
+TSchemeLimits::TSchemeLimits(const NKikimrScheme::TSchemeLimits& proto) {
if (proto.HasMaxDepth()) {
MaxDepth = proto.GetMaxDepth();
}
@@ -77,4 +76,3 @@ NKikimrScheme::TSchemeLimits TSchemeLimits::AsProto() const {
}
}
-}
diff --git a/ydb/core/tx/schemeshard/schemeshard_types.h b/ydb/core/tx/schemeshard/schemeshard_types.h
index b3fc236c08..be2368f7d6 100644
--- a/ydb/core/tx/schemeshard/schemeshard_types.h
+++ b/ydb/core/tx/schemeshard/schemeshard_types.h
@@ -7,13 +7,16 @@
#include <ydb/core/tablet_flat/flat_cxx_database.h>
#include <util/generic/fwd.h>
-namespace NKikimr {
-namespace NSchemeShard {
+namespace NKikimr::NSchemeShard {
struct TSchemeLimits {
+ // Used for backward compatability in case of old databases without explicit limits
+ static constexpr ui64 MaxPathsCompat = 200*1000;
+ static constexpr ui64 MaxObjectsInBackup = 10*1000;
+
// path
ui64 MaxDepth = 32;
- ui64 MaxPaths = 200*1000;
+ ui64 MaxPaths = MaxObjectsInBackup;
ui64 MaxChildrenInDir = 100*1000;
ui64 MaxAclBytesSize = 10 << 10;
ui64 MaxPathElementLength = 255;
@@ -27,7 +30,7 @@ struct TSchemeLimits {
ui64 MaxTableCdcStreams = 5;
ui64 MaxShards = 200*1000; // In each database
ui64 MaxShardsInPath = 35*1000; // In each path in database
- ui64 MaxConsistentCopyTargets = 1000;
+ ui64 MaxConsistentCopyTargets = MaxObjectsInBackup;
// pq group
ui64 MaxPQPartitions = 1000000;
@@ -40,7 +43,6 @@ struct TSchemeLimits {
using ETabletType = TTabletTypes;
-
struct TGlobalTimestamp {
TStepId Step = InvalidStepId;
TTxId TxId = InvalidTxId;
@@ -78,13 +80,11 @@ struct TGlobalTimestamp {
}
};
-
enum class ETableColumnDefaultKind : ui32 {
None = 0,
FromSequence = 1,
};
-
enum class EAttachChildResult : ui32 {
Undefined = 0,
@@ -107,4 +107,3 @@ enum class EAttachChildResult : ui32 {
};
}
-}
diff --git a/ydb/core/tx/schemeshard/schemeshard_utils.cpp b/ydb/core/tx/schemeshard/schemeshard_utils.cpp
index 56ba5d161d..3058f224fc 100644
--- a/ydb/core/tx/schemeshard/schemeshard_utils.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_utils.cpp
@@ -1,6 +1,7 @@
#include "schemeshard_utils.h"
#include <ydb/core/mind/hive/hive.h>
+#include <ydb/core/persqueue/utils.h>
#include <ydb/core/protos/counters_schemeshard.pb.h>
namespace NKikimr {
@@ -199,6 +200,11 @@ void TSelfPinger::ScheduleSelfPingWakeup(const NActors::TActorContext &ctx) {
SelfPingWakeupScheduledTime = AppData(ctx)->TimeProvider->Now();
}
+PQGroupReserve::PQGroupReserve(const ::NKikimrPQ::TPQTabletConfig& tabletConfig, ui64 partitions) {
+ Storage = partitions * NPQ::TopicPartitionReserveSize(tabletConfig);
+ Throughput = partitions * NPQ::TopicPartitionReserveThroughput(tabletConfig);
+}
+
}
namespace NTableIndex {
@@ -414,7 +420,6 @@ NKikimrSchemeOp::TPartitionConfig PartitionConfigForIndexes(
} else {
result.MutablePartitioningPolicy()->SetSizeToSplit(2_GB);
result.MutablePartitioningPolicy()->SetMinPartitionsCount(1);
- result.MutablePartitioningPolicy()->SetMaxPartitionsCount(5000);
}
if (baseTablePartitionConfig.HasPipelineConfig()) {
result.MutablePipelineConfig()->CopyFrom(baseTablePartitionConfig.GetPipelineConfig());
diff --git a/ydb/core/tx/schemeshard/schemeshard_utils.h b/ydb/core/tx/schemeshard/schemeshard_utils.h
index 4bdba6701e..5f75482c88 100644
--- a/ydb/core/tx/schemeshard/schemeshard_utils.h
+++ b/ydb/core/tx/schemeshard/schemeshard_utils.h
@@ -123,6 +123,14 @@ private:
bool SelfPingWakeupScheduled;
};
+class PQGroupReserve {
+public:
+ PQGroupReserve(const ::NKikimrPQ::TPQTabletConfig& tabletConfig, ui64 partitions);
+
+ ui64 Storage;
+ ui64 Throughput;
+};
+
} // NSchemeShard
namespace NTableIndex {
diff --git a/ydb/core/tx/schemeshard/ut_base.cpp b/ydb/core/tx/schemeshard/ut_base.cpp
index 7d3f2bb600..74d08de026 100644
--- a/ydb/core/tx/schemeshard/ut_base.cpp
+++ b/ydb/core/tx/schemeshard/ut_base.cpp
@@ -613,18 +613,15 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
env.TestWaitNotification(runtime, {txId, txId-1, txId-2, txId-3});
- TestUserAttrs(runtime, ++txId, "/", "MyRoot", AlterUserAttrs({{"__extra_path_symbols_allowed", "_.-"}}));
- env.TestWaitNotification(runtime, txId);
- RebootTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor());
+ TSchemeLimits lowLimits;
+ lowLimits.ExtraPathSymbolsAllowed = "_.-";
+ SetSchemeshardSchemaLimits(runtime, lowLimits);
TestMkDir(runtime, ++txId, "/MyRoot", "Dir1!", {NKikimrScheme::StatusSchemeError});
TestMkDir(runtime, ++txId, "/MyRoot", "Dir1?", {NKikimrScheme::StatusSchemeError});
TestMkDir(runtime, ++txId, "/MyRoot", "Dir1@", {NKikimrScheme::StatusSchemeError});
TestMkDir(runtime, ++txId, "/MyRoot", "Dir1:", {NKikimrScheme::StatusSchemeError});
-
- TSchemeLimits lowLimits;
-
lowLimits.ExtraPathSymbolsAllowed = "!?@:";
SetSchemeshardSchemaLimits(runtime, lowLimits);
@@ -639,9 +636,6 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
lowLimits.ExtraPathSymbolsAllowed = "!";
SetSchemeshardSchemaLimits(runtime, lowLimits);
- TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::UserAttrsEqual({{"__extra_path_symbols_allowed", "_.-"}})});
-
TestDescribeResult(DescribePath(runtime, "/MyRoot/Dir1!"),
{NLs::Finished,
NLs::PathVersionEqual(3)});
@@ -1419,9 +1413,9 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
)", {NKikimrScheme::StatusPathDoesNotExist});
{
- TestUserAttrs(runtime, ++txId, "/", "MyRoot", AlterUserAttrs({{"__extra_path_symbols_allowed", "-_."}}));
- env.TestWaitNotification(runtime, txId);
- RebootTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor());
+ TSchemeLimits lowLimits;
+ lowLimits.ExtraPathSymbolsAllowed = "-_.";
+ SetSchemeshardSchemaLimits(runtime, lowLimits);
TestConsistentCopyTables(runtime, ++txId, "/", R"(
CopyTableDescriptions {
@@ -1783,7 +1777,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
NLs::IndexKeys({"value1"})});
TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/DirA/Table1/UserDefinedIndexByValue1/indexImplTable", true, true),
{NLs::Finished,
- NLs::MaxPartitionsCountEqual(5000),
+ NLs::NoMaxPartitionsCount,
NLs::SizeToSplitEqual(2<<30)}); // 2G
TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/DirA/Table1/UserDefinedIndexByValues"),
{NLs::Finished,
@@ -3725,6 +3719,54 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
env.TestWaitNotification(runtime, txId);
}
+ Y_UNIT_TEST(ConsistentCopyTablesForBackup) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+
+ TSchemeLimits limits;
+ limits.MaxConsistentCopyTargets = 1; // should not affect
+ SetSchemeshardSchemaLimits(runtime, limits);
+
+ // create two tables
+ for (int i = 1; i <= 2; ++i) {
+ TestCreateTable(runtime, ++txId, "/MyRoot", Sprintf(R"(
+ Name: "Table%i"
+ Columns { Name: "key" Type: "Uint32"}
+ Columns { Name: "value" Type: "Utf8"}
+ KeyColumnNames: ["key"]
+ )", i));
+ env.TestWaitNotification(runtime, txId);
+ }
+
+ // negative
+ TestConsistentCopyTables(runtime, ++txId, "/", R"(
+ CopyTableDescriptions {
+ SrcPath: "/MyRoot/Table1"
+ DstPath: "/MyRoot/CopyTable1"
+ }
+ CopyTableDescriptions {
+ SrcPath: "/MyRoot/Table2"
+ DstPath: "/MyRoot/CopyTable2"
+ }
+ )", {NKikimrScheme::StatusInvalidParameter});
+
+ // positive
+ TestConsistentCopyTables(runtime, ++txId, "/", R"(
+ CopyTableDescriptions {
+ SrcPath: "/MyRoot/Table1"
+ DstPath: "/MyRoot/CopyTable1"
+ IsBackup: true
+ }
+ CopyTableDescriptions {
+ SrcPath: "/MyRoot/Table2"
+ DstPath: "/MyRoot/CopyTable2"
+ IsBackup: true
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ }
+
Y_UNIT_TEST(CreateIndexedTableAfterBackup) {
TTestBasicRuntime runtime;
TTestEnv env(runtime);
@@ -10231,7 +10273,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
NLs::PathVersionEqual(4),
NLs::PartitionCount(1),
NLs::MinPartitionsCountEqual(1),
- NLs::MaxPartitionsCountEqual(5000)});
+ NLs::NoMaxPartitionsCount
+ });
TestSplitTable(runtime, ++txId, "/MyRoot/table/indexByValue/indexImplTable", R"(
@@ -10253,7 +10296,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
NLs::PathVersionEqual(5),
NLs::PartitionCount(3),
NLs::MinPartitionsCountEqual(1),
- NLs::MaxPartitionsCountEqual(5000)});
+ NLs::NoMaxPartitionsCount
+ });
// request without token
TestAlterTable(runtime, ++txId, "/MyRoot/table/indexByValue/", R"(
@@ -10356,7 +10400,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
{NLs::PathExist,
NLs::PartitionCount(1),
NLs::MinPartitionsCountEqual(1),
- NLs::MaxPartitionsCountEqual(5000),
+ NLs::NoMaxPartitionsCount,
NLs::SizeToSplitEqual(100500)});
}
@@ -10507,4 +10551,388 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
}
);
}
+
+ Y_UNIT_TEST(TopicReserveSize) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+
+ const auto AssertReserve = [&] (TString path, ui64 expectedReservedStorage) {
+ TestDescribeResult(DescribePath(runtime, path),
+ {NLs::Finished,
+ NLs::TopicReservedStorage(expectedReservedStorage)});
+ };
+
+ // create with WriteSpeedInBytesPerSecond
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 1
+ PartitionPerTablet: 1
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 1 * 13 * 19);
+
+ // Change MeteringMode
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_REQUEST_UNITS
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 0);
+
+ // Change MeteringMode
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 1 * 13 * 19);
+
+ // increase partitions count
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 13 * 19);
+
+ // increase WriteSpeedInBytesPerSecond
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 23
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 13 * 23);
+
+ // decrease WriteSpeedInBytesPerSecond
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 13 * 19);
+
+ // increase LifetimeSeconds
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 17
+ WriteSpeedInBytesPerSecond : 23
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 17 * 23);
+
+ // decrease LifetimeSeconds
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 13 * 19);
+
+ // use StorageLimitBytes
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ StorageLimitBytes : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 17);
+
+ // increase StorageLimitBytes
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ StorageLimitBytes : 23
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 23);
+
+ // decrease StorageLimitBytes
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 7
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ StorageLimitBytes : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 7 * 17);
+
+ // increase partitions count
+ TestAlterPQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 11
+ PartitionPerTablet: 11
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ StorageLimitBytes : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic1", 11 * 17);
+
+ // drop partiotion
+ TestDropPQGroup(runtime, ++txId, "/MyRoot", "Topic1");
+ env.TestWaitNotification(runtime, txId);
+
+
+ // create with StorageLimitBytes
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic2"
+ TotalGroupCount: 3
+ PartitionPerTablet: 3
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ StorageLimitBytes : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertReserve("/MyRoot/Topic2", 3 * 17);
+ }
+
+ Y_UNIT_TEST(FindSubDomainPathId) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+
+ TestCreateSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "SubDomenA"
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ // create with WriteSpeedInBytesPerSecond
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot/SubDomenA", R"(
+ Name: "Topic1"
+ TotalGroupCount: 1
+ PartitionPerTablet: 1
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ auto subDomainPathId = DescribePath(runtime, "/MyRoot/SubDomenA").GetPathId();
+ auto topicTabletId = DescribePath(runtime, "/MyRoot/SubDomenA/Topic1", true, true, true)
+ .GetPathDescription().GetPersQueueGroup().GetPartitions()[0].GetTabletId();
+
+ ForwardToTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor(), new TEvSchemeShard::TEvFindTabletSubDomainPathId(topicTabletId));
+
+ TAutoPtr<IEventHandle> handle;
+ auto event = runtime.GrabEdgeEvent<TEvSchemeShard::TEvFindTabletSubDomainPathIdResult>(handle, TDuration::Seconds(1));
+ UNIT_ASSERT(event);
+
+ UNIT_ASSERT_VALUES_EQUAL(subDomainPathId, event->Record.GetSubDomainPathId());
+ }
+
+ Y_UNIT_TEST(FindSubDomainPathIdActor) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+
+ TestCreateSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "SubDomenA"
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ // create with WriteSpeedInBytesPerSecond
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot/SubDomenA", R"(
+ Name: "Topic1"
+ TotalGroupCount: 1
+ PartitionPerTablet: 1
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ auto subDomainPathId = DescribePath(runtime, "/MyRoot/SubDomenA").GetPathId();
+ auto topicTabletId = DescribePath(runtime, "/MyRoot/SubDomenA/Topic1", true, true, true)
+ .GetPathDescription().GetPersQueueGroup().GetPartitions()[0].GetTabletId();
+
+ runtime.Register(CreateFindSubDomainPathIdActor(runtime.AllocateEdgeActor(), topicTabletId, TTestTxConfig::SchemeShard, false));
+
+ TAutoPtr<IEventHandle> handle;
+ auto event = runtime.GrabEdgeEvent<TEvSchemeShard::TEvSubDomainPathIdFound>(handle, TDuration::Seconds(1));
+ UNIT_ASSERT(event);
+
+ UNIT_ASSERT_VALUES_EQUAL(subDomainPathId, event->LocalPathId);
+ }
+
+ Y_UNIT_TEST(FindSubDomainPathIdActorAsync) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+
+ TestCreateSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "SubDomenA"
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ // create with WriteSpeedInBytesPerSecond
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot/SubDomenA", R"(
+ Name: "Topic1"
+ TotalGroupCount: 1
+ PartitionPerTablet: 1
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ auto subDomainPathId = DescribePath(runtime, "/MyRoot/SubDomenA").GetPathId();
+ auto topicTabletId = DescribePath(runtime, "/MyRoot/SubDomenA/Topic1", true, true, true)
+ .GetPathDescription().GetPersQueueGroup().GetPartitions()[0].GetTabletId();
+
+ runtime.Register(CreateFindSubDomainPathIdActor(runtime.AllocateEdgeActor(), topicTabletId, TTestTxConfig::SchemeShard, true, TDuration::Seconds(2)));
+
+ TAutoPtr<IEventHandle> handle;
+ auto event = runtime.GrabEdgeEvent<TEvSchemeShard::TEvSubDomainPathIdFound>(handle, TDuration::Seconds(2));
+ UNIT_ASSERT(event);
+
+ UNIT_ASSERT_VALUES_EQUAL(subDomainPathId, event->LocalPathId);
+ }
+
+ Y_UNIT_TEST(CreateTopicOverDiskSpaceQuotas) {
+ TTestBasicRuntime runtime;
+
+ TTestEnvOptions opts;
+ opts.DisableStatsBatching(true);
+ opts.EnablePersistentPartitionStats(true);
+ opts.EnableTopicDiskSubDomainQuota(true);
+
+ TTestEnv env(runtime, opts);
+
+ ui64 txId = 100;
+
+ // Subdomain with a 1-byte data size quota
+ TestCreateSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "USER_1"
+ PlanResolution: 50
+ Coordinators: 1
+ Mediators: 1
+ TimeCastBucketsPerMediator: 2
+ StoragePools {
+ Name: "name_USER_0_kind_hdd-1"
+ Kind: "hdd-1"
+ }
+ StoragePools {
+ Name: "name_USER_0_kind_hdd-2"
+ Kind: "hdd-2"
+ }
+ DatabaseQuotas {
+ data_size_hard_quota: 1
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot/USER_1", R"(
+ Name: "Topic1"
+ TotalGroupCount: 3
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 1
+ WriteSpeedInBytesPerSecond : 121
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )", {{TEvSchemeShard::EStatus::StatusResourceExhausted, "database size limit exceeded"}});
+ env.TestWaitNotification(runtime, txId);
+ }
+
}
diff --git a/ydb/core/tx/schemeshard/ut_bsvolume.cpp b/ydb/core/tx/schemeshard/ut_bsvolume.cpp
index c5824e6a64..4bcc51a200 100644
--- a/ydb/core/tx/schemeshard/ut_bsvolume.cpp
+++ b/ydb/core/tx/schemeshard/ut_bsvolume.cpp
@@ -102,6 +102,104 @@ Y_UNIT_TEST_SUITE(TBSV) {
// Good: Value { Struct { Optional { Struct { } Struct { Bool: false } } } } }
UNIT_ASSERT_VALUES_EQUAL(result.GetValue().GetStruct(0).GetOptional().GetStruct(0).ListSize(), 0);
}
+ }
+
+ Y_UNIT_TEST(ShouldLimitBlockStoreVolumeDropRate) {
+ struct TMockTimeProvider : public ITimeProvider
+ {
+ TInstant Time;
+
+ TInstant Now() override
+ {
+ return Time;
+ }
+ };
+
+ struct TTimeProviderMocker
+ {
+ TIntrusivePtr<ITimeProvider> OriginalTimeProvider;
+
+ TTimeProviderMocker(TIntrusivePtr<ITimeProvider> timeProvider)
+ {
+ OriginalTimeProvider = NKikimr::TAppData::TimeProvider;
+ NKikimr::TAppData::TimeProvider = timeProvider;
+ }
+
+ ~TTimeProviderMocker()
+ {
+ NKikimr::TAppData::TimeProvider = OriginalTimeProvider;
+ }
+ };
+
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+ auto root = "/MyRoot";
+ auto name = "BSVolume";
+ auto throttled = NKikimrScheme::StatusNotAvailable;
+
+ TestUserAttrs(runtime, ++txId, "", "MyRoot",
+ AlterUserAttrs(
+ {{"drop_blockstore_volume_rate_limiter_rate", "1.0"}}
+ )
+ );
+ env.TestWaitNotification(runtime, txId);
+
+ TestUserAttrs(runtime, ++txId, "", "MyRoot",
+ AlterUserAttrs(
+ {{"drop_blockstore_volume_rate_limiter_capacity", "10.0"}}
+ )
+ );
+ env.TestWaitNotification(runtime, txId);
+
+ TIntrusivePtr<TMockTimeProvider> mockTimeProvider =
+ new TMockTimeProvider();
+ TTimeProviderMocker mocker(mockTimeProvider);
+ NKikimrSchemeOp::TBlockStoreVolumeDescription descr;
+ descr.SetName(name);
+ auto& c = *descr.MutableVolumeConfig();
+ c.SetBlockSize(4096);
+ for (int i = 0; i < 4; ++i) {
+ c.AddExplicitChannelProfiles()->SetPoolKind("pool-kind-1");
+ }
+ c.AddPartitions()->SetBlockCount(16);
+
+ // consume all initial budget
+ for (int i = 0; i < 10; ++i) {
+ TestCreateBlockStoreVolume(runtime, ++txId, root, descr.DebugString());
+ env.TestWaitNotification(runtime, txId);
+ TestDropBlockStoreVolume(runtime, ++txId, root, name);
+ env.TestWaitNotification(runtime, txId);
+ }
+
+ TestCreateBlockStoreVolume(runtime, ++txId, root, descr.DebugString());
+ env.TestWaitNotification(runtime, txId);
+ // drop should be throttled
+ TestDropBlockStoreVolume(runtime, ++txId, root, name, {throttled});
+ env.TestWaitNotification(runtime, txId);
+
+ mockTimeProvider->Time = TInstant::Seconds(1);
+
+ // after 1 second, we should be able to drop one volume
+ TestDropBlockStoreVolume(runtime, ++txId, root, name);
+ env.TestWaitNotification(runtime, txId);
+
+ TestCreateBlockStoreVolume(runtime, ++txId, root, descr.DebugString());
+ env.TestWaitNotification(runtime, txId);
+ // next drop should be throttled
+ TestDropBlockStoreVolume(runtime, ++txId, root, name, {throttled});
+ env.TestWaitNotification(runtime, txId);
+
+ // turn off rate limiter
+ TestUserAttrs(runtime, ++txId, "", "MyRoot",
+ AlterUserAttrs(
+ {{"drop_blockstore_volume_rate_limiter_rate", "0.0"}}
+ )
+ );
+ env.TestWaitNotification(runtime, txId);
+
+ TestDropBlockStoreVolume(runtime, ++txId, root, name);
+ env.TestWaitNotification(runtime, txId);
}
}
diff --git a/ydb/core/tx/schemeshard/ut_bsvolume_reboots.cpp b/ydb/core/tx/schemeshard/ut_bsvolume_reboots.cpp
index 5dbdecf8e6..22ac155469 100644
--- a/ydb/core/tx/schemeshard/ut_bsvolume_reboots.cpp
+++ b/ydb/core/tx/schemeshard/ut_bsvolume_reboots.cpp
@@ -342,11 +342,9 @@ Y_UNIT_TEST_SUITE(TBSVWithReboots) {
t.TestEnv->TestWaitNotification(runtime, t.TxId-1);
TestLs(runtime, "/MyRoot/DirA/BSVolume_4", false, NLs::CheckMountToken("BSVolume_4", "Owner123"));
-
- TestAssignBlockStoreVolume(runtime, t.TxId++, "/MyRoot/DirA", "BSVolume_4", "Owner124", 1);
+ TestAssignBlockStoreVolume(runtime, t.TxId++, "/MyRoot/DirA", "BSVolume_4", "Owner124", 1);
t.TestEnv->TestWaitNotification(runtime, t.TxId-1);
TestLs(runtime, "/MyRoot/DirA/BSVolume_4", false, NLs::CheckMountToken("BSVolume_4", "Owner124"));
-
});
}
}
diff --git a/ydb/core/tx/schemeshard/ut_cdc_stream.cpp b/ydb/core/tx/schemeshard/ut_cdc_stream.cpp
index 13f0fe2668..619399646d 100644
--- a/ydb/core/tx/schemeshard/ut_cdc_stream.cpp
+++ b/ydb/core/tx/schemeshard/ut_cdc_stream.cpp
@@ -1,5 +1,6 @@
#include <ydb/core/metering/metering.h>
#include <ydb/core/tx/schemeshard/ut_helpers/helpers.h>
+#include <ydb/core/tx/schemeshard/schemeshard_billing_helpers.h>
#include <ydb/core/tx/schemeshard/schemeshard_impl.h>
#include <library/cpp/json/json_reader.h>
@@ -139,123 +140,6 @@ Y_UNIT_TEST_SUITE(TCdcStreamTests) {
}
}
- void InitialScan(bool enable) {
- TTestBasicRuntime runtime;
- TTestEnv env(runtime, TTestEnvOptions()
- .EnableProtoSourceIdInfo(true)
- .EnableChangefeedInitialScan(enable));
- ui64 txId = 100;
-
- TestCreateTable(runtime, ++txId, "/MyRoot", R"(
- Name: "Table"
- Columns { Name: "key" Type: "Uint64" }
- Columns { Name: "value" Type: "Uint64" }
- KeyColumnNames: ["key"]
- )");
- env.TestWaitNotification(runtime, txId);
-
- const auto expectedStatus = enable
- ? NKikimrScheme::StatusAccepted
- : NKikimrScheme::StatusPreconditionFailed;
-
- TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
- TableName: "Table"
- StreamDescription {
- Name: "Stream"
- Mode: ECdcStreamModeKeysOnly
- Format: ECdcStreamFormatProto
- State: ECdcStreamStateScan
- }
- )", {expectedStatus});
-
- if (!enable) {
- return;
- }
-
- env.TestWaitNotification(runtime, txId);
- const auto lockTxId = txId;
-
- TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/Table/Stream"), {
- NLs::PathExist,
- NLs::StreamMode(NKikimrSchemeOp::ECdcStreamModeKeysOnly),
- NLs::StreamFormat(NKikimrSchemeOp::ECdcStreamFormatProto),
- NLs::StreamState(NKikimrSchemeOp::ECdcStreamStateScan),
- });
-
- auto testAlterCdcStream = [&runtime](ui64 txId, const TString& parentPath, const TString& schema,
- const TMaybe<ui64>& lockTxId, TEvSchemeShard::EStatus expectedStatus = NKikimrScheme::StatusAccepted)
- {
- auto request = AlterCdcStreamRequest(txId, parentPath, schema);
- if (lockTxId) {
- request->Record.MutableTransaction(0)->MutableLockGuard()->SetOwnerTxId(*lockTxId);
- }
-
- ForwardToTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor(), request);
- TestModificationResult(runtime, txId, expectedStatus);
- };
-
- // without guard & lockTxId
- testAlterCdcStream(++txId, "/MyRoot", R"(
- TableName: "Table"
- StreamName: "Stream"
- GetReady {
- LockTxId: 0
- }
- )", {}, NKikimrScheme::StatusMultipleModifications);
-
- // with guard, without lockTxId
- testAlterCdcStream(++txId, "/MyRoot", R"(
- TableName: "Table"
- StreamName: "Stream"
- GetReady {
- LockTxId: 0
- }
- )", lockTxId, NKikimrScheme::StatusMultipleModifications);
-
- // without guard, with lockTxId
- testAlterCdcStream(++txId, "/MyRoot", Sprintf(R"(
- TableName: "Table"
- StreamName: "Stream"
- GetReady {
- LockTxId: %lu
- }
- )", lockTxId), {}, NKikimrScheme::StatusMultipleModifications);
-
- // with guard & lockTxId
- testAlterCdcStream(++txId, "/MyRoot", Sprintf(R"(
- TableName: "Table"
- StreamName: "Stream"
- GetReady {
- LockTxId: %lu
- }
- )", lockTxId), lockTxId);
- env.TestWaitNotification(runtime, txId);
-
- TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/Table/Stream"), {
- NLs::PathExist,
- NLs::StreamMode(NKikimrSchemeOp::ECdcStreamModeKeysOnly),
- NLs::StreamFormat(NKikimrSchemeOp::ECdcStreamFormatProto),
- NLs::StreamState(NKikimrSchemeOp::ECdcStreamStateReady),
- });
-
- // another try should fail
- testAlterCdcStream(++txId, "/MyRoot", Sprintf(R"(
- TableName: "Table"
- StreamName: "Stream"
- GetReady {
- LockTxId: %lu
- }
- )", lockTxId), {}, NKikimrScheme::StatusPreconditionFailed);
- }
-
- Y_UNIT_TEST(InitialScanShouldSucceed) {
- InitialScan(true);
- }
-
- Y_UNIT_TEST(InitialScanShouldFail) {
- InitialScan(false);
- }
-
Y_UNIT_TEST(Negative) {
TTestBasicRuntime runtime;
TTestEnv env(runtime, TTestEnvOptions().EnableProtoSourceIdInfo(true));
@@ -944,4 +828,417 @@ Y_UNIT_TEST_SUITE(TCdcStreamTests) {
Metering(false);
}
+ Y_UNIT_TEST(ChangeOwner) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime, TTestEnvOptions().EnableProtoSourceIdInfo(true));
+ ui64 txId = 100;
+
+ TestCreateTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64" }
+ Columns { Name: "value" Type: "Uint64" }
+ KeyColumnNames: ["key"]
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ for (const auto* path : {"Table", "Table/Stream", "Table/Stream/streamImpl"}) {
+ TestDescribeResult(DescribePrivatePath(runtime, Sprintf("/MyRoot/%s", path)), {
+ NLs::HasOwner("root@builtin"),
+ });
+ }
+
+ TestModifyACL(runtime, ++txId, "/MyRoot", "Table", "", "user@builtin");
+ env.TestWaitNotification(runtime, txId);
+
+ for (const auto* path : {"Table", "Table/Stream", "Table/Stream/streamImpl"}) {
+ TestDescribeResult(DescribePrivatePath(runtime, Sprintf("/MyRoot/%s", path)), {
+ NLs::HasOwner("user@builtin"),
+ });
+ }
+ }
+
} // TCdcStreamTests
+
+Y_UNIT_TEST_SUITE(TCdcStreamWithInitialScanTests) {
+ void InitialScan(bool enable) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime, TTestEnvOptions()
+ .EnableProtoSourceIdInfo(true)
+ .EnableChangefeedInitialScan(enable));
+ ui64 txId = 100;
+
+ TestCreateTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64" }
+ Columns { Name: "value" Type: "Uint64" }
+ KeyColumnNames: ["key"]
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ const auto expectedStatus = enable
+ ? NKikimrScheme::StatusAccepted
+ : NKikimrScheme::StatusPreconditionFailed;
+
+ TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ State: ECdcStreamStateScan
+ }
+ )", {expectedStatus});
+
+ if (!enable) {
+ return;
+ }
+
+ env.TestWaitNotification(runtime, txId);
+
+ TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/Table/Stream"), {
+ NLs::PathExist,
+ NLs::StreamMode(NKikimrSchemeOp::ECdcStreamModeKeysOnly),
+ NLs::StreamFormat(NKikimrSchemeOp::ECdcStreamFormatProto),
+ NLs::StreamState(NKikimrSchemeOp::ECdcStreamStateScan),
+ });
+ }
+
+ Y_UNIT_TEST(InitialScanEnabled) {
+ InitialScan(true);
+ }
+
+ Y_UNIT_TEST(InitialScanDisabled) {
+ InitialScan(false);
+ }
+
+ Y_UNIT_TEST(AlterStream) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime, TTestEnvOptions()
+ .EnableProtoSourceIdInfo(true)
+ .EnableChangefeedInitialScan(true));
+ runtime.GetAppData().DisableCdcAutoSwitchingToReadyStateForTests = true;
+ ui64 txId = 100;
+
+ TestCreateTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64" }
+ Columns { Name: "value" Type: "Uint64" }
+ KeyColumnNames: ["key"]
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ State: ECdcStreamStateScan
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ const auto lockTxId = txId;
+ auto testAlterCdcStream = [&runtime](ui64 txId, const TString& parentPath, const TString& schema,
+ const TMaybe<ui64>& lockTxId, TEvSchemeShard::EStatus expectedStatus = NKikimrScheme::StatusAccepted)
+ {
+ auto request = AlterCdcStreamRequest(txId, parentPath, schema);
+ if (lockTxId) {
+ request->Record.MutableTransaction(0)->MutableLockGuard()->SetOwnerTxId(*lockTxId);
+ }
+
+ ForwardToTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor(), request);
+ TestModificationResult(runtime, txId, expectedStatus);
+ };
+
+ // try to disable
+ testAlterCdcStream(++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamName: "Stream"
+ Disable {}
+ )", lockTxId, NKikimrScheme::StatusPreconditionFailed);
+
+ // without guard & lockTxId
+ testAlterCdcStream(++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamName: "Stream"
+ GetReady {
+ LockTxId: 0
+ }
+ )", {}, NKikimrScheme::StatusMultipleModifications);
+
+ // with guard, without lockTxId
+ testAlterCdcStream(++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamName: "Stream"
+ GetReady {
+ LockTxId: 0
+ }
+ )", lockTxId, NKikimrScheme::StatusMultipleModifications);
+
+ // without guard, with lockTxId
+ testAlterCdcStream(++txId, "/MyRoot", Sprintf(R"(
+ TableName: "Table"
+ StreamName: "Stream"
+ GetReady {
+ LockTxId: %lu
+ }
+ )", lockTxId), {}, NKikimrScheme::StatusMultipleModifications);
+
+ // with guard & lockTxId
+ testAlterCdcStream(++txId, "/MyRoot", Sprintf(R"(
+ TableName: "Table"
+ StreamName: "Stream"
+ GetReady {
+ LockTxId: %lu
+ }
+ )", lockTxId), lockTxId);
+ env.TestWaitNotification(runtime, txId);
+
+ TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/Table/Stream"), {
+ NLs::PathExist,
+ NLs::StreamMode(NKikimrSchemeOp::ECdcStreamModeKeysOnly),
+ NLs::StreamFormat(NKikimrSchemeOp::ECdcStreamFormatProto),
+ NLs::StreamState(NKikimrSchemeOp::ECdcStreamStateReady),
+ });
+
+ // another try should fail
+ testAlterCdcStream(++txId, "/MyRoot", Sprintf(R"(
+ TableName: "Table"
+ StreamName: "Stream"
+ GetReady {
+ LockTxId: %lu
+ }
+ )", lockTxId), {}, NKikimrScheme::StatusPreconditionFailed);
+ }
+
+ Y_UNIT_TEST(DropStream) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime, TTestEnvOptions()
+ .EnableProtoSourceIdInfo(true)
+ .EnableChangefeedInitialScan(true));
+ runtime.GetAppData().DisableCdcAutoSwitchingToReadyStateForTests = true;
+ ui64 txId = 100;
+
+ TestCreateTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64" }
+ Columns { Name: "value" Type: "Uint64" }
+ KeyColumnNames: ["key"]
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream1"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ State: ECdcStreamStateScan
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ // the table is locked now
+ TestAlterTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "extra" Type: "Uint64"}
+ )", {NKikimrScheme::StatusMultipleModifications});
+
+ TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream2"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ }
+ )", {NKikimrScheme::StatusMultipleModifications});
+
+ // drop the stream that locks the table
+ TestDropCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamName: "Stream1"
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ // the table is no longer locked
+ TestAlterTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "extra" Type: "Uint64"}
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream2"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ }
+
+ void Metering(bool serverless) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime, TTestEnvOptions()
+ .EnableProtoSourceIdInfo(true)
+ .EnableChangefeedInitialScan(true));
+ ui64 txId = 100;
+
+ // create shared db
+ TestCreateExtSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "Shared"
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestAlterExtSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "Shared"
+ StoragePools {
+ Name: "pool-1"
+ Kind: "pool-kind-1"
+ }
+ StoragePools {
+ Name: "pool-2"
+ Kind: "pool-kind-2"
+ }
+ PlanResolution: 50
+ Coordinators: 1
+ Mediators: 1
+ TimeCastBucketsPerMediator: 2
+ ExternalSchemeShard: true
+ ExternalHive: false
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ const auto attrs = AlterUserAttrs({
+ {"cloud_id", "CLOUD_ID_VAL"},
+ {"folder_id", "FOLDER_ID_VAL"},
+ {"database_id", "DATABASE_ID_VAL"}
+ });
+
+ // create serverless db
+ TestCreateExtSubDomain(runtime, ++txId, "/MyRoot", Sprintf(R"(
+ Name: "Serverless"
+ ResourcesDomainKey {
+ SchemeShard: %lu
+ PathId: 2
+ }
+ )", TTestTxConfig::SchemeShard), attrs);
+ env.TestWaitNotification(runtime, txId);
+
+ TestAlterExtSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "Serverless"
+ StoragePools {
+ Name: "pool-1"
+ Kind: "pool-kind-1"
+ }
+ PlanResolution: 50
+ Coordinators: 1
+ Mediators: 1
+ TimeCastBucketsPerMediator: 2
+ ExternalSchemeShard: true
+ ExternalHive: false
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TString dbName;
+ if (serverless) {
+ dbName = "/MyRoot/Serverless";
+ } else {
+ dbName = "/MyRoot/Shared";
+ }
+
+ ui64 schemeShard = 0;
+ TestDescribeResult(DescribePath(runtime, dbName), {
+ NLs::PathExist,
+ NLs::ExtractTenantSchemeshard(&schemeShard)
+ });
+
+ UNIT_ASSERT(schemeShard != 0 && schemeShard != TTestTxConfig::SchemeShard);
+
+ TestCreateTable(runtime, schemeShard, ++txId, dbName, R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64" }
+ Columns { Name: "value" Type: "Uint64" }
+ KeyColumnNames: ["key"]
+ )");
+ env.TestWaitNotification(runtime, txId, schemeShard);
+
+ bool catchMeteringRecord = false;
+ TString meteringRecord;
+ runtime.SetObserverFunc([&](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& ev) {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::EvCdcStreamScanResponse:
+ if (const auto* msg = ev->Get<TEvDataShard::TEvCdcStreamScanResponse>()) {
+ if (msg->Record.GetStatus() == NKikimrTxDataShard::TEvCdcStreamScanResponse::DONE) {
+ catchMeteringRecord = true;
+ }
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ case NMetering::TEvMetering::EvWriteMeteringJson:
+ if (catchMeteringRecord) {
+ meteringRecord = ev->Get<NMetering::TEvMetering::TEvWriteMeteringJson>()->MeteringJson;
+ }
+ return TTestActorRuntime::EEventAction::PROCESS;
+ default:
+ return TTestActorRuntime::EEventAction::PROCESS;
+ }
+ });
+
+ TestCreateCdcStream(runtime, schemeShard, ++txId, dbName, R"(
+ TableName: "Table"
+ StreamDescription {
+ Name: "Stream"
+ Mode: ECdcStreamModeKeysOnly
+ Format: ECdcStreamFormatProto
+ State: ECdcStreamStateScan
+ }
+ )");
+ env.TestWaitNotification(runtime, txId, schemeShard);
+
+ if (serverless) {
+ if (meteringRecord.empty()) {
+ TDispatchOptions opts;
+ opts.FinalEvents.emplace_back([&meteringRecord](IEventHandle&) {
+ return !meteringRecord.empty();
+ });
+ runtime.DispatchEvents(opts);
+ }
+
+ UNIT_ASSERT_STRINGS_EQUAL(meteringRecord, TBillRecord()
+ .Id("cdc_stream_scan-9437197-3-9437197-4")
+ .CloudId("CLOUD_ID_VAL")
+ .FolderId("FOLDER_ID_VAL")
+ .ResourceId("DATABASE_ID_VAL")
+ .SourceWt(TInstant::FromValue(0))
+ .Usage(TBillRecord::RequestUnits(1, TInstant::FromValue(0)))
+ .ToString());
+ } else {
+ for (int i = 0; i < 10; ++i) {
+ env.SimulateSleep(runtime, TDuration::Seconds(1));
+ }
+
+ UNIT_ASSERT(meteringRecord.empty());
+ }
+ }
+
+ Y_UNIT_TEST(MeteringServerless) {
+ Metering(true);
+ }
+
+ Y_UNIT_TEST(MeteringDedicated) {
+ Metering(false);
+ }
+
+} // TCdcStreamWithInitialScanTests
diff --git a/ydb/core/tx/schemeshard/ut_cdc_stream_reboots.cpp b/ydb/core/tx/schemeshard/ut_cdc_stream_reboots.cpp
index a4ddb9beb6..a90a8b6705 100644
--- a/ydb/core/tx/schemeshard/ut_cdc_stream_reboots.cpp
+++ b/ydb/core/tx/schemeshard/ut_cdc_stream_reboots.cpp
@@ -12,6 +12,8 @@ Y_UNIT_TEST_SUITE(TCdcStreamWithRebootsTests) {
t.Run([&](TTestActorRuntime& runtime, bool& activeZone) {
{
TInactiveZone inactive(activeZone);
+ runtime.GetAppData().DisableCdcAutoSwitchingToReadyStateForTests = true;
+
TestCreateTable(runtime, ++t.TxId, "/MyRoot", R"(
Name: "Table"
Columns { Name: "key" Type: "Uint64" }
@@ -43,7 +45,6 @@ Y_UNIT_TEST_SUITE(TCdcStreamWithRebootsTests) {
TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/Table/Stream"), {
NLs::PathExist,
- NLs::StreamState(state.GetOrElse(NKikimrSchemeOp::ECdcStreamStateReady)),
NLs::StreamVirtualTimestamps(vt),
});
});
@@ -123,6 +124,8 @@ Y_UNIT_TEST_SUITE(TCdcStreamWithRebootsTests) {
t.Run([&](TTestActorRuntime& runtime, bool& activeZone) {
{
TInactiveZone inactive(activeZone);
+ runtime.GetAppData().DisableCdcAutoSwitchingToReadyStateForTests = true;
+
TestCreateTable(runtime, ++t.TxId, "/MyRoot", R"(
Name: "Table"
Columns { Name: "key" Type: "Uint64" }
@@ -175,11 +178,15 @@ Y_UNIT_TEST_SUITE(TCdcStreamWithRebootsTests) {
});
}
- Y_UNIT_TEST(DropStream) {
+ void DropStream(const TMaybe<NKikimrSchemeOp::ECdcStreamState>& state = Nothing()) {
TTestWithReboots t;
+ t.GetTestEnvOptions().EnableChangefeedInitialScan(true);
+
t.Run([&](TTestActorRuntime& runtime, bool& activeZone) {
{
TInactiveZone inactive(activeZone);
+ runtime.GetAppData().DisableCdcAutoSwitchingToReadyStateForTests = true;
+
TestCreateTable(runtime, ++t.TxId, "/MyRoot", R"(
Name: "Table"
Columns { Name: "key" Type: "Uint64" }
@@ -188,14 +195,23 @@ Y_UNIT_TEST_SUITE(TCdcStreamWithRebootsTests) {
)");
t.TestEnv->TestWaitNotification(runtime, t.TxId);
- TestCreateCdcStream(runtime, ++t.TxId, "/MyRoot", R"(
+ NKikimrSchemeOp::TCdcStreamDescription streamDesc;
+ streamDesc.SetName("Stream");
+ streamDesc.SetMode(NKikimrSchemeOp::ECdcStreamModeKeysOnly);
+ streamDesc.SetFormat(NKikimrSchemeOp::ECdcStreamFormatProto);
+
+ if (state) {
+ streamDesc.SetState(*state);
+ }
+
+ TString strDesc;
+ const bool ok = google::protobuf::TextFormat::PrintToString(streamDesc, &strDesc);
+ UNIT_ASSERT_C(ok, "protobuf serialization failed");
+
+ TestCreateCdcStream(runtime, ++t.TxId, "/MyRoot", Sprintf(R"(
TableName: "Table"
- StreamDescription {
- Name: "Stream"
- Mode: ECdcStreamModeKeysOnly
- Format: ECdcStreamFormatProto
- }
- )");
+ StreamDescription { %s }
+ )", strDesc.c_str()));
t.TestEnv->TestWaitNotification(runtime, t.TxId);
}
@@ -209,6 +225,18 @@ Y_UNIT_TEST_SUITE(TCdcStreamWithRebootsTests) {
});
}
+ Y_UNIT_TEST(DropStream) {
+ DropStream();
+ }
+
+ Y_UNIT_TEST(DropStreamExplicitReady) {
+ DropStream(NKikimrSchemeOp::ECdcStreamStateReady);
+ }
+
+ Y_UNIT_TEST(DropStreamCreatedWithInitialScan) {
+ DropStream(NKikimrSchemeOp::ECdcStreamStateScan);
+ }
+
Y_UNIT_TEST(CreateDropRecreate) {
TTestWithReboots t;
t.Run([&](TTestActorRuntime& runtime, bool& activeZone) {
diff --git a/ydb/core/tx/schemeshard/ut_compaction.cpp b/ydb/core/tx/schemeshard/ut_compaction.cpp
index d0357ca3a7..c64e07fdad 100644
--- a/ydb/core/tx/schemeshard/ut_compaction.cpp
+++ b/ydb/core/tx/schemeshard/ut_compaction.cpp
@@ -695,7 +695,7 @@ Y_UNIT_TEST_SUITE(TSchemeshardBackgroundCompactionTest) {
case TEvDataShard::EvCompactBorrowed:
// we should not compact borrowed to check that background compaction
// will not compact shard with borrowed parts as well
- Y_UNUSED(ev.Release());
+ ev.Reset();
return TTestActorRuntime::EEventAction::DROP;
default:
return originalObserver(runtime, ev);
@@ -744,7 +744,7 @@ Y_UNIT_TEST_SUITE(TSchemeshardBackgroundCompactionTest) {
runtime.SetObserverFunc([&](TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& ev) {
switch (ev->GetTypeRewrite()) {
case TEvDataShard::EvCompactTableResult: {
- Y_UNUSED(ev.Release());
+ ev.Reset();
++compactionResultCount;
return TTestActorRuntime::EEventAction::DROP;
}
@@ -1070,7 +1070,7 @@ Y_UNIT_TEST_SUITE(TSchemeshardBorrowedCompactionTest) {
runtime.SetObserverFunc([&](TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& ev) {
switch (ev->GetTypeRewrite()) {
case TEvDataShard::EvCompactBorrowed: {
- Y_UNUSED(ev.Release());
+ ev.Reset();
++borrowedRequests;
return TTestActorRuntime::EEventAction::DROP;
}
@@ -1139,7 +1139,7 @@ Y_UNIT_TEST_SUITE(TSchemeshardBorrowedCompactionTest) {
runtime.SetObserverFunc([&](TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& ev) {
switch (ev->GetTypeRewrite()) {
case TEvDataShard::EvCompactBorrowed: {
- Y_UNUSED(ev.Release());
+ ev.Reset();
++borrowedRequests;
return TTestActorRuntime::EEventAction::DROP;
}
@@ -1222,7 +1222,7 @@ Y_UNIT_TEST_SUITE(TSchemeshardBorrowedCompactionTest) {
runtime.SetObserverFunc([&](TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& ev) {
switch (ev->GetTypeRewrite()) {
case TEvDataShard::EvCompactBorrowed: {
- Y_UNUSED(ev.Release());
+ ev.Reset();
++borrowedRequests;
return TTestActorRuntime::EEventAction::DROP;
}
diff --git a/ydb/core/tx/schemeshard/ut_export.cpp b/ydb/core/tx/schemeshard/ut_export.cpp
index c3d60bb0cf..0609751f61 100644
--- a/ydb/core/tx/schemeshard/ut_export.cpp
+++ b/ydb/core/tx/schemeshard/ut_export.cpp
@@ -891,4 +891,46 @@ partitioning_settings {
const auto afterForget = waitForStats(1);
UNIT_ASSERT_STRINGS_EQUAL(expected.DebugString(), afterForget.DebugString());
}
+
+ Y_UNIT_TEST(CheckItemProgress) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+ ui64 txId = 100;
+
+ TestCreateTable(runtime, ++txId, "/MyRoot", R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Utf8" }
+ Columns { Name: "value" Type: "Utf8" }
+ KeyColumnNames: ["key"]
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TPortManager portManager;
+ const ui16 port = portManager.GetPort();
+
+ TS3Mock s3Mock({}, TS3Mock::TSettings(port));
+ UNIT_ASSERT(s3Mock.Start());
+
+ TestExport(runtime, ++txId, "/MyRoot", Sprintf(R"(
+ ExportToS3Settings {
+ endpoint: "localhost:%d"
+ scheme: HTTP
+ items {
+ source_path: "/MyRoot/Table"
+ destination_prefix: ""
+ }
+ }
+ )", port));
+ env.TestWaitNotification(runtime, txId);
+
+ const auto desc = TestGetExport(runtime, txId, "/MyRoot");
+ const auto& entry = desc.GetResponse().GetEntry();
+ UNIT_ASSERT_VALUES_EQUAL(entry.ItemsProgressSize(), 1);
+
+ const auto& item = entry.GetItemsProgress(0);
+ UNIT_ASSERT_VALUES_EQUAL(item.parts_total(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(item.parts_completed(), 1);
+ UNIT_ASSERT(item.has_start_time());
+ UNIT_ASSERT(item.has_end_time());
+ }
}
diff --git a/ydb/core/tx/schemeshard/ut_extsubdomain.cpp b/ydb/core/tx/schemeshard/ut_extsubdomain.cpp
index 78d148ab10..159885ef3a 100644
--- a/ydb/core/tx/schemeshard/ut_extsubdomain.cpp
+++ b/ydb/core/tx/schemeshard/ut_extsubdomain.cpp
@@ -351,10 +351,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardExtSubDomainTest) {
TSchemeLimits lowLimits;
lowLimits.MaxPathElementLength = 10;
lowLimits.ExtraPathSymbolsAllowed = ".-";
-
- TestUserAttrs(runtime, ++txId, "/", "MyRoot", AlterUserAttrs({{"__extra_path_symbols_allowed", lowLimits.ExtraPathSymbolsAllowed}}));
- env.TestWaitNotification(runtime, txId);
- RebootTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor());
+ SetSchemeshardSchemaLimits(runtime, lowLimits);
TestCreateExtSubDomain(runtime, ++txId, "/MyRoot",
R"(Name: "USER+0")",
diff --git a/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.darwin.txt b/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.darwin.txt
index 70e1cd2961..ab12769ca1 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.darwin.txt
+++ b/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.darwin.txt
@@ -22,6 +22,7 @@ target_link_libraries(tx-schemeshard-ut_helpers PUBLIC
core-engine-minikql
core-filestore-core
ydb-core-metering
+ persqueue-ut-common
ydb-core-protos
ydb-core-scheme
ydb-core-tablet_flat
diff --git a/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux-aarch64.txt b/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux-aarch64.txt
index 0240deed2f..4336c0b8d2 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux-aarch64.txt
@@ -23,6 +23,7 @@ target_link_libraries(tx-schemeshard-ut_helpers PUBLIC
core-engine-minikql
core-filestore-core
ydb-core-metering
+ persqueue-ut-common
ydb-core-protos
ydb-core-scheme
ydb-core-tablet_flat
diff --git a/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux.txt b/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux.txt
index 0240deed2f..4336c0b8d2 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux.txt
+++ b/ydb/core/tx/schemeshard/ut_helpers/CMakeLists.linux.txt
@@ -23,6 +23,7 @@ target_link_libraries(tx-schemeshard-ut_helpers PUBLIC
core-engine-minikql
core-filestore-core
ydb-core-metering
+ persqueue-ut-common
ydb-core-protos
ydb-core-scheme
ydb-core-tablet_flat
diff --git a/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp b/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp
index bcbc7ba173..349e636972 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp
@@ -5,6 +5,7 @@
#include <ydb/core/tx/schemeshard/schemeshard.h>
#include <ydb/core/tx/tx_proxy/proxy.h>
#include <ydb/core/persqueue/events/global.h>
+#include <ydb/core/persqueue/ut/common/pq_ut_common.h>
#include <ydb/core/blockstore/core/blockstore.h>
@@ -2186,4 +2187,31 @@ namespace NSchemeShardUT_Private {
auto& rec = result->Record;
return rec;
}
+
+ void SendTEvPeriodicTopicStats(TTestActorRuntime& runtime, ui64 topicId, ui64 generation, ui64 round, ui64 dataSize, ui64 usedReserveSize) {
+ TActorId sender = runtime.AllocateEdgeActor();
+
+ TEvPersQueue::TEvPeriodicTopicStats* ev = new TEvPersQueue::TEvPeriodicTopicStats();
+ auto& rec = ev->Record;
+ rec.SetPathId(topicId);
+ rec.SetGeneration(generation);
+ rec.SetRound(round);
+ rec.SetDataSize(dataSize);
+ rec.SetUsedReserveSize(usedReserveSize);
+
+ ForwardToTablet(runtime, TTestTxConfig::SchemeShard, sender, ev);
+ }
+
+ void WriteToTopic(TTestActorRuntime& runtime, const TString& path, ui32& msgSeqNo, const TString& message) {
+ auto topicDescr = DescribePath(runtime, path).GetPathDescription().GetPersQueueGroup();
+ auto partitionId = topicDescr.GetPartitions()[0].GetPartitionId();
+ auto tabletId = topicDescr.GetPartitions()[0].GetTabletId();
+
+ const auto edge = runtime.AllocateEdgeActor();
+ TString cookie = NKikimr::NPQ::CmdSetOwner(&runtime, tabletId, edge, partitionId, "default", true).first;
+
+ TVector<std::pair<ui64, TString>> data;
+ data.push_back({1, message});
+ NKikimr::NPQ::CmdWrite(&runtime, tabletId, edge, partitionId, "sourceid0", msgSeqNo, data, false, {}, true, cookie, 0);
+ }
}
diff --git a/ydb/core/tx/schemeshard/ut_helpers/helpers.h b/ydb/core/tx/schemeshard/ut_helpers/helpers.h
index f7786d1538..d637c218a6 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/helpers.h
+++ b/ydb/core/tx/schemeshard/ut_helpers/helpers.h
@@ -6,6 +6,7 @@
#include <library/cpp/testing/unittest/registar.h>
#include <ydb/core/engine/mkql_engine_flat.h>
+#include <ydb/core/persqueue/ut/common/pq_ut_common.h>
#include <ydb/core/protos/tx_datashard.pb.h>
#include <ydb/core/testlib/minikql_compile.h>
#include <ydb/core/tx/datashard/datashard.h>
@@ -523,4 +524,7 @@ namespace NSchemeShardUT_Private {
NKikimrPQ::TDescribeResponse GetDescribeFromPQBalancer(TTestActorRuntime& runtime, ui64 balancerId);
+ void SendTEvPeriodicTopicStats(TTestActorRuntime& runtime, ui64 topicId, ui64 generation, ui64 round, ui64 dataSize, ui64 usedReserveSize);
+ void WriteToTopic(TTestActorRuntime& runtime, const TString& path, ui32& msgSeqNo, const TString& message);
+
} //NSchemeShardUT_Private
diff --git a/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp b/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp
index 518649ac34..94f2d5b1b4 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp
@@ -13,6 +13,23 @@ namespace NLs {
using namespace NKikimr;
+#define DESCRIBE_ASSERT_EQUAL(name, type, expression, description) \
+ TCheckFunc name(type expected) { \
+ return [=] (const NKikimrScheme::TEvDescribeSchemeResult& record) { \
+ UNIT_ASSERT_C(IsGoodDomainStatus(record.GetStatus()), "Unexpected status: " << record.GetStatus()); \
+ \
+ const auto& pathDescr = record.GetPathDescription(); \
+ const auto& subdomain = pathDescr.GetDomainDescription(); \
+ const auto& value = expression; \
+ \
+ UNIT_ASSERT_EQUAL_C(value, expected, \
+ description << " mismatch, subdomain with id " << subdomain.GetDomainKey().GetPathId() << \
+ " has value " << value << \
+ " but expected " << expected); \
+ }; \
+}
+
+
void NotInSubdomain(const NKikimrScheme::TEvDescribeSchemeResult& record) {
UNIT_ASSERT(record.HasPathDescription());
NKikimrSchemeOp::TPathDescription descr = record.GetPathDescription();
@@ -604,6 +621,10 @@ TCheckFunc PQPartitionsInsideDomain(ui64 count) {
};
}
+DESCRIBE_ASSERT_EQUAL(TopicReservedStorage, ui64, subdomain.GetDiskSpaceUsage().GetTopics().GetReserveSize(), "Topic ReserveSize")
+DESCRIBE_ASSERT_EQUAL(TopicAccountSize, ui64, subdomain.GetDiskSpaceUsage().GetTopics().GetAccountSize(), "Topic AccountSize")
+DESCRIBE_ASSERT_EQUAL(TopicUsedReserveSize, ui64, subdomain.GetDiskSpaceUsage().GetTopics().GetUsedReserveSize(), "Topic UsedReserveSize")
+
TCheckFunc PathsInsideDomainOneOf(TSet<ui64> variants) {
return [=] (const NKikimrScheme::TEvDescribeSchemeResult& record) {
UNIT_ASSERT_C(IsGoodDomainStatus(record.GetStatus()), "Unexpected status: " << record.GetStatus());
@@ -857,12 +878,28 @@ TCheckFunc MinPartitionsCountEqual(ui32 count) {
};
}
+void HasMinPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record) {
+ UNIT_ASSERT(record.GetPathDescription().GetTable().GetPartitionConfig().GetPartitioningPolicy().HasMinPartitionsCount());
+}
+
+void NoMinPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record) {
+ UNIT_ASSERT(!record.GetPathDescription().GetTable().GetPartitionConfig().GetPartitioningPolicy().HasMinPartitionsCount());
+}
+
TCheckFunc MaxPartitionsCountEqual(ui32 count) {
return [=] (const NKikimrScheme::TEvDescribeSchemeResult& record) {
UNIT_ASSERT_VALUES_EQUAL(record.GetPathDescription().GetTable().GetPartitionConfig().GetPartitioningPolicy().GetMaxPartitionsCount(), count);
};
}
+void HasMaxPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record) {
+ UNIT_ASSERT(record.GetPathDescription().GetTable().GetPartitionConfig().GetPartitioningPolicy().HasMaxPartitionsCount());
+}
+
+void NoMaxPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record) {
+ UNIT_ASSERT(!record.GetPathDescription().GetTable().GetPartitionConfig().GetPartitioningPolicy().HasMaxPartitionsCount());
+}
+
TCheckFunc PartitioningByLoadStatus(bool status) {
return [=] (const NKikimrScheme::TEvDescribeSchemeResult& record) {
UNIT_ASSERT_VALUES_EQUAL(record.GetPathDescription().GetTable().GetPartitionConfig().GetPartitioningPolicy().GetSplitByLoadSettings().GetEnabled(), status);
@@ -997,6 +1034,12 @@ TCheckFunc HasColumnTableTtlSettingsTiering(const TString& tieringName) {
};
}
+TCheckFunc HasOwner(const TString& owner) {
+ return [=](const NKikimrScheme::TEvDescribeSchemeResult& record) {
+ UNIT_ASSERT_VALUES_EQUAL(record.GetPathDescription().GetSelf().GetOwner(), owner);
+ };
+}
+
void CheckEffectiveRight(const NKikimrScheme::TEvDescribeSchemeResult& record, const TString& right, bool mustHave) {
const auto& self = record.GetPathDescription().GetSelf();
TSecurityObject src(self.GetOwner(), self.GetEffectiveACL(), false);
@@ -1068,5 +1111,7 @@ TCheckFunc PartitionKeys(TVector<TString> lastShardKeys) {
};
}
+#undef DESCRIBE_ASSERT_EQUAL
+
} // NLs
} // NSchemeShardUT_Private
diff --git a/ydb/core/tx/schemeshard/ut_helpers/ls_checks.h b/ydb/core/tx/schemeshard/ut_helpers/ls_checks.h
index f4379b7c0a..4597f90465 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/ls_checks.h
+++ b/ydb/core/tx/schemeshard/ut_helpers/ls_checks.h
@@ -34,6 +34,9 @@ namespace NLs {
TCheckFunc PathsInsideDomain(ui64 count);
TCheckFunc PQPartitionsInsideDomain(ui64 count);
+ TCheckFunc TopicReservedStorage(ui64 expected);
+ TCheckFunc TopicAccountSize(ui64 expected);
+ TCheckFunc TopicUsedReserveSize(ui64 expected);
TCheckFunc PathsInsideDomainOneOf(TSet<ui64> variants);
TCheckFunc ShardsInsideDomain(ui64 count);
TCheckFunc ShardsInsideDomainOneOf(TSet<ui64> variants);
@@ -92,7 +95,11 @@ namespace NLs {
TCheckFunc FollowerGroups(const TVector<NKikimrHive::TFollowerGroup>& followerGroup = TVector<NKikimrHive::TFollowerGroup>{});
TCheckFunc SizeToSplitEqual(ui32 size);
TCheckFunc MinPartitionsCountEqual(ui32 count);
+ void HasMinPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record);
+ void NoMinPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record);
TCheckFunc MaxPartitionsCountEqual(ui32 count);
+ void HasMaxPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record);
+ void NoMaxPartitionsCount(const NKikimrScheme::TEvDescribeSchemeResult& record);
TCheckFunc PartitioningByLoadStatus(bool status);
TCheckFunc ColumnFamiliesCount(ui32 size);
TCheckFunc ColumnFamiliesHas(ui32 familyId);
@@ -130,6 +137,7 @@ namespace NLs {
void NoBackupInFly(const NKikimrScheme::TEvDescribeSchemeResult& record);
TCheckFunc BackupHistoryCount(ui64 count);
+ TCheckFunc HasOwner(const TString& owner);
TCheckFunc HasEffectiveRight(const TString& right);
TCheckFunc HasNotEffectiveRight(const TString& right);
diff --git a/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp b/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
index 16918116d7..ef5917450a 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
@@ -530,6 +530,7 @@ NSchemeShardUT_Private::TTestEnv::TTestEnv(TTestActorRuntime& runtime, const TTe
app.SetEnableChangefeedInitialScan(opts.EnableChangefeedInitialScan_);
app.SetEnableNotNullDataColumns(opts.EnableNotNullDataColumns_);
app.SetEnableAlterDatabaseCreateHiveFirst(opts.EnableAlterDatabaseCreateHiveFirst_);
+ app.SetEnableTopicDiskSubDomainQuota(opts.EnableTopicDiskSubDomainQuota_);
if (opts.DisableStatsBatching_.value_or(false)) {
app.SchemeShardConfig.SetStatsMaxBatchSize(0);
diff --git a/ydb/core/tx/schemeshard/ut_helpers/test_env.h b/ydb/core/tx/schemeshard/ut_helpers/test_env.h
index 782593e48e..76619af13e 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/test_env.h
+++ b/ydb/core/tx/schemeshard/ut_helpers/test_env.h
@@ -49,6 +49,7 @@ namespace NSchemeShardUT_Private {
OPTION(std::optional<bool>, EnableChangefeedInitialScan, std::nullopt);
OPTION(std::optional<bool>, EnableNotNullDataColumns, std::nullopt);
OPTION(std::optional<bool>, EnableAlterDatabaseCreateHiveFirst, std::nullopt);
+ OPTION(std::optional<bool>, EnableTopicDiskSubDomainQuota, std::nullopt);
#undef OPTION
};
diff --git a/ydb/core/tx/schemeshard/ut_move.cpp b/ydb/core/tx/schemeshard/ut_move.cpp
index 812877f90a..664cef4135 100644
--- a/ydb/core/tx/schemeshard/ut_move.cpp
+++ b/ydb/core/tx/schemeshard/ut_move.cpp
@@ -804,6 +804,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
NLs::CheckColumns("Table", {"key", "value0", "value1", "valueFloat"}, {}, {"key"}),
NLs::IndexesCount(2)});
+ SetEnableMoveIndex(runtime, env, TTestTxConfig::SchemeShard, false);
+
TestMoveIndex(runtime, ++txId, "/MyRoot/Table", "Sync", "MovedSync", false, {NKikimrScheme::StatusPreconditionFailed});
env.TestWaitNotification(runtime, txId);
diff --git a/ydb/core/tx/schemeshard/ut_split_merge.cpp b/ydb/core/tx/schemeshard/ut_split_merge.cpp
index 52c490efd5..acbcfb959e 100644
--- a/ydb/core/tx/schemeshard/ut_split_merge.cpp
+++ b/ydb/core/tx/schemeshard/ut_split_merge.cpp
@@ -1,13 +1,12 @@
#include <ydb/core/tx/schemeshard/ut_helpers/helpers.h>
-
-#include <ydb/library/yql/minikql/mkql_node.h>
+#include <ydb/core/tx/schemeshard/schemeshard_utils.h>
using namespace NKikimr;
using namespace NKikimr::NMiniKQL;
using namespace NSchemeShard;
using namespace NSchemeShardUT_Private;
-Y_UNIT_TEST_SUITE(TSchemeShardSplitTest) {
+Y_UNIT_TEST_SUITE(TSchemeShardSplitBySizeTest) {
Y_UNIT_TEST(Test) {
}
@@ -407,3 +406,428 @@ Y_UNIT_TEST_SUITE(TSchemeShardSplitTest) {
}
}
+
+namespace {
+
+using NFmt::TPrintableTypedCells;
+
+TString ToSerialized(ui64 key) {
+ const auto cell = TCell::Make(key);
+ const TSerializedCellVec saved(TSerializedCellVec::Serialize(TArrayRef<const TCell>(&cell, 1)));
+ return TString(saved.GetBuffer());
+}
+
+ui64 FromSerialized(const TString& buf) {
+ TSerializedCellVec saved(buf);
+ // Cerr << "TEST FromSerialized, " << TPrintableTypedCells(saved.GetCells(), {NScheme::TTypeInfo(NScheme::NTypeIds::Uint64), NScheme::TTypeInfo(NScheme::NTypeIds::Uint64)}) << Endl;
+ auto& cell = saved.GetCells()[0];
+ // Cerr << "TEST FromSerialized, cell " << cell.IsInline() << ", " << cell.IsNull() << ", " << cell.Size() << Endl;
+ return cell.IsNull() ? 0 : cell.AsValue<ui64>();
+}
+
+void HistogramAddBucket(NKikimrTableStats::THistogram& hist, ui64 key, ui64 value) {
+ auto bucket = hist.AddBuckets();
+ bucket->SetKey(ToSerialized(key));
+ bucket->SetValue(value);
+};
+
+constexpr ui64 CpuLoadMicroseconds(const ui64 percent) {
+ return percent * 1000000 / 100;
+}
+
+// const ui64 CpuLoadPercent(const ui64 microseconds) {
+// return microseconds * 100 / 1000000;
+// }
+
+// Quick and dirty simulator for cpu overload and key range splitting of datashards.
+// Should be used in test runtime EventObservers.
+//
+// Assumed index configuration: 1 initial datashard, Uint64 key.
+//
+struct TLoadAndSplitSimulator {
+ NKikimrTabletBase::TMetrics MetricsPatch;
+ NKikimrTableStats::THistogram KeyAccessHistogramPatch;
+ ui64 TableLocalPathId;
+
+ std::map<ui64, std::pair<ui64, ui64>> DatashardsKeyRanges;
+ TInstant LastSplitAckTime;
+ ui64 SplitAckCount = 0;
+ ui64 PeriodicTableStatsCount = 0;
+ ui64 KeyAccessSampleReqCount = 0;
+ ui64 SplitReqCount = 0;
+
+ TLoadAndSplitSimulator(ui64 tableLocalPathId, ui64 initialDatashardId, ui64 targetCpuLoadPercent)
+ : TableLocalPathId(tableLocalPathId)
+ {
+ MetricsPatch.SetCPU(CpuLoadMicroseconds(targetCpuLoadPercent));
+
+ //NOTE: histogram must have at least 3 buckets with different keys to be able to produce split key
+ // (see ydb/core/tx/schemeshard/schemeshard__table_stats_histogram.cpp, DoFindSplitKey() and ChooseSplitKeyByKeySample())
+ HistogramAddBucket(KeyAccessHistogramPatch, 999998, 1000);
+ HistogramAddBucket(KeyAccessHistogramPatch, 999999, 1000);
+ HistogramAddBucket(KeyAccessHistogramPatch, 1000000, 1000);
+
+ DatashardsKeyRanges[initialDatashardId] = std::make_pair(0, 1000000);
+
+ Cerr << "TEST TLoadAndSplitSimulator for table id " << TableLocalPathId
+ << ", target CPU load " << targetCpuLoadPercent << "%"
+ << Endl;
+ }
+
+ void ChangeEvent(TAutoPtr<IEventHandle>& ev) {
+ switch (ev->GetTypeRewrite()) {
+ case TEvDataShard::EvPeriodicTableStats:
+ // replace real stats with the simulated ones
+ {
+ auto x = reinterpret_cast<TEvDataShard::TEvPeriodicTableStats::TPtr*>(&ev);
+ auto& record = (*x).Get()->Get()->Record;
+
+ if (record.GetTableLocalId() != TableLocalPathId) {
+ return;
+ }
+
+ auto prevCPU = record.GetTabletMetrics().GetCPU();
+ record.MutableTabletMetrics()->MergeFrom(MetricsPatch);
+ auto newCPU = record.GetTabletMetrics().GetCPU();
+
+ Cerr << "TEST TLoadAndSplitSimulator for table id " << TableLocalPathId
+ << ", intercept EvPeriodicTableStats, from datashard " << record.GetDatashardId()
+ << ", patch CPU: " << prevCPU << "->" << newCPU
+ << Endl;
+
+ ++PeriodicTableStatsCount;
+ }
+ break;
+ case TEvDataShard::EvGetTableStats:
+ // count requests for key access samples, as they indicate consideration of performing a split
+ {
+ auto x = reinterpret_cast<TEvDataShard::TEvGetTableStats::TPtr*>(&ev);
+ auto& record = (*x).Get()->Get()->Record;
+
+ if (record.GetTableId() != TableLocalPathId) {
+ return;
+ }
+
+ // Cerr << "TEST TLoadAndSplitSimulator for table id " << TableLocalPathId
+ // << ", intercept EvGetTableStats" << Endl;
+
+ if (record.GetCollectKeySample()) {
+ ++KeyAccessSampleReqCount;
+ }
+ }
+ break;
+ case TEvDataShard::EvGetTableStatsResult:
+ // replace real key access samples with the simulated ones
+ {
+ auto x = reinterpret_cast<TEvDataShard::TEvGetTableStatsResult::TPtr*>(&ev);
+ auto& record = (*x).Get()->Get()->Record;
+
+ if (record.GetTableLocalId() != TableLocalPathId) {
+ return;
+ }
+
+ record.MutableTableStats()->MutableKeyAccessSample()->CopyFrom(KeyAccessHistogramPatch);
+
+ auto [start, end] = DatashardsKeyRanges[record.GetDatashardId()];
+ //NOTE: zero end means infinity -- this is a final shard
+ if (end == 0) {
+ end = 1000000;
+ }
+ ui64 splitPoint = (end - start) / 2;
+ record.MutableTableStats()->MutableKeyAccessSample()->MutableBuckets(0)->SetKey(ToSerialized(splitPoint - 1));
+ record.MutableTableStats()->MutableKeyAccessSample()->MutableBuckets(1)->SetKey(ToSerialized(splitPoint));
+ record.MutableTableStats()->MutableKeyAccessSample()->MutableBuckets(2)->SetKey(ToSerialized(splitPoint + 1));
+
+ Cerr << "TEST TLoadAndSplitSimulator for table id " << TableLocalPathId
+ << ", intercept EvGetTableStatsResult, from datashard " << record.GetDatashardId()
+ << ", patch KeyAccessSample: split point " << splitPoint
+ << Endl;
+ }
+ break;
+ case TEvDataShard::EvSplit:
+ // save key ranges of the new datashards
+ {
+ auto x = reinterpret_cast<TEvDataShard::TEvSplit::TPtr*>(&ev);
+ auto& record = (*x).Get()->Get()->Record;
+
+ // remove info for the source shard(s) that will be splitted
+ // (split will have single source range)
+ for (const auto& i : record.GetSplitDescription().GetSourceRanges()) {
+ DatashardsKeyRanges.erase(i.GetTabletID());
+ }
+ // add info for destination shards
+ for (const auto& i : record.GetSplitDescription().GetDestinationRanges()) {
+ auto& [start, end] = DatashardsKeyRanges[i.GetTabletID()];
+ start = FromSerialized(i.GetKeyRangeBegin());
+ //NOTE: empty KeyRangeEnd means infinity
+ auto keyRangeEnd = i.GetKeyRangeEnd();
+ end = (keyRangeEnd.size() > 0) ? FromSerialized(keyRangeEnd) : 0;
+ }
+
+ Cerr << "TEST TLoadAndSplitSimulator for table id " << TableLocalPathId
+ << ", intercept EvSplit, to datashard " << record.GetSplitDescription().GetSourceRanges(0).GetTabletID()
+ << ", event:"
+ << Endl
+ << record.DebugString()
+ << Endl;
+
+ ++SplitReqCount;
+ }
+ break;
+ case TEvDataShard::EvSplitAck:
+ // count splits
+ {
+ auto x = reinterpret_cast<TEvDataShard::TEvSplitAck::TPtr*>(&ev);
+ auto& record = (*x).Get()->Get()->Record;
+
+ auto now = TInstant::Now();
+ auto elapsed = now - LastSplitAckTime;
+ LastSplitAckTime = now;
+
+ Cerr << "TEST TLoadAndSplitSimulator for table id " << TableLocalPathId
+ << ", intercept EvSplitAck, from datashard " << record.GetTabletId()
+ << ", " << elapsed << " since last split ack"
+ << Endl;
+
+ ++SplitAckCount;
+ }
+ break;
+ }
+ };
+};
+
+TTestEnv SetupEnv(TTestBasicRuntime &runtime) {
+ TTestEnvOptions opts;
+ opts.EnableBackgroundCompaction(false);
+
+ TTestEnv env(runtime, opts);
+
+ NDataShard::gDbStatsReportInterval = TDuration::Seconds(0);
+ NDataShard::gDbStatsDataSizeResolution = 10;
+ NDataShard::gDbStatsRowCountResolution = 10;
+
+ {
+ auto& appData = runtime.GetAppData();
+
+ appData.FeatureFlags.SetEnablePersistentPartitionStats(true);
+
+ // disable batching
+ appData.SchemeShardConfig.SetStatsBatchTimeoutMs(0);
+ appData.SchemeShardConfig.SetStatsMaxBatchSize(0);
+ }
+
+ runtime.SetLogPriority(NKikimrServices::FLAT_TX_SCHEMESHARD, NActors::NLog::PRI_DEBUG);
+ runtime.SetLogPriority(NKikimrServices::TX_DATASHARD, NActors::NLog::PRI_DEBUG);
+
+ // apply config changes to schemeshard via reboot
+ //FIXME: make it possible to set config before initial boot
+ GracefulRestartTablet(runtime, TTestTxConfig::SchemeShard, runtime.AllocateEdgeActor());
+
+ return env;
+}
+
+} // anonymous namespace
+
+Y_UNIT_TEST_SUITE(TSchemeShardSplitByLoad) {
+
+ void SplitByLoad(TTestBasicRuntime &runtime, const TString &tablePath, ui32 targetCpuLoadPercent) {
+ auto tableInfo = DescribePrivatePath(runtime, tablePath, true, true);
+ Cerr << "TEST table initial state:" << Endl << tableInfo.DebugString() << Endl;
+
+ const ui64 tableLocalPathId = tableInfo.GetPathDescription().GetSelf().GetPathId();
+ const ui64 initialDatashardId = tableInfo.GetPathDescription().GetTablePartitions(0).GetDatashardId();
+
+ TLoadAndSplitSimulator simulator(tableLocalPathId, initialDatashardId, targetCpuLoadPercent);
+
+ runtime.SetObserverFunc([&simulator](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& event) {
+ simulator.ChangeEvent(event);
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+ {
+ TDispatchOptions opts;
+ opts.CustomFinalCondition = [&simulator]() {
+ auto now = TInstant::Now();
+ // Cerr << "TEST SplitByLoad, CustomFinalCondition, SplitAckCount " << simulator.SplitAckCount << ", " << (now - simulator.LastSplitAckTime) << " since last split" << Endl;
+ return simulator.SplitAckCount > 0 && (now - simulator.LastSplitAckTime) > TDuration::Seconds(3);
+ };
+ runtime.DispatchEvents(opts/*, TDuration::Seconds(120)*/);
+ }
+ Cerr << "TEST SplitByLoad, splitted " << simulator.SplitAckCount << " times"
+ << ", datashard count " << simulator.DatashardsKeyRanges.size()
+ << Endl;
+ // Cerr << "TEST SplitByLoad, PeriodicTableStats " << simulator.PeriodicTableStatsCount << Endl;
+ // Cerr << "TEST SplitByLoad, KeyAccessSampleReq " << simulator.KeyAccessSampleReqCount << Endl;
+ // Cerr << "TEST SplitByLoad, SplitReq " << simulator.SplitReqCount << Endl;
+ }
+
+ void NoSplitByLoad(TTestBasicRuntime &runtime, const TString &tablePath, ui32 targetCpuLoadPercent) {
+ auto tableInfo = DescribePrivatePath(runtime, tablePath, true, true);
+ Cerr << "TEST table initial state:" << Endl << tableInfo.DebugString() << Endl;
+
+ const ui64 tableLocalPathId = tableInfo.GetPathDescription().GetSelf().GetPathId();
+ const ui64 initialDatashardId = tableInfo.GetPathDescription().GetTablePartitions(0).GetDatashardId();
+
+ TLoadAndSplitSimulator simulator(tableLocalPathId, initialDatashardId, targetCpuLoadPercent);
+
+ runtime.SetObserverFunc([&simulator](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& event) {
+ simulator.ChangeEvent(event);
+ return TTestActorRuntime::EEventAction::PROCESS;
+ });
+ {
+ TDispatchOptions opts;
+ opts.CustomFinalCondition = [&simulator]() {
+ // Cerr << "TEST SplitByLoad, PeriodicTableStats " << simulator.PeriodicTableStatsCount << ", KeyAccessSampleReq " << simulator.KeyAccessSampleReqCount << Endl;
+ return simulator.PeriodicTableStatsCount > 10 && simulator.KeyAccessSampleReqCount == 0;
+ };
+ runtime.DispatchEvents(opts, TDuration::Seconds(60));
+ }
+ Cerr << "TEST SplitByLoad, splitted " << simulator.SplitAckCount << " times"
+ << ", datashard count " << simulator.DatashardsKeyRanges.size()
+ << Endl;
+ // Cerr << "TEST SplitByLoad, PeriodicTableStats " << simulator.PeriodicTableStatsCount << Endl;
+ // Cerr << "TEST SplitByLoad, KeyAccessSampleReq " << simulator.KeyAccessSampleReqCount << Endl;
+ // Cerr << "TEST SplitByLoad, SplitReq " << simulator.SplitReqCount << Endl;
+ }
+
+ Y_UNIT_TEST(TableSplitsUpToMaxPartitionsCount) {
+ TTestBasicRuntime runtime;
+ auto env = SetupEnv(runtime);
+
+ const ui32 expectedPartitionCount = 5;
+ const ui32 cpuLoadThreshold = 1; // percents
+ const ui64 cpuLoadSimulated = 100; // percents
+
+ const auto tableScheme = Sprintf(
+ R"(
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64"}
+ Columns { Name: "value" Type: "Uint64"}
+ KeyColumnNames: ["key"]
+ UniformPartitionsCount: 1
+ PartitionConfig {
+ PartitioningPolicy {
+
+ MaxPartitionsCount: %d # replacement field for required number of partitions
+
+ SplitByLoadSettings: {
+ Enabled: true
+
+ CpuPercentageThreshold: %d # replacement field for cpu load split threshold, percents
+
+ }
+ }
+ }
+ )",
+ expectedPartitionCount,
+ cpuLoadThreshold
+ );
+
+ ui64 txId = 100;
+ TestCreateTable(runtime, ++txId, "/MyRoot", tableScheme);
+ env.TestWaitNotification(runtime, txId);
+
+ SplitByLoad(runtime, "/MyRoot/Table", cpuLoadSimulated);
+
+ auto tableInfo = DescribePrivatePath(runtime, "/MyRoot/Table", true, true);
+ Cerr << "TEST table final state:" << Endl << tableInfo.DebugString() << Endl;
+ TestDescribeResult(tableInfo, {NLs::PartitionCount(expectedPartitionCount)});
+ }
+
+ Y_UNIT_TEST(IndexTableSplitsUpToMainTableCurrentPartitionCount) {
+ TTestBasicRuntime runtime;
+ auto env = SetupEnv(runtime);
+
+ const ui32 expectedPartitionCount = 5;
+ const ui32 cpuLoadThreshold = 1; // percents
+ const ui64 cpuLoadSimulated = 100; // percents
+
+ const auto mainTableScheme = Sprintf(
+ R"(
+ TableDescription {
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64"}
+ Columns { Name: "value" Type: "Uint64"}
+ KeyColumnNames: ["key"]
+
+ UniformPartitionsCount: %d # replacement field for required number of partitions
+
+ PartitionConfig {
+ PartitioningPolicy {
+ MaxPartitionsCount: 10
+ SplitByLoadSettings: {
+ Enabled: true
+
+ CpuPercentageThreshold: %d # replacement field for cpu load split threshold, percents
+
+ }
+ }
+ }
+ }
+ IndexDescription {
+ Name: "by-value"
+ KeyColumnNames: ["value"]
+ }
+ )",
+ expectedPartitionCount,
+ cpuLoadThreshold
+ );
+
+ ui64 txId = 100;
+ TestCreateIndexedTable(runtime, ++txId, "/MyRoot", mainTableScheme);
+ env.TestWaitNotification(runtime, txId);
+
+ SplitByLoad(runtime, "/MyRoot/Table/by-value/indexImplTable", cpuLoadSimulated);
+
+ auto tableInfo = DescribePrivatePath(runtime, "/MyRoot/Table/by-value/indexImplTable", true, true);
+ Cerr << "TEST table final state:" << Endl << tableInfo.DebugString() << Endl;
+ TestDescribeResult(tableInfo, {NLs::PartitionCount(expectedPartitionCount)});
+ }
+
+ Y_UNIT_TEST(IndexTableDoesNotSplitsIfDisabledByMainTable) {
+ TTestBasicRuntime runtime;
+ auto env = SetupEnv(runtime);
+
+ const ui32 cpuLoadThreshold = 1; // percents
+ const ui64 cpuLoadSimulated = 100; // percents
+
+ const auto mainTableScheme = Sprintf(
+ R"(
+ TableDescription {
+ Name: "Table"
+ Columns { Name: "key" Type: "Uint64"}
+ Columns { Name: "value" Type: "Uint64"}
+ KeyColumnNames: ["key"]
+
+ UniformPartitionsCount: 5
+
+ PartitionConfig {
+ PartitioningPolicy {
+ MaxPartitionsCount: 10
+ SplitByLoadSettings: {
+ Enabled: false
+
+ CpuPercentageThreshold: %d # replacement field for cpu load split threshold, percents
+
+ }
+ }
+ }
+ }
+ IndexDescription {
+ Name: "by-value"
+ KeyColumnNames: ["value"]
+ }
+ )",
+ cpuLoadThreshold
+ );
+
+ ui64 txId = 100;
+ TestCreateIndexedTable(runtime, ++txId, "/MyRoot", mainTableScheme);
+ env.TestWaitNotification(runtime, txId);
+
+ NoSplitByLoad(runtime, "/MyRoot/Table/by-value/indexImplTable", cpuLoadSimulated);
+
+ auto tableInfo = DescribePrivatePath(runtime, "/MyRoot/Table/by-value/indexImplTable", true, true);
+ Cerr << "TEST table final state:" << Endl << tableInfo.DebugString() << Endl;
+ TestDescribeResult(tableInfo, {NLs::PartitionCount(1)});
+ }
+}
diff --git a/ydb/core/tx/schemeshard/ut_stats.cpp b/ydb/core/tx/schemeshard/ut_stats.cpp
index d2fbcaf251..7967f72c54 100644
--- a/ydb/core/tx/schemeshard/ut_stats.cpp
+++ b/ydb/core/tx/schemeshard/ut_stats.cpp
@@ -297,4 +297,290 @@ Y_UNIT_TEST_SUITE(TSchemeshardStatsBatchingTest) {
WaitAndCheckStatPersisted(runtime, env, newRowsCount, batchTimeout, eventAction);
}
+
+ Y_UNIT_TEST(TopicAccountSizeAndUsedReserveSize) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+
+ runtime.SetLogPriority(NKikimrServices::FLAT_TX_SCHEMESHARD, NActors::NLog::PRI_TRACE);
+
+ auto& appData = runtime.GetAppData();
+
+ ui64 txId = 100;
+
+ // disable batching
+ appData.SchemeShardConfig.SetStatsBatchTimeoutMs(0);
+ appData.SchemeShardConfig.SetStatsMaxBatchSize(0);
+
+ // apply config via reboot
+ TActorId sender = runtime.AllocateEdgeActor();
+ GracefulRestartTablet(runtime, TTestTxConfig::SchemeShard, sender);
+
+ const auto Assert = [&] (ui64 expectedAccountSize, ui64 expectedUsedReserveSize) {
+ TestDescribeResult(DescribePath(runtime, "/MyRoot/Topic1"),
+ {NLs::Finished,
+ NLs::TopicAccountSize(expectedAccountSize),
+ NLs::TopicUsedReserveSize(expectedUsedReserveSize)});
+ };
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 1
+ PartitionPerTablet: 1
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 13
+ WriteSpeedInBytesPerSecond : 19
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ Assert(1 * 13 * 19, 0); // 247, 0
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic2"
+ TotalGroupCount: 3
+ PartitionPerTablet: 3
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 11
+ WriteSpeedInBytesPerSecond : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ Assert(1 * 13 * 19 + 3 * 11 * 17, 0); // 247 + 561 = 808, 0
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic3"
+ TotalGroupCount: 3
+ PartitionPerTablet: 3
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 11
+ WriteSpeedInBytesPerSecond : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ Assert(1 * 13 * 19 + 3 * 11 * 17 + 3 * 11 * 17, 0); // 247 + 561 + 561 = 1369, 0
+
+ ui64 topic1Id = DescribePath(runtime, "/MyRoot/Topic1").GetPathDescription().GetSelf().GetPathId();
+ ui64 topic2Id = DescribePath(runtime, "/MyRoot/Topic2").GetPathDescription().GetSelf().GetPathId();
+ ui64 topic3Id = DescribePath(runtime, "/MyRoot/Topic3").GetPathDescription().GetSelf().GetPathId();
+
+ ui64 generation = 1;
+ ui64 round = 1;
+
+ SendTEvPeriodicTopicStats(runtime, topic1Id, generation, ++round, 101, 101);
+ Assert(1369, 101); // only reserve size
+
+ SendTEvPeriodicTopicStats(runtime, topic1Id, generation, ++round, 383, 247);
+ Assert(1369 + (383 - 247), 247); // 1505, 247 reserve + exceeding the limit
+
+ SendTEvPeriodicTopicStats(runtime, topic2Id, generation, ++round, 113, 113);
+ Assert(1369 + (383 - 247), 247 + 113); // 1505, 360
+
+ SendTEvPeriodicTopicStats(runtime, topic1Id, generation, ++round, 31, 31);
+ Assert(1369, 31 + 113); // only reserve, data size
+
+ TestDropPQGroup(runtime, ++txId, "/MyRoot", "Topic2");
+ env.TestWaitNotification(runtime, txId);
+ Assert(808, 31);
+
+ SendTEvPeriodicTopicStats(runtime, topic3Id, generation, ++round, 151, 151);
+ Assert(808, 31 + 151);
+
+ TestDeallocatePQ(runtime, ++txId, "/MyRoot", "Name: \"Topic3\"");
+ env.TestWaitNotification(runtime, txId);
+ Assert(247, 31);
+ }
+
+ Y_UNIT_TEST(TopicPeriodicStatMeteringModeReserved) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+
+ runtime.SetLogPriority(NKikimrServices::PERSQUEUE, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::PERSQUEUE_READ_BALANCER, NLog::PRI_TRACE);
+
+ auto& appData = runtime.GetAppData();
+
+ ui64 txId = 100;
+
+ // disable batching
+ appData.SchemeShardConfig.SetStatsBatchTimeoutMs(0);
+ appData.SchemeShardConfig.SetStatsMaxBatchSize(0);
+
+ appData.PQConfig.SetBalancerWakeupIntervalSec(1);
+
+ // apply config via reboot
+ TActorId sender = runtime.AllocateEdgeActor();
+ GracefulRestartTablet(runtime, TTestTxConfig::SchemeShard, sender);
+
+ TString topicPath = "/MyRoot/Topic1";
+
+ const auto Assert = [&] (ui64 expectedAccountSize, ui64 expectedUsedReserveSize) {
+ TestDescribeResult(DescribePath(runtime,topicPath),
+ {NLs::Finished,
+ NLs::TopicAccountSize(expectedAccountSize),
+ NLs::TopicUsedReserveSize(expectedUsedReserveSize)});
+ };
+
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 3
+ PartitionPerTablet: 3
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 11
+ WriteSpeedInBytesPerSecond : 17
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ Assert(3 * 11 * 17, 0); // 561, 0
+
+ ui32 msgSeqNo = 100;
+ WriteToTopic(runtime, topicPath, msgSeqNo, "Message 100");
+
+ env.SimulateSleep(runtime, TDuration::Seconds(3)); // Wait TEvPeriodicTopicStats
+
+ Assert(3 * 11 * 17, 69); // 69 - it is unstable value. it can change if internal message store change
+ }
+
+ Y_UNIT_TEST(TopicPeriodicStatMeteringModeRequest) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+
+ runtime.SetLogPriority(NKikimrServices::PERSQUEUE_READ_BALANCER, NLog::PRI_TRACE);
+
+ auto& appData = runtime.GetAppData();
+
+ ui64 txId = 100;
+
+ // disable batching
+ appData.SchemeShardConfig.SetStatsBatchTimeoutMs(0);
+ appData.SchemeShardConfig.SetStatsMaxBatchSize(0);
+
+ appData.PQConfig.SetBalancerWakeupIntervalSec(1);
+
+ // apply config via reboot
+ TActorId sender = runtime.AllocateEdgeActor();
+ GracefulRestartTablet(runtime, TTestTxConfig::SchemeShard, sender);
+
+ TString topicPath = "/MyRoot/Topic1";
+
+ const auto Assert = [&] (ui64 expectedAccountSize, ui64 expectedUsedReserveSize) {
+ TestDescribeResult(DescribePath(runtime,topicPath),
+ {NLs::Finished,
+ NLs::TopicAccountSize(expectedAccountSize),
+ NLs::TopicUsedReserveSize(expectedUsedReserveSize)});
+ };
+
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 3
+ PartitionPerTablet: 3
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 11
+ WriteSpeedInBytesPerSecond : 17
+ }
+ MeteringMode: METERING_MODE_REQUEST_UNITS
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ Assert(0, 0); // topic is empty
+
+ ui64 balancerId = DescribePath(runtime, "/MyRoot/Topic1").GetPathDescription().GetPersQueueGroup().GetBalancerTabletID();
+
+ auto stats = NPQ::GetReadBalancerPeriodicTopicStats(runtime, balancerId);
+ UNIT_ASSERT_EQUAL_C(0, stats->Record.GetDataSize(), "DataSize from ReadBalancer");
+ UNIT_ASSERT_EQUAL_C(0, stats->Record.GetUsedReserveSize(), "UsedReserveSize from ReadBalancer");
+
+ ui32 msgSeqNo = 100;
+ WriteToTopic(runtime, topicPath, msgSeqNo, "Message 100");
+
+ env.SimulateSleep(runtime, TDuration::Seconds(3)); // Wait TEvPeriodicTopicStats
+
+ Assert(69, 0); // 69 - it is unstable value. it can change if internal message store change
+
+ stats = NPQ::GetReadBalancerPeriodicTopicStats(runtime, balancerId);
+ UNIT_ASSERT_EQUAL_C(69, stats->Record.GetDataSize(), "DataSize from ReadBalancer");
+ UNIT_ASSERT_EQUAL_C(0, stats->Record.GetUsedReserveSize(), "UsedReserveSize from ReadBalancer");
+
+ appData.PQConfig.SetBalancerWakeupIntervalSec(30);
+
+ GracefulRestartTablet(runtime, balancerId, sender);
+
+ stats = NPQ::GetReadBalancerPeriodicTopicStats(runtime, balancerId);
+ UNIT_ASSERT_EQUAL_C(69, stats->Record.GetDataSize(), "DataSize from ReadBalancer after reload");
+ UNIT_ASSERT_EQUAL_C(0, stats->Record.GetUsedReserveSize(), "UsedReserveSize from ReadBalancer after reload");
+ }
+
+ Y_UNIT_TEST(PeriodicTopicStatsReload) {
+ TTestBasicRuntime runtime;
+ TTestEnv env(runtime);
+
+ runtime.SetLogPriority(NKikimrServices::FLAT_TX_SCHEMESHARD, NActors::NLog::PRI_TRACE);
+
+ auto& appData = runtime.GetAppData();
+
+ ui64 txId = 100;
+
+ // disable batching
+ appData.SchemeShardConfig.SetStatsBatchTimeoutMs(0);
+ appData.SchemeShardConfig.SetStatsMaxBatchSize(0);
+
+ // apply config via reboot
+ TActorId sender = runtime.AllocateEdgeActor();
+
+ GracefulRestartTablet(runtime, TTestTxConfig::SchemeShard, sender);
+
+ const auto AssertTopicSize = [&] (ui64 expectedAccountSize, ui64 expectedUsedReserveSize) {
+ TestDescribeResult(DescribePath(runtime, "/MyRoot/Topic1"),
+ {NLs::Finished,
+ NLs::TopicAccountSize(expectedAccountSize),
+ NLs::TopicUsedReserveSize(expectedUsedReserveSize)});
+ };
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot", R"(
+ Name: "Topic1"
+ TotalGroupCount: 1
+ PartitionPerTablet: 1
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 1
+ WriteSpeedInBytesPerSecond : 7
+
+ }
+ MeteringMode: METERING_MODE_RESERVED_CAPACITY
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+ AssertTopicSize(7, 0);
+
+ ui64 topic1Id = DescribePath(runtime, "/MyRoot/Topic1").GetPathDescription().GetSelf().GetPathId();
+
+ ui64 generation = 1;
+ ui64 round = 97;
+
+ SendTEvPeriodicTopicStats(runtime, topic1Id, generation, round, 17, 7);
+ AssertTopicSize(17, 7);
+
+ GracefulRestartTablet(runtime, TTestTxConfig::SchemeShard, sender);
+
+ AssertTopicSize(17, 7); // loaded from db
+
+ SendTEvPeriodicTopicStats(runtime, topic1Id, generation, round - 1, 19, 7);
+
+ AssertTopicSize(17, 7); // not changed because round is less
+ }
+
};
diff --git a/ydb/core/tx/schemeshard/ut_subdomain.cpp b/ydb/core/tx/schemeshard/ut_subdomain.cpp
index f07c58c2de..ec752a4d28 100644
--- a/ydb/core/tx/schemeshard/ut_subdomain.cpp
+++ b/ydb/core/tx/schemeshard/ut_subdomain.cpp
@@ -1,5 +1,6 @@
#include <ydb/core/tx/schemeshard/ut_helpers/helpers.h>
#include <ydb/core/tx/datashard/datashard.h>
+#include <ydb/core/persqueue/events/internal.h>
using namespace NKikimr;
using namespace NSchemeShard;
@@ -70,10 +71,10 @@ NLs::TCheckFunc LsCheckSubDomainParamsInMassiveCase(const TString name = "",
};
}
-NLs::TCheckFunc LsCheckDiskQuotaExceeded(bool value = true) {
+NLs::TCheckFunc LsCheckDiskQuotaExceeded(bool value = true, TString msg = TString()) {
return [=] (const NKikimrScheme::TEvDescribeSchemeResult& record) {
auto& desc = record.GetPathDescription().GetDomainDescription();
- UNIT_ASSERT_VALUES_EQUAL(desc.GetDomainState().GetDiskQuotaExceeded(), value);
+ UNIT_ASSERT_VALUES_EQUAL_C(desc.GetDomainState().GetDiskQuotaExceeded(), value, msg);
};
}
@@ -2254,7 +2255,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
env.TestWaitNotification(runtime, txId - 1);
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(24),
+ NLs::PathVersionEqual(23),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(0),
NLs::ShardsInsideDomain(2)});
@@ -2301,7 +2302,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
env.TestWaitNotification(runtime, txId - 1);
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(28),
+ NLs::PathVersionEqual(27),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(0),
NLs::ShardsInsideDomain(2)});
@@ -2322,7 +2323,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(28),
+ NLs::PathVersionEqual(27),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(0),
NLs::ShardsInsideDomain(2)});
@@ -2339,7 +2340,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(28),
+ NLs::PathVersionEqual(27),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(0),
NLs::ShardsInsideDomain(2)});
@@ -2357,7 +2358,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(30),
+ NLs::PathVersionEqual(29),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(1),
NLs::ShardsInsideDomain(4)});
@@ -2374,7 +2375,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(30),
+ NLs::PathVersionEqual(29),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(1),
NLs::ShardsInsideDomain(5)});
@@ -2391,7 +2392,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
{NLs::PathExist,
- NLs::PathVersionEqual(30),
+ NLs::PathVersionEqual(29),
NLs::DomainLimitsIs(lowLimits.MaxPaths, lowLimits.MaxShards),
NLs::PathsInsideDomain(1),
NLs::ShardsInsideDomain(5)});
@@ -2899,11 +2900,12 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
}
}
- Y_UNIT_TEST(DiskSpaceQuotas) {
+ Y_UNIT_TEST(TableDiskSpaceQuotas) {
TTestBasicRuntime runtime;
TTestEnvOptions opts;
opts.DisableStatsBatching(true);
opts.EnablePersistentPartitionStats(true);
+ opts.EnableTopicDiskSubDomainQuota(false);
TTestEnv env(runtime, opts);
ui64 txId = 100;
@@ -2957,7 +2959,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
env.TestWaitNotification(runtime, txId);
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
- {LsCheckDiskQuotaExceeded(false)});
+ {LsCheckDiskQuotaExceeded(false, "SubDomain created")});
// skip a single coordinator and mediator
ui64 tabletId = TTestTxConfig::FakeHiveTablets + 2;
@@ -2974,14 +2976,14 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
waitForTableStats(1);
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
- {LsCheckDiskQuotaExceeded(true)});
+ {LsCheckDiskQuotaExceeded(true, "Table was created and data was written")});
TestDropTable(runtime, ++txId, "/MyRoot/USER_0", "Table1");
waitForSchemaChanged(1);
env.TestWaitNotification(runtime, txId);
TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_0"),
- {LsCheckDiskQuotaExceeded(false)});
+ {LsCheckDiskQuotaExceeded(false, "Table dropped")});
}
Y_UNIT_TEST(SchemeDatabaseQuotaRejects) {
@@ -3113,5 +3115,85 @@ Y_UNIT_TEST_SUITE(TSchemeShardSubDomainTest) {
NLs::ShardsInsideDomain(0)});
}
}
+
+ Y_UNIT_TEST(TopicDiskSpaceQuotas) {
+ TTestBasicRuntime runtime;
+
+ TTestEnvOptions opts;
+ opts.DisableStatsBatching(true);
+ opts.EnablePersistentPartitionStats(true);
+ opts.EnableTopicDiskSubDomainQuota(true);
+
+ TTestEnv env(runtime, opts);
+
+ runtime.SetLogPriority(NKikimrServices::PERSQUEUE, NLog::PRI_TRACE);
+ runtime.SetLogPriority(NKikimrServices::PERSQUEUE_READ_BALANCER, NLog::PRI_TRACE);
+
+ runtime.GetAppData().PQConfig.SetBalancerWakeupIntervalSec(1);
+
+ ui64 txId = 100;
+
+ // Subdomain with a 1-byte data size quota
+ TestCreateSubDomain(runtime, ++txId, "/MyRoot", R"(
+ Name: "USER_1"
+ PlanResolution: 50
+ Coordinators: 1
+ Mediators: 1
+ TimeCastBucketsPerMediator: 2
+ StoragePools {
+ Name: "name_USER_0_kind_hdd-1"
+ Kind: "hdd-1"
+ }
+ StoragePools {
+ Name: "name_USER_0_kind_hdd-2"
+ Kind: "hdd-2"
+ }
+ DatabaseQuotas {
+ data_size_hard_quota: 1
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_1"),
+ {LsCheckDiskQuotaExceeded(false, "SubDomain was created")});
+
+ TestCreatePQGroup(runtime, ++txId, "/MyRoot/USER_1", R"(
+ Name: "Topic1"
+ TotalGroupCount: 3
+ PartitionPerTablet: 7
+ PQTabletConfig {
+ PartitionConfig {
+ LifetimeSeconds: 60
+ }
+ MeteringMode: METERING_MODE_REQUEST_UNITS
+ }
+ )");
+ env.TestWaitNotification(runtime, txId);
+
+ TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_1"),
+ {LsCheckDiskQuotaExceeded(false, "Topic was created")});
+
+ ui64 balancerId = DescribePath(runtime, "/MyRoot/USER_1/Topic1").GetPathDescription().GetPersQueueGroup().GetBalancerTabletID();
+
+ auto stats = NPQ::GetReadBalancerPeriodicTopicStats(runtime, balancerId);
+ UNIT_ASSERT_EQUAL_C(false, stats->Record.GetSubDomainOutOfSpace(), "SubDomainOutOfSpace from ReadBalancer");
+
+ ui32 seqNo = 100;
+ WriteToTopic(runtime, "/MyRoot/USER_1/Topic1", ++seqNo, "Message 0");
+ env.SimulateSleep(runtime, TDuration::Seconds(3)); // Wait TEvPeriodicTopicStats
+
+ TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_1"),
+ {LsCheckDiskQuotaExceeded(true, "Message 0 was written")});
+
+ stats = NPQ::GetReadBalancerPeriodicTopicStats(runtime, balancerId);
+ UNIT_ASSERT_EQUAL_C(true, stats->Record.GetSubDomainOutOfSpace(), "SubDomainOutOfSpace from ReadBalancer after write");
+
+ TestDropPQGroup(runtime, ++txId, "/MyRoot/USER_1", "Topic1");
+ env.TestWaitNotification(runtime, txId);
+ env.SimulateSleep(runtime, TDuration::Seconds(1));
+
+ TestDescribeResult(DescribePath(runtime, "/MyRoot/USER_1"),
+ {LsCheckDiskQuotaExceeded(false, "Topic1 was deleted")});
+ }
}
diff --git a/ydb/core/tx/tiering/common.h b/ydb/core/tx/tiering/common.h
index 83a5a3139e..a00601a734 100644
--- a/ydb/core/tx/tiering/common.h
+++ b/ydb/core/tx/tiering/common.h
@@ -16,9 +16,5 @@ enum EEvents {
EvEnd
};
-class TEvTiersManagerReadyForUsage: public TEventLocal<TEvTiersManagerReadyForUsage, EvTiersManagerReadyForUsage> {
-
-};
-
static_assert(EEvents::EvEnd < EventSpaceEnd(TKikimrEvents::ES_TIERING), "expect EvEnd < EventSpaceEnd(TKikimrEvents::ES_TIERING)");
}
diff --git a/ydb/core/tx/tiering/manager.cpp b/ydb/core/tx/tiering/manager.cpp
index 78ed9e33b0..8c79c96693 100644
--- a/ydb/core/tx/tiering/manager.cpp
+++ b/ydb/core/tx/tiering/manager.cpp
@@ -162,8 +162,6 @@ void TTiersManager::TakeConfigs(NMetadata::NFetcher::ISnapshot::TPtr snapshotExt
auto& manager = Managers.emplace(i.second.GetTierName(), std::move(localManager)).first->second;
manager.Start(Secrets);
}
- ReadyForUsageFlag = true;
- TActivationContext::AsActorContext().Send(TabletActorId, new NTiers::TEvTiersManagerReadyForUsage);
}
TActorId TTiersManager::GetStorageActorId(const TString& tierId) {
@@ -216,7 +214,7 @@ NMetadata::NFetcher::ISnapshotsFetcher::TPtr TTiersManager::GetExternalDataManip
THashMap<ui64, NKikimr::NOlap::TTiering> TTiersManager::GetTiering() const {
THashMap<ui64, NKikimr::NOlap::TTiering> result;
- if (!Snapshot) {
+ if (!IsReady()) {
return result;
}
auto snapshotPtr = std::dynamic_pointer_cast<NTiers::TConfigsSnapshot>(Snapshot);
@@ -231,6 +229,7 @@ THashMap<ui64, NKikimr::NOlap::TTiering> TTiersManager::GetTiering() const {
auto it = tierConfigs.find(name);
if (it != tierConfigs.end()) {
tier->Compression = NTiers::ConvertCompression(it->second.GetProtoConfig().GetCompression());
+ tier->NeedExport = it->second.NeedExport();
}
}
}
diff --git a/ydb/core/tx/tiering/manager.h b/ydb/core/tx/tiering/manager.h
index 1ddf79da15..258058fe27 100644
--- a/ydb/core/tx/tiering/manager.h
+++ b/ydb/core/tx/tiering/manager.h
@@ -41,7 +41,6 @@ private:
TActor* Actor = nullptr;
std::unordered_map<ui64, TString> PathIdTiering;
YDB_READONLY_DEF(TManagers, Managers);
- YDB_READONLY_FLAG(ReadyForUsage, false);
std::shared_ptr<NMetadata::NSecret::TSnapshot> Secrets;
NMetadata::NFetcher::ISnapshot::TPtr Snapshot;
@@ -62,6 +61,11 @@ public:
void DisablePathId(const ui64 pathId) {
PathIdTiering.erase(pathId);
}
+
+ bool IsReady() const {
+ return !!Snapshot;
+ }
+
TTiersManager& Start(std::shared_ptr<TTiersManager> ownerPtr);
TTiersManager& Stop();
TActorId GetStorageActorId(const TString& tierId);
diff --git a/ydb/core/tx/tiering/rule/initializer.cpp b/ydb/core/tx/tiering/rule/initializer.cpp
index b2f07c8ae4..96c1c3cff5 100644
--- a/ydb/core/tx/tiering/rule/initializer.cpp
+++ b/ydb/core/tx/tiering/rule/initializer.cpp
@@ -13,17 +13,17 @@ TVector<NKikimr::NMetadata::NInitializer::ITableModifier::TPtr> TTierRulesInitia
{
auto& column = *request.add_columns();
column.set_name("tieringRuleId");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name("defaultColumn");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name("description");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
result.emplace_back(new NMetadata::NInitializer::TGenericTableModifier<NMetadata::NRequest::TDialogCreateTable>(request, "create"));
auto hRequest = TTieringRule::AddHistoryTableScheme(request);
diff --git a/ydb/core/tx/tiering/rule/manager.cpp b/ydb/core/tx/tiering/rule/manager.cpp
index aa16310215..7fd2a201ec 100644
--- a/ydb/core/tx/tiering/rule/manager.cpp
+++ b/ydb/core/tx/tiering/rule/manager.cpp
@@ -14,17 +14,17 @@ NMetadata::NModifications::TOperationParsingResult TTieringRulesManager::DoBuild
const NYql::TObjectSettingsImpl& settings,
const NMetadata::NModifications::IOperationsManager::TModificationContext& /*context*/) const {
NMetadata::NInternal::TTableRecord result;
- result.SetColumn(TTieringRule::TDecoder::TieringRuleId, NMetadata::NInternal::TYDBValue::Bytes(settings.GetObjectId()));
+ result.SetColumn(TTieringRule::TDecoder::TieringRuleId, NMetadata::NInternal::TYDBValue::Utf8(settings.GetObjectId()));
{
auto it = settings.GetFeatures().find(TTieringRule::TDecoder::DefaultColumn);
if (it != settings.GetFeatures().end()) {
- result.SetColumn(TTieringRule::TDecoder::DefaultColumn, NMetadata::NInternal::TYDBValue::Bytes(it->second));
+ result.SetColumn(TTieringRule::TDecoder::DefaultColumn, NMetadata::NInternal::TYDBValue::Utf8(it->second));
}
}
{
auto it = settings.GetFeatures().find(TTieringRule::TDecoder::Description);
if (it != settings.GetFeatures().end()) {
- result.SetColumn(TTieringRule::TDecoder::Description, NMetadata::NInternal::TYDBValue::Bytes(it->second));
+ result.SetColumn(TTieringRule::TDecoder::Description, NMetadata::NInternal::TYDBValue::Utf8(it->second));
}
}
return result;
diff --git a/ydb/core/tx/tiering/rule/object.cpp b/ydb/core/tx/tiering/rule/object.cpp
index 0bd4fd00b5..12f5981d7b 100644
--- a/ydb/core/tx/tiering/rule/object.cpp
+++ b/ydb/core/tx/tiering/rule/object.cpp
@@ -43,13 +43,13 @@ bool TTieringRule::DeserializeDescriptionFromJson(const NJson::TJsonValue & json
NMetadata::NInternal::TTableRecord TTieringRule::SerializeToRecord() const {
NMetadata::NInternal::TTableRecord result;
- result.SetColumn(TDecoder::TieringRuleId, NMetadata::NInternal::TYDBValue::Bytes(TieringRuleId));
- result.SetColumn(TDecoder::DefaultColumn, NMetadata::NInternal::TYDBValue::Bytes(DefaultColumn));
+ result.SetColumn(TDecoder::TieringRuleId, NMetadata::NInternal::TYDBValue::Utf8(TieringRuleId));
+ result.SetColumn(TDecoder::DefaultColumn, NMetadata::NInternal::TYDBValue::Utf8(DefaultColumn));
{
auto jsonDescription = SerializeDescriptionToJson();
NJsonWriter::TBuf sout;
sout.WriteJsonValue(&jsonDescription, true);
- result.SetColumn(TDecoder::Description, NMetadata::NInternal::TYDBValue::Bytes(sout.Str()));
+ result.SetColumn(TDecoder::Description, NMetadata::NInternal::TYDBValue::Utf8(sout.Str()));
}
return result;
}
diff --git a/ydb/core/tx/tiering/s3_actor.cpp b/ydb/core/tx/tiering/s3_actor.cpp
index 5dd253607e..7e918936b2 100644
--- a/ydb/core/tx/tiering/s3_actor.cpp
+++ b/ydb/core/tx/tiering/s3_actor.cpp
@@ -25,7 +25,10 @@ public:
TS3Export() = default;
explicit TS3Export(TAutoPtr<TEvPrivate::TEvExport> ev)
- : Event(ev.Release()) {
+ : Event(ev.Release())
+ {
+ Y_VERIFY(Event);
+ Y_VERIFY(Event->Status == NKikimrProto::UNKNOWN);
}
TEvPrivate::TEvExport::TBlobDataMap& Blobs() {
@@ -41,17 +44,16 @@ public:
return KeysToWrite.empty();
}
- TS3Export& RegisterKey(const TString& key) {
- KeysToWrite.emplace(key);
- return *this;
+ void RegisterKey(const TString& key, const TUnifiedBlobId& blobId) {
+ KeysToWrite.emplace(key, blobId);
}
- TS3Export& FinishKey(const TString& key) {
- KeysToWrite.erase(key);
- return *this;
+ TUnifiedBlobId FinishKey(const TString& key) {
+ auto node = KeysToWrite.extract(key);
+ return node.mapped();
}
private:
- TSet<TString> KeysToWrite;
+ std::unordered_map<TString, TUnifiedBlobId> KeysToWrite;
};
struct TS3Forget {
@@ -113,28 +115,39 @@ public:
void Handle(TEvPrivate::TEvExport::TPtr& ev) {
auto& msg = *ev->Get();
ui64 exportNo = msg.ExportNo;
- Y_VERIFY(ev->Get()->DstActor == ShardActor);
+ Y_VERIFY(msg.DstActor == ShardActor);
+
+ if (Exports.count(exportNo)) {
+ LOG_S_ERROR("[S3] Multiple exports with same export id '" << exportNo << "' at tablet " << TabletId);
+ return;
+ }
- Y_VERIFY(!Exports.count(exportNo));
Exports[exportNo] = TS3Export(ev->Release());
auto& ex = Exports[exportNo];
- for (auto& [blobId, blob] : ex.Blobs()) {
- TString key = ex.AddExported(blobId, blob.PathId).GetS3Key();
- Y_VERIFY(!ExportingKeys.count(key)); // TODO
+ for (auto& [blobId, blobData] : ex.Blobs()) {
+ TString key = ex.AddExported(blobId, msg.PathId).GetS3Key();
+ Y_VERIFY(!ExportingKeys.count(key)); // TODO: allow reexport?
- ex.RegisterKey(key);
+ ex.RegisterKey(key, blobId);
ExportingKeys[key] = exportNo;
-
- if (blob.Evicting) {
- SendPutObjectIfNotExists(key, std::move(blob.Data));
- } else {
- SendPutObject(key, std::move(blob.Data));
- }
+
+ SendPutObjectIfNotExists(key, std::move(blobData));
}
}
void Handle(TEvPrivate::TEvForget::TPtr& ev) {
+ // It's possible to get several forgets for the same blob (remove + cleanup)
+ for (auto& evict : ev->Get()->Evicted) {
+ if (evict.ExternBlob.IsS3Blob()) {
+ const TString& key = evict.ExternBlob.GetS3Key();
+ if (ForgettingKeys.count(key)) {
+ LOG_S_NOTICE("[S3] Ignore forget '" << evict.Blob.ToStringNew() << "' at tablet " << TabletId);
+ return; // TODO: return an error?
+ }
+ }
+ }
+
ui64 forgetNo = ++ForgetNo;
Forgets[forgetNo] = TS3Forget(ev->Release());
@@ -147,7 +160,7 @@ public:
}
const TString& key = evict.ExternBlob.GetS3Key();
- Y_VERIFY(!ForgettingKeys.count(key)); // TODO
+ Y_VERIFY(!ForgettingKeys.count(key));
forget.KeysToDelete.emplace(key);
ForgettingKeys[key] = forgetNo;
@@ -175,7 +188,6 @@ public:
}
}
- // TODO: clean written blobs in failed export
void Handle(TEvExternalStorage::TEvPutObjectResponse::TPtr& ev) {
Y_VERIFY(Initialized());
@@ -185,10 +197,14 @@ public:
const bool hasError = !resultOutcome.IsSuccess();
TString errStr;
if (hasError) {
- errStr = LogError("PutObjectResponse", resultOutcome.GetError(), !!msg.Key);
+ errStr = LogError("PutObjectResponse", resultOutcome.GetError(), msg.Key);
+ }
+
+ if (!msg.Key || msg.Key->empty()) {
+ LOG_S_ERROR("[S3] no key in PutObjectResponse at tablet " << TabletId);
+ return;
}
- Y_VERIFY(msg.Key); // FIXME
const TString key = *msg.Key;
LOG_S_DEBUG("[S3] PutObjectResponse '" << key << "' at tablet " << TabletId);
@@ -225,7 +241,7 @@ public:
const auto& resultOutcome = msg.Result;
if (!resultOutcome.IsSuccess()) {
- KeyFinished(context->GetKey(), true, LogError("CheckObjectExistsResponse", resultOutcome.GetError(), !!context->GetKey()));
+ KeyFinished(context->GetKey(), true, LogError("CheckObjectExistsResponse", resultOutcome.GetError(), context->GetKey()));
} else if (!msg.IsExists()) {
SendPutObject(context->GetKey(), std::move(context->DetachData()));
} else {
@@ -241,10 +257,14 @@ public:
TString errStr;
if (!resultOutcome.IsSuccess()) {
- errStr = LogError("DeleteObjectResponse", resultOutcome.GetError(), !!msg.Key);
+ errStr = LogError("DeleteObjectResponse", resultOutcome.GetError(), msg.Key);
+ }
+
+ if (!msg.Key || msg.Key->empty()) {
+ LOG_S_ERROR("[S3] no key in DeleteObjectResponse at tablet " << TabletId);
+ return;
}
- Y_VERIFY(msg.Key); // FIXME
TString key = *msg.Key;
LOG_S_DEBUG("[S3] DeleteObjectResponse '" << key << "' at tablet " << TabletId);
@@ -287,7 +307,7 @@ public:
TString errStr;
if (!resultOutcome.IsSuccess()) {
- errStr = LogError("GetObjectResponse", resultOutcome.GetError(), !!key);
+ errStr = LogError("GetObjectResponse", resultOutcome.GetError(), key);
}
if (!key || key->empty()) {
@@ -352,17 +372,12 @@ public:
}
auto& ex = it->second;
- ex.FinishKey(key);
+ TUnifiedBlobId blobId = ex.FinishKey(key);
- if (hasError) {
- ex.Event->Status = NKikimrProto::ERROR;
- Y_VERIFY(ex.Event->ErrorStrings.emplace(key, errStr).second, "%s", key.data());
- if (ex.ExtractionFinished()) {
- Send(ShardActor, ex.Event.release());
- Exports.erase(exportNo);
- }
- } else if (ex.ExtractionFinished()) {
- ex.Event->Status = NKikimrProto::OK;
+ ex.Event->AddResult(blobId, key, hasError, errStr);
+
+ if (ex.ExtractionFinished()) {
+ Y_VERIFY(ex.Event->Finished());
Send(ShardActor, ex.Event.release());
Exports.erase(exportNo);
}
@@ -392,7 +407,7 @@ private:
hFunc(TEvExternalStorage::TEvDeleteObjectResponse, Handle);
hFunc(TEvExternalStorage::TEvGetObjectResponse, Handle);
hFunc(TEvExternalStorage::TEvCheckObjectExistsResponse, Handle);
-
+
#if 0
hFunc(TEvExternalStorage::TEvHeadObjectResponse, Handle);
#endif
@@ -415,8 +430,8 @@ private:
void SendPutObject(const TString& key, TString&& data) const {
auto request = Aws::S3::Model::PutObjectRequest()
- .WithKey(key)
- .WithStorageClass(Aws::S3::Model::StorageClass::STANDARD_IA);
+ .WithKey(key);
+ //.WithStorageClass(Aws::S3::Model::StorageClass::STANDARD_IA); // TODO: move to config
#if 0
Aws::Map<Aws::String, Aws::String> metadata;
metadata.emplace("Content-Type", "application/x-compressed");
@@ -460,13 +475,16 @@ private:
Send(ExternalStorageActorId, new TEvExternalStorage::TEvDeleteObjectRequest(request));
}
- TString LogError(const TString& responseType, const Aws::S3::S3Error& error, bool hasKey) const {
+ TString LogError(const TString& responseType, const Aws::S3::S3Error& error,
+ const std::optional<TString>& key) const {
TString errStr = TString(error.GetExceptionName()) + " " + error.GetMessage();
- if (errStr.empty() && !hasKey) {
+
+ LOG_S_NOTICE("[S3] Error in " << responseType << " for key '" << (key ? *key : TString())
+ << "' at tablet " << TabletId << ": " << errStr);
+
+ if (errStr.empty() && !key) {
errStr = responseType + " with no key";
}
-
- LOG_S_NOTICE("[S3] Error in " << responseType << " at tablet " << TabletId << ": " << errStr);
return errStr;
}
};
diff --git a/ydb/core/tx/tiering/tier/initializer.cpp b/ydb/core/tx/tiering/tier/initializer.cpp
index cbd9599b0f..9bf517856a 100644
--- a/ydb/core/tx/tiering/tier/initializer.cpp
+++ b/ydb/core/tx/tiering/tier/initializer.cpp
@@ -13,12 +13,12 @@ TVector<NKikimr::NMetadata::NInitializer::ITableModifier::TPtr> TTiersInitialize
{
auto& column = *request.add_columns();
column.set_name("tierName");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name("tierConfig");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
result.emplace_back(new NMetadata::NInitializer::TGenericTableModifier<NMetadata::NRequest::TDialogCreateTable>(request, "create"));
auto hRequest = TTierConfig::AddHistoryTableScheme(request);
diff --git a/ydb/core/tx/tiering/tier/manager.cpp b/ydb/core/tx/tiering/tier/manager.cpp
index ac7c494dc8..0366f1212a 100644
--- a/ydb/core/tx/tiering/tier/manager.cpp
+++ b/ydb/core/tx/tiering/tier/manager.cpp
@@ -9,7 +9,7 @@ NMetadata::NModifications::TOperationParsingResult TTiersManager::DoBuildPatchFr
const NMetadata::NModifications::IOperationsManager::TModificationContext& context) const
{
NMetadata::NInternal::TTableRecord result;
- result.SetColumn(TTierConfig::TDecoder::TierName, NMetadata::NInternal::TYDBValue::Bytes(settings.GetObjectId()));
+ result.SetColumn(TTierConfig::TDecoder::TierName, NMetadata::NInternal::TYDBValue::Utf8(settings.GetObjectId()));
{
auto it = settings.GetFeatures().find(TTierConfig::TDecoder::TierConfig);
if (it != settings.GetFeatures().end()) {
@@ -31,7 +31,7 @@ NMetadata::NModifications::TOperationParsingResult TTiersManager::DoBuildPatchFr
return "SecretKey is incorrect";
}
*proto.MutableObjectStorage()->MutableSecretKey() = secretKey->SerializeToString();
- result.SetColumn(TTierConfig::TDecoder::TierConfig, NMetadata::NInternal::TYDBValue::Bytes(proto.DebugString()));
+ result.SetColumn(TTierConfig::TDecoder::TierConfig, NMetadata::NInternal::TYDBValue::Utf8(proto.DebugString()));
}
}
}
diff --git a/ydb/core/tx/tiering/tier/object.cpp b/ydb/core/tx/tiering/tier/object.cpp
index d886eb5194..ec9c93b8ce 100644
--- a/ydb/core/tx/tiering/tier/object.cpp
+++ b/ydb/core/tx/tiering/tier/object.cpp
@@ -39,8 +39,8 @@ bool TTierConfig::DeserializeFromRecord(const TDecoder& decoder, const Ydb::Valu
NMetadata::NInternal::TTableRecord TTierConfig::SerializeToRecord() const {
NMetadata::NInternal::TTableRecord result;
- result.SetColumn(TDecoder::TierName, NMetadata::NInternal::TYDBValue::Bytes(TierName));
- result.SetColumn(TDecoder::TierConfig, NMetadata::NInternal::TYDBValue::Bytes(ProtoConfig.DebugString()));
+ result.SetColumn(TDecoder::TierName, NMetadata::NInternal::TYDBValue::Utf8(TierName));
+ result.SetColumn(TDecoder::TierConfig, NMetadata::NInternal::TYDBValue::Utf8(ProtoConfig.DebugString()));
return result;
}
diff --git a/ydb/core/tx/tiering/ut/ut_tiers.cpp b/ydb/core/tx/tiering/ut/ut_tiers.cpp
index fa099d423f..af2b42ca98 100644
--- a/ydb/core/tx/tiering/ut/ut_tiers.cpp
+++ b/ydb/core/tx/tiering/ut/ut_tiers.cpp
@@ -29,8 +29,8 @@ private:
using TBase = Tests::NCS::THelper;
public:
using TBase::TBase;
- void CreateTestOlapTable(TString tableName = "olapTable", TString storeName = "olapStore",
- ui32 storeShardsCount = 4, ui32 tableShardsCount = 3,
+ void CreateTestOlapTable(TString tableName = "olapTable", ui32 tableShardsCount = 3,
+ TString storeName = "olapStore", ui32 storeShardsCount = 4,
TString shardingFunction = "HASH_FUNCTION_CLOUD_LOGS") {
TActorId sender = Server.GetRuntime()->AllocateEdgeActor();
CreateTestOlapStore(sender, Sprintf(R"(
@@ -295,13 +295,6 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
}
}
{
- std::vector<NMetadata::NInternal::TTableRecord> patches;
- {
- NMetadata::NInternal::TTableRecord patch;
- patch.SetColumn("ownerPath", NMetadata::NInternal::TYDBValue::Bytes("/Root/olapStore"));
- patch.SetColumn("tierName", NMetadata::NInternal::TYDBValue::Bytes("tier1"));
- patches.emplace_back(std::move(patch));
- }
emulator->ResetConditions();
emulator->SetExpectedTieringsCount(0);
emulator->SetExpectedTiersCount(0);
@@ -491,14 +484,22 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
emulator->SetExpectedTiersCount(2);
emulator->CheckRuntime(runtime);
}
- lHelper.CreateTestOlapTable("olapTable");
+ lHelper.CreateTestOlapTable("olapTable", 2);
Cerr << "Wait tables" << Endl;
runtime.SimulateSleep(TDuration::Seconds(20));
Cerr << "Initialization tables" << Endl;
- Cerr << "Insert..." << Endl;
const TInstant pkStart = Now() - TDuration::Days(15);
ui32 idx = 0;
- lHelper.SendDataViaActorSystem("/Root/olapStore/olapTable", 0, (pkStart + TDuration::Seconds(2 * idx++)).GetValue(), 2000);
+
+ auto batch = lHelper.TestArrowBatch(0, (pkStart + TDuration::Seconds(2 * idx++)).GetValue(), 6000);
+ auto batchSize = NArrow::GetBatchDataSize(batch);
+ Cerr << "Inserting " << batchSize << " bytes..." << Endl;
+ UNIT_ASSERT(batchSize > 4 * 1024 * 1024); // NColumnShard::TLimits::MIN_BYTES_TO_INSERT
+ UNIT_ASSERT(batchSize < 8 * 1024 * 1024);
+
+ for (ui32 i = 0; i < 4; ++i) {
+ lHelper.SendDataViaActorSystem("/Root/olapStore/olapTable", batch);
+ }
{
const TInstant start = Now();
bool check = false;
@@ -515,7 +516,7 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
#endif
runtime.SimulateSleep(TDuration::Seconds(1));
}
- Y_VERIFY(check);
+ UNIT_ASSERT(check);
}
#ifdef S3_TEST_USAGE
Cerr << "storage initialized..." << Endl;
@@ -538,10 +539,10 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
#endif
runtime.SimulateSleep(TDuration::Seconds(1));
}
- Y_VERIFY(check);
+ UNIT_ASSERT(check);
}
#ifndef S3_TEST_USAGE
- Y_VERIFY(Singleton<NKikimr::NWrappers::NExternalStorage::TFakeExternalStorage>()->GetBucketsCount() == 1);
+ UNIT_ASSERT_EQUAL(Singleton<NKikimr::NWrappers::NExternalStorage::TFakeExternalStorage>()->GetBucketsCount(), 1);
#endif
}
diff --git a/ydb/core/tx/tx_proxy/proxy_ext_tenant_ut.cpp b/ydb/core/tx/tx_proxy/proxy_ext_tenant_ut.cpp
index ff7c9579d8..f46e47617e 100644
--- a/ydb/core/tx/tx_proxy/proxy_ext_tenant_ut.cpp
+++ b/ydb/core/tx/tx_proxy/proxy_ext_tenant_ut.cpp
@@ -93,7 +93,7 @@ void DeclareAndDefineWithNodes(TTestEnvWithPoolsSupport& env) {
NTestLs::IsExtSubdomain(ls); //root TSS
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
- UNIT_ASSERT_VALUES_EQUAL(ver.Version, 4);
+ UNIT_ASSERT_VALUES_EQUAL(ver.Version, (env.GetSettings().FeatureFlags.GetEnableAlterDatabaseCreateHiveFirst() ? 5 : 4));
}
{
@@ -126,7 +126,7 @@ void CreateTableInsideAndLs(TTestEnvWithPoolsSupport& env) {
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_UNEQUAL(ver.OwnerId, rootSchemeShard);
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
- UNIT_ASSERT_VALUES_EQUAL(ver.Version, 4);
+ UNIT_ASSERT_VALUES_EQUAL(ver.Version, (env.GetSettings().FeatureFlags.GetEnableAlterDatabaseCreateHiveFirst() ? 5 : 4));
}
{
@@ -147,7 +147,7 @@ void CreateTableInsideAndLs(TTestEnvWithPoolsSupport& env) {
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_UNEQUAL(ver.OwnerId, rootSchemeShard);
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
- UNIT_ASSERT_VALUES_EQUAL(ver.Version, 6);
+ UNIT_ASSERT_VALUES_EQUAL(ver.Version, (env.GetSettings().FeatureFlags.GetEnableAlterDatabaseCreateHiveFirst() ? 7 : 6));
}
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().ForceDeleteSubdomain("/dc-1", "USER_0"));
@@ -227,7 +227,7 @@ void CreateTableInsideThenStopTenantAndForceDeleteSubDomain(TTestEnvWithPoolsSup
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().CreateExtSubdomain("/dc-1", subdomain_0));
auto ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsUnavailable(ls); //root TSS not ready yet
+ NTestLs::IsUnavailable(ls); // extsubdomain is not ready yet
ls = env.GetClient().Ls("/dc-1");
NTestLs::ChildrenCount(ls, 1);
@@ -243,7 +243,7 @@ void CreateTableInsideThenStopTenantAndForceDeleteSubDomain(TTestEnvWithPoolsSup
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().AlterExtSubdomain("/dc-1", subdomain));
auto ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsExtSubdomain(ls); //root TSS ready
+ NTestLs::IsExtSubdomain(ls); // extsubdomain's SS is ready
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_UNEQUAL(ver.OwnerId, rootSchemeShard);
schemeshards[x] = ver.OwnerId;
@@ -251,7 +251,7 @@ void CreateTableInsideThenStopTenantAndForceDeleteSubDomain(TTestEnvWithPoolsSup
UNIT_ASSERT_VALUES_UNEQUAL(schemeshards[x], schemeshards[x-1]);
}
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
- UNIT_ASSERT_VALUES_EQUAL(ver.Version, 4);
+ UNIT_ASSERT_VALUES_EQUAL(ver.Version, (env.GetSettings().FeatureFlags.GetEnableAlterDatabaseCreateHiveFirst() ? 5 : 4));
}
{
@@ -274,7 +274,7 @@ void CreateTableInsideThenStopTenantAndForceDeleteSubDomain(TTestEnvWithPoolsSup
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_EQUAL(ver.OwnerId, schemeshards[x]);
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
- UNIT_ASSERT_VALUES_EQUAL(ver.Version, 6);
+ UNIT_ASSERT_VALUES_EQUAL(ver.Version, (env.GetSettings().FeatureFlags.GetEnableAlterDatabaseCreateHiveFirst() ? 7 : 6));
ls = env.GetClient().Ls("/dc-1");
@@ -288,7 +288,9 @@ void CreateTableInsideThenStopTenantAndForceDeleteSubDomain(TTestEnvWithPoolsSup
{
auto ls = env.GetClient().Ls("/dc-1");
- NTestLs::NoChildren(ls);
+ //NOTE: no need to check children count because extsubdomain root path
+ // could still exist technically but in a state of being deleted --
+ // -- all that counts is that path status: should be DoesNotExist
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_EQUAL(ver.OwnerId, rootSchemeShard);
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
@@ -296,7 +298,7 @@ void CreateTableInsideThenStopTenantAndForceDeleteSubDomain(TTestEnvWithPoolsSup
env.GetClient().RefreshPathCache(&env.GetRuntime(), "/dc-1/USER_0");
ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsDoesNotExist(ls); //root TSS deleted
+ NTestLs::IsDoesNotExist(ls); // extsubdomain root deleted
}
}
}
@@ -490,7 +492,7 @@ void CreateTableInsideAndAlterDomainAndTable(TTestEnvWithPoolsSupport& env) {
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().CreateExtSubdomain("/dc-1", subdomain_0));
auto ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsUnavailable(ls); //root TSS not ready yet
+ NTestLs::IsUnavailable(ls); // extsubdomain is not ready yet
ls = env.GetClient().Ls("/dc-1");
NTestLs::ChildrenCount(ls, 1);
@@ -505,7 +507,7 @@ void CreateTableInsideAndAlterDomainAndTable(TTestEnvWithPoolsSupport& env) {
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().AlterExtSubdomain("/dc-1", subdomain));
auto ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsExtSubdomain(ls); //root TSS ready
+ NTestLs::IsExtSubdomain(ls); // extsubdomain's SS is ready
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_UNEQUAL(ver.OwnerId, rootSchemeShard);
schemeshards[x] = ver.OwnerId;
@@ -557,7 +559,7 @@ void CreateTableInsideAndAlterDomainAndTable(TTestEnvWithPoolsSupport& env) {
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().AlterExtSubdomain("/dc-1", subdomain));
auto ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsExtSubdomain(ls); //root TSS ready
+ NTestLs::IsExtSubdomain(ls); // extsubdomain's SS is ready
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_UNEQUAL(ver.OwnerId, rootSchemeShard);
schemeshards[x] = ver.OwnerId;
@@ -565,7 +567,7 @@ void CreateTableInsideAndAlterDomainAndTable(TTestEnvWithPoolsSupport& env) {
UNIT_ASSERT_VALUES_UNEQUAL(schemeshards[x], schemeshards[x-1]);
}
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
- UNIT_ASSERT_VALUES_EQUAL(ver.Version, 7);
+ UNIT_ASSERT_VALUES_EQUAL(ver.Version, (env.GetSettings().FeatureFlags.GetEnableAlterDatabaseCreateHiveFirst() ? 8 : 7));
NKikimrSubDomains::TDomainDescription description = NTestLs::ExtractDomainDescription(ls);
UNIT_ASSERT_VALUES_UNEQUAL(description.GetProcessingParams().GetHive(), 0);
@@ -600,13 +602,13 @@ void CreateTableInsideAndAlterDomainAndTable(TTestEnvWithPoolsSupport& env) {
UNIT_ASSERT_VALUES_EQUAL(description.GetPartitionConfig().GetFollowerCount(), 1);
}
- env.GetTenants().Stop();
-
UNIT_ASSERT_VALUES_EQUAL(NMsgBusProxy::MSTATUS_OK, env.GetClient().ForceDeleteSubdomain("/dc-1", "USER_0"));
{
auto ls = env.GetClient().Ls("/dc-1");
- NTestLs::NoChildren(ls);
+ //NOTE: no need to check children count because extsubdomain root path
+ // could still exist technically but in a state of being deleted --
+ // -- all that counts is that path status: should be DoesNotExist
auto ver = NTestLs::ExtractPathVersion(ls);
UNIT_ASSERT_VALUES_EQUAL(ver.OwnerId, rootSchemeShard);
UNIT_ASSERT_VALUES_EQUAL(ver.PathId, 1);
@@ -614,8 +616,10 @@ void CreateTableInsideAndAlterDomainAndTable(TTestEnvWithPoolsSupport& env) {
env.GetClient().RefreshPathCache(&env.GetRuntime(), "/dc-1/USER_0");
ls = env.GetClient().Ls("/dc-1/USER_0");
- NTestLs::IsDoesNotExist(ls); //root TSS deleted
+ NTestLs::IsDoesNotExist(ls); // extsubdomain root deleted
}
+
+ env.GetTenants().Stop();
}
}
@@ -710,33 +714,33 @@ Y_UNIT_TEST_SUITE(TExtSubDomainTest) {
DeclareAndDrop(env);
}
- Y_UNIT_TEST(DeclareAndDefineWithoutNodes) {
- TTestEnvWithPoolsSupport env(1, 0, 2);
+ Y_UNIT_TEST_FLAG(DeclareAndDefineWithoutNodes, AlterDatabaseCreateHiveFirst) {
+ TTestEnvWithPoolsSupport env(1, 0, 2, AlterDatabaseCreateHiveFirst);
DeclareAndDefineWithoutNodes(env);
}
- Y_UNIT_TEST(DeclareAndDefineWithNodes) {
- TTestEnvWithPoolsSupport env(1, 1, 2);
+ Y_UNIT_TEST_FLAG(DeclareAndDefineWithNodes, AlterDatabaseCreateHiveFirst) {
+ TTestEnvWithPoolsSupport env(1, 1, 2, AlterDatabaseCreateHiveFirst);
DeclareAndDefineWithNodes(env);
}
- Y_UNIT_TEST(CreateTableInsideAndLs) {
- TTestEnvWithPoolsSupport env(1, 1, 2);
+ Y_UNIT_TEST_FLAG(CreateTableInsideAndLs, AlterDatabaseCreateHiveFirst) {
+ TTestEnvWithPoolsSupport env(1, 1, 2, AlterDatabaseCreateHiveFirst);
CreateTableInsideAndLs(env);
}
- Y_UNIT_TEST(DeclareAndAlterPools) {
- TTestEnvWithPoolsSupport env(1, 1, 2);
+ Y_UNIT_TEST_FLAG(DeclareAndAlterPools, AlterDatabaseCreateHiveFirst) {
+ TTestEnvWithPoolsSupport env(1, 1, 2, AlterDatabaseCreateHiveFirst);
DeclareAndAlterPools(env);
}
- Y_UNIT_TEST(CreateTableInsideThenStopTenantAndForceDeleteSubDomain) {
- TTestEnvWithPoolsSupport env(1, 1, 2);
+ Y_UNIT_TEST_FLAG(CreateTableInsideThenStopTenantAndForceDeleteSubDomain, AlterDatabaseCreateHiveFirst) {
+ TTestEnvWithPoolsSupport env(1, 1, 2, AlterDatabaseCreateHiveFirst);
CreateTableInsideThenStopTenantAndForceDeleteSubDomain(env);
}
- Y_UNIT_TEST(CreateTableInsideAndAlterDomainAndTable) {
- TTestEnvWithPoolsSupport env(1, 1, 2);
+ Y_UNIT_TEST_FLAG(CreateTableInsideAndAlterDomainAndTable, AlterDatabaseCreateHiveFirst) {
+ TTestEnvWithPoolsSupport env(1, 1, 2, AlterDatabaseCreateHiveFirst);
CreateTableInsideAndAlterDomainAndTable(env);
}
diff --git a/ydb/core/tx/tx_proxy/proxy_ut_helpers.h b/ydb/core/tx/tx_proxy/proxy_ut_helpers.h
index 846b0cf568..aa1718deb7 100644
--- a/ydb/core/tx/tx_proxy/proxy_ut_helpers.h
+++ b/ydb/core/tx/tx_proxy/proxy_ut_helpers.h
@@ -7,6 +7,23 @@
#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/testing/unittest/tests_data.h>
+
+// ad-hoc test parametrization support: only for single boolean flag
+// taken from ydb/core/ut/common/kqp_ut_common.h:Y_UNIT_TEST_TWIN
+//TODO: introduce general support for test parametrization?
+#define Y_UNIT_TEST_FLAG(N, OPT) \
+ template<bool OPT> void Test##N(NUnitTest::TTestContext&); \
+ struct TTestRegistration##N { \
+ TTestRegistration##N() { \
+ TCurrentTest::AddTest(#N "-" #OPT "-false", static_cast<void (*)(NUnitTest::TTestContext&)>(&Test##N<false>), false); \
+ TCurrentTest::AddTest(#N "-" #OPT "-true", static_cast<void (*)(NUnitTest::TTestContext&)>(&Test##N<true>), false); \
+ } \
+ }; \
+ static TTestRegistration##N testRegistration##N; \
+ template<bool OPT> \
+ void Test##N(NUnitTest::TTestContext&)
+
+
namespace NKikimr {
namespace NTxProxyUT {
@@ -188,13 +205,14 @@ void SetRowInSimpletable(TBaseTestEnv& env, ui64 key, ui64 value, const TString
class TTestEnvWithPoolsSupport: public TBaseTestEnv {
public:
- TTestEnvWithPoolsSupport(ui32 staticNodes = 1, ui32 dynamicNodes = 0, ui32 poolsCount = 2)
+ TTestEnvWithPoolsSupport(ui32 staticNodes = 1, ui32 dynamicNodes = 0, ui32 poolsCount = 2, bool enableAlterDatabaseCreateHiveFirst = true)
{
Settings = new Tests::TServerSettings(PortManager.GetPort(3534));
GetSettings().SetEnableMockOnSingleNode(false);
GetSettings().SetNodeCount(staticNodes);
GetSettings().SetDynamicNodeCount(dynamicNodes);
+ GetSettings().SetEnableAlterDatabaseCreateHiveFirst(enableAlterDatabaseCreateHiveFirst);
GetSettings().SetEnableSystemViews(false);
for (ui32 poolNum = 1; poolNum <= poolsCount; ++poolNum) {
diff --git a/ydb/core/tx/tx_proxy/schemereq.cpp b/ydb/core/tx/tx_proxy/schemereq.cpp
index ccd7e4ae46..d5a916ae51 100644
--- a/ydb/core/tx/tx_proxy/schemereq.cpp
+++ b/ydb/core/tx/tx_proxy/schemereq.cpp
@@ -1055,6 +1055,7 @@ struct TBaseSchemeReq: public TActorBootstrapped<TDerived> {
}
}
+ request->Record.SetPeerName(GetRequestProto().GetPeerName());
if (GetRequestEv().HasModifyScheme()) {
request->Record.AddTransaction()->MergeFrom(GetModifyScheme());
} else {
diff --git a/ydb/core/tx/tx_proxy/upload_rows_common_impl.h b/ydb/core/tx/tx_proxy/upload_rows_common_impl.h
index 649b3fc6ca..34c72ad245 100644
--- a/ydb/core/tx/tx_proxy/upload_rows_common_impl.h
+++ b/ydb/core/tx/tx_proxy/upload_rows_common_impl.h
@@ -105,7 +105,7 @@ private:
TActorId SchemeCache;
TActorId LeaderPipeCache;
TDuration Timeout;
- TInstant Deadline;
+ TInstant StartTime;
TActorId TimeoutTimerActorId;
bool WaitingResolveReply;
bool Finished;
@@ -149,6 +149,7 @@ protected:
TVector<std::pair<TString, NScheme::TTypeInfo>> YdbSchema;
THashMap<ui32, size_t> Id2Position; // columnId -> its position in YdbSchema
THashMap<TString, NScheme::TTypeInfo> ColumnsToConvert;
+ THashMap<TString, NScheme::TTypeInfo> ColumnsToConvertInplace;
bool WriteToTableShadow = false;
bool AllowWriteToPrivateTable = false;
@@ -174,7 +175,7 @@ public:
{}
void Bootstrap(const NActors::TActorContext& ctx) {
- Deadline = AppData(ctx)->TimeProvider->Now() + Timeout;
+ StartTime = TAppData::TimeProvider->Now();
ResolveTable(GetTable(), ctx);
}
@@ -189,6 +190,10 @@ public:
}
protected:
+ TInstant Deadline() const {
+ return StartTime + Timeout;
+ }
+
const NSchemeCache::TSchemeCacheNavigate* GetResolveNameResult() const {
return ResolveNamesResult.get();
}
@@ -279,6 +284,11 @@ private:
return res;
}
+ static bool SameOrConvertableDstType(NScheme::TTypeInfo type1, NScheme::TTypeInfo type2, bool allowConvert) {
+ bool ok = SameDstType(type1, type2, allowConvert);
+ return ok || NArrow::TArrowToYdbConverter::NeedInplaceConversion(type1, type2);
+ }
+
bool BuildSchema(const NActors::TActorContext& ctx, TString& errorMessage, bool makeYqbSchema) {
Y_UNUSED(ctx);
Y_VERIFY(ResolveNamesResult);
@@ -354,13 +364,17 @@ private:
if (typeInProto.type_id()) {
auto typeInRequest = NScheme::TTypeInfo(typeInProto.type_id());
- bool ok = SameDstType(typeInRequest, ci.PType, GetSourceType() != EUploadSource::ProtoValues);
+ bool sourceIsArrow = GetSourceType() != EUploadSource::ProtoValues;
+ bool ok = SameOrConvertableDstType(typeInRequest, ci.PType, sourceIsArrow); // TODO
if (!ok) {
errorMessage = Sprintf("Type mismatch for column %s: expected %s, got %s",
name.c_str(), NScheme::TypeName(ci.PType),
NScheme::TypeName(typeInRequest));
return false;
}
+ if (NArrow::TArrowToYdbConverter::NeedInplaceConversion(typeInRequest, ci.PType)) {
+ ColumnsToConvertInplace[name] = ci.PType;
+ }
} else if (typeInProto.has_decimal_type() && ci.PType.GetTypeId() == NScheme::NTypeIds::Decimal) {
int precision = typeInProto.decimal_type().precision();
int scale = typeInProto.decimal_type().scale();
@@ -471,7 +485,9 @@ private:
void HandleTimeout(const TActorContext& ctx) {
ShardRepliesLeft.clear();
- return ReplyWithError(Ydb::StatusIds::TIMEOUT, "Request timed out", ctx);
+ return ReplyWithError(Ydb::StatusIds::TIMEOUT, TStringBuilder() << "Bulk upsert to table " << GetTable()
+ << " longTx " << LongTxId.ToString()
+ << " timed out, duration: " << (TAppData::TimeProvider->Now() - StartTime).Seconds() << " sec", ctx);
}
void Handle(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr& ev, const TActorContext& ctx) {
@@ -549,6 +565,9 @@ private:
if (!ExtractBatch(errorMessage)) {
return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, errorMessage, ctx);
}
+ if (!ColumnsToConvertInplace.empty()) {
+ Batch = NArrow::InplaceConvertColumns(Batch, ColumnsToConvertInplace);
+ }
// Explicit types conversion
if (!ColumnsToConvert.empty()) {
Batch = NArrow::ConvertColumns(Batch, ColumnsToConvert);
@@ -585,6 +604,7 @@ private:
if (TableKind == NSchemeCache::TSchemeCacheNavigate::KindTable) {
ResolveShards(ctx);
} else if (isColumnTable) {
+ // Batch is already converted
WriteToColumnTable(ctx);
} else {
return ReplyWithError(Ydb::StatusIds::SCHEME_ERROR,
@@ -599,7 +619,7 @@ private:
}
LOG_DEBUG_S(ctx, NKikimrServices::MSGBUS_REQUEST, "Bulk upsert to table " << GetTable()
- << " startint LongTx");
+ << " starting LongTx");
// Begin Long Tx for writing a batch into OLAP table
TActorId longTxServiceId = NLongTxService::MakeLongTxServiceID(ctx.SelfID.NodeId());
@@ -652,8 +672,9 @@ private:
Y_VERIFY(batch);
#if 1 // TODO: check we call ValidateFull() once over pipeline (upsert -> long tx -> shard insert)
- if (!batch->ValidateFull().ok()) {
- return ReplyWithError(Ydb::StatusIds::SCHEME_ERROR, "Bad batch in bulk upsert data", ctx);
+ auto validationInfo = batch->ValidateFull();
+ if (!validationInfo.ok()) {
+ return ReplyWithError(Ydb::StatusIds::SCHEME_ERROR, "Bad batch in bulk upsert data: " + validationInfo.message() + "; order:" + JoinSeq(", ", outputColumns), ctx);
}
#endif
@@ -716,7 +737,8 @@ private:
Y_VERIFY(Batch);
TBase::Become(&TThis::StateWaitWriteBatchResult);
- TString dedupId = LongTxId.ToString(); // TODO: is this a proper dedup_id?
+ ui32 batchNo = 0;
+ TString dedupId = ToString(batchNo);
NGRpcService::DoLongTxWriteSameMailbox(ctx, ctx.SelfID, LongTxId, dedupId,
GetDatabase(), GetTable(), ResolveNamesResult, Batch, Issues);
}
@@ -907,7 +929,7 @@ private:
if (!ev) {
shardRequests[shardIdx].reset(new TEvDataShard::TEvUploadRowsRequest());
ev = shardRequests[shardIdx].get();
- ev->Record.SetCancelDeadlineMs(Deadline.MilliSeconds());
+ ev->Record.SetCancelDeadlineMs(Deadline().MilliSeconds());
ev->Record.SetTableId(keyRange->TableId.PathId.LocalPathId);
for (const auto& fd : KeyColumnPositions) {
diff --git a/ydb/core/util/operation_queue.h b/ydb/core/util/operation_queue.h
index 61bed56bc3..43de2cc0f0 100644
--- a/ydb/core/util/operation_queue.h
+++ b/ydb/core/util/operation_queue.h
@@ -53,6 +53,9 @@ struct TConfig {
// retry after this amount of time
TDuration WakeupInterval = TDuration::Seconds(1);
+ // Do not wakeup too often
+ TDuration MinWakeupInterval = TDuration::Zero();
+
// done and timeouted items are enqueued again
bool IsCircular = false;
@@ -631,43 +634,55 @@ void TOperationQueue<T, TQueue>::ScheduleWakeup() {
return;
auto now = Timer.Now();
+ auto wakeup = TMonotonic::Max();
+
if (RunningItems.Empty() && !ReadyQueue.Empty()) {
if (TokenBucket.Available() <= 0) {
// we didn't start anything because of RPS limit
- NextWakeup = now + TokenBucket.NextAvailableDelay();
- Timer.SetWakeupTimer(TokenBucket.NextAvailableDelay());
- return;
+ wakeup = now + TokenBucket.NextAvailableDelay();
} else if (!NextWakeup) {
// special case when we failed to start anything
- NextWakeup = now + Config.WakeupInterval;
- Timer.SetWakeupTimer(Config.WakeupInterval);
- return;
+ wakeup = now + Config.WakeupInterval;
+ }
+ } else {
+ // note, that by design we should have remove timeouted items,
+ // thus assume that timeout is in future
+ if (Config.Timeout && !RunningItems.Empty()) {
+ const auto& item = RunningItems.Front();
+ wakeup = Min(wakeup, item.Timestamp + Config.Timeout);
}
- }
- auto wakeup = TMonotonic::Max();
+ if (!WaitingItems.Empty()) {
+ const auto& item = WaitingItems.Front();
+ wakeup = Min(wakeup, item.Timestamp + Config.MinOperationRepeatDelay);
+ }
- if (Config.Timeout && !RunningItems.Empty()) {
- const auto& item = RunningItems.Front();
- wakeup = Min(wakeup, item.Timestamp + Config.Timeout);
- }
+ // neither timeout will happen or there any waiting items.
+ // in this case, queue will be triggered by enqueue operation.
+ if (wakeup == TMonotonic::Max())
+ return;
- if (!WaitingItems.Empty()) {
- const auto& item = WaitingItems.Front();
- wakeup = Min(wakeup, item.Timestamp + Config.MinOperationRepeatDelay);
+ // no sense to wakeup earlier that rate limit allows
+ if (HasRateLimit) {
+ wakeup = Max(wakeup, now + TokenBucket.NextAvailableDelay());
+ }
}
- if (wakeup == TMonotonic::Max())
- return;
+ // don't wakeup too often (as well as don't wakeup in past)
+ wakeup = Max(wakeup, now + Config.MinWakeupInterval);
- // no sense to wakeup earlier that rate limit allows
- if (HasRateLimit) {
- wakeup = Max(wakeup, now + TokenBucket.NextAvailableDelay());
- }
-
- if (!NextWakeup || NextWakeup > wakeup) {
+ if (!NextWakeup) {
NextWakeup = wakeup;
Timer.SetWakeupTimer(wakeup - now);
+ return;
+ }
+
+ if (NextWakeup > wakeup) {
+ auto delta = NextWakeup - wakeup;
+ if (!Config.MinWakeupInterval || delta > Config.MinWakeupInterval) {
+ NextWakeup = wakeup;
+ Timer.SetWakeupTimer(wakeup - now);
+ }
}
}
diff --git a/ydb/core/util/operation_queue_ut.cpp b/ydb/core/util/operation_queue_ut.cpp
index 7daa22ba67..4161594867 100644
--- a/ydb/core/util/operation_queue_ut.cpp
+++ b/ydb/core/util/operation_queue_ut.cpp
@@ -955,6 +955,46 @@ Y_UNIT_TEST_SUITE(TCircularOperationQueueTest) {
UNIT_ASSERT_VALUES_EQUAL(starter.WakeupHistory.back(), goldWakeup);
}
+ Y_UNIT_TEST(CheckWakeupWhenRPSExhausted2) {
+ // regression case for the following case:
+ // 1. Enqueue operation 1.
+ // 2. Done operation 1.
+ // 3. Enqueue 2 and 3 - they should not add extra wakeups
+
+ TQueue::TConfig config;
+ config.IsCircular = true;
+ config.InflightLimit = 1;
+ config.MaxRate = 0.5;
+ config.Timeout = Timeout;
+ TOperationStarter starter;
+
+ TQueue queue(config, starter, starter);
+ queue.Start();
+
+ queue.Enqueue(1);
+ queue.Enqueue(2);
+
+ UNIT_ASSERT_VALUES_EQUAL(queue.RunningSize(), 1UL);
+ UNIT_ASSERT_VALUES_EQUAL(starter.WakeupHistory.size(), 1UL); // only timeout for 1
+
+ queue.OnDone(1);
+
+ // 2 is running now because token bucket allows
+ UNIT_ASSERT_VALUES_EQUAL(queue.RunningSize(), 1UL);
+ UNIT_ASSERT_VALUES_EQUAL(starter.WakeupHistory.size(), 1UL); // only first timeout
+
+ queue.Enqueue(3);
+ UNIT_ASSERT_VALUES_EQUAL(starter.WakeupHistory.size(), 1UL); // only first timeout
+
+ queue.OnDone(2);
+ UNIT_ASSERT_VALUES_EQUAL(queue.RunningSize(), 0UL); // blocked by RPS
+ UNIT_ASSERT_VALUES_EQUAL(starter.WakeupHistory.size(), 2UL); // start new one, when RPS allows
+
+ queue.Enqueue(4);
+ UNIT_ASSERT_VALUES_EQUAL(queue.RunningSize(), 0UL); // no change
+ UNIT_ASSERT_VALUES_EQUAL(starter.WakeupHistory.size(), 2UL); // no change
+ }
+
Y_UNIT_TEST(CheckStartAfterStop) {
TQueue::TConfig config;
config.IsCircular = true;
diff --git a/ydb/core/viewer/content/v2/storage.js b/ydb/core/viewer/content/v2/storage.js
index 1872e4916d..f9c7170713 100644
--- a/ydb/core/viewer/content/v2/storage.js
+++ b/ydb/core/viewer/content/v2/storage.js
@@ -133,7 +133,24 @@ Storage.prototype.appear = function() {
if (!this.visible) {
var row = $(this.domElement);
- row.append($('<td>', {class: 'storage_erasure', text: this.ErasureSpecies}));
+ var erasureElem;
+
+ if (this.BlobDepotId === undefined) {
+ erasureElem = $('<td>', {class: 'storage_erasure', text: this.ErasureSpecies});
+ } else if (!this.BlobDepotId) {
+ erasureElem = $('<td>', {text: 'BlobDepot (error)'});
+ } else {
+ erasureElem = $('<td>');
+ var link = $('<a>', {
+ 'href': '../../../tablets/app?TabletID=' + this.BlobDepotId,
+ 'text': 'BlobDepot',
+ 'title': this.BlobDepotId
+ });
+ erasureElem.html(link);
+ }
+
+ row.append(erasureElem);
+
row.append(this.storageUnits = $('<td>', {class: 'storage_units'}));
row.append(this.allocatedSize = $('<td>'));
row.append(this.availableSize = $('<td>'));
@@ -275,6 +292,19 @@ Storage.prototype.update = function() {
this.pDisksByVDisks[vDisk.Id] = pDisk;
}
+ if (this.AllocatedSize !== undefined) {
+ allocatedSize = Number(this.AllocatedSize);
+ }
+ if (this.AvailableSize !== undefined) {
+ availableSize = Number(this.AvailableSize);
+ }
+ if (this.ReadThroughput !== undefined) {
+ readSpeed = Number(this.ReadThroughput);
+ }
+ if (this.WriteThroughput !== undefined) {
+ writeSpeed = Number(this.WriteThroughput);
+ }
+
this.vDiskMap.resizeVDisks();
if (allocatedSize === undefined) {
diff --git a/ydb/core/viewer/content/v2/storage_view.js b/ydb/core/viewer/content/v2/storage_view.js
index b4fe4b6a45..7f57df3b0f 100644
--- a/ydb/core/viewer/content/v2/storage_view.js
+++ b/ydb/core/viewer/content/v2/storage_view.js
@@ -199,6 +199,8 @@ StorageView.prototype.onStorage = function(update) {
}
storage.updateFromStorage(storageGroup);
var allocatedSizeGroup = 0;
+ var totalSize_ = 0;
+ var allocatedSize_ = 0;
vDisks += storageGroup.VDisks.length;
for (var vDiskNum in storageGroup.VDisks) {
var vDisk = storageGroup.VDisks[vDiskNum];
@@ -212,15 +214,22 @@ StorageView.prototype.onStorage = function(update) {
if (!pPiskSeen[pDiskId]) {
pPiskSeen[pDiskId] = true;
pDisks++;
- if (pDisk.TotalSize && pDisk.TotalSize && pDisk.AvailableSize) {
+ if (pDisk.TotalSize && pDisk.AvailableSize) {
var ts = Number(pDisk.TotalSize);
- totalSize += ts;
- allocatedSize += ts - Number(pDisk.AvailableSize);
+ totalSize_ += ts;
+ allocatedSize_ += ts - Number(pDisk.AvailableSize);
}
}
}
}
+ if (storageGroup.AllocatedSize !== undefined && storageGroup.AvailableSize !== undefined) {
+ allocatedSizeGroup = Number(storageGroup.AllocatedSize);
+ allocatedSize_ = allocatedSizeGroup;
+ totalSize_ = allocatedSize_ + Number(storageGroup.AvailableSize);
+ }
storage.allocatedSizeBytes = allocatedSizeGroup;
+ totalSize += totalSize_;
+ allocatedSize += allocatedSize_;
this.updateGroup(storage);
}
}
diff --git a/ydb/core/wrappers/s3_storage.h b/ydb/core/wrappers/s3_storage.h
index c5f239b1a4..4317570bb9 100644
--- a/ydb/core/wrappers/s3_storage.h
+++ b/ydb/core/wrappers/s3_storage.h
@@ -53,13 +53,13 @@ private:
const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) {
const auto* ctx = static_cast<const TCtx*>(context.get());
- LOG_NOTICE_S(*ctx->GetActorSystem(), NKikimrServices::S3_WRAPPER, "Response"
+ LOG_INFO_S(*ctx->GetActorSystem(), NKikimrServices::S3_WRAPPER, "Response"
<< ": uuid# " << ctx->GetUUID()
<< ", response# " << outcome);
ctx->Reply(request, outcome);
};
- LOG_NOTICE_S(*TlsActivationContext, NKikimrServices::S3_WRAPPER, "Request"
+ LOG_INFO_S(*TlsActivationContext, NKikimrServices::S3_WRAPPER, "Request"
<< ": uuid# " << ctx->GetUUID()
<< ", request# " << ev->Get()->GetRequest());
func(Client.Get(), ctx->PrepareRequest(ev), callback, ctx);
diff --git a/ydb/core/ydb_convert/table_description.cpp b/ydb/core/ydb_convert/table_description.cpp
index 69dc8547ed..68cd1ec619 100644
--- a/ydb/core/ydb_convert/table_description.cpp
+++ b/ydb/core/ydb_convert/table_description.cpp
@@ -420,7 +420,6 @@ void FillChangefeedDescription(Ydb::Table::DescribeTableResult& out,
auto changefeed = out.add_changefeeds();
changefeed->set_name(stream.GetName());
- changefeed->set_state(Ydb::Table::ChangefeedDescription::STATE_ENABLED);
changefeed->set_virtual_timestamps(stream.GetVirtualTimestamps());
switch (stream.GetMode()) {
@@ -442,6 +441,16 @@ void FillChangefeedDescription(Ydb::Table::DescribeTableResult& out,
default:
break;
}
+
+ switch (stream.GetState()) {
+ case NKikimrSchemeOp::ECdcStreamState::ECdcStreamStateReady:
+ case NKikimrSchemeOp::ECdcStreamState::ECdcStreamStateDisabled:
+ case NKikimrSchemeOp::ECdcStreamState::ECdcStreamStateScan:
+ changefeed->set_state(static_cast<Ydb::Table::ChangefeedDescription::State>(stream.GetState()));
+ break;
+ default:
+ break;
+ }
}
}
@@ -475,6 +484,15 @@ bool FillChangefeedDescription(NKikimrSchemeOp::TCdcStreamDescription& out,
return false;
}
+ if (in.initial_scan()) {
+ if (!AppData()->FeatureFlags.GetEnableChangefeedInitialScan()) {
+ status = Ydb::StatusIds::UNSUPPORTED;
+ error = "Changefeed initial scan is not supported yet";
+ return false;
+ }
+ out.SetState(NKikimrSchemeOp::ECdcStreamState::ECdcStreamStateScan);
+ }
+
return true;
}
diff --git a/ydb/core/ymq/actor/action.h b/ydb/core/ymq/actor/action.h
index b974384101..89dd9d43cf 100644
--- a/ydb/core/ymq/actor/action.h
+++ b/ydb/core/ymq/actor/action.h
@@ -11,6 +11,7 @@
#include "serviceid.h"
#include "schema.h"
+#include <ydb/core/audit/audit_log.h>
#include <ydb/core/base/path.h>
#include <ydb/core/base/ticket_parser.h>
#include <ydb/core/base/quoter.h>
@@ -76,9 +77,10 @@ public:
return;
}
- TStringBuf tokenBuf(SecurityToken_);
- UserName_ = TString(tokenBuf.NextTok(':'));
- FolderId_ = TString(tokenBuf);
+ auto items = ParseCloudSecurityToken(SecurityToken_);
+ UserName_ = std::get<0>(items);
+ FolderId_ = std::get<1>(items);
+ UserSID_ = std::get<2>(items);
}
void DoBootstrap() {
@@ -294,10 +296,88 @@ protected:
Response_.SetResourceId(GetQueueName());
}
+ AuditLog();
+
Cb_->DoSendReply(Response_);
PassAway();
}
+ void AuditLog() {
+ if (IsModifySchemaRequest(SourceSqsRequest_)) {
+ #define RESPONSE_CASE(action) \
+ case NKikimrClient::TSqsResponse::Y_CAT(k, action): { \
+ AuditLogEntry(Response_.Y_CAT(Get, action)(), RequestId_); \
+ break; \
+ }
+
+ #define RESPONSE_BATCH_CASE(action) \
+ case NKikimrClient::TSqsResponse::Y_CAT(k, action): { \
+ const auto& resp = Response_.Y_CAT(Get, action)(); \
+ const TError* globalError = resp.HasError() ? &resp.GetError() : nullptr; \
+ for (size_t i = 0; i < resp.EntriesSize(); ++i) { \
+ TString reqId = TStringBuilder() << RequestId_ << "_" << i; \
+ AuditLogEntry(resp.GetEntries()[i], reqId, globalError); \
+ } \
+ break; \
+ }
+
+ switch (Response_.GetResponseCase()) {
+ RESPONSE_CASE(ChangeMessageVisibility)
+ RESPONSE_BATCH_CASE(ChangeMessageVisibilityBatch)
+ RESPONSE_CASE(CreateQueue)
+ RESPONSE_CASE(CreateUser)
+ RESPONSE_CASE(DeleteMessage)
+ RESPONSE_BATCH_CASE(DeleteMessageBatch)
+ RESPONSE_CASE(DeleteQueue)
+ RESPONSE_CASE(DeleteUser)
+ RESPONSE_CASE(ListPermissions)
+ RESPONSE_CASE(GetQueueAttributes)
+ RESPONSE_CASE(GetQueueUrl)
+ RESPONSE_CASE(ListQueues)
+ RESPONSE_CASE(ListUsers)
+ RESPONSE_CASE(ModifyPermissions)
+ RESPONSE_CASE(PurgeQueue)
+ RESPONSE_CASE(ReceiveMessage)
+ RESPONSE_CASE(SendMessage)
+ RESPONSE_BATCH_CASE(SendMessageBatch)
+ RESPONSE_CASE(SetQueueAttributes)
+ RESPONSE_CASE(ListDeadLetterSourceQueues)
+ RESPONSE_CASE(CountQueues)
+ case NKikimrClient::TSqsResponse::kDeleteQueueBatch:
+ case NKikimrClient::TSqsResponse::kGetQueueAttributesBatch:
+ case NKikimrClient::TSqsResponse::kPurgeQueueBatch:
+ // DeleteQueueBatch, GetQueueAttributesBatch, PurgeQueueBatch - generates not batch queries inside
+ case NKikimrClient::TSqsResponse::RESPONSE_NOT_SET:
+ break;
+ }
+
+ #undef RESPONSE_BATCH_CASE
+ #undef RESPONSE_CASE
+ }
+ }
+
+ template <class TResponse>
+ void AuditLogEntry(const TResponse& response, const TString& requestId, const TError* error = nullptr) {
+ if (!error && response.HasError()) {
+ error = &response.GetError();
+ }
+ static const TString EmptyValue = "{none}";
+ AUDIT_LOG(
+ AUDIT_PART("component", TString("ymq"))
+ AUDIT_PART("request_id", requestId)
+ AUDIT_PART("subject", (UserSID_ ? UserSID_ : EmptyValue))
+ AUDIT_PART("account", UserName_)
+ AUDIT_PART("cloud_id", UserName_, Cfg().GetYandexCloudMode())
+ AUDIT_PART("folder_id", Response_.GetFolderId(), Cfg().GetYandexCloudMode())
+ AUDIT_PART("resource_id", GetQueueName(), Cfg().GetYandexCloudMode())
+ AUDIT_PART("operation", ActionToCloudConvMethod(Action_))
+ AUDIT_PART("queue", GetQueueName())
+ AUDIT_PART("status", TString(error ? "ERROR": "SUCCESS"))
+ AUDIT_PART("reason", error->GetMessage(), error)
+ AUDIT_PART("detailed_status", error->GetErrorCode(), error)
+ );
+ }
+
void PassAway() {
if (TProxyActor::NeedCreateProxyActor(Action_)) {
if (TString queueName = GetQueueName()) {
@@ -747,7 +827,7 @@ protected:
TString FolderId_;
size_t SecurityCheckRequestsToWaitFor_ = 2;
TIntrusivePtr<TSecurityObject> SecurityObject_;
- TIntrusivePtr<NACLib::TUserToken> UserToken_;
+ TIntrusiveConstPtr<NACLib::TUserToken> UserToken_;
TString UserSID_; // identifies the client who sent this request
bool UserExists_ = false;
bool QueueExists_ = false;
diff --git a/ydb/core/ymq/actor/proxy_actor.cpp b/ydb/core/ymq/actor/proxy_actor.cpp
index 2cad630ce2..dde7450600 100644
--- a/ydb/core/ymq/actor/proxy_actor.cpp
+++ b/ydb/core/ymq/actor/proxy_actor.cpp
@@ -2,6 +2,7 @@
#include "error.h"
#include "proxy_actor.h"
+#include <ydb/core/ymq/base/action.h>
#include <ydb/core/protos/sqs.pb.h>
#include <ydb/core/ymq/base/counters.h>
#include <ydb/core/ymq/base/security.h>
@@ -13,6 +14,9 @@
namespace NKikimr::NSQS {
+#define SQS_SWITCH_REQUEST(request, default_case) \
+ SQS_SWITCH_REQUEST_CUSTOM(request, ENUMERATE_PROXY_ACTIONS, default_case)
+
TString SecurityPrint(const NKikimrClient::TSqsResponse& resp) {
switch (resp.GetResponseCase()) {
case NKikimrClient::TSqsResponse::kChangeMessageVisibility:
@@ -54,6 +58,13 @@ TString SecurityPrint(const NKikimrClient::TSqsResponse& resp) {
Y_VERIFY(false);
}
+std::tuple<TString, TString, TString> ParseCloudSecurityToken(const TString& token) {
+ TStringBuf tokenBuf(token);
+ TString userName = TString(tokenBuf.NextTok(':'));
+ TString folderId = TString(tokenBuf.NextTok(':'));
+ TString userSID = TString(tokenBuf.NextTok(':'));
+ return {userName, folderId, userSID};
+}
void TProxyActor::Bootstrap() {
this->Become(&TProxyActor::StateFunc);
@@ -69,9 +80,9 @@ void TProxyActor::Bootstrap() {
securityToken = ExtractSecurityToken<typename std::remove_reference<decltype(request)>::type, TCredentials>(request);
SQS_SWITCH_REQUEST(Request_, Y_VERIFY(false));
#undef SQS_REQUEST_CASE
- TStringBuf tokenBuf(securityToken);
- UserName_ = TString(tokenBuf.NextTok(':'));
- FolderId_ = TString(tokenBuf.NextTok(':'));
+ auto items = ParseCloudSecurityToken(securityToken);
+ UserName_ = std::get<0>(items);
+ FolderId_ = std::get<1>(items);
// TODO: handle empty cloud id better
RLOG_SQS_DEBUG("Proxy actor: used " << UserName_ << " as an account name and " << QueueName_ << " as a queue name");
diff --git a/ydb/core/ymq/actor/proxy_actor.h b/ydb/core/ymq/actor/proxy_actor.h
index 42d73b8de1..c5397ef702 100644
--- a/ydb/core/ymq/actor/proxy_actor.h
+++ b/ydb/core/ymq/actor/proxy_actor.h
@@ -13,23 +13,7 @@
namespace NKikimr::NSQS {
-#define SQS_REQUEST_CASE_WRAP(action) \
- case NKikimrClient::TSqsRequest::Y_CAT(k, action): { \
- SQS_REQUEST_CASE(action) \
- break; \
- }
-
-// DO NOT proxy account creation or queue listing
-
-#define SQS_SWITCH_REQUEST_CUSTOM(request, enumerate, default_case) \
- switch ((request).GetRequestCase()) { \
- enumerate(SQS_REQUEST_CASE_WRAP) \
- default: \
- default_case; \
- }
-
-#define SQS_SWITCH_REQUEST(request, default_case) \
- SQS_SWITCH_REQUEST_CUSTOM(request, ENUMERATE_PROXY_ACTIONS, default_case)
+std::tuple<TString, TString, TString> ParseCloudSecurityToken(const TString& token);
class TProxyActor
: public TActorBootstrapped<TProxyActor>
diff --git a/ydb/core/ymq/actor/queue_leader.cpp b/ydb/core/ymq/actor/queue_leader.cpp
index 0b8d330405..2d9fecad7c 100644
--- a/ydb/core/ymq/actor/queue_leader.cpp
+++ b/ydb/core/ymq/actor/queue_leader.cpp
@@ -1701,7 +1701,7 @@ void TQueueLeader::CreateBackgroundActors() {
}
}
-void TQueueLeader::MarkInflyReloading(ui64 shard, size_t invalidatedCount, const TString& invalidationReason) {
+void TQueueLeader::MarkInflyReloading(ui64 shard, i64 invalidatedCount, const TString& invalidationReason) {
LWPROBE(InflyInvalidation, UserName_, QueueName_, shard, invalidatedCount, invalidationReason);
auto& shardInfo = Shards_[shard];
if (!shardInfo.NeedInflyReload) {
@@ -1915,35 +1915,40 @@ void TQueueLeader::OnAddedMessagesToInfly(ui64 shard, const TSqsEvents::TEvExecu
shardInfo.LastAddMessagesToInfly = TActivationContext::Now();
bool markInflyReloading = false;
- size_t inflyVersionDiff = 0;
+ i64 inflyVersionDiff = 0;
if (reply.GetStatus() == TEvTxUserProxy::TEvProposeTransactionStatus::EStatus::ExecComplete) {
using NKikimr::NClient::TValue;
const TValue val(TValue::Create(reply.GetExecutionEngineEvaluatedResponse()));
- const TValue list = val["messages"];
- for (size_t i = 0, size = list.Size(); i < size; ++i) {
- const TValue& message = list[i];
- const TValue& delayDeadlineValue = message["DelayDeadline"];
- const ui64 delayDeadlineMs = delayDeadlineValue.HaveValue() ? ui64(delayDeadlineValue) : 0;
- const TInstant delayDeadline = TInstant::MilliSeconds(delayDeadlineMs);
- const ui64 offset = message["Offset"];
- const ui32 receiveCount = 0; // as in transaction
- LOG_SQS_TRACE("Adding message to infly struct for shard " << TLogQueueName(UserName_, QueueName_, shard) << ": { Offset: " << offset << ", DelayDeadline: " << delayDeadline << ", ReceiveCount: " << receiveCount << " }");
- shardInfo.Infly->Add(MakeHolder<TInflyMessage>(offset, message["RandomId"], delayDeadline, receiveCount));
- }
- LWPROBE(AddMessagesToInfly, UserName_, QueueName_, shard, list.Size());
- shardInfo.ReadOffset = val["readOffset"];
const ui64 currentInflyVersion = val["currentInflyVersion"];
if (shardInfo.InflyVersion != currentInflyVersion) {
- Y_VERIFY(shardInfo.InflyVersion < currentInflyVersion);
- inflyVersionDiff = currentInflyVersion - shardInfo.InflyVersion;
+ inflyVersionDiff = i64(currentInflyVersion) - shardInfo.InflyVersion;
LOG_SQS_WARN("Concurrent infly version change detected for " << TLogQueueName(UserName_, QueueName_, shard) << ". Expected "
<< shardInfo.InflyVersion << ", but got: " << currentInflyVersion << ". Mark infly for reloading");
markInflyReloading = true;
}
- shardInfo.InflyVersion = val["newInflyVersion"];
+ if (shardInfo.InflyVersion > currentInflyVersion) {
+ LOG_SQS_ERROR("Skip added messages to inflight because infly version is outdated for " << TLogQueueName(UserName_, QueueName_, shard)
+ << ". Known " << shardInfo.InflyVersion << ", got " << currentInflyVersion);
+ } else {
+ shardInfo.InflyVersion = val["newInflyVersion"];
+
+ const TValue list = val["messages"];
+ for (size_t i = 0, size = list.Size(); i < size; ++i) {
+ const TValue& message = list[i];
+ const TValue& delayDeadlineValue = message["DelayDeadline"];
+ const ui64 delayDeadlineMs = delayDeadlineValue.HaveValue() ? ui64(delayDeadlineValue) : 0;
+ const TInstant delayDeadline = TInstant::MilliSeconds(delayDeadlineMs);
+ const ui64 offset = message["Offset"];
+ const ui32 receiveCount = 0; // as in transaction
+ LOG_SQS_TRACE("Adding message to infly struct for shard " << TLogQueueName(UserName_, QueueName_, shard) << ": { Offset: " << offset << ", DelayDeadline: " << delayDeadline << ", ReceiveCount: " << receiveCount << " }");
+ shardInfo.Infly->Add(MakeHolder<TInflyMessage>(offset, message["RandomId"], delayDeadline, receiveCount));
+ }
+ LWPROBE(AddMessagesToInfly, UserName_, QueueName_, shard, list.Size());
+ shardInfo.ReadOffset = val["readOffset"];
- // Update messages count
- shardInfo.MessagesCount = static_cast<ui64>(i64(val["messagesCount"]));
+ // Update messages count
+ shardInfo.MessagesCount = static_cast<ui64>(i64(val["messagesCount"]));
+ }
} else {
LOG_SQS_ERROR("Failed to add new messages to infly for " << TLogQueueName(UserName_, QueueName_, shard) << ": " << reply);
}
diff --git a/ydb/core/ymq/actor/queue_leader.h b/ydb/core/ymq/actor/queue_leader.h
index 2b6e6a0057..0f0fa172e7 100644
--- a/ydb/core/ymq/actor/queue_leader.h
+++ b/ydb/core/ymq/actor/queue_leader.h
@@ -90,7 +90,7 @@ private:
void AnswerFailed(TSqsEvents::TEvGetConfiguration::TPtr& ev);
void AskQueueAttributes();
void OnQueueAttributes(const TSqsEvents::TEvExecuted::TRecord& ev);
- void MarkInflyReloading(ui64 shard, size_t invalidatedCount, const TString& invalidationReason);
+ void MarkInflyReloading(ui64 shard, i64 invalidatedCount, const TString& invalidationReason);
void StartLoadingInfly();
void StartLoadingInfly(ui64 shard, bool afterFailure = false);
void OnInflyLoaded(ui64 shard, const TSqsEvents::TEvExecuted::TRecord& reply);
diff --git a/ydb/core/ymq/base/CMakeLists.darwin.txt b/ydb/core/ymq/base/CMakeLists.darwin.txt
index bf1fda0f31..bfb1045e25 100644
--- a/ydb/core/ymq/base/CMakeLists.darwin.txt
+++ b/ydb/core/ymq/base/CMakeLists.darwin.txt
@@ -24,6 +24,7 @@ target_link_libraries(core-ymq-base PUBLIC
ydb-core-base
ydb-core-protos
core-ymq-proto
+ core-kqp-common
ydb-library-aclib
library-http_proxy-authorization
library-http_proxy-error
diff --git a/ydb/core/ymq/base/CMakeLists.linux-aarch64.txt b/ydb/core/ymq/base/CMakeLists.linux-aarch64.txt
index 3885fba961..4342cefd96 100644
--- a/ydb/core/ymq/base/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/ymq/base/CMakeLists.linux-aarch64.txt
@@ -25,6 +25,7 @@ target_link_libraries(core-ymq-base PUBLIC
ydb-core-base
ydb-core-protos
core-ymq-proto
+ core-kqp-common
ydb-library-aclib
library-http_proxy-authorization
library-http_proxy-error
diff --git a/ydb/core/ymq/base/CMakeLists.linux.txt b/ydb/core/ymq/base/CMakeLists.linux.txt
index 3885fba961..4342cefd96 100644
--- a/ydb/core/ymq/base/CMakeLists.linux.txt
+++ b/ydb/core/ymq/base/CMakeLists.linux.txt
@@ -25,6 +25,7 @@ target_link_libraries(core-ymq-base PUBLIC
ydb-core-base
ydb-core-protos
core-ymq-proto
+ core-kqp-common
ydb-library-aclib
library-http_proxy-authorization
library-http_proxy-error
diff --git a/ydb/core/ymq/base/action.cpp b/ydb/core/ymq/base/action.cpp
index b601d72d87..36603a67b3 100644
--- a/ydb/core/ymq/base/action.cpp
+++ b/ydb/core/ymq/base/action.cpp
@@ -141,6 +141,28 @@ bool IsProxyAction(EAction action) {
#undef ACTION_CASE
}
+// Actions modifying a schema
+#define ENUMERATE_MODIFY_SCHEME_ACTIONS(macro) \
+ macro(CreateQueue) \
+ macro(CreateUser) \
+ macro(DeleteQueue) \
+ macro(DeleteQueueBatch) \
+ macro(DeleteUser) \
+ macro(ModifyPermissions)
+
+
+#define SQS_SWITCH_MODIFY_SCHEME_REQUEST(request, default_case) \
+ SQS_SWITCH_REQUEST_CUSTOM(request, ENUMERATE_MODIFY_SCHEME_ACTIONS, default_case)
+
+
+bool IsModifySchemaRequest(const NKikimrClient::TSqsRequest& req) {
+#define SQS_REQUEST_CASE(action) return true;
+
+ SQS_SWITCH_MODIFY_SCHEME_REQUEST(req, return false)
+
+#undef SQS_REQUEST_CASE
+}
+
} // namespace NKikimr::NSQS
template<>
diff --git a/ydb/core/ymq/base/action.h b/ydb/core/ymq/base/action.h
index ede7922dd1..9ad47c3925 100644
--- a/ydb/core/ymq/base/action.h
+++ b/ydb/core/ymq/base/action.h
@@ -1,5 +1,7 @@
#pragma once
+#include <ydb/core/protos/msgbus.pb.h>
+
#include <util/generic/string.h>
namespace NKikimr::NSQS {
@@ -48,9 +50,26 @@ bool IsActionForMessage(EAction action);
bool IsFastAction(EAction action);
bool IsPrivateAction(EAction action);
+bool IsModifySchemaRequest(const NKikimrClient::TSqsRequest& req);
+
// get nonbatch action variant for given action
EAction GetNonBatchAction(EAction action);
+#define SQS_REQUEST_CASE_WRAP(action) \
+ case NKikimrClient::TSqsRequest::Y_CAT(k, action): { \
+ SQS_REQUEST_CASE(action) \
+ break; \
+ }
+
+// DO NOT proxy account creation or queue listing
+
+#define SQS_SWITCH_REQUEST_CUSTOM(request, enumerate, default_case) \
+ switch ((request).GetRequestCase()) { \
+ enumerate(SQS_REQUEST_CASE_WRAP) \
+ default: \
+ default_case; \
+ }
+
// Actions with proxy
#define ENUMERATE_PROXY_ACTIONS(macro) \
macro(ChangeMessageVisibility) \
diff --git a/ydb/core/ymq/base/counters.cpp b/ydb/core/ymq/base/counters.cpp
index 8bbdf5613c..87061d8d73 100644
--- a/ydb/core/ymq/base/counters.cpp
+++ b/ydb/core/ymq/base/counters.cpp
@@ -970,6 +970,14 @@ void TCloudAuthCounters::IncCounter(const NCloudAuth::EActionType actionType, co
++*CloudAuthCounters[actionType][credentialType][grpcStatus];
}
+void TCloudAuthCounters::IncAuthorizeCounter(const NCloudAuth::ECredentialType credentialType, bool error) {
+ if (error) {
+ ++*AuthorizeError[credentialType];
+ } else {
+ ++*AuthorizeSuccess[credentialType];
+ }
+}
+
void TCloudAuthCounters::InitCounters(TIntrusivePtr<::NMonitoring::TDynamicCounters> cloudAuthCounters) {
for (size_t actionType = 0; actionType < NCloudAuth::EActionType::ActionTypesCount; ++actionType) {
const auto actionTypeStr = ToString(static_cast<NCloudAuth::EActionType>(actionType));
@@ -977,8 +985,14 @@ void TCloudAuthCounters::InitCounters(TIntrusivePtr<::NMonitoring::TDynamicCount
for (size_t credentialType = 0; credentialType < NCloudAuth::ECredentialType::CredentialTypesCount; ++credentialType) {
const auto credentialTypeStr = ToString(static_cast<NCloudAuth::ECredentialType>(credentialType));
const auto actionAndCredentialCounters = actionCounters->GetSubgroup("credential_type", credentialTypeStr);
- for (size_t grpcStatus = 0; grpcStatus < GRPC_STATUSES_COUNT; ++grpcStatus) {
- INIT_COUNTER_WITH_NAME(actionAndCredentialCounters, CloudAuthCounters[actionType][credentialType][grpcStatus], StringifyGrpcStatus(grpcStatus), ELifetime::Persistent, EValueType::Derivative, Lazy(*Cfg));
+
+ if (actionType == NCloudAuth::EActionType::Authorize) {
+ INIT_COUNTER_WITH_NAME(actionAndCredentialCounters, AuthorizeSuccess[credentialType], "Ok", ELifetime::Persistent, EValueType::Derivative, Lazy(*Cfg));
+ INIT_COUNTER_WITH_NAME(actionAndCredentialCounters, AuthorizeError[credentialType], "PermissionDenied", ELifetime::Persistent, EValueType::Derivative, Lazy(*Cfg));
+ } else {
+ for (size_t grpcStatus = 0; grpcStatus < GRPC_STATUSES_COUNT; ++grpcStatus) {
+ INIT_COUNTER_WITH_NAME(actionAndCredentialCounters, CloudAuthCounters[actionType][credentialType][grpcStatus], StringifyGrpcStatus(grpcStatus), ELifetime::Persistent, EValueType::Derivative, Lazy(*Cfg));
+ }
}
}
}
diff --git a/ydb/core/ymq/base/counters.h b/ydb/core/ymq/base/counters.h
index 7dda5ff14a..8798118416 100644
--- a/ydb/core/ymq/base/counters.h
+++ b/ydb/core/ymq/base/counters.h
@@ -794,6 +794,7 @@ struct TCloudAuthCounters {
}
void IncCounter(const NCloudAuth::EActionType actionType, const NCloudAuth::ECredentialType credentialType, int grpcStatus);
+ void IncAuthorizeCounter(const NCloudAuth::ECredentialType credentialType, bool error);
static constexpr int GRPC_STATUSES_COUNT = 18;
@@ -805,6 +806,8 @@ private:
TLazyCachedCounter CloudAuthCounters[NCloudAuth::EActionType::ActionTypesCount] // 3 types.
[NCloudAuth::ECredentialType::CredentialTypesCount] // 2 types.
[GRPC_STATUSES_COUNT]; // 18 types.
+ TLazyCachedCounter AuthorizeSuccess[NCloudAuth::ECredentialType::CredentialTypesCount];
+ TLazyCachedCounter AuthorizeError[NCloudAuth::ECredentialType::CredentialTypesCount];
};
// Metering counters in SQS core subsystem.
diff --git a/ydb/core/yq/libs/init/init.cpp b/ydb/core/yq/libs/init/init.cpp
index 87b63d46e6..2538d08a05 100644
--- a/ydb/core/yq/libs/init/init.cpp
+++ b/ydb/core/yq/libs/init/init.cpp
@@ -201,7 +201,7 @@ void Init(
NYql::NDqs::TLocalWorkerManagerOptions lwmOptions;
lwmOptions.Counters = workerManagerCounters;
lwmOptions.DqTaskCounters = protoConfig.GetEnableTaskCounters() ? appData->Counters->GetSubgroup("counters", "dq_tasks") : nullptr;
- lwmOptions.Factory = NYql::NTaskRunnerProxy::CreateFactory(appData->FunctionRegistry, dqCompFactory, dqTaskTransformFactory, false);
+ lwmOptions.Factory = NYql::NTaskRunnerProxy::CreateFactory(appData->FunctionRegistry, dqCompFactory, dqTaskTransformFactory, nullptr, false);
lwmOptions.AsyncIoFactory = asyncIoFactory;
lwmOptions.FunctionRegistry = appData->FunctionRegistry;
lwmOptions.TaskRunnerInvokerFactory = new NYql::NDqs::TTaskRunnerInvokerFactory();
diff --git a/ydb/core/yq/libs/logs/log.cpp b/ydb/core/yq/libs/logs/log.cpp
index 18e5faee5d..65371ef058 100644
--- a/ydb/core/yq/libs/logs/log.cpp
+++ b/ydb/core/yq/libs/logs/log.cpp
@@ -78,6 +78,10 @@ private:
LogConfig.Swap(event.MutableConfig()->MutableLogConfig());
UpdateYqlLogLevels();
+
+ auto resp = MakeHolder<NConsole::TEvConsole::TEvConfigNotificationResponse>(event);
+
+ Send(ev->Sender, resp.Release(), 0, ev->Cookie);
}
void UpdateYqlLogLevels() {
diff --git a/ydb/core/yq/libs/result_formatter/result_formatter.cpp b/ydb/core/yq/libs/result_formatter/result_formatter.cpp
index dde4ac6886..736c7292c4 100644
--- a/ydb/core/yq/libs/result_formatter/result_formatter.cpp
+++ b/ydb/core/yq/libs/result_formatter/result_formatter.cpp
@@ -331,6 +331,7 @@ template <typename F>
NJson::TJsonValue GenericFormatColumnValue(
const NYdb::TValue& value,
NKikimr::NMiniKQL::TType* type,
+ const TTypeEnvironment& typeEnv,
const THolderFactory& holderFactory,
F f)
{
@@ -353,6 +354,7 @@ NJson::TJsonValue GenericFormatColumnValue(
auto unboxed = ImportValueFromProto(
type,
rawProtoValue,
+ typeEnv,
holderFactory);
return f(unboxed);
@@ -361,9 +363,10 @@ NJson::TJsonValue GenericFormatColumnValue(
NJson::TJsonValue FormatColumnValue(
const NYdb::TValue& value,
NKikimr::NMiniKQL::TType* type,
+ const TTypeEnvironment& typeEnv,
const THolderFactory& holderFactory)
{
- return GenericFormatColumnValue(value, type, holderFactory, [type](auto unboxed) {
+ return GenericFormatColumnValue(value, type, typeEnv, holderFactory, [type](auto unboxed) {
NJson::TJsonValue v;
NJson::ReadJsonTree(
NJson2Yson::ConvertYson2Json(NYql::NCommon::WriteYsonValue(unboxed, type)),
@@ -375,6 +378,7 @@ NJson::TJsonValue FormatColumnValue(
NJson::TJsonValue FormatColumnPrettyValue(
const NYdb::TValue& value,
NKikimr::NMiniKQL::TType* type,
+ const TTypeEnvironment& typeEnv,
const THolderFactory& holderFactory)
{
@@ -382,7 +386,7 @@ NJson::TJsonValue FormatColumnPrettyValue(
static const TValueConvertPolicy convertPolicy{ UNSAFE_NUMBER_AS_STRING };
- return GenericFormatColumnValue(value, type, holderFactory, [type](auto unboxed) {
+ return GenericFormatColumnValue(value, type, typeEnv, holderFactory, [type](auto unboxed) {
NJson::TJsonValue v;
TStringStream out;
NJson::TJsonWriter jsonWriter(&out, MakeJsonConfig());
@@ -440,8 +444,8 @@ void FormatResultSet(NJson::TJsonValue& root, const NYdb::TResultSet& resultSet,
for (size_t columnNum = 0; columnNum < columnsMeta.size(); ++columnNum) {
const NYdb::TColumn& columnMeta = columnsMeta[columnNum];
NJson::TJsonValue v = prettyValueFormat
- ? FormatColumnPrettyValue(rsParser.GetValue(columnNum), columnTypes[columnNum].MiniKQLType, holderFactory)
- : FormatColumnValue(rsParser.GetValue(columnNum), columnTypes[columnNum].MiniKQLType, holderFactory);
+ ? FormatColumnPrettyValue(rsParser.GetValue(columnNum), columnTypes[columnNum].MiniKQLType, typeEnv, holderFactory)
+ : FormatColumnValue(rsParser.GetValue(columnNum), columnTypes[columnNum].MiniKQLType, typeEnv, holderFactory);
if (prettyValueFormat) {
row.AppendValue(std::move(v));
} else {
diff --git a/ydb/library/aclib/aclib.cpp b/ydb/library/aclib/aclib.cpp
index b04fcd0a9c..cdeb7dbb79 100644
--- a/ydb/library/aclib/aclib.cpp
+++ b/ydb/library/aclib/aclib.cpp
@@ -64,6 +64,11 @@ TUserToken::TUserToken(NACLibProto::TUserToken&& token) {
TUserToken::TUserToken(const TString& token) {
Y_VERIFY(ParseFromString(token));
+ Serialized_ = token;
+}
+
+const TString& TUserToken::GetSerializedToken() const {
+ return Serialized_;
}
bool TUserToken::IsExist(const TSID& someSID) const {
@@ -103,6 +108,10 @@ TString TUserToken::SerializeAsString() const {
return NACLibProto::TUserToken::SerializeAsString();
}
+void TUserToken::SaveSerializationInfo() {
+ Serialized_ = SerializeAsString();
+}
+
TSID TUserToken::GetUserFromVector(const TVector<TSID>& userAndGroupSIDs) {
return userAndGroupSIDs.empty() ? TSID() : userAndGroupSIDs.front();
}
diff --git a/ydb/library/aclib/aclib.h b/ydb/library/aclib/aclib.h
index a3bbba19e1..928f838ef4 100644
--- a/ydb/library/aclib/aclib.h
+++ b/ydb/library/aclib/aclib.h
@@ -87,14 +87,16 @@ public:
TUserToken(const TString& originalUserToken, const TSID& userSID, const TVector<TSID>& groupSIDs);
TUserToken(const NACLibProto::TUserToken& token);
TUserToken(NACLibProto::TUserToken&& token);
- TUserToken(const TString& token);
+ explicit TUserToken(const TString& token);
bool IsExist(const TSID& someSID) const; // check for presence of SID specified in the token
TSID GetUserSID() const;
TVector<TSID> GetGroupSIDs() const;
TString GetOriginalUserToken() const;
TString SerializeAsString() const;
+ void SaveSerializationInfo();
void AddGroupSID(const TSID& groupSID);
bool IsSystemUser() const;
+ const TString& GetSerializedToken() const;
using NACLibProto::TUserToken::ShortDebugString;
@@ -102,6 +104,8 @@ protected:
static TSID GetUserFromVector(const TVector<TSID>& userAndGroupSIDs);
static TVector<TSID> GetGroupsFromVector(const TVector<TSID>& userAndGroupSIDs);
void SetGroupSIDs(const TVector<TString>& groupSIDs);
+private:
+ TString Serialized_;
};
class TACL : public NACLibProto::TACL {
diff --git a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionAvg.h b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionAvg.h
index 598afb54a3..508abe059f 100644
--- a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionAvg.h
+++ b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionAvg.h
@@ -119,16 +119,17 @@ public:
size_t row_end,
AggregateDataPtr __restrict place,
const IColumn ** columns,
- Arena *,
- ssize_t if_argument_pos) const final
+ Arena *) const final
{
AggregateFunctionSumData<Numerator> sum_data;
const auto & column = assert_cast<const ColumnType &>(*columns[0]);
- if (if_argument_pos >= 0)
+ if (auto * flags = column.null_bitmap_data())
{
- const auto & flags = assert_cast<const ColumnUInt8 &>(*columns[if_argument_pos]).raw_values();
- sum_data.addManyConditional(column.raw_values(), flags, row_begin, row_end);
- this->data(place).denominator += countBytesInFilter(flags, row_begin, row_end);
+ auto * condition_map = flags + column.offset();
+ auto length = row_end - row_begin;
+
+ sum_data.addManyConditional(column.raw_values(), condition_map, row_begin, row_end);
+ this->data(place).denominator += arrow::internal::CountSetBits(condition_map, row_begin, length);
}
else
{
diff --git a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionCount.h b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionCount.h
index 0994cadc1f..d7157f31e4 100644
--- a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionCount.h
+++ b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionCount.h
@@ -46,14 +46,14 @@ public:
size_t row_end,
AggregateDataPtr __restrict place,
const IColumn ** columns,
- Arena *,
- ssize_t if_argument_pos) const override
+ Arena *) const override
{
- if (if_argument_pos >= 0)
+ const auto & column = *columns[0];
+ if (auto * flags = column.null_bitmap_data())
{
- const auto & filter_column = assert_cast<const ColumnUInt8 &>(*columns[if_argument_pos]);
- const auto & flags = filter_column.raw_values();
- data(place).count += countBytesInFilter(flags, row_begin, row_end);
+ auto * condition_map = flags + column.offset();
+ auto length = row_end - row_begin;
+ data(place).count += arrow::internal::CountSetBits(condition_map, row_begin, length);
}
else
{
@@ -70,12 +70,6 @@ public:
{
assert_cast<MutableColumnUInt64 &>(to).Append(data(place).count).ok();
}
-
- /// Reset the state to specified value. This function is not the part of common interface.
- void set(AggregateDataPtr __restrict place, UInt64 new_count) const
- {
- data(place).count = new_count;
- }
};
class WrappedCount final : public ArrowAggregateFunctionWrapper
diff --git a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionMinMaxAny.h b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionMinMaxAny.h
index c8ce2884c7..f323ea50d2 100644
--- a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionMinMaxAny.h
+++ b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionMinMaxAny.h
@@ -38,7 +38,7 @@ public:
if (has())
assert_cast<MutableColumnType &>(to).Append(value).ok();
else
- assert_cast<MutableColumnType &>(to).AppendEmptyValue().ok();
+ assert_cast<MutableColumnType &>(to).AppendNull().ok();
}
void change(const IColumn & column, size_t row_num, Arena *)
@@ -201,7 +201,7 @@ public:
if (has())
assert_cast<MutableColumnType &>(to).Append(getData(), size).ok();
else
- assert_cast<MutableColumnType &>(to).AppendEmptyValue().ok();
+ assert_cast<MutableColumnType &>(to).AppendNull().ok();
}
/// Assuming to.has()
@@ -572,20 +572,20 @@ public:
size_t row_end,
AggregateDataPtr place,
const IColumn ** columns,
- Arena * arena,
- ssize_t if_argument_pos) const override
+ Arena * arena) const override
{
if constexpr (is_any)
if (this->data(place).has())
return;
- if (if_argument_pos >= 0)
+
+ const auto & column = *columns[0];
+ if (column.null_bitmap_data())
{
- const auto & flags = assert_cast<const ColumnUInt8 &>(*columns[if_argument_pos]).raw_values();
for (size_t i = row_begin; i < row_end; ++i)
{
- if (flags[i])
+ if (column.IsValid(i))
{
- this->data(place).changeIfBetter(*columns[0], i, arena);
+ this->data(place).changeIfBetter(column, i, arena);
if constexpr (is_any)
break;
}
@@ -595,7 +595,7 @@ public:
{
for (size_t i = row_begin; i < row_end; ++i)
{
- this->data(place).changeIfBetter(*columns[0], i, arena);
+ this->data(place).changeIfBetter(column, i, arena);
if constexpr (is_any)
break;
}
diff --git a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionSum.h b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionSum.h
index f539323d6a..575c627a19 100644
--- a/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionSum.h
+++ b/ydb/library/arrow_clickhouse/AggregateFunctions/AggregateFunctionSum.h
@@ -33,9 +33,16 @@ struct AggregateFunctionSumData
{
using Impl = AggregateFunctionSumAddOverflowImpl<T>;
T sum{};
+ bool has_value = false;
+
+ bool has() const
+ {
+ return has_value;
+ }
void NO_SANITIZE_UNDEFINED ALWAYS_INLINE add(T value)
{
+ has_value = true;
Impl::add(sum, value);
}
@@ -84,7 +91,7 @@ struct AggregateFunctionSumData
{
addManyImpl(ptr, start, end);
}
-
+#if 0
template <typename Value, bool add_if_zero>
void NO_SANITIZE_UNDEFINED NO_INLINE addManyConditionalInternalImpl(
const Value * __restrict ptr,
@@ -172,7 +179,34 @@ struct AggregateFunctionSumData
{
return addManyConditionalInternal<Value, false>(ptr, cond_map, start, end);
}
+#else
+ template <typename Value>
+ void NO_SANITIZE_UNDEFINED NO_INLINE addManyConditionalImpl(
+ const Value * __restrict ptr,
+ const uint8_t * __restrict condition_map,
+ size_t start,
+ size_t end) /// NOLINT
+ {
+ // TODO: optimize
+
+ const auto * end_ptr = ptr + end;
+ ptr += start;
+ while (ptr < end_ptr)
+ {
+ if (arrow::BitUtil::GetBit(condition_map, start))
+ Impl::add(sum, *ptr);
+ ++ptr;
+ ++start;
+ }
+ }
+
+ template <typename Value>
+ void ALWAYS_INLINE addManyConditional(const Value * __restrict ptr, const uint8_t * __restrict cond_map, size_t start, size_t end)
+ {
+ return addManyConditionalImpl<Value>(ptr, cond_map, start, end);
+ }
+#endif
void NO_SANITIZE_UNDEFINED merge(const AggregateFunctionSumData & rhs)
{
Impl::add(sum, rhs.sum);
@@ -219,14 +253,13 @@ public:
size_t row_end,
AggregateDataPtr __restrict place,
const IColumn ** columns,
- Arena *,
- ssize_t if_argument_pos) const override
+ Arena *) const override
{
const auto & column = assert_cast<const ColumnType &>(*columns[0]);
- if (if_argument_pos >= 0)
+ if (auto * flags = column.null_bitmap_data())
{
- const auto & flags = assert_cast<const ColumnUInt8 &>(*columns[if_argument_pos]).raw_values();
- this->data(place).addManyConditional(column.raw_values(), flags, row_begin, row_end);
+ auto * condition_map = flags + column.offset();
+ this->data(place).addManyConditional(column.raw_values(), condition_map, row_begin, row_end);
}
else
{
@@ -241,7 +274,10 @@ public:
void insertResultInto(AggregateDataPtr __restrict place, MutableColumn & to, Arena *) const override
{
- assert_cast<MutableColumnType &>(to).Append(this->data(place).get()).ok();
+ if (this->data(place).has())
+ assert_cast<MutableColumnType &>(to).Append(this->data(place).get()).ok();
+ else
+ assert_cast<MutableColumnType &>(to).AppendNull().ok();
}
};
diff --git a/ydb/library/arrow_clickhouse/AggregateFunctions/IAggregateFunction.h b/ydb/library/arrow_clickhouse/AggregateFunctions/IAggregateFunction.h
index e6b753d95d..f4f21463a1 100644
--- a/ydb/library/arrow_clickhouse/AggregateFunctions/IAggregateFunction.h
+++ b/ydb/library/arrow_clickhouse/AggregateFunctions/IAggregateFunction.h
@@ -117,8 +117,7 @@ public:
AggregateDataPtr * places,
size_t place_offset,
const IColumn ** columns,
- Arena * arena,
- ssize_t if_argument_pos = -1) const = 0;
+ Arena * arena) const = 0;
virtual void mergeBatch(
size_t row_begin,
@@ -135,8 +134,7 @@ public:
size_t row_end,
AggregateDataPtr __restrict place,
const IColumn ** columns,
- Arena * arena,
- ssize_t if_argument_pos = -1) const = 0;
+ Arena * arena) const = 0;
/** The case when the aggregation key is UInt8
* and pointers to aggregation states are stored in AggregateDataPtr[256] lookup table.
@@ -204,15 +202,13 @@ public:
AggregateDataPtr * places,
size_t place_offset,
const IColumn ** columns,
- Arena * arena,
- ssize_t if_argument_pos = -1) const override
+ Arena * arena) const override
{
- if (if_argument_pos >= 0)
+ if (columns && columns[0]->null_bitmap_data())
{
- const auto & flags = assert_cast<const ColumnUInt8 &>(*columns[if_argument_pos]).raw_values();
for (size_t i = row_begin; i < row_end; ++i)
{
- if (flags[i] && places[i])
+ if (columns[0]->IsValid(i) && places[i])
static_cast<const Derived *>(this)->add(places[i] + place_offset, columns, i, arena);
}
}
@@ -242,15 +238,13 @@ public:
size_t row_end,
AggregateDataPtr __restrict place,
const IColumn ** columns,
- Arena * arena,
- ssize_t if_argument_pos = -1) const override
+ Arena * arena) const override
{
- if (if_argument_pos >= 0)
+ if (columns && columns[0]->null_bitmap_data())
{
- const auto & flags = assert_cast<const ColumnUInt8 &>(*columns[if_argument_pos]).raw_values();
for (size_t i = row_begin; i < row_end; ++i)
{
- if (flags[i])
+ if (columns[0]->IsValid(i))
static_cast<const Derived *>(this)->add(place, columns, i, arena);
}
}
diff --git a/ydb/library/arrow_clickhouse/Columns/ColumnsCommon.cpp b/ydb/library/arrow_clickhouse/Columns/ColumnsCommon.cpp
index a3ac4e692f..6a2a885850 100644
--- a/ydb/library/arrow_clickhouse/Columns/ColumnsCommon.cpp
+++ b/ydb/library/arrow_clickhouse/Columns/ColumnsCommon.cpp
@@ -259,27 +259,27 @@ bool insertData(MutableColumn & column, const StringRef & value)
switch (column.type()->id())
{
case arrow::Type::UINT8:
- return insertNumber(column, *reinterpret_cast<const UInt8 *>(value.data));
+ return insertNumber(column, unalignedLoad<UInt8>(value.data));
case arrow::Type::UINT16:
- return insertNumber(column, *reinterpret_cast<const UInt16 *>(value.data));
+ return insertNumber(column, unalignedLoad<UInt16>(value.data));
case arrow::Type::UINT32:
- return insertNumber(column, *reinterpret_cast<const UInt32 *>(value.data));
+ return insertNumber(column, unalignedLoad<UInt32>(value.data));
case arrow::Type::UINT64:
- return insertNumber(column, *reinterpret_cast<const UInt64 *>(value.data));
+ return insertNumber(column, unalignedLoad<UInt64>(value.data));
case arrow::Type::INT8:
- return insertNumber(column, *reinterpret_cast<const Int8 *>(value.data));
+ return insertNumber(column, unalignedLoad<Int8>(value.data));
case arrow::Type::INT16:
- return insertNumber(column, *reinterpret_cast<const Int16 *>(value.data));
+ return insertNumber(column, unalignedLoad<Int16>(value.data));
case arrow::Type::INT32:
- return insertNumber(column, *reinterpret_cast<const Int32 *>(value.data));
+ return insertNumber(column, unalignedLoad<Int32>(value.data));
case arrow::Type::INT64:
- return insertNumber(column, *reinterpret_cast<const Int64 *>(value.data));
+ return insertNumber(column, unalignedLoad<Int64>(value.data));
case arrow::Type::FLOAT:
- return insertNumber(column, *reinterpret_cast<const float *>(value.data));
+ return insertNumber(column, unalignedLoad<float>(value.data));
case arrow::Type::DOUBLE:
- return insertNumber(column, *reinterpret_cast<const double *>(value.data));
+ return insertNumber(column, unalignedLoad<double>(value.data));
case arrow::Type::FIXED_SIZE_BINARY:
return insertFixedString(column, value);
@@ -289,9 +289,9 @@ bool insertData(MutableColumn & column, const StringRef & value)
return insertString(column, value);
case arrow::Type::TIMESTAMP:
- return insertTimestamp(column, *reinterpret_cast<const Int64 *>(value.data));
+ return insertTimestamp(column, unalignedLoad<Int64>(value.data));
case arrow::Type::DURATION:
- return insertDuration(column, *reinterpret_cast<const Int64 *>(value.data));
+ return insertDuration(column, unalignedLoad<Int64>(value.data));
case arrow::Type::DECIMAL:
return insertDecimal(column, value);
diff --git a/ydb/library/arrow_clickhouse/arrow_clickhouse_types.h b/ydb/library/arrow_clickhouse/arrow_clickhouse_types.h
index 9142899fb1..493280e862 100644
--- a/ydb/library/arrow_clickhouse/arrow_clickhouse_types.h
+++ b/ydb/library/arrow_clickhouse/arrow_clickhouse_types.h
@@ -10,6 +10,7 @@
#include <contrib/libs/apache/arrow/cpp/src/arrow/api.h>
#include <contrib/libs/apache/arrow/cpp/src/arrow/compute/api.h>
+#include <contrib/libs/apache/arrow/cpp/src/arrow/util/bitmap.h>
#include <common/StringRef.h>
#include <common/extended_types.h>
diff --git a/ydb/library/arrow_kernels/operations.h b/ydb/library/arrow_kernels/operations.h
index 02f04ce75f..f9dafc4b50 100644
--- a/ydb/library/arrow_kernels/operations.h
+++ b/ydb/library/arrow_kernels/operations.h
@@ -52,6 +52,9 @@ enum class EOperation {
//
BinaryLength,
MatchSubstring,
+ MatchLike,
+ StartsWith,
+ EndsWith,
// math
Acosh,
Atanh,
diff --git a/ydb/library/mkql_proto/mkql_proto.cpp b/ydb/library/mkql_proto/mkql_proto.cpp
index a88e95785d..c1b5abea1d 100644
--- a/ydb/library/mkql_proto/mkql_proto.cpp
+++ b/ydb/library/mkql_proto/mkql_proto.cpp
@@ -1375,7 +1375,8 @@ TType* TProtoImporter::ImportTypeFromProto(const Ydb::Type& input) {
Y_FORCE_INLINE void CheckTypeId(i32 id, i32 expected, std::string_view typeName) {
if (id != expected) {
- throw yexception() << "Invalid value representation for type: " << typeName;
+ throw yexception() << "Invalid value representation for type: " << typeName
+ << ", expected value case: " << expected << ", but current: " << id;
}
}
@@ -1543,14 +1544,45 @@ NUdf::TUnboxedValue TProtoImporter::ImportValueFromProto(const TType* type, cons
return KindDataImport(type, value);
case TType::EKind::Optional: {
- const TOptionalType* optionalType = static_cast<const TOptionalType*>(type);
- switch (value.value_case()) {
- case Ydb::Value::kNestedValue:
- return ImportValueFromProto(optionalType->GetItemType(), value.nested_value(), factory).MakeOptional();
- case Ydb::Value::kNullFlagValue:
- return NUdf::TUnboxedValue();
- default:
- return ImportValueFromProto(optionalType->GetItemType(), value, factory).MakeOptional();
+ const TType* innerType = type;
+ const Ydb::Value* innerValue = &value;
+ ui32 level = 0;
+ ui32 nestLevel = 0;
+ while(innerType->GetKind() == TType::EKind::Optional) {
+ const TOptionalType* optionalType = static_cast<const TOptionalType*>(innerType);
+ innerType = optionalType->GetItemType();
+ ++level;
+ if (innerValue->value_case() == Ydb::Value::kNestedValue) {
+ innerValue = &(innerValue->nested_value());
+ ++nestLevel;
+ }
+ }
+
+ const Ydb::Value* tmpValue = innerValue;
+ while(tmpValue->value_case() == Ydb::Value::kNestedValue) {
+ tmpValue = &(tmpValue->nested_value());
+ }
+
+ if (innerType->GetKind() == TType::EKind::Variant) {
+ if (tmpValue->value_case() == Ydb::Value::kNullFlagValue) {
+ auto res = ImportValueFromProto(innerType, *innerValue, factory);
+ while (level-->0) { res = res.MakeOptional(); }
+ return res;
+ }
+ auto res = ImportValueFromProto(innerType, value, factory);
+ while (level-->0) { res = res.MakeOptional(); }
+ return res;
+ } else {
+ MKQL_ENSURE(innerValue->value_case() != Ydb::Value::kNestedValue, "unexpected nested value");
+ if (innerValue->value_case() != Ydb::Value::kNullFlagValue) {
+ auto res = ImportValueFromProto(innerType, *innerValue, factory);
+ while (level-->0) { res = res.MakeOptional(); }
+ return res;
+ } else {
+ auto res = NUdf::TUnboxedValue();
+ while (nestLevel-->0) { res = res.MakeOptional(); }
+ return res;
+ }
}
}
@@ -1564,7 +1596,7 @@ NUdf::TUnboxedValue TProtoImporter::ImportValueFromProto(const TType* type, cons
*items++ = ImportValueFromProto(itemType, x, factory);
}
- return std::move(array);
+ return array;
}
case TType::EKind::Struct: {
@@ -1572,25 +1604,31 @@ NUdf::TUnboxedValue TProtoImporter::ImportValueFromProto(const TType* type, cons
NUdf::TUnboxedValue* itemsPtr = nullptr;
auto res = factory.CreateDirectArrayHolder(structType->GetMembersCount(), itemsPtr);
TRemapArray remap = TRemapArray::FromCookie(structType->GetCookie());
+ MKQL_ENSURE((ui32)value.items_size() == structType->GetMembersCount(),
+ "Member size mismatch. members in value: " << value.items_size()
+ << ", members in type: " << structType->GetMembersCount());
for (ui32 index = 0; index < structType->GetMembersCount(); ++index) {
ui32 remapped = remap.empty() ? index : remap[index];
auto memberType = structType->GetMemberType(index);
itemsPtr[index] = ImportValueFromProto(memberType, value.items(remapped), factory);
}
- return std::move(res);
+ return res;
}
case TType::EKind::Tuple: {
const TTupleType* tupleType = static_cast<const TTupleType*>(type);
NUdf::TUnboxedValue* itemsPtr = nullptr;
auto res = factory.CreateDirectArrayHolder(tupleType->GetElementsCount(), itemsPtr);
+ MKQL_ENSURE_S((ui32)value.items_size() == tupleType->GetElementsCount(),
+ "Elements size mismatch. Elements in value: " << value.items_size()
+ << ", elements in type: " << tupleType->GetElementsCount());
for (ui32 index = 0; index < tupleType->GetElementsCount(); ++index) {
auto elementType = tupleType->GetElementType(index);
itemsPtr[index] = ImportValueFromProto(elementType, value.items(index), factory);
}
- return std::move(res);
+ return res;
}
case TType::EKind::Dict: {
@@ -1606,21 +1644,27 @@ NUdf::TUnboxedValue TProtoImporter::ImportValueFromProto(const TType* type, cons
);
}
- return std::move(dictBuilder->Build());
+ return dictBuilder->Build();
}
case TType::EKind::Variant: {
const TVariantType* variantType = static_cast<const TVariantType*>(type);
auto index = value.variant_index();
- auto unboxedValue = ImportValueFromProto(variantType->GetAlternativeType(index), value, factory);
- auto res = factory.CreateVariantHolder(std::move(unboxedValue.Release()), index);
- return std::move(res);
+ MKQL_ENSURE_S(index < variantType->GetAlternativesCount(), "type has " << variantType->GetAlternativesCount()
+ << " alternatives, but requested " << index);
+ auto alternative = variantType->GetAlternativeType(index);
+ if (value.value_case() == Ydb::Value::kNestedValue) {
+ auto unboxedValue = ImportValueFromProto(alternative, value.nested_value(), factory);
+ return factory.CreateVariantHolder(std::move(unboxedValue.Release()), index);
+ }
+ auto unboxedValue = ImportValueFromProto(alternative, value, factory);
+ return factory.CreateVariantHolder(std::move(unboxedValue.Release()), index);
}
case TType::EKind::Tagged: {
const TTaggedType* taggedType = static_cast<const TTaggedType*>(type);
auto unboxedValue = ImportValueFromProto(taggedType->GetBaseType(), value, factory);
- return std::move(unboxedValue);
+ return unboxedValue;
}
case TType::EKind::Pg:
@@ -1740,6 +1784,15 @@ std::pair<TType*, NUdf::TUnboxedValue> ImportValueFromProto(const Ydb::Type& typ
return {nodeType, unboxedValue};
}
+NUdf::TUnboxedValue ImportValueFromProto(TType* type,
+ const Ydb::Value& value, const TTypeEnvironment& env, const THolderFactory& factory)
+{
+ TProtoImporter importer(env);
+ auto unboxedValue = importer.ImportValueFromProto(type, value, factory);
+ return unboxedValue;
+
+}
+
TType* ImportTypeFromProto(const NKikimrMiniKQL::TType& type, const TTypeEnvironment& env) {
TProtoImporter importer(env);
return importer.ImportTypeFromProto(type);
diff --git a/ydb/library/mkql_proto/mkql_proto.h b/ydb/library/mkql_proto/mkql_proto.h
index 3514d2a297..44d8003cfc 100644
--- a/ydb/library/mkql_proto/mkql_proto.h
+++ b/ydb/library/mkql_proto/mkql_proto.h
@@ -22,6 +22,8 @@ TType* ImportTypeFromProto(const NKikimrMiniKQL::TType& type, const TTypeEnviron
std::pair<TType*, NUdf::TUnboxedValue> ImportValueFromProto(const Ydb::Type& type, const Ydb::Value& value,
const TTypeEnvironment& env, const THolderFactory& factory);
+NUdf::TUnboxedValue ImportValueFromProto(TType* type, const Ydb::Value& value,
+ const TTypeEnvironment& env, const THolderFactory& factory);
std::pair<TType*, NUdf::TUnboxedValue> ImportValueFromProto(const NKikimrMiniKQL::TType& type, const NKikimrMiniKQL::TValue& value,
const TTypeEnvironment& env, const THolderFactory& factory);
TRuntimeNode ImportValueFromProto(const NKikimrMiniKQL::TType& type, const NKikimrMiniKQL::TValue& value,
diff --git a/ydb/library/persqueue/topic_parser/counters.cpp b/ydb/library/persqueue/topic_parser/counters.cpp
index 5f78745bde..479812b04f 100644
--- a/ydb/library/persqueue/topic_parser/counters.cpp
+++ b/ydb/library/persqueue/topic_parser/counters.cpp
@@ -37,14 +37,14 @@ TVector<TPQLabelsInfo> GetLabels(const TTopicConverterPtr& topic)
return GetLabelsForCustomCluster(topic, topic->GetCluster());
}
-TVector<TPQLabelsInfo> GetLabelsForTopic(const TTopicConverterPtr& topic, const TString& cloudId,
+TVector<std::pair<TString, TString>> GetSubgroupsForTopic(const TTopicConverterPtr& topic, const TString& cloudId,
const TString& dbId, const TString& dbPath, const TString& folderId) {
- TVector<TPQLabelsInfo> res = {
- {{{"database", dbPath}}, {dbPath}},
- {{{"cloud_id", cloudId}}, {cloudId}},
- {{{"folder_id", folderId}}, {folderId}},
- {{{"database_id", dbId}}, {dbId}},
- {{{"topic", topic->GetClientsideName()}}, {topic->GetClientsideName()}}};
+ TVector<std::pair<TString, TString>> res = {
+ {"database", dbPath},
+ {"cloud_id", cloudId},
+ {"folder_id", folderId},
+ {"database_id", dbId},
+ {"topic", topic->GetClientsideName()}};
return res;
}
diff --git a/ydb/library/persqueue/topic_parser/counters.h b/ydb/library/persqueue/topic_parser/counters.h
index 5457287521..8367e10f82 100644
--- a/ydb/library/persqueue/topic_parser/counters.h
+++ b/ydb/library/persqueue/topic_parser/counters.h
@@ -9,7 +9,7 @@ namespace NPersQueue {
TVector<NPersQueue::TPQLabelsInfo> GetLabels(const TTopicConverterPtr& topic);
//TVector<NPersQueue::TPQLabelsInfo> GetLabelsForLegacyName(const TString& topic);
TVector<NPersQueue::TPQLabelsInfo> GetLabelsForCustomCluster(const TTopicConverterPtr& topic, TString cluster);
-TVector<NPersQueue::TPQLabelsInfo> GetLabelsForTopic(const TTopicConverterPtr& topic, const TString& cloudId,
+TVector<std::pair<TString, TString>> GetSubgroupsForTopic(const TTopicConverterPtr& topic, const TString& cloudId,
const TString& dbId, const TString& dbPath,
const TString& folderId);
diff --git a/ydb/library/persqueue/topic_parser/topic_parser.cpp b/ydb/library/persqueue/topic_parser/topic_parser.cpp
index c1377d4d4f..09b14ffdb8 100644
--- a/ydb/library/persqueue/topic_parser/topic_parser.cpp
+++ b/ydb/library/persqueue/topic_parser/topic_parser.cpp
@@ -310,10 +310,9 @@ bool TDiscoveryConverter::TryParseModernMirroredPath(TStringBuf path) {
CHECK_SET_VALID(res, "Malformed mirrored topic path - expected to end with '-mirrored-from-<cluster>'", return false);
CHECK_SET_VALID(!snd.empty(), "Malformed mirrored topic path - expected to end with valid cluster name",
return false);
- CHECK_SET_VALID(Dc.empty() || Dc == "unknown" || Dc == snd,
- "Bad mirrored topic path - cluster in name mismatches with cluster provided",
- return false);
Dc = snd;
+
+ CHECK_SET_VALID(LocalDc != Dc, "Local topic cannot contain '-mirrored-from' part", return false);
FullModernName = path;
ModernName = fst;
if (Account_.Defined()) {
@@ -775,9 +774,20 @@ TString TTopicNameConverter::GetFederationPath() const {
if (FstClass) {
return ClientsideName;
}
+
return LbPath.GetOrElse("");
}
+
+TString TTopicNameConverter::GetFederationPathWithDC() const {
+ if (FstClass) {
+ return ClientsideName;
+ }
+
+ return Account_ ? (*Account_ + "/" + FullModernName) : LbPath.GetOrElse("");
+}
+
+
const TString& TTopicNameConverter::GetCluster() const {
return Dc;
}
diff --git a/ydb/library/persqueue/topic_parser/topic_parser.h b/ydb/library/persqueue/topic_parser/topic_parser.h
index 627785eef5..0f9ff8daf3 100644
--- a/ydb/library/persqueue/topic_parser/topic_parser.h
+++ b/ydb/library/persqueue/topic_parser/topic_parser.h
@@ -130,6 +130,7 @@ public:
return FullModernName;
}
+
protected:
/** Account will be set for federation topics without database only;
* Generally used only for discovery purposes
@@ -140,6 +141,7 @@ protected:
* Set database for topics specified via account-in-directory mode. Used for discovery purpose in metacache
*/
void SetDatabase(const TString& database);
+ const TMaybe<TString>& GetDatabase() const { return Database;}
protected:
@@ -230,6 +232,8 @@ public:
/** Get logbroker logical path, 'account/dir/topic'. Generally this is not topic location path.
* Identical for clientside name for 1st class */
TString GetFederationPath() const;
+ TString GetFederationPathWithDC() const;
+
/** Gets DC */
const TString& GetCluster() const;
@@ -354,7 +358,6 @@ public:
TString GetLocalCluster() const { return LocalDc; }
bool GetNoDCMode() const { return NoDcMode; }
-
private:
void SetPQNormPrefix() {
TStringBuf prefix(PQRootPrefix);
diff --git a/ydb/library/yql/core/common_opt/yql_co_extr_members.cpp b/ydb/library/yql/core/common_opt/yql_co_extr_members.cpp
index df940da9d0..f4155d060c 100644
--- a/ydb/library/yql/core/common_opt/yql_co_extr_members.cpp
+++ b/ydb/library/yql/core/common_opt/yql_co_extr_members.cpp
@@ -70,6 +70,8 @@ TExprNode::TPtr ApplyExtractMembersToSkipNullMembers(const TExprNode::TPtr& node
if (hasMember) {
filteredMembers.push_back(x.Ptr());
+ } else {
+ return nullptr;
}
}
diff --git a/ydb/library/yql/core/common_opt/yql_flatmap_over_join.cpp b/ydb/library/yql/core/common_opt/yql_flatmap_over_join.cpp
index def2bf130e..34afad5254 100644
--- a/ydb/library/yql/core/common_opt/yql_flatmap_over_join.cpp
+++ b/ydb/library/yql/core/common_opt/yql_flatmap_over_join.cpp
@@ -148,7 +148,9 @@ TExprNode::TPtr SingleInputPredicatePushdownOverEquiJoin(TExprNode::TPtr equiJoi
} else if (node->IsCallable("DependsOn")) {
++insideDependsOn;
} else if (isStrict && !insideAssumeStrict && node->IsCallable({"Udf", "ScriptUdf", "Unwrap", "Ensure"})) {
- isStrict = false;
+ if (!node->IsCallable("Udf") || !HasSetting(*node->Child(TCoUdf::idx_Settings), "strict")) {
+ isStrict = false;
+ }
} else if (insideDependsOn && node.Get() == args->Child(0)) {
withDependsOn = true;
}
diff --git a/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp b/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp
index e377d1592b..93f852f6ae 100644
--- a/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp
+++ b/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp
@@ -4461,8 +4461,8 @@ TExprNode::TPtr UnpickleInput(TExprNode::TPtr originalLambda, TListExpandMap& li
inner
.With(j)
.Callable("Unpickle")
- .Arg(0, "out", j)
- .Add(1, ExpandType(originalLambda->Pos(), *it->second, ctx))
+ .Add(0, ExpandType(originalLambda->Pos(), *it->second, ctx))
+ .Arg(1, "out", j)
.Seal()
.Done()
;
@@ -4879,8 +4879,7 @@ bool CollectBlockRewrites(const TMultiExprType* multiInputType, bool keepInputCo
}
const bool isUdf = node->IsCallable("Apply") && node->Head().IsCallable("Udf");
if (isUdf) {
- auto func = node->Head().Head().Content();
- if (!func.StartsWith("ClickHouse.")) {
+ if (!GetSetting(*node->Head().Child(7), "blocks")) {
return true;
}
}
@@ -4923,7 +4922,6 @@ bool CollectBlockRewrites(const TMultiExprType* multiInputType, bool keepInputCo
.Do([&](TExprNodeBuilder& parent) -> TExprNodeBuilder& {
for (ui32 i = 1; i < node->ChildrenSize(); ++i) {
auto child = node->Child(i);
- // TODO: check if ClickHouse UDF accepts ChunkedBlock as argument
auto originalTypeNode = node->Head().Child(2)->Head().Child(i - 1);
parent.Callable(i - 1, child->IsComplete() ? "ScalarType" : "BlockType")
.Add(0, originalTypeNode)
@@ -4935,8 +4933,7 @@ bool CollectBlockRewrites(const TMultiExprType* multiInputType, bool keepInputCo
.Seal()
.Callable(1, "StructType")
.Seal()
- .Callable(2, "TupleType")
- .Seal()
+ .Add(2, node->Head().Child(2)->ChildPtr(2))
.Seal()
.Add(3, node->Head().ChildPtr(3))
.Seal()
diff --git a/ydb/library/yql/core/type_ann/type_ann_core.cpp b/ydb/library/yql/core/type_ann/type_ann_core.cpp
index d54270154a..23a412fc2d 100644
--- a/ydb/library/yql/core/type_ann/type_ann_core.cpp
+++ b/ydb/library/yql/core/type_ann/type_ann_core.cpp
@@ -7089,6 +7089,8 @@ template <NKikimr::NUdf::EDataSlot DataSlot>
auto& cachedFuncType = std::get<0>(cacheItem);
auto& cachedRunConfigType = std::get<1>(cacheItem);
auto& cachedNormalizedUserType = std::get<2>(cacheItem);
+ auto& cachedSupportsBlocks = std::get<3>(cacheItem);
+ auto& cachedIsStrict = std::get<4>(cacheItem);
if (!cachedFuncType) {
IUdfResolver::TFunction description;
description.Pos = ctx.Expr.GetPosition(input->Pos());
@@ -7133,6 +7135,8 @@ template <NKikimr::NUdf::EDataSlot DataSlot>
cachedFuncType = description.CallableType;
cachedRunConfigType = description.RunConfigType ? description.RunConfigType : ctx.Expr.MakeType<TVoidExprType>();
cachedNormalizedUserType = description.UserType ? description.NormalizedUserType : ctx.Expr.MakeType<TVoidExprType>();
+ cachedSupportsBlocks = description.SupportsBlocks;
+ cachedIsStrict = description.IsStrict;
}
TStringBuf typeConfig = "";
@@ -7169,6 +7173,22 @@ template <NKikimr::NUdf::EDataSlot DataSlot>
.Add(5, runConfigTypeNode)
.Atom(6, fileAlias)
.List(7)
+ .Do([&](TExprNodeBuilder& parent) -> TExprNodeBuilder& {
+ ui32 settingIndex = 0;
+ if (cachedSupportsBlocks) {
+ parent.List(settingIndex++)
+ .Atom(0, "blocks")
+ .Seal();
+ }
+
+ if (cachedIsStrict) {
+ parent.List(settingIndex++)
+ .Atom(0, "strict")
+ .Seal();
+ }
+
+ return parent;
+ })
.Seal()
.Seal()
.Build();
diff --git a/ydb/library/yql/core/type_ann/type_ann_list.cpp b/ydb/library/yql/core/type_ann/type_ann_list.cpp
index d0f78b6a16..b229254f99 100644
--- a/ydb/library/yql/core/type_ann/type_ann_list.cpp
+++ b/ydb/library/yql/core/type_ann/type_ann_list.cpp
@@ -5339,6 +5339,8 @@ namespace {
}
input->SetTypeAnn(retType);
+ } else if (name == "some") {
+ input->SetTypeAnn(lambda->GetTypeAnn());
} else {
ctx.Expr.AddError(TIssue(ctx.Expr.GetPosition(input->Pos()),
TStringBuilder() << "Unsupported agg name: " << name));
diff --git a/ydb/library/yql/core/yql_expr_type_annotation.cpp b/ydb/library/yql/core/yql_expr_type_annotation.cpp
index e095d95000..e73d195b62 100644
--- a/ydb/library/yql/core/yql_expr_type_annotation.cpp
+++ b/ydb/library/yql/core/yql_expr_type_annotation.cpp
@@ -5365,7 +5365,7 @@ const TTypeAnnotationNode* GetBlockItemType(const TTypeAnnotationNode& type, boo
const TTypeAnnotationNode* AggApplySerializedStateType(const TExprNode::TPtr& input, TExprContext& ctx) {
auto name = input->Child(0)->Content();
- if (name == "count" || name == "count_all" || name == "sum" || name == "min" || name == "max") {
+ if (name == "count" || name == "count_all" || name == "sum" || name == "min" || name == "max" || name == "some") {
return input->GetTypeAnn();
} else if (name == "avg") {
auto itemType = input->Content().StartsWith("AggBlock") ?
diff --git a/ydb/library/yql/core/yql_type_annotation.h b/ydb/library/yql/core/yql_type_annotation.h
index 3b1ea7f490..ce3ab9de26 100644
--- a/ydb/library/yql/core/yql_type_annotation.h
+++ b/ydb/library/yql/core/yql_type_annotation.h
@@ -207,8 +207,8 @@ struct TTypeAnnotationContext: public TThrRefBase {
bool PullUpFlatMapOverJoin = true;
bool DeprecatedSQL = false;
THashMap<std::tuple<TString, TString, const TTypeAnnotationNode*>,
- std::tuple<const TTypeAnnotationNode*, const TTypeAnnotationNode*, const TTypeAnnotationNode*>>
- UdfTypeCache; // (name,typecfg,type)->(type,run config type,new user type)
+ std::tuple<const TTypeAnnotationNode*, const TTypeAnnotationNode*, const TTypeAnnotationNode*, bool, bool>>
+ UdfTypeCache; // (name,typecfg,type)->(type,run config type,new user type, blocks, strict)
bool UseTableMetaFromGraph = false;
bool DiscoveryMode = false;
bool ForceDq = false;
diff --git a/ydb/library/yql/core/yql_udf_resolver.h b/ydb/library/yql/core/yql_udf_resolver.h
index 235987ecab..46a40fe72b 100644
--- a/ydb/library/yql/core/yql_udf_resolver.h
+++ b/ydb/library/yql/core/yql_udf_resolver.h
@@ -45,6 +45,8 @@ public:
const TTypeAnnotationNode* NormalizedUserType = nullptr;
const TTypeAnnotationNode* RunConfigType = nullptr;
const TTypeAnnotationNode* CallableType = nullptr;
+ bool SupportsBlocks = false;
+ bool IsStrict = false;
};
struct TImport {
diff --git a/ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io.h b/ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io.h
index 8e45f4f40f..c6a8fc5da1 100644
--- a/ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io.h
+++ b/ydb/library/yql/dq/actors/compute/dq_compute_actor_async_io.h
@@ -2,6 +2,8 @@
#include <ydb/library/yql/dq/actors/dq_events_ids.h>
#include <ydb/library/yql/dq/common/dq_common.h>
#include <ydb/library/yql/dq/runtime/dq_output_consumer.h>
+#include <ydb/library/yql/dq/runtime/dq_async_input.h>
+#include <ydb/library/yql/dq/runtime/dq_input_producer.h>
#include <ydb/library/yql/dq/runtime/dq_async_output.h>
#include <ydb/library/yql/minikql/computation/mkql_computation_node_holders.h>
#include <ydb/library/yql/public/issue/yql_issue.h>
@@ -87,6 +89,10 @@ struct IDqComputeActorAsyncInput {
return 0;
}
+ virtual TMaybe<google::protobuf::Any> ExtraData() { return {}; }
+
+ virtual void FillExtraStats(NDqProto::TDqTaskStats* /* stats */, bool /* finalized stats */, const NYql::NDq::TDqMeteringStats*) { }
+
// The same signature as IActor::PassAway().
// It is guaranted that this method will be called with bound MKQL allocator.
// So, it is the right place to destroy all internal UnboxedValues.
@@ -170,6 +176,7 @@ public:
const NKikimr::NMiniKQL::TTypeEnvironment& TypeEnv;
const NKikimr::NMiniKQL::THolderFactory& HolderFactory;
::NMonitoring::TDynamicCounterPtr TaskCounters;
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> Alloc;
};
struct TSinkArguments {
@@ -197,6 +204,7 @@ public:
const NKikimr::NMiniKQL::TTypeEnvironment& TypeEnv;
const NKikimr::NMiniKQL::THolderFactory& HolderFactory;
NKikimr::NMiniKQL::TProgramBuilder& ProgramBuilder;
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> Alloc;
};
struct TOutputTransformArguments {
diff --git a/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h b/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h
index 0c936298a5..a97f62e9c2 100644
--- a/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h
+++ b/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h
@@ -577,11 +577,31 @@ protected:
Terminate(success, TIssues({TIssue(message)}));
}
+ void FillExtraData(NDqProto::TEvComputeActorState& state) {
+ auto* extraData = state.MutableExtraData();
+ for (auto& [index, input] : SourcesMap) {
+ if (auto data = input.AsyncInput->ExtraData()) {
+ auto* entry = extraData->AddSourcesExtraData();
+ entry->SetIndex(index);
+ entry->MutableData()->CopyFrom(*data);
+ }
+ }
+ for (auto& [index, input] : InputTransformsMap) {
+ if (auto data = input.AsyncInput->ExtraData()) {
+ auto* entry = extraData->AddInputTransformsData();
+ entry->SetIndex(index);
+ entry->MutableData()->CopyFrom(*data);
+ }
+ }
+ }
+
void ReportStateAndMaybeDie(NYql::NDqProto::StatusIds::StatusCode statusCode, const TIssues& issues)
{
auto execEv = MakeHolder<TEvDqCompute::TEvState>();
auto& record = execEv->Record;
+ FillExtraData(record);
+
record.SetState(State);
record.SetStatusCode(statusCode);
record.SetTaskId(Task.GetId());
@@ -1504,7 +1524,8 @@ protected:
.ComputeActorId = this->SelfId(),
.TypeEnv = typeEnv,
.HolderFactory = holderFactory,
- .TaskCounters = TaskCounters
+ .TaskCounters = TaskCounters,
+ .Alloc = TaskRunner ? TaskRunner->GetAllocatorPtr() : nullptr
});
} catch (const std::exception& ex) {
throw yexception() << "Failed to create source " << inputDesc.GetSource().GetType() << ": " << ex.what();
@@ -1532,7 +1553,8 @@ protected:
.ComputeActorId = this->SelfId(),
.TypeEnv = typeEnv,
.HolderFactory = holderFactory,
- .ProgramBuilder = *transform.ProgramBuilder
+ .ProgramBuilder = *transform.ProgramBuilder,
+ .Alloc = TaskRunner->GetAllocatorPtr()
});
} catch (const std::exception& ex) {
throw yexception() << "Failed to create input transform " << inputDesc.GetTransform().GetType() << ": " << ex.what();
@@ -1894,10 +1916,12 @@ public:
THashMap<ui64, ui64> ingressBytesMap;
for (auto& [inputIndex, sourceInfo] : SourcesMap) {
- if (sourceInfo.AsyncInput) {
+ if (auto* source = sourceInfo.AsyncInput) {
auto ingressBytes = sourceInfo.AsyncInput->GetIngressBytes();
ingressBytesMap.emplace(inputIndex, ingressBytes);
Ingress[sourceInfo.Type] = Ingress.Value(sourceInfo.Type, 0) + ingressBytes;
+ // TODO: support async CA
+ source->FillExtraStats(protoTask, last, TaskRunner ? TaskRunner->GetMeteringStats() : nullptr);
}
}
FillTaskRunnerStats(Task.GetId(), Task.GetStageId(), *taskStats, protoTask, (bool) GetProfileStats(), ingressBytesMap);
@@ -1948,6 +1972,11 @@ public:
protoTransform->SetMaxMemoryUsage(transformStats->MaxMemoryUsage);
}
+
+ if (auto* transform = transformInfo.AsyncInput) {
+ // TODO: support async CA
+ transform->FillExtraStats(protoTask, last, TaskRunner ? TaskRunner->GetMeteringStats() : 0);
+ }
}
for (auto& [name, bytes] : Egress) {
diff --git a/ydb/library/yql/dq/actors/protos/dq_events.proto b/ydb/library/yql/dq/actors/protos/dq_events.proto
index 3baf18902e..e4d0e201ca 100644
--- a/ydb/library/yql/dq/actors/protos/dq_events.proto
+++ b/ydb/library/yql/dq/actors/protos/dq_events.proto
@@ -1,6 +1,7 @@
package NYql.NDqProto;
option cc_enable_arenas = true;
+import "google/protobuf/any.proto";
import "library/cpp/actors/protos/actors.proto";
import "ydb/library/yql/dq/actors/protos/dq_stats.proto";
import "ydb/library/yql/dq/actors/protos/dq_status_codes.proto";
@@ -54,6 +55,16 @@ message TComputeActorStats {
reserved 2; //optional NKqpProto.TKqpStatsRun LegacyStats = 2;
};
+message TExtraInputData {
+ optional uint32 Index = 1;
+ optional google.protobuf.Any Data = 2;
+}
+
+message TComputeActorExtraData {
+ repeated TExtraInputData SourcesExtraData = 1;
+ repeated TExtraInputData InputTransformsData = 2;
+}
+
message TEvComputeActorState {
optional uint32 State = 1; // == EComputeState
optional TComputeActorStats LegacyStats = 2;
@@ -62,6 +73,7 @@ message TEvComputeActorState {
optional uint64 TaskId = 5;
optional TDqComputeActorStats Stats = 6;
optional NYql.NDqProto.StatusIds.StatusCode StatusCode = 7;
+ optional TComputeActorExtraData ExtraData = 8;
};
message TEvComputeStateRequest {
diff --git a/ydb/library/yql/dq/opt/dq_opt.cpp b/ydb/library/yql/dq/opt/dq_opt.cpp
index 3ae4e9f285..0df08540ff 100644
--- a/ydb/library/yql/dq/opt/dq_opt.cpp
+++ b/ydb/library/yql/dq/opt/dq_opt.cpp
@@ -151,10 +151,15 @@ ui32 GetStageOutputsCount(const TDqStageBase& stage) {
return resultsTypeTuple->GetSize();
}
-TVector<TDqConnection> FindDqConnections(const TExprBase& node) {
- TVector<TDqConnection> connections;
+bool IsDqPureNode(const TExprBase& node) {
+ return !node.Maybe<TDqSource>() &&
+ !node.Maybe<TDqConnection>() &&
+ !node.Maybe<TDqPrecompute>();
+}
- VisitExpr(node.Ptr(), [&connections](const TExprNode::TPtr& exprNode) {
+void FindDqConnections(const TExprBase& node, TVector<TDqConnection>& connections, bool& isPure) {
+ isPure = true;
+ VisitExpr(node.Ptr(), [&](const TExprNode::TPtr& exprNode) {
TExprBase node(exprNode);
if (node.Maybe<TDqPhyPrecompute>()) {
@@ -167,10 +172,12 @@ TVector<TDqConnection> FindDqConnections(const TExprBase& node) {
return false;
}
+ if (!IsDqPureNode(node)) {
+ isPure = false;
+ }
+
return true;
});
-
- return connections;
}
bool IsDqPureExpr(const TExprBase& node, bool isPrecomputePure) {
@@ -179,8 +186,7 @@ bool IsDqPureExpr(const TExprBase& node, bool isPrecomputePure) {
};
auto predicate = [](const TExprNode::TPtr& node) {
- return TMaybeNode<TDqSource>(node).IsValid() ||
- TMaybeNode<TDqConnection>(node).IsValid();
+ return !IsDqPureNode(TExprBase(node));
};
if (isPrecomputePure) {
@@ -215,7 +221,11 @@ bool IsDqSelfContainedExpr(const TExprBase& node) {
return true;
},
- [&knownArguments] (const TExprNode::TPtr& node) {
+ [&selfContained, &knownArguments] (const TExprNode::TPtr& node) {
+ if (!selfContained) {
+ return false;
+ }
+
if (auto maybeLambda = TMaybeNode<TCoLambda>(node)) {
for (const auto& arg : maybeLambda.Cast().Args()) {
auto it = knownArguments.find(arg.Raw());
diff --git a/ydb/library/yql/dq/opt/dq_opt.h b/ydb/library/yql/dq/opt/dq_opt.h
index 3887ef720a..c5bd5bdb9d 100644
--- a/ydb/library/yql/dq/opt/dq_opt.h
+++ b/ydb/library/yql/dq/opt/dq_opt.h
@@ -56,7 +56,7 @@ bool IsSingleConsumerConnection(const NNodes::TDqConnection& node, const TParent
ui32 GetStageOutputsCount(const NNodes::TDqStageBase& stage);
-TVector<NNodes::TDqConnection> FindDqConnections(const NNodes::TExprBase& node);
+void FindDqConnections(const NNodes::TExprBase& node, TVector<NNodes::TDqConnection>&, bool&);
bool IsDqPureExpr(const NNodes::TExprBase& node, bool isPrecomputePure = true);
bool IsDqSelfContainedExpr(const NNodes::TExprBase& node);
bool IsDqDependsOnStage(const NNodes::TExprBase& node, const NNodes::TDqStageBase& stage);
diff --git a/ydb/library/yql/dq/opt/dq_opt_phy.cpp b/ydb/library/yql/dq/opt/dq_opt_phy.cpp
index 37a087f376..6d119f18d0 100644
--- a/ydb/library/yql/dq/opt/dq_opt_phy.cpp
+++ b/ydb/library/yql/dq/opt/dq_opt_phy.cpp
@@ -577,8 +577,14 @@ TExprBase DqBuildPureFlatmapStage(TExprBase node, TExprContext& ctx) {
return node;
}
- auto innerConnections = FindDqConnections(flatmap.Lambda());
- if (innerConnections.empty()) {
+ if (!IsDqSelfContainedExpr(flatmap.Input())) {
+ return node;
+ }
+
+ bool isPure;
+ TVector<TDqConnection> innerConnections;
+ FindDqConnections(flatmap.Lambda(), innerConnections, isPure);
+ if (!isPure || innerConnections.empty()) {
return node;
}
@@ -617,7 +623,12 @@ TExprBase DqBuildFlatmapStage(TExprBase node, TExprContext& ctx, IOptimizationCo
return node;
}
- auto innerConnections = FindDqConnections(flatmap.Lambda());
+ bool isPure;
+ TVector<TDqConnection> innerConnections;
+ FindDqConnections(flatmap.Lambda(), innerConnections, isPure);
+ if (!isPure) {
+ return node;
+ }
TMaybeNode<TDqStage> flatmapStage;
if (!innerConnections.empty()) {
@@ -839,11 +850,11 @@ TExprBase DqPushCombineToStage(TExprBase node, TExprContext& ctx, IOptimizationC
return node;
}
- if (!CanPushDqExpr(combine.PreMapLambda(), dqUnion) ||
- !CanPushDqExpr(combine.KeySelectorLambda(), dqUnion) ||
- !CanPushDqExpr(combine.InitHandlerLambda(), dqUnion) ||
- !CanPushDqExpr(combine.UpdateHandlerLambda(), dqUnion) ||
- !CanPushDqExpr(combine.FinishHandlerLambda(), dqUnion))
+ if (!IsDqPureExpr(combine.PreMapLambda()) ||
+ !IsDqPureExpr(combine.KeySelectorLambda()) ||
+ !IsDqPureExpr(combine.InitHandlerLambda()) ||
+ !IsDqPureExpr(combine.UpdateHandlerLambda()) ||
+ !IsDqPureExpr(combine.FinishHandlerLambda()))
{
return node;
}
@@ -879,6 +890,26 @@ TExprBase DqPushCombineToStage(TExprBase node, TExprContext& ctx, IOptimizationC
.Done();
}
+ if (IsDqDependsOnStage(combine.PreMapLambda(), dqUnion.Output().Stage()) ||
+ IsDqDependsOnStage(combine.KeySelectorLambda(), dqUnion.Output().Stage()) ||
+ IsDqDependsOnStage(combine.InitHandlerLambda(), dqUnion.Output().Stage()) ||
+ IsDqDependsOnStage(combine.UpdateHandlerLambda(), dqUnion.Output().Stage()) ||
+ IsDqDependsOnStage(combine.FinishHandlerLambda(), dqUnion.Output().Stage()))
+ {
+ return Build<TDqCnUnionAll>(ctx, combine.Pos())
+ .Output()
+ .Stage<TDqStage>()
+ .Inputs()
+ .Add(dqUnion)
+ .Build()
+ .Program(lambda)
+ .Settings(TDqStageSettings().BuildNode(ctx, node.Pos()))
+ .Build()
+ .Index().Build("0")
+ .Build()
+ .Done();
+ }
+
auto result = DqPushLambdaToStageUnionAll(dqUnion, lambda, {}, ctx, optCtx);
if (!result) {
return node;
@@ -2485,15 +2516,19 @@ TExprBase DqPrecomputeToInput(const TExprBase& node, TExprContext& ctx) {
TExprNode::TListType newArgs;
TNodeOnNodeOwnedMap replaces;
+ TNodeOnNodeOwnedMap inputsReplaces;
+
for (ui64 i = 0; i < stage.Inputs().Size(); ++i) {
newInputs.push_back(stage.Inputs().Item(i).Ptr());
auto arg = stage.Program().Args().Arg(i).Raw();
newArgs.push_back(ctx.NewArgument(arg->Pos(), arg->Content()));
replaces[arg] = newArgs.back();
+
+ inputsReplaces[arg] = stage.Inputs().Item(i).Ptr();
}
for (auto& precompute: innerPrecomputes) {
- newInputs.push_back(precompute);
+ newInputs.push_back(ctx.ReplaceNodes(TExprNode::TPtr(precompute), inputsReplaces));
newArgs.push_back(ctx.NewArgument(precompute->Pos(), TStringBuilder() << "_dq_precompute_" << newArgs.size()));
replaces[precompute.Get()] = newArgs.back();
}
diff --git a/ydb/library/yql/dq/runtime/dq_input_producer.cpp b/ydb/library/yql/dq/runtime/dq_input_producer.cpp
index 71f64e30a5..d86bcd90a1 100644
--- a/ydb/library/yql/dq/runtime/dq_input_producer.cpp
+++ b/ydb/library/yql/dq/runtime/dq_input_producer.cpp
@@ -14,10 +14,12 @@ namespace {
class TDqInputUnionStreamValue : public TComputationValue<TDqInputUnionStreamValue> {
public:
- TDqInputUnionStreamValue(TMemoryUsageInfo* memInfo, TVector<IDqInput::TPtr>&& inputs)
+ TDqInputUnionStreamValue(TMemoryUsageInfo* memInfo, TVector<IDqInput::TPtr>&& inputs, TDqMeteringStats::TInputStatsMeter stats)
: TComputationValue<TDqInputUnionStreamValue>(memInfo)
, Inputs(std::move(inputs))
- , CurrentItemIndex(0) {}
+ , CurrentItemIndex(0)
+ , Stats(stats)
+ {}
private:
NUdf::EFetchStatus Fetch(NKikimr::NUdf::TUnboxedValue& result) final {
@@ -33,6 +35,9 @@ private:
}
result = std::move(CurrentBuffer[CurrentItemIndex]);
+ if (Stats) {
+ Stats.Add(result);
+ }
++CurrentItemIndex;
return NUdf::EFetchStatus::Ok;
}
@@ -56,15 +61,17 @@ private:
TVector<IDqInput::TPtr> Inputs;
TUnboxedValueVector CurrentBuffer;
ui64 CurrentItemIndex;
+ TDqMeteringStats::TInputStatsMeter Stats;
};
class TDqInputMergeStreamValue : public TComputationValue<TDqInputMergeStreamValue> {
public:
TDqInputMergeStreamValue(TMemoryUsageInfo* memInfo, TVector<IDqInput::TPtr>&& inputs,
- TVector<TSortColumnInfo>&& sortCols)
+ TVector<TSortColumnInfo>&& sortCols, TDqMeteringStats::TInputStatsMeter stats)
: TComputationValue<TDqInputMergeStreamValue>(memInfo)
, Inputs(std::move(inputs))
, SortCols(std::move(sortCols))
+ , Stats(stats)
{
CurrentBuffers.resize(Inputs.size());
CurrentItemIndexes.reserve(Inputs.size());
@@ -137,6 +144,9 @@ private:
}
result = std::move(FindResult());
+ if (Stats) {
+ Stats.Add(result);
+ }
return NUdf::EFetchStatus::Ok;
}
@@ -211,20 +221,32 @@ private:
TVector<TUnboxedValuesIterator> CurrentItemIndexes;
ui32 InitializationIndex = 0;
TMap<ui32, EDataSlot> SortColTypes;
+ TDqMeteringStats::TInputStatsMeter Stats;
};
} // namespace
+void TDqMeteringStats::TInputStatsMeter::Add(const NKikimr::NUdf::TUnboxedValue& val) {
+ Stats->RowsConsumed += 1;
+ if (InputType) {
+ NYql::NDq::TDqDataSerializer::TEstimateSizeSettings settings;
+ settings.DiscardUnsupportedTypes = true;
+ settings.WithHeaders = false;
+
+ Stats->BytesConsumed += Max<ui64>(TDqDataSerializer::EstimateSize(val, InputType, nullptr, settings), 8 /* billing size for count(*) */);
+ }
+}
+
NUdf::TUnboxedValue CreateInputUnionValue(TVector<IDqInput::TPtr>&& inputs,
- const NMiniKQL::THolderFactory& factory)
+ const NMiniKQL::THolderFactory& factory, TDqMeteringStats::TInputStatsMeter stats)
{
- return factory.Create<TDqInputUnionStreamValue>(std::move(inputs));
+ return factory.Create<TDqInputUnionStreamValue>(std::move(inputs), stats);
}
NKikimr::NUdf::TUnboxedValue CreateInputMergeValue(TVector<IDqInput::TPtr>&& inputs,
- TVector<TSortColumnInfo>&& sortCols, const NKikimr::NMiniKQL::THolderFactory& factory)
+ TVector<TSortColumnInfo>&& sortCols, const NKikimr::NMiniKQL::THolderFactory& factory, TDqMeteringStats::TInputStatsMeter stats)
{
- return factory.Create<TDqInputMergeStreamValue>(std::move(inputs), std::move(sortCols));
+ return factory.Create<TDqInputMergeStreamValue>(std::move(inputs), std::move(sortCols), stats);
}
} // namespace NYql::NDq
diff --git a/ydb/library/yql/dq/runtime/dq_input_producer.h b/ydb/library/yql/dq/runtime/dq_input_producer.h
index 7a590b23be..d90caa8be1 100644
--- a/ydb/library/yql/dq/runtime/dq_input_producer.h
+++ b/ydb/library/yql/dq/runtime/dq_input_producer.h
@@ -5,10 +5,33 @@
namespace NYql::NDq {
+struct TDqMeteringStats {
+ struct TInputStats {
+ ui64 RowsConsumed = 0;
+ ui64 BytesConsumed = 0;
+ };
+
+ struct TInputStatsMeter {
+ void Add(const NKikimr::NUdf::TUnboxedValue&);
+ operator bool() { return Stats; }
+
+ TInputStats* Stats;
+ NKikimr::NMiniKQL::TType* InputType = nullptr;
+ };
+
+ std::vector<std::unique_ptr<TInputStats>> Inputs;
+
+ TInputStats& AddInputs() {
+ Inputs.push_back(std::make_unique<TInputStats>());
+ return *Inputs.back();
+ }
+};
+
NKikimr::NUdf::TUnboxedValue CreateInputUnionValue(TVector<IDqInput::TPtr>&& inputs,
- const NKikimr::NMiniKQL::THolderFactory& holderFactory);
+ const NKikimr::NMiniKQL::THolderFactory& holderFactory, TDqMeteringStats::TInputStatsMeter = {});
NKikimr::NUdf::TUnboxedValue CreateInputMergeValue(TVector<IDqInput::TPtr>&& inputs,
- TVector<TSortColumnInfo>&& sortCols, const NKikimr::NMiniKQL::THolderFactory& factory);
+ TVector<TSortColumnInfo>&& sortCols, const NKikimr::NMiniKQL::THolderFactory& factory,
+ TDqMeteringStats::TInputStatsMeter = {});
} // namespace NYql::NDq
diff --git a/ydb/library/yql/dq/runtime/dq_tasks_runner.cpp b/ydb/library/yql/dq/runtime/dq_tasks_runner.cpp
index a97aa62869..fa20ed6d1c 100644
--- a/ydb/library/yql/dq/runtime/dq_tasks_runner.cpp
+++ b/ydb/library/yql/dq/runtime/dq_tasks_runner.cpp
@@ -129,21 +129,21 @@ void ValidateParamValue(std::string_view paramName, const TType* type, const NUd
#define LOG(...) do { if (Y_UNLIKELY(LogFunc)) { LogFunc(__VA_ARGS__); } } while (0)
NUdf::TUnboxedValue DqBuildInputValue(const NDqProto::TTaskInput& inputDesc, const NKikimr::NMiniKQL::TType* type,
- TVector<IDqInput::TPtr>&& inputs, const THolderFactory& holderFactory)
+ TVector<IDqInput::TPtr>&& inputs, const THolderFactory& holderFactory, TDqMeteringStats::TInputStatsMeter stats)
{
switch (inputDesc.GetTypeCase()) {
case NYql::NDqProto::TTaskInput::kSource:
Y_VERIFY(inputs.size() == 1);
[[fallthrough]];
case NYql::NDqProto::TTaskInput::kUnionAll:
- return CreateInputUnionValue(std::move(inputs), holderFactory);
+ return CreateInputUnionValue(std::move(inputs), holderFactory, stats);
case NYql::NDqProto::TTaskInput::kMerge: {
const auto& protoSortCols = inputDesc.GetMerge().GetSortColumns();
TVector<TSortColumnInfo> sortColsInfo;
GetColumnsInfo(type, protoSortCols, sortColsInfo);
YQL_ENSURE(!sortColsInfo.empty());
- return CreateInputMergeValue(std::move(inputs), std::move(sortColsInfo), holderFactory);
+ return CreateInputMergeValue(std::move(inputs), std::move(sortColsInfo), holderFactory, stats);
}
default:
YQL_ENSURE(false, "Unknown input type: " << (ui32) inputDesc.GetTypeCase());
@@ -218,6 +218,7 @@ public:
: Context(context)
, Settings(settings)
, LogFunc(logFunc)
+ , AllocatedHolder(std::make_optional<TAllocatedHolder>())
, CollectBasicStats(Settings.CollectBasicStats)
, CollectProfileStats(Settings.CollectProfileStats)
{
@@ -231,12 +232,15 @@ public:
}
if (!Context.Alloc) {
- SelfAlloc = std::make_unique<TScopedAlloc>(__LOCATION__, TAlignedPagePoolCounters(),
- Context.FuncRegistry->SupportsSizedAllocators());
+ SelfAlloc = std::shared_ptr<TScopedAlloc>(new TScopedAlloc(__LOCATION__, TAlignedPagePoolCounters(),
+ Context.FuncRegistry->SupportsSizedAllocators()), [](TScopedAlloc* ptr) {
+ ptr->Acquire();
+ delete ptr;
+ });
}
if (!Context.TypeEnv) {
- SelfTypeEnv = std::make_unique<TTypeEnvironment>(Context.Alloc ? *Context.Alloc : *SelfAlloc);
+ AllocatedHolder->SelfTypeEnv = std::make_unique<TTypeEnvironment>(Context.Alloc ? *Context.Alloc : *SelfAlloc);
}
if (SelfAlloc) {
@@ -247,9 +251,15 @@ public:
~TDqTaskRunner() {
if (SelfAlloc) {
SelfAlloc->Acquire();
+ AllocatedHolder.reset();
+ SelfAlloc->Release();
}
}
+ const TDqMeteringStats* GetMeteringStats() const override {
+ return &BillingStats;
+ }
+
ui64 GetTaskId() const override {
Y_VERIFY(TaskId, "Not prepared yet");
return TaskId;
@@ -273,12 +283,12 @@ public:
return nullptr;
};
- if (Y_UNLIKELY(CollectProfileStats && !ProgramParsed.StatsRegistry)) {
- ProgramParsed.StatsRegistry = NMiniKQL::CreateDefaultStatsRegistry();
+ if (Y_UNLIKELY(CollectProfileStats && !AllocatedHolder->ProgramParsed.StatsRegistry)) {
+ AllocatedHolder->ProgramParsed.StatsRegistry = NMiniKQL::CreateDefaultStatsRegistry();
}
TComputationPatternOpts opts(alloc.Ref(), typeEnv, taskRunnerFactory,
Context.FuncRegistry, NUdf::EValidateMode::None, validatePolicy, Settings.OptLLVM, EGraphPerProcess::Multi,
- ProgramParsed.StatsRegistry.Get());
+ AllocatedHolder->ProgramParsed.StatsRegistry.Get());
if (!SecureParamsProvider) {
SecureParamsProvider = MakeSimpleSecureParamsProvider(Settings.SecureParams);
@@ -288,10 +298,12 @@ public:
return opts;
}
- std::shared_ptr<TPatternCacheEntry> CreateComputationPattern(const NDqProto::TDqTask& task, const TString& rawProgram) {
+ std::shared_ptr<TPatternCacheEntry> CreateComputationPattern(const NDqProto::TDqTask& task, const TString& rawProgram, bool forCache, bool& canBeCached) {
+ canBeCached = true;
auto entry = TComputationPatternLRUCache::CreateCacheEntry(UseSeparatePatternAlloc());
auto& patternAlloc = UseSeparatePatternAlloc() ? entry->Alloc : Alloc();
auto& patternEnv = UseSeparatePatternAlloc() ? entry->Env : TypeEnv();
+ patternAlloc.Ref().UseRefLocking = forCache;
{
auto guard = patternEnv.BindAllocator();
@@ -307,10 +319,14 @@ public:
TRuntimeNode programRoot = programStruct.GetValue(*programRootIdx);
if (Context.FuncProvider) {
+ auto guard = patternEnv.BindAllocator();
TExploringNodeVisitor explorer;
explorer.Walk(programRoot.GetNode(), patternEnv);
bool wereChanges = false;
programRoot = SinglePassVisitCallables(programRoot, explorer, Context.FuncProvider, patternEnv, true, wereChanges);
+ if (wereChanges) {
+ canBeCached = false;
+ }
}
entry->OutputItemTypes.resize(task.OutputsSize());
@@ -399,35 +415,41 @@ public:
YQL_ENSURE(program.GetRuntimeVersion() <= NYql::NDqProto::ERuntimeVersion::RUNTIME_VERSION_YQL_1_0);
std::shared_ptr<TPatternCacheEntry> entry;
+ bool canBeCached;
if (UseSeparatePatternAlloc() && Context.PatternCache) {
auto& cache = Context.PatternCache;
- entry = cache->Find(program.GetRaw());
- if (!entry) {
- entry = CreateComputationPattern(task, program.GetRaw());
- if (entry->Pattern->GetSuitableForCache()) {
+ auto ticket = cache->FindOrSubscribe(program.GetRaw());
+ if (!ticket.HasFuture()) {
+ entry = CreateComputationPattern(task, program.GetRaw(), true, canBeCached);
+ if (canBeCached && entry->Pattern->GetSuitableForCache()) {
cache->EmplacePattern(task.GetProgram().GetRaw(), entry);
+ ticket.Close();
} else {
cache->IncNotSuitablePattern();
}
+ } else {
+ entry = ticket.GetValueSync();
}
- } else {
- entry = CreateComputationPattern(task, program.GetRaw());
+ }
+
+ if (!entry) {
+ entry = CreateComputationPattern(task, program.GetRaw(), false, canBeCached);
}
- ProgramParsed.PatternCacheEntry = entry;
+ AllocatedHolder->ProgramParsed.PatternCacheEntry = entry;
// clone pattern using TDqTaskRunner's alloc
auto opts = CreatePatternOpts(Alloc(), TypeEnv());
- ProgramParsed.CompGraph = ProgramParsed.GetPattern()->Clone(
+ AllocatedHolder->ProgramParsed.CompGraph = AllocatedHolder->ProgramParsed.GetPattern()->Clone(
opts.ToComputationOptions(*Context.RandomProvider, *Context.TimeProvider, &TypeEnv()));
- TBindTerminator term(ProgramParsed.CompGraph->GetTerminator());
+ TBindTerminator term(AllocatedHolder->ProgramParsed.CompGraph->GetTerminator());
- auto paramNode = ProgramParsed.CompGraph->GetEntryPoint(entry->ProgramInputsCount, /* require */ false);
+ auto paramNode = AllocatedHolder->ProgramParsed.CompGraph->GetEntryPoint(entry->ProgramInputsCount, /* require */ false);
if (paramNode) {
// TODO: Remove serialized parameters that are used in OLAP program and not used in current program
- const auto& graphHolderFactory = ProgramParsed.CompGraph->GetHolderFactory();
+ const auto& graphHolderFactory = AllocatedHolder->ProgramParsed.CompGraph->GetHolderFactory();
NUdf::TUnboxedValue* structMembers;
auto paramsCount = entry->ParamsStruct->GetMembersCount();
auto paramsStructValue = graphHolderFactory.CreateDirectArrayHolder(paramsCount, structMembers);
@@ -454,7 +476,7 @@ public:
}
}
- paramNode->SetValue(ProgramParsed.CompGraph->GetContext(), std::move(paramsStructValue));
+ paramNode->SetValue(AllocatedHolder->ProgramParsed.CompGraph->GetContext(), std::move(paramsStructValue));
} else {
/*
* This situation is ok, when there are OLAP parameters only. There is no parameter node
@@ -480,20 +502,21 @@ public:
LOG(TStringBuilder() << "Prepare task: " << TaskId);
auto startTime = TInstant::Now();
- auto& holderFactory = ProgramParsed.CompGraph->GetHolderFactory();
- TBindTerminator term(ProgramParsed.CompGraph->GetTerminator());
+ auto& holderFactory = AllocatedHolder->ProgramParsed.CompGraph->GetHolderFactory();
+ TBindTerminator term(AllocatedHolder->ProgramParsed.CompGraph->GetTerminator());
auto& typeEnv = TypeEnv();
for (ui32 i = 0; i < task.InputsSize(); ++i) {
auto& inputDesc = task.GetInputs(i);
+ auto& inputStats = BillingStats.AddInputs();
TVector<IDqInput::TPtr> inputs{Reserve(std::max<ui64>(inputDesc.ChannelsSize(), 1))}; // 1 is for "source" type of input.
TInputTransformInfo* transform = nullptr;
TType** inputType = &entry->InputItemTypes[i];
if (inputDesc.HasTransform()) {
const auto& transformDesc = inputDesc.GetTransform();
- transform = &InputTransforms[i];
+ transform = &AllocatedHolder->InputTransforms[i];
Y_VERIFY(!transform->TransformInput);
Y_VERIFY(!transform->TransformOutput);
@@ -504,7 +527,7 @@ public:
TStringBuf outputTypeNodeRaw(transformDesc.GetOutputType());
auto outputTypeNode = NMiniKQL::DeserializeNode(outputTypeNodeRaw, typeEnv);
YQL_ENSURE(outputTypeNode, "Failed to deserialize transform output type");
- TType* outputType = static_cast<TType*>(outputTypeNode);
+ TType* outputType = transform->TransformOutputType = static_cast<TType*>(outputTypeNode);
auto typeCheckLog = [&] () {
TStringStream out;
out << *outputType << " != " << *entry->InputItemTypes[i];
@@ -527,7 +550,7 @@ public:
if (inputDesc.HasSource()) {
auto source = CreateDqAsyncInputBuffer(i, *inputType,
memoryLimits.ChannelBufferSize, Settings.CollectProfileStats);
- auto [_, inserted] = Sources.emplace(i, source);
+ auto [_, inserted] = AllocatedHolder->Sources.emplace(i, source);
Y_VERIFY(inserted);
inputs.emplace_back(source);
} else {
@@ -536,22 +559,24 @@ public:
auto inputChannel = CreateDqInputChannel(channelId, *inputType,
memoryLimits.ChannelBufferSize, Settings.CollectProfileStats, typeEnv, holderFactory,
inputChannelDesc.GetTransportVersion());
- auto ret = InputChannels.emplace(channelId, inputChannel);
+ auto ret = AllocatedHolder->InputChannels.emplace(channelId, inputChannel);
YQL_ENSURE(ret.second, "task: " << TaskId << ", duplicated input channelId: " << channelId);
inputs.emplace_back(inputChannel);
}
}
- auto entryNode = ProgramParsed.CompGraph->GetEntryPoint(i, true);
+ auto entryNode = AllocatedHolder->ProgramParsed.CompGraph->GetEntryPoint(i, true);
if (transform) {
- transform->TransformInput = DqBuildInputValue(inputDesc, transform->TransformInputType, std::move(inputs), holderFactory);
+ transform->TransformInput = DqBuildInputValue(inputDesc, transform->TransformInputType, std::move(inputs), holderFactory, {});
inputs.clear();
inputs.emplace_back(transform->TransformOutput);
- entryNode->SetValue(ProgramParsed.CompGraph->GetContext(),
- CreateInputUnionValue(std::move(inputs), holderFactory));
+ entryNode->SetValue(AllocatedHolder->ProgramParsed.CompGraph->GetContext(),
+ CreateInputUnionValue(std::move(inputs), holderFactory,
+ {&inputStats, transform->TransformOutputType}));
} else {
- entryNode->SetValue(ProgramParsed.CompGraph->GetContext(),
- DqBuildInputValue(inputDesc, entry->InputItemTypes[i], std::move(inputs), holderFactory));
+ entryNode->SetValue(AllocatedHolder->ProgramParsed.CompGraph->GetContext(),
+ DqBuildInputValue(inputDesc, entry->InputItemTypes[i], std::move(inputs), holderFactory,
+ {&inputStats, entry->InputItemTypes[i]}));
}
}
@@ -568,7 +593,7 @@ public:
TType** taskOutputType = &entry->OutputItemTypes[i];
if (outputDesc.HasTransform()) {
const auto& transformDesc = outputDesc.GetTransform();
- transform = &OutputTransforms[i];
+ transform = &AllocatedHolder->OutputTransforms[i];
Y_VERIFY(!transform->TransformInput);
Y_VERIFY(!transform->TransformOutput);
@@ -593,7 +618,7 @@ public:
if (outputDesc.HasSink()) {
auto sink = CreateDqAsyncOutputBuffer(i, *taskOutputType, memoryLimits.ChannelBufferSize,
Settings.CollectProfileStats);
- auto [_, inserted] = Sinks.emplace(i, sink);
+ auto [_, inserted] = AllocatedHolder->Sinks.emplace(i, sink);
Y_VERIFY(inserted);
outputs.emplace_back(sink);
} else {
@@ -615,7 +640,7 @@ public:
auto outputChannel = CreateDqOutputChannel(channelId, *taskOutputType, typeEnv,
holderFactory, settings, LogFunc);
- auto ret = OutputChannels.emplace(channelId, outputChannel);
+ auto ret = AllocatedHolder->OutputChannels.emplace(channelId, outputChannel);
YQL_ENSURE(ret.second, "task: " << TaskId << ", duplicated output channelId: " << channelId);
outputs.emplace_back(outputChannel);
}
@@ -638,12 +663,12 @@ public:
}
if (outputConsumers.empty()) {
- Output = nullptr;
+ AllocatedHolder->Output = nullptr;
} else if (outputConsumers.size() == 1) {
- Output = std::move(outputConsumers[0]);
+ AllocatedHolder->Output = std::move(outputConsumers[0]);
} else {
auto guard = BindAllocator();
- Output = CreateOutputMultiConsumer(std::move(outputConsumers));
+ AllocatedHolder->Output = CreateOutputMultiConsumer(std::move(outputConsumers));
}
auto prepareTime = TInstant::Now() - startTime;
@@ -659,13 +684,13 @@ public:
if (Stats) {
Stats->BuildCpuTime += prepareTime;
- for (auto&[channelId, inputChannel] : InputChannels) {
+ for (auto&[channelId, inputChannel] : AllocatedHolder->InputChannels) {
Stats->InputChannels.emplace(channelId, inputChannel->GetStats());
}
- for (auto&[inputIndex, source] : Sources) {
+ for (auto&[inputIndex, source] : AllocatedHolder->Sources) {
Stats->Sources.emplace(inputIndex, source->GetStats());
}
- for (auto&[channelId, outputChannel] : OutputChannels) {
+ for (auto&[channelId, outputChannel] : AllocatedHolder->OutputChannels) {
Stats->OutputChannels.emplace(channelId, outputChannel->GetStats());
}
}
@@ -673,10 +698,10 @@ public:
ERunStatus Run() final {
LOG(TStringBuilder() << "Run task: " << TaskId);
- if (!ResultStream) {
+ if (!AllocatedHolder->ResultStream) {
auto guard = BindAllocator();
- TBindTerminator term(ProgramParsed.CompGraph->GetTerminator());
- ResultStream = ProgramParsed.CompGraph->GetValue();
+ TBindTerminator term(AllocatedHolder->ProgramParsed.CompGraph->GetTerminator());
+ AllocatedHolder->ResultStream = AllocatedHolder->ProgramParsed.CompGraph->GetValue();
}
RunComputeTime = TDuration::Zero();
@@ -689,9 +714,9 @@ public:
if (Y_UNLIKELY(CollectProfileStats)) {
Stats->ComputeCpuTimeByRun->Collect(RunComputeTime.MilliSeconds());
- if (ProgramParsed.StatsRegistry) {
+ if (AllocatedHolder->ProgramParsed.StatsRegistry) {
Stats->MkqlStats.clear();
- ProgramParsed.StatsRegistry->ForEachStat([this](const TStatKey& key, i64 value) {
+ AllocatedHolder->ProgramParsed.StatsRegistry->ForEachStat([this](const TStatKey& key, i64 value) {
Stats->MkqlStats.emplace_back(TMkqlStat{key, value});
});
}
@@ -732,43 +757,43 @@ public:
}
IDqInputChannel::TPtr GetInputChannel(ui64 channelId) override {
- auto ptr = InputChannels.FindPtr(channelId);
+ auto ptr = AllocatedHolder->InputChannels.FindPtr(channelId);
YQL_ENSURE(ptr, "task: " << TaskId << " does not have input channelId: " << channelId);
return *ptr;
}
IDqAsyncInputBuffer::TPtr GetSource(ui64 inputIndex) override {
- auto ptr = Sources.FindPtr(inputIndex);
+ auto ptr = AllocatedHolder->Sources.FindPtr(inputIndex);
YQL_ENSURE(ptr, "task: " << TaskId << " does not have input index: " << inputIndex);
return *ptr;
}
IDqOutputChannel::TPtr GetOutputChannel(ui64 channelId) override {
- auto ptr = OutputChannels.FindPtr(channelId);
+ auto ptr = AllocatedHolder->OutputChannels.FindPtr(channelId);
YQL_ENSURE(ptr, "task: " << TaskId << " does not have output channelId: " << channelId);
return *ptr;
}
IDqAsyncOutputBuffer::TPtr GetSink(ui64 outputIndex) override {
- auto ptr = Sinks.FindPtr(outputIndex);
+ auto ptr = AllocatedHolder->Sinks.FindPtr(outputIndex);
YQL_ENSURE(ptr, "task: " << TaskId << " does not have output index: " << outputIndex);
return *ptr;
}
std::pair<NUdf::TUnboxedValue, IDqAsyncInputBuffer::TPtr> GetInputTransform(ui64 inputIndex) override {
- auto ptr = InputTransforms.FindPtr(inputIndex);
+ auto ptr = AllocatedHolder->InputTransforms.FindPtr(inputIndex);
YQL_ENSURE(ptr, "task: " << TaskId << " does not have input index: " << inputIndex << " or such transform");
return {ptr->TransformInput, ptr->TransformOutput};
}
std::pair<IDqAsyncOutputBuffer::TPtr, IDqOutputConsumer::TPtr> GetOutputTransform(ui64 outputIndex) override {
- auto ptr = OutputTransforms.FindPtr(outputIndex);
+ auto ptr = AllocatedHolder->OutputTransforms.FindPtr(outputIndex);
YQL_ENSURE(ptr, "task: " << TaskId << " does not have output index: " << outputIndex << " or such transform");
return {ptr->TransformInput, ptr->TransformOutput};
}
TGuard<NKikimr::NMiniKQL::TScopedAlloc> BindAllocator(TMaybe<ui64> memoryLimit = {}) override {
- auto guard = Context.TypeEnv ? Context.TypeEnv->BindAllocator() : SelfTypeEnv->BindAllocator();
+ auto guard = Context.TypeEnv ? Context.TypeEnv->BindAllocator() : AllocatedHolder->SelfTypeEnv->BindAllocator();
if (memoryLimit) {
guard.GetMutex()->SetLimit(*memoryLimit);
}
@@ -776,15 +801,19 @@ public:
}
bool IsAllocatorAttached() override {
- return Context.TypeEnv ? Context.TypeEnv->GetAllocator().IsAttached() : SelfTypeEnv->GetAllocator().IsAttached();
+ return Context.TypeEnv ? Context.TypeEnv->GetAllocator().IsAttached() : AllocatedHolder->SelfTypeEnv->GetAllocator().IsAttached();
}
const NKikimr::NMiniKQL::TTypeEnvironment& GetTypeEnv() const override {
- return Context.TypeEnv ? *Context.TypeEnv : *SelfTypeEnv;
+ return Context.TypeEnv ? *Context.TypeEnv : *AllocatedHolder->SelfTypeEnv;
}
const NKikimr::NMiniKQL::THolderFactory& GetHolderFactory() const override {
- return ProgramParsed.CompGraph->GetHolderFactory();
+ return AllocatedHolder->ProgramParsed.CompGraph->GetHolderFactory();
+ }
+
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> GetAllocatorPtr() const override {
+ return SelfAlloc;
}
const THashMap<TString, TString>& GetSecureParams() const override {
@@ -810,17 +839,17 @@ public:
}
TString Save() const override {
- return ProgramParsed.CompGraph->SaveGraphState();
+ return AllocatedHolder->ProgramParsed.CompGraph->SaveGraphState();
}
void Load(TStringBuf in) override {
- Y_VERIFY(!ResultStream);
- ProgramParsed.CompGraph->LoadGraphState(in);
+ Y_VERIFY(!AllocatedHolder->ResultStream);
+ AllocatedHolder->ProgramParsed.CompGraph->LoadGraphState(in);
}
private:
NKikimr::NMiniKQL::TTypeEnvironment& TypeEnv() {
- return Context.TypeEnv ? *Context.TypeEnv : *SelfTypeEnv;
+ return Context.TypeEnv ? *Context.TypeEnv : *AllocatedHolder->SelfTypeEnv;
}
NKikimr::NMiniKQL::TScopedAlloc& Alloc() {
@@ -828,12 +857,12 @@ private:
}
ERunStatus FetchAndDispatch() {
- if (!Output) {
+ if (!AllocatedHolder->Output) {
LOG("no consumers, Finish execution");
return ERunStatus::Finished;
}
- TBindTerminator term(ProgramParsed.CompGraph->GetTerminator());
+ TBindTerminator term(AllocatedHolder->ProgramParsed.CompGraph->GetTerminator());
auto startComputeTime = TInstant::Now();
Y_DEFER {
@@ -847,7 +876,7 @@ private:
};
auto guard = BindAllocator();
- while (!Output->IsFull()) {
+ while (!AllocatedHolder->Output->IsFull()) {
if (Y_UNLIKELY(CollectProfileStats)) {
auto now = TInstant::Now();
StopWaitingOutput(now);
@@ -855,16 +884,16 @@ private:
}
NUdf::TUnboxedValue value;
- auto fetchStatus = ResultStream.Fetch(value);
+ auto fetchStatus = AllocatedHolder->ResultStream.Fetch(value);
switch (fetchStatus) {
case NUdf::EFetchStatus::Ok: {
- Output->Consume(std::move(value));
+ AllocatedHolder->Output->Consume(std::move(value));
break;
}
case NUdf::EFetchStatus::Finish: {
LOG(TStringBuilder() << "task" << TaskId << ", execution finished, finish consumers");
- Output->Finish();
+ AllocatedHolder->Output->Finish();
return ERunStatus::Finished;
}
case NUdf::EFetchStatus::Yield: {
@@ -883,13 +912,13 @@ private:
TLogFunc LogFunc;
std::unique_ptr<NUdf::ISecureParamsProvider> SecureParamsProvider;
- std::unique_ptr<NKikimr::NMiniKQL::TScopedAlloc> SelfAlloc; // if not set -> use Context.Alloc
- std::unique_ptr<NKikimr::NMiniKQL::TTypeEnvironment> SelfTypeEnv; // if not set -> use Context.TypeEnv
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> SelfAlloc; // if not set -> use Context.Alloc
struct TInputTransformInfo {
NUdf::TUnboxedValue TransformInput;
IDqAsyncInputBuffer::TPtr TransformOutput;
TType* TransformInputType = nullptr;
+ TType* TransformOutputType = nullptr;
};
struct TOutputTransformInfo {
@@ -907,16 +936,24 @@ private:
return PatternCacheEntry->Pattern.Get();
}
};
- TProgramParsed ProgramParsed;
-
- THashMap<ui64, IDqInputChannel::TPtr> InputChannels; // Channel id -> Channel
- THashMap<ui64, IDqAsyncInputBuffer::TPtr> Sources; // Input index -> Source
- THashMap<ui64, TInputTransformInfo> InputTransforms; // Output index -> Transform
- THashMap<ui64, IDqOutputChannel::TPtr> OutputChannels; // Channel id -> Channel
- THashMap<ui64, IDqAsyncOutputBuffer::TPtr> Sinks; // Output index -> Sink
- THashMap<ui64, TOutputTransformInfo> OutputTransforms; // Output index -> Transform
- IDqOutputConsumer::TPtr Output;
- NUdf::TUnboxedValue ResultStream;
+
+ struct TAllocatedHolder {
+ std::unique_ptr<NKikimr::NMiniKQL::TTypeEnvironment> SelfTypeEnv; // if not set -> use Context.TypeEnv
+
+ TProgramParsed ProgramParsed;
+
+ THashMap<ui64, IDqInputChannel::TPtr> InputChannels; // Channel id -> Channel
+ THashMap<ui64, IDqAsyncInputBuffer::TPtr> Sources; // Input index -> Source
+ THashMap<ui64, TInputTransformInfo> InputTransforms; // Output index -> Transform
+ THashMap<ui64, IDqOutputChannel::TPtr> OutputChannels; // Channel id -> Channel
+ THashMap<ui64, IDqAsyncOutputBuffer::TPtr> Sinks; // Output index -> Sink
+ THashMap<ui64, TOutputTransformInfo> OutputTransforms; // Output index -> Transform
+
+ IDqOutputConsumer::TPtr Output;
+ NUdf::TUnboxedValue ResultStream;
+ };
+
+ std::optional<TAllocatedHolder> AllocatedHolder;
NKikimr::NMiniKQL::TWatermark Watermark;
bool TaskHasEffects = false;
@@ -924,6 +961,7 @@ private:
bool CollectBasicStats = false;
bool CollectProfileStats = false;
std::unique_ptr<TDqTaskRunnerStats> Stats;
+ TDqMeteringStats BillingStats;
TDuration RunComputeTime;
private:
diff --git a/ydb/library/yql/dq/runtime/dq_tasks_runner.h b/ydb/library/yql/dq/runtime/dq_tasks_runner.h
index 262fe77413..38ec3484b8 100644
--- a/ydb/library/yql/dq/runtime/dq_tasks_runner.h
+++ b/ydb/library/yql/dq/runtime/dq_tasks_runner.h
@@ -5,6 +5,7 @@
#include <ydb/library/yql/dq/runtime/dq_async_output.h>
#include <ydb/library/yql/dq/runtime/dq_compute.h>
#include <ydb/library/yql/dq/runtime/dq_input_channel.h>
+#include <ydb/library/yql/dq/runtime/dq_input_producer.h>
#include <ydb/library/yql/dq/runtime/dq_output_channel.h>
#include <ydb/library/yql/dq/runtime/dq_output_consumer.h>
#include <ydb/library/yql/dq/runtime/dq_async_input.h>
@@ -311,12 +312,14 @@ public:
virtual bool IsAllocatorAttached() = 0;
virtual const NKikimr::NMiniKQL::TTypeEnvironment& GetTypeEnv() const = 0;
virtual const NKikimr::NMiniKQL::THolderFactory& GetHolderFactory() const = 0;
+ virtual std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> GetAllocatorPtr() const = 0;
virtual const THashMap<TString, TString>& GetSecureParams() const = 0;
virtual const THashMap<TString, TString>& GetTaskParams() const = 0;
virtual void UpdateStats() = 0;
virtual const TDqTaskRunnerStats* GetStats() const = 0;
+ virtual const TDqMeteringStats* GetMeteringStats() const = 0;
[[nodiscard]]
virtual TString Save() const = 0;
diff --git a/ydb/library/yql/dq/runtime/dq_transport.cpp b/ydb/library/yql/dq/runtime/dq_transport.cpp
index 0f177986d4..3ef737da40 100644
--- a/ydb/library/yql/dq/runtime/dq_transport.cpp
+++ b/ydb/library/yql/dq/runtime/dq_transport.cpp
@@ -238,7 +238,7 @@ std::optional<ui64> EstimateIntegralDataSize(const TDataType* dataType) {
}
}
-ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniKQL::TType* type, bool* fixed) {
+ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniKQL::TType* type, bool* fixed, TDqDataSerializer::TEstimateSizeSettings settings) {
switch (type->GetKind()) {
case TType::EKind::Void:
case TType::EKind::Null:
@@ -261,7 +261,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
case NUdf::EDataSlot::Json:
case NUdf::EDataSlot::JsonDocument:
case NUdf::EDataSlot::Yson:
- return 2 + value.AsStringRef().Size();
+ return (settings.WithHeaders?2:0) + value.AsStringRef().Size();
default:
YQL_ENSURE(false, "" << dataType->GetKindAsStr());
}
@@ -276,7 +276,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
return *size;
}
}
- return EstimateSizeImpl(value.GetOptionalValue(), optionalType->GetItemType(), fixed);
+ return EstimateSizeImpl(value.GetOptionalValue(), optionalType->GetItemType(), fixed, settings);
}
return 0;
}
@@ -284,18 +284,18 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
case TType::EKind::List: {
auto listType = static_cast<const TListType*>(type);
auto itemType = listType->GetItemType();
- ui64 size = 2;
+ ui64 size = (settings.WithHeaders?2:0);
if (value.HasFastListLength() && value.GetListLength() > 0 && value.GetElements()) {
auto len = value.GetListLength();
auto p = value.GetElements();
do {
- size += EstimateSizeImpl(*p++, itemType, fixed);
+ size += EstimateSizeImpl(*p++, itemType, fixed, settings);
}
while (--len);
} else {
const auto iter = value.GetListIterator();
for (NUdf::TUnboxedValue item; iter.Next(item);) {
- size += EstimateSizeImpl(item, itemType, fixed);
+ size += EstimateSizeImpl(item, itemType, fixed, settings);
}
}
return size;
@@ -303,7 +303,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
case TType::EKind::Struct: {
auto structType = static_cast<const TStructType*>(type);
- ui64 size = 2;
+ ui64 size = (settings.WithHeaders?2:0);
for (ui32 index = 0; index < structType->GetMembersCount(); ++index) {
auto memberType = structType->GetMemberType(index);
@@ -315,7 +315,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
}
}
- size += EstimateSizeImpl(value.GetElement(index), memberType, fixed);
+ size += EstimateSizeImpl(value.GetElement(index), memberType, fixed, settings);
}
return size;
@@ -323,7 +323,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
case TType::EKind::Tuple: {
auto tupleType = static_cast<const TTupleType*>(type);
- ui64 size = 2;
+ ui64 size = (settings.WithHeaders?2:0);
for (ui32 index = 0; index < tupleType->GetElementsCount(); ++index) {
auto elementType = tupleType->GetElementType(index);
@@ -335,7 +335,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
}
}
- size += EstimateSizeImpl(value.GetElement(index), elementType, fixed);
+ size += EstimateSizeImpl(value.GetElement(index), elementType, fixed, settings);
}
return size;
}
@@ -345,11 +345,11 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
auto keyType = dictType->GetKeyType();
auto payloadType = dictType->GetPayloadType();
- ui64 size = 2;
+ ui64 size = (settings.WithHeaders?2:0);
const auto iter = value.GetDictIterator();
for (NUdf::TUnboxedValue key, payload; iter.NextPair(key, payload);) {
- size += EstimateSizeImpl(key, keyType, fixed);
- size += EstimateSizeImpl(payload, payloadType, fixed);
+ size += EstimateSizeImpl(key, keyType, fixed, settings);
+ size += EstimateSizeImpl(payload, payloadType, fixed, settings);
}
return size;
}
@@ -364,7 +364,7 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
MKQL_ENSURE(innerType->IsTuple(), "Unexpected underlying variant type: " << innerType->GetKindAsStr());
innerType = static_cast<TTupleType*>(innerType)->GetElementType(variantIndex);
}
- return 2 + EstimateSizeImpl(value.GetVariantItem(), innerType, fixed);
+ return (settings.WithHeaders?2:0) + EstimateSizeImpl(value.GetVariantItem(), innerType, fixed, settings);
}
case TType::EKind::Pg: {
@@ -382,19 +382,23 @@ ui64 EstimateSizeImpl(const NUdf::TUnboxedValuePod& value, const NKikimr::NMiniK
case TType::EKind::Flow:
case TType::EKind::ReservedKind:
case TType::EKind::Tagged:
- case TType::EKind::Block:
+ case TType::EKind::Block: {
+ if (settings.DiscardUnsupportedTypes) {
+ return 0;
+ }
THROW yexception() << "Unsupported type: " << type->GetKindAsStr();
+ }
}
}
} // namespace
-ui64 TDqDataSerializer::EstimateSize(const NUdf::TUnboxedValue& value, const NKikimr::NMiniKQL::TType* type, bool* fixed)
+ui64 TDqDataSerializer::EstimateSize(const NUdf::TUnboxedValue& value, const NKikimr::NMiniKQL::TType* type, bool* fixed, TDqDataSerializer::TEstimateSizeSettings settings)
{
if (fixed) {
*fixed = true;
}
- return EstimateSizeImpl(value, type, fixed);
+ return EstimateSizeImpl(value, type, fixed, settings);
}
} // namespace NYql::NDq
diff --git a/ydb/library/yql/dq/runtime/dq_transport.h b/ydb/library/yql/dq/runtime/dq_transport.h
index bcad268f08..3f4e182b8c 100644
--- a/ydb/library/yql/dq/runtime/dq_transport.h
+++ b/ydb/library/yql/dq/runtime/dq_transport.h
@@ -53,7 +53,18 @@ public:
void Deserialize(const NDqProto::TData& data, const NKikimr::NMiniKQL::TType* itemType, NUdf::TUnboxedValue& value) const;
ui64 CalcSerializedSize(NUdf::TUnboxedValue& value, const NKikimr::NMiniKQL::TType* type);
- static ui64 EstimateSize(const NUdf::TUnboxedValue& value, const NKikimr::NMiniKQL::TType* type, bool* fixed = nullptr);
+
+ struct TEstimateSizeSettings {
+ bool WithHeaders;
+ bool DiscardUnsupportedTypes;
+
+ TEstimateSizeSettings() {
+ WithHeaders = true;
+ DiscardUnsupportedTypes = false;
+ }
+ };
+
+ static ui64 EstimateSize(const NUdf::TUnboxedValue& value, const NKikimr::NMiniKQL::TType* type, bool* fixed = nullptr, TEstimateSizeSettings = {});
static void DeserializeParam(const NDqProto::TData& data, const NKikimr::NMiniKQL::TType* type,
const NKikimr::NMiniKQL::THolderFactory& holderFactory, NKikimr::NUdf::TUnboxedValue& value);
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.darwin.txt b/ydb/library/yql/minikql/computation/CMakeLists.darwin.txt
index a1a1ffe339..9fbb4aab45 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.darwin.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.darwin.txt
@@ -25,6 +25,7 @@ target_link_libraries(yql-minikql-computation PUBLIC
parser-pg_wrapper-interface
yql-public-udf
library-yql-utils
+ cpp-threading-future
yql-minikql-codegen
llvm12-lib-IR
lib-ExecutionEngine-MCJIT
@@ -67,6 +68,7 @@ target_link_libraries(yql-minikql-computation.global PUBLIC
parser-pg_wrapper-interface
yql-public-udf
library-yql-utils
+ cpp-threading-future
yql-minikql-codegen
llvm12-lib-IR
lib-ExecutionEngine-MCJIT
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt b/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt
index eba04ed0ee..ee92f6ead7 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt
@@ -26,6 +26,7 @@ target_link_libraries(yql-minikql-computation PUBLIC
parser-pg_wrapper-interface
yql-public-udf
library-yql-utils
+ cpp-threading-future
yql-minikql-codegen
llvm12-lib-IR
lib-ExecutionEngine-MCJIT
@@ -69,6 +70,7 @@ target_link_libraries(yql-minikql-computation.global PUBLIC
parser-pg_wrapper-interface
yql-public-udf
library-yql-utils
+ cpp-threading-future
yql-minikql-codegen
llvm12-lib-IR
lib-ExecutionEngine-MCJIT
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.linux.txt b/ydb/library/yql/minikql/computation/CMakeLists.linux.txt
index eba04ed0ee..ee92f6ead7 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.linux.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.linux.txt
@@ -26,6 +26,7 @@ target_link_libraries(yql-minikql-computation PUBLIC
parser-pg_wrapper-interface
yql-public-udf
library-yql-utils
+ cpp-threading-future
yql-minikql-codegen
llvm12-lib-IR
lib-ExecutionEngine-MCJIT
@@ -69,6 +70,7 @@ target_link_libraries(yql-minikql-computation.global PUBLIC
parser-pg_wrapper-interface
yql-public-udf
library-yql-utils
+ cpp-threading-future
yql-minikql-codegen
llvm12-lib-IR
lib-ExecutionEngine-MCJIT
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node.cpp b/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
index f7249bea95..6921e83fed 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
@@ -36,7 +36,7 @@ TComputationContext::TComputationContext(const THolderFactory& holderFactory,
, TimeProvider(opts.TimeProvider)
, ArrowMemoryPool(arrowMemoryPool)
, WideFields(mutables.CurWideFieldsIndex, nullptr)
- , TypeEnv(*opts.TypeEnv)
+ , TypeEnv(opts.TypeEnv)
{
std::fill_n(MutableValues.get(), mutables.CurValueIndex, NUdf::TUnboxedValue(NUdf::TUnboxedValuePod::Invalid()));
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node.h b/ydb/library/yql/minikql/computation/mkql_computation_node.h
index f113752a12..640ef0f581 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node.h
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node.h
@@ -119,7 +119,7 @@ struct TComputationContext : public TComputationContextLLVM {
bool ExecuteLLVM = true;
arrow::MemoryPool& ArrowMemoryPool;
std::vector<NUdf::TUnboxedValue*> WideFields;
- TTypeEnvironment& TypeEnv;
+ TTypeEnvironment* TypeEnv = nullptr;
TComputationContext(const THolderFactory& holderFactory,
const NUdf::IValueBuilder* builder,
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp b/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp
index f82797d3ca..d08d593db7 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp
@@ -148,6 +148,10 @@ public:
~TPatternNodes()
{
+ for (auto it = ComputationNodesList.rbegin(); it != ComputationNodesList.rend(); ++it) {
+ *it = nullptr;
+ }
+
ComputationNodesList.clear();
if (!UncaughtException()) {
#ifndef NDEBUG
@@ -454,7 +458,11 @@ private:
name == "KqpWideReadTable" ||
name == "KqpWideReadTableRanges" ||
name == "KqpLookupTable" ||
- name == "KqpReadTable"
+ name == "KqpReadTable" ||
+ name == "RangeMultiply" ||
+ name == "RangeUnion" ||
+ name == "RangeIntersect" ||
+ name == "RangeFinalize"
) {
PatternNodes->SuitableForCache = false;
}
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node_holders.cpp b/ydb/library/yql/minikql/computation/mkql_computation_node_holders.cpp
index 9f538964fa..8d46ca3df9 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node_holders.cpp
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node_holders.cpp
@@ -3316,7 +3316,13 @@ THolderFactory::THolderFactory(
, MemInfo(memInfo)
, FunctionRegistry(functionRegistry)
, EmptyContainer(NUdf::TUnboxedValuePod(AllocateOn<TEmptyContainerHolder>(CurrentAllocState, &MemInfo)))
-{}
+{
+ CurrentAllocState->LockObject(EmptyContainer);
+}
+
+THolderFactory::~THolderFactory() {
+ CurrentAllocState->UnlockObject(EmptyContainer);
+}
NUdf::TUnboxedValuePod THolderFactory::CreateTypeHolder(TType* type) const
{
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node_holders.h b/ydb/library/yql/minikql/computation/mkql_computation_node_holders.h
index 74b769f180..6e24992d73 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node_holders.h
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node_holders.h
@@ -394,6 +394,8 @@ public:
TMemoryUsageInfo& memInfo,
const IFunctionRegistry* functionRegistry = nullptr);
+ ~THolderFactory();
+
template <typename T, typename... TArgs>
NUdf::TUnboxedValuePod Create(TArgs&&... args) const {
return NUdf::TUnboxedValuePod(AllocateOn<T>(CurrentAllocState, &MemInfo, std::forward<TArgs>(args)...));
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node_impl.cpp b/ydb/library/yql/minikql/computation/mkql_computation_node_impl.cpp
index c7c7908f73..f22dafdc8a 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node_impl.cpp
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node_impl.cpp
@@ -32,15 +32,17 @@ TUnboxedImmutableComputationNode::TUnboxedImmutableComputationNode(TMemoryUsageI
, RepresentationKind(UnboxedValue.HasValue() ? (UnboxedValue.IsBoxed() ? EValueRepresentation::Boxed : (UnboxedValue.IsString() ? EValueRepresentation::String : EValueRepresentation::Embedded)) : EValueRepresentation::Embedded)
{
MKQL_MEM_TAKE(MemInfo, this, sizeof(*this), __MKQL_LOCATION__);
+ TlsAllocState->LockObject(UnboxedValue);
}
TUnboxedImmutableComputationNode::~TUnboxedImmutableComputationNode() {
MKQL_MEM_RETURN(MemInfo, this, sizeof(*this));
+ TlsAllocState->UnlockObject(UnboxedValue);
}
NUdf::TUnboxedValue TUnboxedImmutableComputationNode::GetValue(TComputationContext& compCtx) const {
Y_UNUSED(compCtx);
- if (RepresentationKind == EValueRepresentation::String) {
+ if (!TlsAllocState->UseRefLocking && RepresentationKind == EValueRepresentation::String) {
/// TODO: YQL-4461
return MakeString(UnboxedValue.AsStringRef());
}
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_pattern_cache.h b/ydb/library/yql/minikql/computation/mkql_computation_pattern_cache.h
index fdf3429fd8..1cb848bb93 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_pattern_cache.h
+++ b/ydb/library/yql/minikql/computation/mkql_computation_pattern_cache.h
@@ -3,6 +3,7 @@
#include "mkql_computation_node.h"
#include <ydb/library/yql/minikql/mkql_node.h>
+#include <library/cpp/threading/future/future.h>
#include <memory>
@@ -52,11 +53,13 @@ struct TPatternCacheEntry {
class TComputationPatternLRUCache {
mutable std::mutex Mutex;
+ THashMap<TString, TMaybe<TVector<NThreading::TPromise<std::shared_ptr<TPatternCacheEntry>>>>> Notify;
TLRUCache<TString, std::shared_ptr<TPatternCacheEntry>> Cache;
size_t CurrentSizeBytes = 0;
const size_t MaxSizeBytes = 0;
public:
NMonitoring::TDynamicCounters::TCounterPtr Hits;
+ NMonitoring::TDynamicCounters::TCounterPtr Waits;
NMonitoring::TDynamicCounters::TCounterPtr Misses;
NMonitoring::TDynamicCounters::TCounterPtr NotSuitablePattern;
NMonitoring::TDynamicCounters::TCounterPtr SizeItems;
@@ -64,10 +67,46 @@ public:
NMonitoring::TDynamicCounters::TCounterPtr MaxSizeBytesCounter;
public:
+ class TTicket : private TNonCopyable {
+ public:
+ TTicket(const TString& serialized, bool isOwned, const NThreading::TFuture<std::shared_ptr<TPatternCacheEntry>>& future, TComputationPatternLRUCache* cache)
+ : Serialized(serialized)
+ , IsOwned(isOwned)
+ , Future(future)
+ , Cache(cache)
+ {}
+
+ ~TTicket() {
+ if (Cache) {
+ Cache->NotifyMissing(Serialized);
+ }
+ }
+
+ bool HasFuture() const {
+ return !IsOwned;
+ }
+
+ std::shared_ptr<TPatternCacheEntry> GetValueSync() const {
+ Y_VERIFY(HasFuture());
+ return Future.GetValueSync();
+ }
+
+ void Close() {
+ Cache = nullptr;
+ }
+
+ private:
+ const TString Serialized;
+ const bool IsOwned;
+ const NThreading::TFuture<std::shared_ptr<TPatternCacheEntry>> Future;
+ TComputationPatternLRUCache* Cache;
+ };
+
TComputationPatternLRUCache(size_t sizeBytes, NMonitoring::TDynamicCounterPtr counters = MakeIntrusive<NMonitoring::TDynamicCounters>())
: Cache(10000)
, MaxSizeBytes(sizeBytes)
, Hits(counters->GetCounter("PatternCache/Hits", true))
+ , Waits(counters->GetCounter("PatternCache/Waits", true))
, Misses(counters->GetCounter("PatternCache/Misses", true))
, NotSuitablePattern(counters->GetCounter("PatternCache/NotSuitablePattern", true))
, SizeItems(counters->GetCounter("PatternCache/SizeItems", false))
@@ -92,6 +131,30 @@ public:
}
}
+ TTicket FindOrSubscribe(const TString& serialized) {
+ auto guard = std::scoped_lock<std::mutex>(Mutex);
+ if (auto it = Cache.Find(serialized); it != Cache.End()) {
+ ++*Hits;
+ return TTicket(serialized, false, NThreading::MakeFuture<std::shared_ptr<TPatternCacheEntry>>(*it), nullptr);
+ }
+
+ auto [notifyIt, isNew] = Notify.emplace(serialized, Nothing());
+ if (isNew) {
+ ++*Misses;
+ return TTicket(serialized, true, {}, this);
+ }
+
+ ++*Waits;
+ auto promise = NThreading::NewPromise<std::shared_ptr<TPatternCacheEntry>>();
+ auto& subscribers = Notify[serialized];
+ if (!subscribers) {
+ subscribers.ConstructInPlace();
+ }
+
+ subscribers->push_back(promise);
+ return TTicket(serialized, false, promise, nullptr);
+ }
+
void RemoveOldest() {
auto oldest = Cache.FindOldest();
Y_VERIFY_DEBUG(oldest != Cache.End());
@@ -99,25 +162,57 @@ public:
Cache.Erase(oldest);
}
+ void NotifyMissing(const TString& serialized) {
+ TMaybe<TVector<NThreading::TPromise<std::shared_ptr<TPatternCacheEntry>>>> subscribers;
+ {
+ auto guard = std::scoped_lock<std::mutex>(Mutex);
+ auto notifyIt = Notify.find(serialized);
+ if (notifyIt != Notify.end()) {
+ subscribers.swap(notifyIt->second);
+ Notify.erase(notifyIt);
+ }
+ }
+
+ if (subscribers) {
+ for (auto& s : *subscribers) {
+ s.SetValue(nullptr);
+ }
+ }
+ }
+
void EmplacePattern(const TString& serialized, std::shared_ptr<TPatternCacheEntry> patternWithEnv) {
Y_VERIFY_DEBUG(patternWithEnv && patternWithEnv->Pattern);
- auto guard = std::scoped_lock<std::mutex>(Mutex);
- // normally remove only one old cache entry by iteration to prevent bursts
- if (CurrentSizeBytes > MaxSizeBytes) {
- RemoveOldest();
- }
- // to prevent huge memory overusage remove as much as needed
- while (CurrentSizeBytes > 2 * MaxSizeBytes) {
- RemoveOldest();
+ TMaybe<TVector<NThreading::TPromise<std::shared_ptr<TPatternCacheEntry>>>> subscribers;
+ {
+ auto guard = std::scoped_lock<std::mutex>(Mutex);
+ // normally remove only one old cache entry by iteration to prevent bursts
+ if (CurrentSizeBytes > MaxSizeBytes) {
+ RemoveOldest();
+ }
+ // to prevent huge memory overusage remove as much as needed
+ while (CurrentSizeBytes > 2 * MaxSizeBytes) {
+ RemoveOldest();
+ }
+
+ patternWithEnv->UpdateSizeForCache();
+ CurrentSizeBytes += patternWithEnv->SizeForCache;
+
+ Cache.Insert(serialized, patternWithEnv);
+ auto notifyIt = Notify.find(serialized);
+ if (notifyIt != Notify.end()) {
+ subscribers.swap(notifyIt->second);
+ Notify.erase(notifyIt);
+ }
+
+ *SizeItems = Cache.Size();
+ *SizeBytes = CurrentSizeBytes;
}
- patternWithEnv->UpdateSizeForCache();
- CurrentSizeBytes += patternWithEnv->SizeForCache;
-
- Cache.Insert(serialized, std::move(patternWithEnv));
-
- *SizeItems = Cache.Size();
- *SizeBytes = CurrentSizeBytes;
+ if (subscribers) {
+ for (auto& s : *subscribers) {
+ s.SetValue(patternWithEnv);
+ }
+ }
}
void CleanCache() {
diff --git a/ydb/library/yql/minikql/dom/CMakeLists.darwin.txt b/ydb/library/yql/minikql/dom/CMakeLists.darwin.txt
index 338a759823..87e994f1ea 100644
--- a/ydb/library/yql/minikql/dom/CMakeLists.darwin.txt
+++ b/ydb/library/yql/minikql/dom/CMakeLists.darwin.txt
@@ -10,7 +10,7 @@
add_library(yql-minikql-dom)
target_compile_options(yql-minikql-dom PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(yql-minikql-dom PUBLIC
diff --git a/ydb/library/yql/minikql/dom/CMakeLists.linux-aarch64.txt b/ydb/library/yql/minikql/dom/CMakeLists.linux-aarch64.txt
index 46754a9edb..356fa0eb3a 100644
--- a/ydb/library/yql/minikql/dom/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/minikql/dom/CMakeLists.linux-aarch64.txt
@@ -10,7 +10,7 @@
add_library(yql-minikql-dom)
target_compile_options(yql-minikql-dom PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(yql-minikql-dom PUBLIC
diff --git a/ydb/library/yql/minikql/dom/CMakeLists.linux.txt b/ydb/library/yql/minikql/dom/CMakeLists.linux.txt
index 46754a9edb..356fa0eb3a 100644
--- a/ydb/library/yql/minikql/dom/CMakeLists.linux.txt
+++ b/ydb/library/yql/minikql/dom/CMakeLists.linux.txt
@@ -10,7 +10,7 @@
add_library(yql-minikql-dom)
target_compile_options(yql-minikql-dom PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(yql-minikql-dom PUBLIC
diff --git a/ydb/library/yql/minikql/mkql_alloc.cpp b/ydb/library/yql/minikql/mkql_alloc.cpp
index 9c7d264605..0e62e78bb5 100644
--- a/ydb/library/yql/minikql/mkql_alloc.cpp
+++ b/ydb/library/yql/minikql/mkql_alloc.cpp
@@ -95,6 +95,50 @@ size_t TAllocState::GetDeallocatedInPages() const {
return deallocated;
}
+void TAllocState::LockObject(::NKikimr::NUdf::TUnboxedValuePod value) {
+ if (!UseRefLocking) {
+ return;
+ }
+
+ void* obj;
+ if (value.IsString()) {
+ obj = value.AsStringRef().Data();
+ } else if (value.IsBoxed()) {
+ obj = value.AsBoxed().Get();
+ } else {
+ return;
+ }
+
+ auto [it, isNew] = LockedObjectsRefs.emplace(obj, TLockInfo{ 0, 0 });
+ if (isNew) {
+ it->second.OriginalRefs = value.LockRef();
+ }
+
+ ++it->second.Locks;
+}
+
+void TAllocState::UnlockObject(::NKikimr::NUdf::TUnboxedValuePod value) {
+ if (!UseRefLocking) {
+ return;
+ }
+
+ void* obj;
+ if (value.IsString()) {
+ obj = value.AsStringRef().Data();
+ } else if (value.IsBoxed()) {
+ obj = value.AsBoxed().Get();
+ } else {
+ return;
+ }
+
+ auto it = LockedObjectsRefs.find(obj);
+ Y_VERIFY(it != LockedObjectsRefs.end());
+ if (--it->second.Locks == 0) {
+ value.UnlockRef(it->second.OriginalRefs);
+ LockedObjectsRefs.erase(it);
+ }
+}
+
void TScopedAlloc::Acquire() {
if (!AttachedCount_) {
PrevState_ = TlsAllocState;
diff --git a/ydb/library/yql/minikql/mkql_alloc.h b/ydb/library/yql/minikql/mkql_alloc.h
index eaa9ee0337..62d7efc842 100644
--- a/ydb/library/yql/minikql/mkql_alloc.h
+++ b/ydb/library/yql/minikql/mkql_alloc.h
@@ -77,6 +77,14 @@ struct TAllocState : public TAlignedPagePool
void* MainContext = nullptr;
void* CurrentContext = nullptr;
+ struct TLockInfo {
+ i32 OriginalRefs;
+ i32 Locks;
+ };
+
+ bool UseRefLocking = false;
+ std::unordered_map<void*, TLockInfo> LockedObjectsRefs;
+
::NKikimr::NUdf::TBoxedValueLink Root;
NKikimr::NUdf::TBoxedValueLink* GetRoot() noexcept {
@@ -88,6 +96,9 @@ struct TAllocState : public TAlignedPagePool
void InvalidateMemInfo();
size_t GetDeallocatedInPages() const;
static void CleanupPAllocList(TListEntry* root);
+
+ void LockObject(::NKikimr::NUdf::TUnboxedValuePod value);
+ void UnlockObject(::NKikimr::NUdf::TUnboxedValuePod value);
};
extern Y_POD_THREAD(TAllocState*) TlsAllocState;
diff --git a/ydb/library/yql/minikql/mkql_runtime_version.h b/ydb/library/yql/minikql/mkql_runtime_version.h
index 043e54c485..19b344fcc0 100644
--- a/ydb/library/yql/minikql/mkql_runtime_version.h
+++ b/ydb/library/yql/minikql/mkql_runtime_version.h
@@ -24,12 +24,20 @@ namespace NMiniKQL {
// 1. Bump this version every time incompatible runtime nodes are introduced.
// 2. Make sure you provide runtime node generation for previous runtime versions.
#ifndef MKQL_RUNTIME_VERSION
-#define MKQL_RUNTIME_VERSION 32U
+#define MKQL_RUNTIME_VERSION 30U
#endif
// History:
// v4 is the version supported by kikimr-19-6
// v14 is the version supported by kikimr-20-2
+// v14 is the version supported by kikimr-20-2
+// v21 is the version supported by kikimr-20-4
+// v21 is the version supported by kikimr-20-6
+// v23 is the version supported by kikimr-21-2
+// v24 is the version supported by kikimr-21-4
+// v29 is the version supported by kikimr-22-2
+// v30 is the version supported by kikimr-22-4
+// v32 is the version supported by kikimr-23-1
constexpr ui32 RuntimeVersion = MKQL_RUNTIME_VERSION;
}
diff --git a/ydb/library/yql/minikql/mkql_type_builder.cpp b/ydb/library/yql/minikql/mkql_type_builder.cpp
index badbe461ea..773e52a93e 100644
--- a/ydb/library/yql/minikql/mkql_type_builder.cpp
+++ b/ydb/library/yql/minikql/mkql_type_builder.cpp
@@ -1480,11 +1480,8 @@ NUdf::TType* TFunctionTypeInfoBuilder::EmptyDict() const {
return Env_.GetTypeOfEmptyDict();
}
-NUdf::IFunctionTypeInfoBuilder9& TFunctionTypeInfoBuilder::BlockImplementationImpl(
- NUdf::TUniquePtr<NUdf::IBoxedValue> impl)
+void TFunctionTypeInfoBuilder::Unused1()
{
- BlockImplementation_ = std::move(impl);
- return *this;
}
NUdf::ISetTypeBuilder::TPtr TFunctionTypeInfoBuilder::Set() const {
@@ -1507,10 +1504,20 @@ NUdf::IBlockTypeBuilder::TPtr TFunctionTypeInfoBuilder::Block(bool isScalar) con
return new TBlockTypeBuilder(*this, isScalar);
}
-void TFunctionTypeInfoBuilder::Unused1() {
+void TFunctionTypeInfoBuilder::Unused2() {
}
-void TFunctionTypeInfoBuilder::Unused2() {
+void TFunctionTypeInfoBuilder::Unused3() {
+}
+
+NUdf::IFunctionTypeInfoBuilder15& TFunctionTypeInfoBuilder::SupportsBlocks() {
+ SupportsBlocks_ = true;
+ return *this;
+}
+
+NUdf::IFunctionTypeInfoBuilder15& TFunctionTypeInfoBuilder::IsStrict() {
+ IsStrict_ = true;
+ return *this;
}
bool TFunctionTypeInfoBuilder::GetSecureParam(NUdf::TStringRef key, NUdf::TStringRef& value) const {
@@ -1635,7 +1642,8 @@ void TFunctionTypeInfoBuilder::Build(TFunctionTypeInfo* funcInfo)
funcInfo->ModuleIR = std::move(ModuleIR_);
funcInfo->ModuleIRUniqID = std::move(ModuleIRUniqID_);
funcInfo->IRFunctionName = std::move(IRFunctionName_);
- funcInfo->BlockImplementation = std::move(BlockImplementation_);
+ funcInfo->SupportsBlocks = SupportsBlocks_;
+ funcInfo->IsStrict = IsStrict_;
}
NUdf::TType* TFunctionTypeInfoBuilder::Primitive(NUdf::TDataTypeId typeId) const
diff --git a/ydb/library/yql/minikql/mkql_type_builder.h b/ydb/library/yql/minikql/mkql_type_builder.h
index af6ba7e315..0d1fe86799 100644
--- a/ydb/library/yql/minikql/mkql_type_builder.h
+++ b/ydb/library/yql/minikql/mkql_type_builder.h
@@ -38,11 +38,12 @@ struct TFunctionTypeInfo
const TType* RunConfigType = nullptr;
const TType* UserType = nullptr;
NUdf::TUniquePtr<NUdf::IBoxedValue> Implementation;
- NUdf::TUniquePtr<NUdf::IBoxedValue> BlockImplementation;
TString ModuleIR;
TString ModuleIRUniqID;
TString IRFunctionName;
bool Deterministic = true;
+ bool SupportsBlocks = false;
+ bool IsStrict = false;
};
//////////////////////////////////////////////////////////////////////////////
@@ -133,23 +134,23 @@ public:
NUdf::TType* EmptyList() const override;
NUdf::TType* EmptyDict() const override;
- NUdf::IFunctionTypeInfoBuilder9& BlockImplementationImpl(
- NUdf::TUniquePtr<NUdf::IBoxedValue> impl) override;
-
+ void Unused1() override;
NUdf::ISetTypeBuilder::TPtr Set() const override;
NUdf::IEnumTypeBuilder::TPtr Enum(ui32 expectedItems = 10) const override;
NUdf::TType* Tagged(const NUdf::TType* baseType, const NUdf::TStringRef& tag) const override;
NUdf::TType* Pg(ui32 typeId) const override;
NUdf::IBlockTypeBuilder::TPtr Block(bool isScalar) const override;
- void Unused1() override;
void Unused2() override;
+ void Unused3() override;
+
+ NUdf::IFunctionTypeInfoBuilder15& SupportsBlocks() override;
+ NUdf::IFunctionTypeInfoBuilder15& IsStrict() override;
bool GetSecureParam(NUdf::TStringRef key, NUdf::TStringRef& value) const override;
private:
const TTypeEnvironment& Env_;
NUdf::TUniquePtr<NUdf::IBoxedValue> Implementation_;
- NUdf::TUniquePtr<NUdf::IBoxedValue> BlockImplementation_;
const TType* ReturnType_;
const TType* RunConfigType_;
const TType* UserType_;
@@ -165,6 +166,8 @@ private:
TString ModuleIR_;
TString ModuleIRUniqID_;
TString IRFunctionName_;
+ bool SupportsBlocks_ = false;
+ bool IsStrict_ = false;
};
class TTypeInfoHelper : public NUdf::ITypeInfoHelper
diff --git a/ydb/library/yql/parser/pg_wrapper/CMakeLists.darwin.txt b/ydb/library/yql/parser/pg_wrapper/CMakeLists.darwin.txt
index c12b7097ea..3a044bbf92 100644
--- a/ydb/library/yql/parser/pg_wrapper/CMakeLists.darwin.txt
+++ b/ydb/library/yql/parser/pg_wrapper/CMakeLists.darwin.txt
@@ -6,7 +6,6 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
find_package(OpenSSL REQUIRED)
add_subdirectory(interface)
add_subdirectory(ut)
@@ -123,7 +122,6 @@ target_link_libraries(yql-parser-pg_wrapper PUBLIC
library-yql-utils
contrib-libs-icu
contrib-libs-libc_compat
- Iconv::Iconv
contrib-libs-libxml
contrib-libs-lz4
OpenSSL::OpenSSL
diff --git a/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux-aarch64.txt b/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux-aarch64.txt
index c978c34342..de1d28f9e8 100644
--- a/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux-aarch64.txt
@@ -6,7 +6,6 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
find_package(OpenSSL REQUIRED)
add_subdirectory(interface)
add_subdirectory(ut)
@@ -122,7 +121,6 @@ target_link_libraries(yql-parser-pg_wrapper PUBLIC
library-yql-utils
contrib-libs-icu
contrib-libs-libc_compat
- Iconv::Iconv
contrib-libs-libxml
contrib-libs-lz4
OpenSSL::OpenSSL
diff --git a/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux.txt b/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux.txt
index b8b09100c0..98b75da5ea 100644
--- a/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux.txt
+++ b/ydb/library/yql/parser/pg_wrapper/CMakeLists.linux.txt
@@ -6,7 +6,6 @@
# original buildsystem will not be accepted.
-find_package(Iconv REQUIRED)
find_package(OpenSSL REQUIRED)
add_subdirectory(interface)
add_subdirectory(ut)
@@ -124,7 +123,6 @@ target_link_libraries(yql-parser-pg_wrapper PUBLIC
library-yql-utils
contrib-libs-icu
contrib-libs-libc_compat
- Iconv::Iconv
contrib-libs-libxml
contrib-libs-lz4
OpenSSL::OpenSSL
diff --git a/ydb/library/yql/providers/common/proto/udf_resolver.proto b/ydb/library/yql/providers/common/proto/udf_resolver.proto
index cbfe07f218..8b67815726 100644
--- a/ydb/library/yql/providers/common/proto/udf_resolver.proto
+++ b/ydb/library/yql/providers/common/proto/udf_resolver.proto
@@ -27,6 +27,8 @@ message TFunctionResult {
repeated TArgResult Args = 11;
optional string ReturnType = 12;
optional string ReturnDoc = 13;
+ optional bool SupportsBlocks = 14;
+ optional bool IsStrict = 15;
};
message TImport {
diff --git a/ydb/library/yql/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp b/ydb/library/yql/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp
index 4ed2e02033..f1f631d49b 100644
--- a/ydb/library/yql/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp
+++ b/ydb/library/yql/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp
@@ -364,6 +364,8 @@ private:
continue;
}
}
+ udf->SupportsBlocks = udfRes.GetSupportsBlocks();
+ udf->IsStrict = udfRes.GetIsStrict();
}
}
diff --git a/ydb/library/yql/providers/common/udf_resolve/yql_simple_udf_resolver.cpp b/ydb/library/yql/providers/common/udf_resolve/yql_simple_udf_resolver.cpp
index c0f452e0e0..01f235d5a7 100644
--- a/ydb/library/yql/providers/common/udf_resolve/yql_simple_udf_resolver.cpp
+++ b/ydb/library/yql/providers/common/udf_resolve/yql_simple_udf_resolver.cpp
@@ -192,6 +192,9 @@ bool LoadFunctionsMetadata(const TVector<IUdfResolver::TFunction*>& functions,
udf.NormalizedUserType = ConvertMiniKQLType(udf.Pos, const_cast<TType*>(funcInfo.UserType), ctx);
YQL_ENSURE(udf.NormalizedUserType);
}
+
+ udf.SupportsBlocks = funcInfo.SupportsBlocks;
+ udf.IsStrict = funcInfo.IsStrict;
} catch (const std::exception& e) {
ctx.AddError(TIssue(udf.Pos, TStringBuilder()
<< "Internal error was found when udf metadata is loading for function: " << udf.Name
diff --git a/ydb/library/yql/providers/dq/actors/task_controller.cpp b/ydb/library/yql/providers/dq/actors/task_controller.cpp
index 02178732b1..02b10d5aff 100644
--- a/ydb/library/yql/providers/dq/actors/task_controller.cpp
+++ b/ydb/library/yql/providers/dq/actors/task_controller.cpp
@@ -17,7 +17,6 @@
#include <ydb/public/lib/yson_value/ydb_yson_value.h>
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor.h>
-#include <ydb/core/kqp/common/kqp.h>
#include <library/cpp/actors/core/actorsystem.h>
#include <library/cpp/actors/core/event_pb.h>
diff --git a/ydb/library/yql/providers/dq/api/protos/task_command_executor.proto b/ydb/library/yql/providers/dq/api/protos/task_command_executor.proto
index 62e029b30c..742f9cabe9 100644
--- a/ydb/library/yql/providers/dq/api/protos/task_command_executor.proto
+++ b/ydb/library/yql/providers/dq/api/protos/task_command_executor.proto
@@ -43,6 +43,8 @@ message TCommandHeader {
SINK_IS_FINISHED = 24; // Header -> TIsFinishedResponse
SINK_OUTPUT_TYPE = 25; // Header -> TGetTypeResponse
SINK_STATS = 26; // Header -> TGetSinkStatsResponse
+
+ GET_METERING_STATS = 27;
};
int32 Version = 1;
@@ -66,6 +68,14 @@ message TPopResponse {
google.protobuf.Any Stats = 4;
}
+message TMeteringStatsResponse {
+ message TInputStats {
+ uint64 RowsConsumed = 1;
+ uint64 BytesConsumed = 2;
+ };
+ repeated TInputStats Inputs = 1;
+};
+
message TSinkPopRequest {
uint64 Bytes = 1;
bool Raw = 2;
diff --git a/ydb/library/yql/providers/dq/runtime/task_command_executor.cpp b/ydb/library/yql/providers/dq/runtime/task_command_executor.cpp
index 11314e9fe1..97ca943186 100644
--- a/ydb/library/yql/providers/dq/runtime/task_command_executor.cpp
+++ b/ydb/library/yql/providers/dq/runtime/task_command_executor.cpp
@@ -244,6 +244,17 @@ public:
}
_exit(127);
}
+
+ NDqProto::TMeteringStatsResponse GetMeteringStats() {
+ NDqProto::TMeteringStatsResponse resp;
+ auto* stats = Runner->GetMeteringStats();
+ for (auto& input : stats->Inputs) {
+ auto* i = resp.AddInputs();
+ i->SetRowsConsumed(input->RowsConsumed);
+ i->SetBytesConsumed(input->BytesConsumed);
+ }
+ return resp;
+ }
NDqProto::TGetStatsResponse GetStats(ui64 taskId) {
const auto stats = Runner->GetStats();
@@ -585,6 +596,12 @@ public:
GetStats(taskId).Save(&output);
break;
}
+ case NDqProto::TCommandHeader::GET_METERING_STATS: {
+ Y_ENSURE(header.GetVersion() >= 3);
+ Y_ENSURE(taskId == Runner->GetTaskId());
+ GetMeteringStats().Save(&output);
+ break;
+ }
case NDqProto::TCommandHeader::GET_STATS_INPUT: {
Y_ENSURE(header.GetVersion() >= 3);
Y_ENSURE(taskId == Runner->GetTaskId());
diff --git a/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp b/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp
index be139375b3..bcda5b2119 100644
--- a/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp
+++ b/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp
@@ -206,7 +206,10 @@ private:
class TAbstractFactory: public IProxyFactory {
public:
- TAbstractFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry, NKikimr::NMiniKQL::TComputationNodeFactory compFactory, TTaskTransformFactory taskTransformFactory)
+ TAbstractFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry,
+ NKikimr::NMiniKQL::TComputationNodeFactory compFactory,
+ TTaskTransformFactory taskTransformFactory,
+ std::shared_ptr<NKikimr::NMiniKQL::TComputationPatternLRUCache> patternCache)
: DeterministicMode(!!GetEnv("YQL_DETERMINISTIC_MODE"))
, RandomProvider(
DeterministicMode
@@ -223,6 +226,7 @@ public:
ExecutionContext.ComputationFactory = compFactory;
ExecutionContext.RandomProvider = RandomProvider.Get();
ExecutionContext.TimeProvider = TimeProvider.Get();
+ ExecutionContext.PatternCache = patternCache;
}
protected:
@@ -242,8 +246,9 @@ public:
TLocalFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry,
NKikimr::NMiniKQL::TComputationNodeFactory compFactory,
TTaskTransformFactory taskTransformFactory,
+ std::shared_ptr<NKikimr::NMiniKQL::TComputationPatternLRUCache> patternCache,
bool terminateOnError)
- : TAbstractFactory(functionRegistry, compFactory, taskTransformFactory)
+ : TAbstractFactory(functionRegistry, compFactory, taskTransformFactory, patternCache)
, TerminateOnError(terminateOnError)
{ }
@@ -284,9 +289,9 @@ private:
IProxyFactory::TPtr CreateFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry,
NKikimr::NMiniKQL::TComputationNodeFactory compFactory,
- TTaskTransformFactory taskTransformFactory, bool terminateOnError)
+ TTaskTransformFactory taskTransformFactory, std::shared_ptr<NKikimr::NMiniKQL::TComputationPatternLRUCache> patternCache, bool terminateOnError)
{
- return new TLocalFactory(functionRegistry, compFactory, taskTransformFactory, terminateOnError);
+ return new TLocalFactory(functionRegistry, compFactory, taskTransformFactory, patternCache, terminateOnError);
}
} // namespace NYql::NTaskRunnerProxy
diff --git a/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.h b/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.h
index 1702041a74..1090bf551a 100644
--- a/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.h
+++ b/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.h
@@ -8,6 +8,7 @@ namespace NYql::NTaskRunnerProxy {
IProxyFactory::TPtr CreateFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry,
NKikimr::NMiniKQL::TComputationNodeFactory compFactory, TTaskTransformFactory taskTransformFactory,
+ std::shared_ptr<NKikimr::NMiniKQL::TComputationPatternLRUCache> patternCache,
bool terminateOnError
);
diff --git a/ydb/library/yql/providers/dq/task_runner/tasks_runner_pipe.cpp b/ydb/library/yql/providers/dq/task_runner/tasks_runner_pipe.cpp
index fda8714214..7b52ec18d4 100644
--- a/ydb/library/yql/providers/dq/task_runner/tasks_runner_pipe.cpp
+++ b/ydb/library/yql/providers/dq/task_runner/tasks_runner_pipe.cpp
@@ -1244,10 +1244,9 @@ public:
const TString& traceId)
: TraceId(traceId)
, Task(task)
- , Alloc(__LOCATION__, NKikimr::TAlignedPagePoolCounters(), true)
- , TypeEnv(Alloc)
- , MemInfo("TDqTaskRunnerProxy")
- , HolderFactory(Alloc.Ref(), MemInfo)
+ , Alloc(new NKikimr::NMiniKQL::TScopedAlloc(__LOCATION__, NKikimr::TAlignedPagePoolCounters(), true),
+ [](NKikimr::NMiniKQL::TScopedAlloc* ptr) { ptr->Acquire(); delete ptr; })
+ , AllocatedHolder(std::make_optional<TAllocatedHolder>(*Alloc, "TDqTaskRunnerProxy"))
, Running(true)
, Command(std::move(command))
, StderrReader(MakeHolder<TThread>([this] () { ReadStderr(); }))
@@ -1256,13 +1255,15 @@ public:
, TaskId(Task.GetId())
, StageId(stageId)
{
- Alloc.Release();
+ Alloc->Release();
StderrReader->Start();
InitTaskMeta();
}
~TTaskRunner() {
- Alloc.Acquire();
+ Alloc->Acquire();
+ AllocatedHolder.reset();
+ Alloc->Release();
Command->Kill();
Command->Wait(TDuration::Seconds(0));
}
@@ -1343,11 +1344,15 @@ public:
}
const NMiniKQL::TTypeEnvironment& GetTypeEnv() const override {
- return TypeEnv;
+ return AllocatedHolder->TypeEnv;
}
const NMiniKQL::THolderFactory& GetHolderFactory() const override {
- return HolderFactory;
+ return AllocatedHolder->HolderFactory;
+ }
+
+ std::shared_ptr<NMiniKQL::TScopedAlloc> GetAllocatorPtr() const {
+ return Alloc;
}
const THashMap<TString, TString>& GetSecureParams() const override {
@@ -1359,7 +1364,7 @@ public:
}
TGuard<NKikimr::NMiniKQL::TScopedAlloc> BindAllocator(TMaybe<ui64> memoryLimit) override {
- auto guard = TypeEnv.BindAllocator();
+ auto guard = AllocatedHolder->TypeEnv.BindAllocator();
if (memoryLimit) {
guard.GetMutex()->SetLimit(*memoryLimit);
}
@@ -1367,7 +1372,7 @@ public:
}
bool IsAllocatorAttached() override {
- return TypeEnv.GetAllocator().IsAttached();
+ return AllocatedHolder->TypeEnv.GetAllocator().IsAttached();
}
void Kill() override {
@@ -1435,10 +1440,20 @@ private:
THashMap<TString, TString> SecureParams;
THashMap<TString, TString> TaskParams;
- NKikimr::NMiniKQL::TScopedAlloc Alloc;
- NKikimr::NMiniKQL::TTypeEnvironment TypeEnv;
- NKikimr::NMiniKQL::TMemoryUsageInfo MemInfo;
- NKikimr::NMiniKQL::THolderFactory HolderFactory;
+ std::shared_ptr <NKikimr::NMiniKQL::TScopedAlloc> Alloc;
+
+ struct TAllocatedHolder {
+ TAllocatedHolder(NKikimr::NMiniKQL::TScopedAlloc& alloc, const TStringBuf& memInfoTitle)
+ : TypeEnv(alloc)
+ , MemInfo(memInfoTitle)
+ , HolderFactory(alloc.Ref(), MemInfo) {}
+
+ NKikimr::NMiniKQL::TTypeEnvironment TypeEnv;
+ NKikimr::NMiniKQL::TMemoryUsageInfo MemInfo;
+ NKikimr::NMiniKQL::THolderFactory HolderFactory;
+ };
+
+ std::optional<TAllocatedHolder> AllocatedHolder;
std::atomic<bool> Running;
int Code = -1;
@@ -1565,6 +1580,10 @@ public:
return Delegate->GetHolderFactory();
}
+ std::shared_ptr<NKikimr::NMiniKQL::TScopedAlloc> GetAllocatorPtr() const override {
+ return Delegate->GetAllocatorPtr();
+ }
+
const THashMap<TString, TString>& GetSecureParams() const override {
return Delegate->GetSecureParams();
}
@@ -1588,6 +1607,29 @@ public:
void UpdateStats() override {
}
+ const TDqMeteringStats* GetMeteringStats() const override {
+ try {
+ NDqProto::TCommandHeader header;
+ header.SetVersion(3);
+ header.SetCommand(NDqProto::TCommandHeader::GET_METERING_STATS);
+ header.SetTaskId(Task.GetId());
+ header.Save(&Delegate->GetOutput());
+
+ NDqProto::TMeteringStatsResponse response;
+ response.Load(&Delegate->GetInput());
+
+ MeteringStats.Inputs.clear();
+ for (auto input : response.GetInputs()) {
+ auto i = MeteringStats.AddInputs();
+ i.RowsConsumed = input.GetRowsConsumed();
+ i.BytesConsumed = input.GetBytesConsumed();
+ }
+ return &MeteringStats;
+ } catch (...) {
+ Delegate->RaiseException();
+ }
+ }
+
const TDqTaskRunnerStats* GetStats() const override
{
try {
@@ -1629,6 +1671,7 @@ private:
TIntrusivePtr<TTaskRunner> Delegate;
NDqProto::TDqTask Task;
mutable TDqTaskRunnerStats Stats;
+ mutable TDqMeteringStats MeteringStats;
THashMap<ui64, IDqInputChannel::TPtr> InputChannels;
THashMap<ui64, IDqAsyncInputBuffer::TPtr> Sources;
diff --git a/ydb/library/yql/public/udf/udf_helpers.h b/ydb/library/yql/public/udf/udf_helpers.h
index 9a659fc97a..5112ce22fe 100644
--- a/ydb/library/yql/public/udf/udf_helpers.h
+++ b/ydb/library/yql/public/udf/udf_helpers.h
@@ -177,6 +177,9 @@ namespace NUdf {
#define SIMPLE_UDF(udfName, signature) \
UDF(udfName, builder.SimpleSignature<signature>();)
+#define SIMPLE_STRICT_UDF(udfName, signature) \
+ UDF(udfName, builder.SimpleSignature<signature>().IsStrict();)
+
#define SIMPLE_UDF_WITH_IR(udfName, signature, irResourceId, irFunctionName) \
UDF_IMPL(udfName, builder.SimpleSignature<signature>();, ;, ;, irResourceId, irFunctionName)
@@ -186,6 +189,9 @@ namespace NUdf {
#define SIMPLE_UDF_OPTIONS(udfName, signature, options) \
UDF(udfName, builder.SimpleSignature<signature>(); options;)
+#define SIMPLE_STRICT_UDF_OPTIONS(udfName, signature, options) \
+ UDF(udfName, builder.SimpleSignature<signature>().IsStrict(); options;)
+
#define SIMPLE_UDF_RUN_OPTIONS(udfName, signature, options) \
UDF_RUN(udfName, builder.SimpleSignature<signature>(); options;)
diff --git a/ydb/library/yql/public/udf/udf_type_builder.h b/ydb/library/yql/public/udf/udf_type_builder.h
index dc9825f24c..d38e716368 100644
--- a/ydb/library/yql/public/udf/udf_type_builder.h
+++ b/ydb/library/yql/public/udf/udf_type_builder.h
@@ -593,8 +593,7 @@ public:
#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 19)
class IFunctionTypeInfoBuilder9: public IFunctionTypeInfoBuilder8 {
public:
- virtual IFunctionTypeInfoBuilder9& BlockImplementationImpl(
- TUniquePtr<IBoxedValue> impl) = 0;
+ virtual void Unused1() = 0;
};
#endif
@@ -631,12 +630,22 @@ public:
class IFunctionTypeInfoBuilder14: public IFunctionTypeInfoBuilder13 {
public:
virtual IBlockTypeBuilder::TPtr Block(bool isScalar) const = 0;
- virtual void Unused1() = 0;
virtual void Unused2() = 0;
+ virtual void Unused3() = 0;
};
#endif
-#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 26)
+#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 28)
+class IFunctionTypeInfoBuilder15: public IFunctionTypeInfoBuilder14 {
+public:
+ virtual IFunctionTypeInfoBuilder15& SupportsBlocks() = 0;
+ virtual IFunctionTypeInfoBuilder15& IsStrict() = 0;
+};
+#endif
+
+#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 28)
+using IFunctionTypeInfoBuilderImpl = IFunctionTypeInfoBuilder15;
+#elif UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 26)
using IFunctionTypeInfoBuilderImpl = IFunctionTypeInfoBuilder14;
#elif UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 25)
using IFunctionTypeInfoBuilderImpl = IFunctionTypeInfoBuilder13;
@@ -770,14 +779,6 @@ public:
return *this;
}
#endif
-
-#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 19)
- IFunctionTypeInfoBuilder& BlockImplementation(
- TUniquePtr<IBoxedValue> impl) {
- BlockImplementationImpl(std::move(impl));
- return *this;
- }
-#endif
};
UDF_ASSERT_TYPE_SIZE(IFunctionTypeInfoBuilder, 8);
diff --git a/ydb/library/yql/public/udf/udf_version.h b/ydb/library/yql/public/udf/udf_version.h
index c6f1ef2b24..303a707147 100644
--- a/ydb/library/yql/public/udf/udf_version.h
+++ b/ydb/library/yql/public/udf/udf_version.h
@@ -7,7 +7,7 @@ namespace NYql {
namespace NUdf {
#define CURRENT_UDF_ABI_VERSION_MAJOR 2
-#define CURRENT_UDF_ABI_VERSION_MINOR 27
+#define CURRENT_UDF_ABI_VERSION_MINOR 28
#define CURRENT_UDF_ABI_VERSION_PATCH 0
#ifdef USE_CURRENT_UDF_ABI_VERSION
diff --git a/ydb/library/yql/sql/v1/aggregation.cpp b/ydb/library/yql/sql/v1/aggregation.cpp
index cced16f386..d24da366fe 100644
--- a/ydb/library/yql/sql/v1/aggregation.cpp
+++ b/ydb/library/yql/sql/v1/aggregation.cpp
@@ -35,6 +35,7 @@ static const THashSet<TString> AggApplyFuncs = {
"avg_traits_factory",
"min_traits_factory",
"max_traits_factory",
+ "some_traits_factory",
};
class TAggregationFactory : public IAggregation {
diff --git a/ydb/library/yql/udfs/common/datetime/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/datetime/CMakeLists.darwin.txt
index 88ac893134..817c1ec408 100644
--- a/ydb/library/yql/udfs/common/datetime/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/datetime/CMakeLists.darwin.txt
@@ -20,7 +20,7 @@ target_link_libraries(datetime_udf INTERFACE
add_global_library_for(datetime_udf.global datetime_udf)
target_compile_options(datetime_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(datetime_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/datetime/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/datetime/CMakeLists.linux-aarch64.txt
index 0a1687960b..3f2359da6c 100644
--- a/ydb/library/yql/udfs/common/datetime/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/datetime/CMakeLists.linux-aarch64.txt
@@ -21,7 +21,7 @@ target_link_libraries(datetime_udf INTERFACE
add_global_library_for(datetime_udf.global datetime_udf)
target_compile_options(datetime_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(datetime_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/datetime/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/datetime/CMakeLists.linux.txt
index 0a1687960b..3f2359da6c 100644
--- a/ydb/library/yql/udfs/common/datetime/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/datetime/CMakeLists.linux.txt
@@ -21,7 +21,7 @@ target_link_libraries(datetime_udf INTERFACE
add_global_library_for(datetime_udf.global datetime_udf)
target_compile_options(datetime_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(datetime_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/datetime/datetime_udf.cpp b/ydb/library/yql/udfs/common/datetime/datetime_udf.cpp
index 01567c0b1b..3bf67b22ea 100644
--- a/ydb/library/yql/udfs/common/datetime/datetime_udf.cpp
+++ b/ydb/library/yql/udfs/common/datetime/datetime_udf.cpp
@@ -13,19 +13,19 @@ using namespace NUdf;
using namespace NDatetime;
namespace {
- SIMPLE_UDF(TToString, char*(TAutoMap<TTimestamp>)) {
+ SIMPLE_STRICT_UDF(TToString, char*(TAutoMap<TTimestamp>)) {
const auto input = args[0].Get<ui64>();
TInstant instant = TInstant::MicroSeconds(input);
return valueBuilder->NewString(instant.ToString());
}
- SIMPLE_UDF(TToStringUpToSeconds, char*(TAutoMap<TTimestamp>)) {
+ SIMPLE_STRICT_UDF(TToStringUpToSeconds, char*(TAutoMap<TTimestamp>)) {
const auto input = args[0].Get<ui64>();
TInstant instant = TInstant::MicroSeconds(input);
return valueBuilder->NewString(instant.ToStringUpToSeconds());
}
- SIMPLE_UDF(TToStringFormat, char*(TAutoMap<TTimestamp>, char*)) {
+ SIMPLE_STRICT_UDF(TToStringFormat, char*(TAutoMap<TTimestamp>, char*)) {
const auto input = args[0].Get<ui64>();
const TString format(args[1].AsStringRef());
TInstant instant = TInstant::MicroSeconds(input);
@@ -33,7 +33,7 @@ namespace {
return valueBuilder->NewString(tm.ToString(format.c_str()));
}
- SIMPLE_UDF(TToDate, char*(TAutoMap<TTimestamp>)) {
+ SIMPLE_STRICT_UDF(TToDate, char*(TAutoMap<TTimestamp>)) {
const auto input = args[0].Get<ui64>();
TInstant instant = TInstant::MicroSeconds(input);
TSimpleTM tm = TSimpleTM::New(static_cast<time_t>(instant.Seconds()));
@@ -76,7 +76,7 @@ namespace {
return TUnboxedValuePod(result);
}
- SIMPLE_UDF(TIsWeekend, bool(TAutoMap<TTimestamp>)) {
+ SIMPLE_STRICT_UDF(TIsWeekend, bool(TAutoMap<TTimestamp>)) {
Y_UNUSED(valueBuilder);
const auto input = args[0].Get<ui64>();
TInstant instant = TInstant::MicroSeconds(input);
@@ -149,12 +149,12 @@ namespace {
return success ? TUnboxedValuePod(result.MicroSeconds() + bonus) : TUnboxedValuePod();
}
- SIMPLE_UDF(TFromString, TOptional<ui64>(TOptional<char*>)) {
+ SIMPLE_STRICT_UDF(TFromString, TOptional<ui64>(TOptional<char*>)) {
Y_UNUSED(valueBuilder);
return FromStringImpl(args);
}
- SIMPLE_UDF(TTimestampFromString, TOptional<TTimestamp>(TOptional<char*>)) {
+ SIMPLE_STRICT_UDF(TTimestampFromString, TOptional<TTimestamp>(TOptional<char*>)) {
Y_UNUSED(valueBuilder);
return FromStringImpl(args);
}
@@ -169,42 +169,42 @@ namespace {
return success ? TUnboxedValuePod(result.MicroSeconds()) : TUnboxedValuePod();
}
- SIMPLE_UDF(TFromStringFormat, TOptional<ui64>(TOptional<char*>, char*)) {
+ SIMPLE_STRICT_UDF(TFromStringFormat, TOptional<ui64>(TOptional<char*>, char*)) {
Y_UNUSED(valueBuilder);
return FromStringFormatImpl(args);
}
- SIMPLE_UDF(TTimestampFromStringFormat, TOptional<TTimestamp>(TOptional<char*>, char*)) {
+ SIMPLE_STRICT_UDF(TTimestampFromStringFormat, TOptional<TTimestamp>(TOptional<char*>, char*)) {
Y_UNUSED(valueBuilder);
return FromStringFormatImpl(args);
}
- SIMPLE_UDF(TDateStartOfDay, TDate(TAutoMap<TDate>)) {
+ SIMPLE_STRICT_UDF(TDateStartOfDay, TDate(TAutoMap<TDate>)) {
Y_UNUSED(valueBuilder);
const auto input = args[0].Get<ui16>();
return TUnboxedValuePod(ui16(input));
}
- SIMPLE_UDF(TDatetimeStartOfDay, TDatetime(TAutoMap<TDatetime>)) {
+ SIMPLE_STRICT_UDF(TDatetimeStartOfDay, TDatetime(TAutoMap<TDatetime>)) {
Y_UNUSED(valueBuilder);
const auto input = args[0].Get<ui32>();
return TUnboxedValuePod(ui32(input - input % 86400));
}
- SIMPLE_UDF(TTimestampStartOfDay, TTimestamp(TAutoMap<TTimestamp>)) {
+ SIMPLE_STRICT_UDF(TTimestampStartOfDay, TTimestamp(TAutoMap<TTimestamp>)) {
Y_UNUSED(valueBuilder);
const auto input = args[0].Get<ui64>();
return TUnboxedValuePod(ui64(input - input % 86400000000ull));
}
- SIMPLE_UDF(TGetTimeOfDay, TInterval(TAutoMap<TTimestamp>)) {
+ SIMPLE_STRICT_UDF(TGetTimeOfDay, TInterval(TAutoMap<TTimestamp>)) {
Y_UNUSED(valueBuilder);
const auto input = args[0].Get<ui64>();
return TUnboxedValuePod(ui64(input % 86400000000ull));
}
#define DATETIME_TO_UDF(unit, type) \
- SIMPLE_UDF(TTo##unit, type(TAutoMap<TTimestamp>)) { \
+ SIMPLE_STRICT_UDF(TTo##unit, type(TAutoMap<TTimestamp>)) { \
Y_UNUSED(valueBuilder); \
const ui64 input = args[0].Get<ui64>(); \
TInstant instant = TInstant::MicroSeconds(input); \
@@ -212,7 +212,7 @@ namespace {
}
#define DATETIME_INTERVAL_TO_UDF(unit, type) \
- SIMPLE_UDF(TIntervalTo##unit, type(TAutoMap<TInterval>)) { \
+ SIMPLE_STRICT_UDF(TIntervalTo##unit, type(TAutoMap<TInterval>)) { \
Y_UNUSED(valueBuilder); \
const i64 input = args[0].Get<i64>(); \
TDuration duration = TDuration::MicroSeconds(std::abs(input)); \
@@ -220,58 +220,58 @@ namespace {
}
#define DATETIME_FROM_UDF(unit) \
- SIMPLE_UDF(TFrom##unit, ui64(TAutoMap<ui64>)) { \
+ SIMPLE_STRICT_UDF(TFrom##unit, ui64(TAutoMap<ui64>)) { \
Y_UNUSED(valueBuilder); \
EMPTY_RESULT_ON_EMPTY_ARG(0); \
const auto input = args[0].Get<ui64>(); \
return TUnboxedValuePod(TInstant::unit(input).MicroSeconds()); \
}
-#define DATETIME_TIMESTAMP_FROM_UDF(unit) \
- SIMPLE_UDF(TTimestampFrom##unit, TOptional<TTimestamp>(TOptional<ui64>)) { \
- Y_UNUSED(valueBuilder); \
- EMPTY_RESULT_ON_EMPTY_ARG(0); \
- const auto input = args[0].Get<ui64>(); \
- ui64 result = TInstant::unit(input).MicroSeconds(); \
- if (result < MAX_TIMESTAMP) { \
- return TUnboxedValuePod(result); \
- } else { \
- return TUnboxedValuePod(); \
- } \
- }
-
-#define DATETIME_INTERVAL_FROM_UDF(unit) \
- SIMPLE_UDF(TIntervalFrom##unit, TOptional<TInterval>(TOptional<i64>)) { \
- Y_UNUSED(valueBuilder); \
- EMPTY_RESULT_ON_EMPTY_ARG(0); \
- const auto input = args[0].Get<i64>(); \
- i64 result = TInstant::unit(std::abs(input)).MicroSeconds(); \
- if (static_cast<ui64>(result) < MAX_TIMESTAMP) { \
- return TUnboxedValuePod(input >= 0 ? result : -result); \
- } else { \
- return TUnboxedValuePod(); \
- } \
- }
-
-#define DATETIME_GET_UDF(udfName, resultType, result) \
- SIMPLE_UDF(udfName, resultType(TAutoMap<TTimestamp>)) { \
- Y_UNUSED(valueBuilder); \
- const auto input = args[0].Get<ui64>(); \
- const TInstant& instant = TInstant::MicroSeconds(input); \
- TSimpleTM tm = TSimpleTM::New( \
- static_cast<time_t>(instant.Seconds())); \
- Y_UNUSED(tm); \
- return TUnboxedValuePod(result); \
- }
-
-#define DATETIME_GET_STRING_UDF(udfName, result) \
- SIMPLE_UDF(udfName, char*(TAutoMap<TTimestamp>)) { \
- const auto input = args[0].Get<ui64>(); \
- const TInstant& instant = TInstant::MicroSeconds(input); \
- TSimpleTM tm = TSimpleTM::New( \
- static_cast<time_t>(instant.Seconds())); \
- Y_UNUSED(tm); \
- return valueBuilder->NewString(result); \
+#define DATETIME_TIMESTAMP_FROM_UDF(unit) \
+ SIMPLE_STRICT_UDF(TTimestampFrom##unit, TOptional<TTimestamp>(TOptional<ui64>)) { \
+ Y_UNUSED(valueBuilder); \
+ EMPTY_RESULT_ON_EMPTY_ARG(0); \
+ const auto input = args[0].Get<ui64>(); \
+ ui64 result = TInstant::unit(input).MicroSeconds(); \
+ if (result < MAX_TIMESTAMP) { \
+ return TUnboxedValuePod(result); \
+ } else { \
+ return TUnboxedValuePod(); \
+ } \
+ }
+
+#define DATETIME_INTERVAL_FROM_UDF(unit) \
+ SIMPLE_STRICT_UDF(TIntervalFrom##unit, TOptional<TInterval>(TOptional<i64>)) { \
+ Y_UNUSED(valueBuilder); \
+ EMPTY_RESULT_ON_EMPTY_ARG(0); \
+ const auto input = args[0].Get<i64>(); \
+ i64 result = TInstant::unit(std::abs(input)).MicroSeconds(); \
+ if (static_cast<ui64>(result) < MAX_TIMESTAMP) { \
+ return TUnboxedValuePod(input >= 0 ? result : -result); \
+ } else { \
+ return TUnboxedValuePod(); \
+ } \
+ }
+
+#define DATETIME_GET_UDF(udfName, resultType, result) \
+ SIMPLE_STRICT_UDF(udfName, resultType(TAutoMap<TTimestamp>)) { \
+ Y_UNUSED(valueBuilder); \
+ const auto input = args[0].Get<ui64>(); \
+ const TInstant& instant = TInstant::MicroSeconds(input); \
+ TSimpleTM tm = TSimpleTM::New( \
+ static_cast<time_t>(instant.Seconds())); \
+ Y_UNUSED(tm); \
+ return TUnboxedValuePod(result); \
+ }
+
+#define DATETIME_GET_STRING_UDF(udfName, result) \
+ SIMPLE_STRICT_UDF(udfName, char*(TAutoMap<TTimestamp>)) { \
+ const auto input = args[0].Get<ui64>(); \
+ const TInstant& instant = TInstant::MicroSeconds(input); \
+ TSimpleTM tm = TSimpleTM::New( \
+ static_cast<time_t>(instant.Seconds())); \
+ Y_UNUSED(tm); \
+ return valueBuilder->NewString(result); \
}
TInstant InstantFromMicroseconds(ui64 value) {
@@ -299,7 +299,7 @@ namespace {
}
#define DATETIME_START_UDF(udfName, type, logic, inputConv, outputConv) \
- SIMPLE_UDF(udfName, type(TAutoMap<type>)) { \
+ SIMPLE_STRICT_UDF(udfName, type(TAutoMap<type>)) { \
Y_UNUSED(valueBuilder); \
const auto input = args[0].Get<typename NUdf::TDataType<type>::TLayout>(); \
TInstant instant = inputConv(input); \
diff --git a/ydb/library/yql/udfs/common/datetime2/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/datetime2/CMakeLists.darwin.txt
index 5c32601078..a078eb370e 100644
--- a/ydb/library/yql/udfs/common/datetime2/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/datetime2/CMakeLists.darwin.txt
@@ -22,7 +22,7 @@ target_link_libraries(datetime2_udf INTERFACE
add_global_library_for(datetime2_udf.global datetime2_udf)
target_compile_options(datetime2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(datetime2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux-aarch64.txt
index 7adaa56f7d..1e9e007437 100644
--- a/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux-aarch64.txt
@@ -23,7 +23,7 @@ target_link_libraries(datetime2_udf INTERFACE
add_global_library_for(datetime2_udf.global datetime2_udf)
target_compile_options(datetime2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(datetime2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux.txt
index 7adaa56f7d..1e9e007437 100644
--- a/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/datetime2/CMakeLists.linux.txt
@@ -23,7 +23,7 @@ target_link_libraries(datetime2_udf INTERFACE
add_global_library_for(datetime2_udf.global datetime2_udf)
target_compile_options(datetime2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(datetime2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp b/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp
index 731b2f85c9..55c4965332 100644
--- a/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp
+++ b/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp
@@ -309,25 +309,25 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
// Make*
- SIMPLE_UDF(TMakeDate, TDate(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TMakeDate, TDate(TAutoMap<TResource<TMResourceName>>)) {
auto& builder = valueBuilder->GetDateBuilder();
auto& storage = Reference(args[0]);
return TUnboxedValuePod(storage.ToDate(builder, false));
}
- SIMPLE_UDF(TMakeDatetime, TDatetime(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TMakeDatetime, TDatetime(TAutoMap<TResource<TMResourceName>>)) {
auto& builder = valueBuilder->GetDateBuilder();
auto& storage = Reference(args[0]);
return TUnboxedValuePod(storage.ToDatetime(builder));
}
- SIMPLE_UDF(TMakeTimestamp, TTimestamp(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TMakeTimestamp, TTimestamp(TAutoMap<TResource<TMResourceName>>)) {
auto& builder = valueBuilder->GetDateBuilder();
auto& storage = Reference(args[0]);
return TUnboxedValuePod(storage.ToTimestamp(builder));
}
- SIMPLE_UDF(TMakeTzDate, TTzDate(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TMakeTzDate, TTzDate(TAutoMap<TResource<TMResourceName>>)) {
auto& builder = valueBuilder->GetDateBuilder();
auto& storage = Reference(args[0]);
TUnboxedValuePod result(storage.ToDate(builder, true));
@@ -335,7 +335,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TMakeTzDatetime, TTzDatetime(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TMakeTzDatetime, TTzDatetime(TAutoMap<TResource<TMResourceName>>)) {
auto& builder = valueBuilder->GetDateBuilder();
auto& storage = Reference(args[0]);
TUnboxedValuePod result(storage.ToDatetime(builder));
@@ -343,7 +343,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TMakeTzTimestamp, TTzTimestamp(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TMakeTzTimestamp, TTzTimestamp(TAutoMap<TResource<TMResourceName>>)) {
auto& builder = valueBuilder->GetDateBuilder();
auto& storage = Reference(args[0]);
TUnboxedValuePod result(storage.ToTimestamp(builder));
@@ -353,17 +353,17 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
// Get*
-#define GET_METHOD(field, type) \
- SIMPLE_UDF(TGet##field, type(TAutoMap<TResource<TMResourceName>>)) { \
- Y_UNUSED(valueBuilder); \
- return TUnboxedValuePod(Get##field(args[0])); \
+#define GET_METHOD(field, type) \
+ SIMPLE_STRICT_UDF(TGet##field, type(TAutoMap<TResource<TMResourceName>>)) { \
+ Y_UNUSED(valueBuilder); \
+ return TUnboxedValuePod(Get##field(args[0])); \
}
GET_METHOD(Year, ui16)
GET_METHOD(DayOfYear, ui16)
GET_METHOD(Month, ui8)
- SIMPLE_UDF(TGetMonthName, char*(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TGetMonthName, char*(TAutoMap<TResource<TMResourceName>>)) {
Y_UNUSED(valueBuilder);
static const std::array<TUnboxedValue, 12U> monthNames = {{
TUnboxedValuePod::Embedded(TStringRef::Of("January")),
@@ -385,14 +385,14 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
GET_METHOD(WeekOfYear, ui8)
GET_METHOD(WeekOfYearIso8601, ui8)
- SIMPLE_UDF(TGetDayOfMonth, ui8(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TGetDayOfMonth, ui8(TAutoMap<TResource<TMResourceName>>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(GetDay(args[0]));
}
GET_METHOD(DayOfWeek, ui8)
- SIMPLE_UDF(TGetDayOfWeekName, char*(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TGetDayOfWeekName, char*(TAutoMap<TResource<TMResourceName>>)) {
Y_UNUSED(valueBuilder);
static const std::array<TUnboxedValue, 7U> dayNames = {{
TUnboxedValuePod::Embedded(TStringRef::Of("Monday")),
@@ -410,19 +410,19 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
GET_METHOD(Minute, ui8)
GET_METHOD(Second, ui8)
- SIMPLE_UDF(TGetMillisecondOfSecond, ui32(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TGetMillisecondOfSecond, ui32(TAutoMap<TResource<TMResourceName>>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(GetMicrosecond(args[0]) / 1000u);
}
- SIMPLE_UDF(TGetMicrosecondOfSecond, ui32(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TGetMicrosecondOfSecond, ui32(TAutoMap<TResource<TMResourceName>>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(GetMicrosecond(args[0]));
}
GET_METHOD(TimezoneId, ui16)
- SIMPLE_UDF(TGetTimezoneName, char*(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TGetTimezoneName, char*(TAutoMap<TResource<TMResourceName>>)) {
auto timezoneId = GetTimezoneId(args[0]);
if (timezoneId >= NUdf::GetTimezones().size()) {
return TUnboxedValuePod();
@@ -549,13 +549,14 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
builder.Implementation(new TUpdate(builder.GetSourcePosition()));
}
+ builder.IsStrict();
return true;
}
};
// From*
- SIMPLE_UDF(TFromSeconds, TOptional<TTimestamp>(TAutoMap<ui32>)) {
+ SIMPLE_STRICT_UDF(TFromSeconds, TOptional<TTimestamp>(TAutoMap<ui32>)) {
Y_UNUSED(valueBuilder);
auto res = args[0].Get<ui32>();
if (!ValidateDatetime(res)) {
@@ -564,7 +565,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return TUnboxedValuePod((ui64)(res * 1000000ull));
}
- SIMPLE_UDF(TFromMilliseconds, TOptional<TTimestamp>(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TFromMilliseconds, TOptional<TTimestamp>(TAutoMap<ui64>)) {
Y_UNUSED(valueBuilder);
auto res = args[0].Get<ui64>();
if (res >= MAX_TIMESTAMP / 1000u) {
@@ -573,7 +574,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return TUnboxedValuePod(res * 1000u);
}
- SIMPLE_UDF(TFromMicroseconds, TOptional<TTimestamp>(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TFromMicroseconds, TOptional<TTimestamp>(TAutoMap<ui64>)) {
Y_UNUSED(valueBuilder);
auto res = args[0].Get<ui64>();
if (!ValidateTimestamp(res)) {
@@ -582,37 +583,37 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return TUnboxedValuePod(res);
}
- SIMPLE_UDF(TIntervalFromDays, TOptional<TInterval>(TAutoMap<i32>)) {
+ SIMPLE_STRICT_UDF(TIntervalFromDays, TOptional<TInterval>(TAutoMap<i32>)) {
Y_UNUSED(valueBuilder);
const i64 res = i64(args[0].Get<i32>()) * 86400000000ll;
return ValidateInterval(res) ? TUnboxedValuePod(res) : TUnboxedValuePod();
}
- SIMPLE_UDF(TIntervalFromHours, TOptional<TInterval>(TAutoMap<i32>)) {
+ SIMPLE_STRICT_UDF(TIntervalFromHours, TOptional<TInterval>(TAutoMap<i32>)) {
Y_UNUSED(valueBuilder);
const i64 res = i64(args[0].Get<i32>()) * 3600000000ll;
return ValidateInterval(res) ? TUnboxedValuePod(res) : TUnboxedValuePod();
}
- SIMPLE_UDF(TIntervalFromMinutes, TOptional<TInterval>(TAutoMap<i32>)) {
+ SIMPLE_STRICT_UDF(TIntervalFromMinutes, TOptional<TInterval>(TAutoMap<i32>)) {
Y_UNUSED(valueBuilder);
const i64 res = i64(args[0].Get<i32>()) * 60000000ll;
return ValidateInterval(res) ? TUnboxedValuePod(res) : TUnboxedValuePod();
}
- SIMPLE_UDF(TIntervalFromSeconds, TOptional<TInterval>(TAutoMap<i32>)) {
+ SIMPLE_STRICT_UDF(TIntervalFromSeconds, TOptional<TInterval>(TAutoMap<i32>)) {
Y_UNUSED(valueBuilder);
const i64 res = i64(args[0].Get<i32>()) * 1000000ll;
return ValidateInterval(res) ? TUnboxedValuePod(res) : TUnboxedValuePod();
}
- SIMPLE_UDF(TIntervalFromMilliseconds, TOptional<TInterval>(TAutoMap<i64>)) {
+ SIMPLE_STRICT_UDF(TIntervalFromMilliseconds, TOptional<TInterval>(TAutoMap<i64>)) {
Y_UNUSED(valueBuilder);
const i64 res = i64(args[0].Get<i64>()) * 1000ll;
return ValidateInterval(res) ? TUnboxedValuePod(res) : TUnboxedValuePod();
}
- SIMPLE_UDF(TIntervalFromMicroseconds, TOptional<TInterval>(TAutoMap<i64>)) {
+ SIMPLE_STRICT_UDF(TIntervalFromMicroseconds, TOptional<TInterval>(TAutoMap<i64>)) {
Y_UNUSED(valueBuilder);
const i64 res = args[0].Get<i64>();
return ValidateInterval(res) ? TUnboxedValuePod(res) : TUnboxedValuePod();
@@ -620,17 +621,17 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
// To*
- SIMPLE_UDF(TToDays, i32(TAutoMap<TInterval>)) {
+ SIMPLE_STRICT_UDF(TToDays, i32(TAutoMap<TInterval>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(i32(args[0].Get<i64>() / 86400000000ll));
}
- SIMPLE_UDF(TToHours, i32(TAutoMap<TInterval>)) {
+ SIMPLE_STRICT_UDF(TToHours, i32(TAutoMap<TInterval>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(i32(args[0].Get<i64>() / 3600000000ll));
}
- SIMPLE_UDF(TToMinutes, i32(TAutoMap<TInterval>)) {
+ SIMPLE_STRICT_UDF(TToMinutes, i32(TAutoMap<TInterval>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(i32(args[0].Get<i64>() / 60000000ll));
}
@@ -661,6 +662,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
if (!typesOnly) { \
builder.Implementation(new TTo##units<TUserDataType>); \
} \
+ builder.IsStrict(); \
} \
};
@@ -705,7 +707,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
// StartOf*
- SIMPLE_UDF(TStartOfYear, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TStartOfYear, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
auto result = args[0];
auto& storage = Reference(result);
storage.Month = 1;
@@ -722,7 +724,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TStartOfQuarter, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TStartOfQuarter, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
auto result = args[0];
auto& storage = Reference(result);
storage.Month = (storage.Month - 1) / 3 * 3 + 1;
@@ -739,7 +741,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TStartOfMonth, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TStartOfMonth, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
auto result = args[0];
auto& storage = Reference(result);
storage.Day = 1;
@@ -755,7 +757,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TStartOfWeek, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TStartOfWeek, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
auto result = args[0];
auto& storage = Reference(result);
auto& builder = valueBuilder->GetDateBuilder();
@@ -774,7 +776,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TStartOfDay, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TStartOfDay, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>)) {
auto result = args[0];
auto& storage = Reference(result);
storage.Hour = 0;
@@ -789,7 +791,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TStartOf, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, TAutoMap<TInterval>)) {
+ SIMPLE_STRICT_UDF(TStartOf, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, TAutoMap<TInterval>)) {
auto result = args[0];
ui64 interval = std::abs(args[1].Get<i64>());
if (interval == 0) {
@@ -815,7 +817,7 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
return result;
}
- SIMPLE_UDF(TTimeOfDay, TInterval(TAutoMap<TResource<TMResourceName>>)) {
+ SIMPLE_STRICT_UDF(TTimeOfDay, TInterval(TAutoMap<TResource<TMResourceName>>)) {
Y_UNUSED(valueBuilder);
auto& storage = Reference(args[0]);
return TUnboxedValuePod((i64)storage.ToTimeOfDay());
@@ -823,15 +825,15 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
// Add ...
- SIMPLE_UDF(TShiftYears, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, i32)) {
+ SIMPLE_STRICT_UDF(TShiftYears, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, i32)) {
return DoAddYears(args[0], args[1].Get<i32>(), valueBuilder->GetDateBuilder());
}
- SIMPLE_UDF(TShiftQuarters, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, i32)) {
+ SIMPLE_STRICT_UDF(TShiftQuarters, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, i32)) {
return DoAddMonths(args[0], 3ll * args[1].Get<i32>(), valueBuilder->GetDateBuilder());
}
- SIMPLE_UDF(TShiftMonths, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, i32)) {
+ SIMPLE_STRICT_UDF(TShiftMonths, TOptional<TResource<TMResourceName>>(TAutoMap<TResource<TMResourceName>>, i32)) {
return DoAddMonths(args[0], args[1].Get<i32>(), valueBuilder->GetDateBuilder());
}
@@ -1466,18 +1468,18 @@ NUdf::TUnboxedValuePod DoAddYears(const NUdf::TUnboxedValuePod& date, i64 years,
}
};
-#define PARSE_SPECIFIC_FORMAT(format) \
- SIMPLE_UDF(TParse##format, TOptional<TResource<TMResourceName>>(TAutoMap<char*>)) { \
- auto str = args[0].AsStringRef(); \
- TInstant instant; \
- if (!TInstant::TryParse##format(TStringBuf(str.Data(), str.Size()), instant)) { \
- return TUnboxedValuePod(); \
- } \
- auto& builder = valueBuilder->GetDateBuilder(); \
- TUnboxedValuePod result(0); \
- auto& storage = Reference(result); \
- storage.FromTimestamp(builder, instant.MicroSeconds()); \
- return result; \
+#define PARSE_SPECIFIC_FORMAT(format) \
+ SIMPLE_STRICT_UDF(TParse##format, TOptional<TResource<TMResourceName>>(TAutoMap<char*>)) { \
+ auto str = args[0].AsStringRef(); \
+ TInstant instant; \
+ if (!TInstant::TryParse##format(TStringBuf(str.Data(), str.Size()), instant)) { \
+ return TUnboxedValuePod(); \
+ } \
+ auto& builder = valueBuilder->GetDateBuilder(); \
+ TUnboxedValuePod result(0); \
+ auto& storage = Reference(result); \
+ storage.FromTimestamp(builder, instant.MicroSeconds()); \
+ return result; \
}
PARSE_SPECIFIC_FORMAT(Rfc822);
diff --git a/ydb/library/yql/udfs/common/digest/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/digest/CMakeLists.darwin.txt
index 4d38552a9b..89441c0430 100644
--- a/ydb/library/yql/udfs/common/digest/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/digest/CMakeLists.darwin.txt
@@ -28,7 +28,7 @@ target_link_libraries(digest_udf INTERFACE
add_global_library_for(digest_udf.global digest_udf)
target_compile_options(digest_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_include_directories(digest_udf.global PRIVATE
diff --git a/ydb/library/yql/udfs/common/digest/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/digest/CMakeLists.linux-aarch64.txt
index 88aebe8ada..13c464cad7 100644
--- a/ydb/library/yql/udfs/common/digest/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/digest/CMakeLists.linux-aarch64.txt
@@ -29,7 +29,7 @@ target_link_libraries(digest_udf INTERFACE
add_global_library_for(digest_udf.global digest_udf)
target_compile_options(digest_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_include_directories(digest_udf.global PRIVATE
diff --git a/ydb/library/yql/udfs/common/digest/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/digest/CMakeLists.linux.txt
index 88aebe8ada..13c464cad7 100644
--- a/ydb/library/yql/udfs/common/digest/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/digest/CMakeLists.linux.txt
@@ -29,7 +29,7 @@ target_link_libraries(digest_udf INTERFACE
add_global_library_for(digest_udf.global digest_udf)
target_compile_options(digest_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_include_directories(digest_udf.global PRIVATE
diff --git a/ydb/library/yql/udfs/common/digest/digest_udf.cpp b/ydb/library/yql/udfs/common/digest/digest_udf.cpp
index 0c455b95c6..ce8c7e1d4e 100644
--- a/ydb/library/yql/udfs/common/digest/digest_udf.cpp
+++ b/ydb/library/yql/udfs/common/digest/digest_udf.cpp
@@ -25,49 +25,49 @@ using namespace NKikimr;
using namespace NUdf;
namespace {
- SIMPLE_UDF(TCrc32c, ui32(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TCrc32c, ui32(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui32 hash = Crc32c(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TCrc64, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TCrc64, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui64 hash = crc64(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TFnv32, ui32(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TFnv32, ui32(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui32 hash = FnvHash<ui32>(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TFnv64, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TFnv64, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui64 hash = FnvHash<ui64>(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TMurMurHash, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TMurMurHash, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui64 hash = MurmurHash<ui64>(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TMurMurHash32, ui32(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TMurMurHash32, ui32(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui32 hash = MurmurHash<ui32>(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TCityHash, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TCityHash, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui64 hash = CityHash64(inputRef.Data(), inputRef.Size());
@@ -96,6 +96,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new TCityHash128);
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -116,33 +117,33 @@ namespace {
}
};
- SIMPLE_UDF(TNumericHash, ui64(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TNumericHash, ui64(TAutoMap<ui64>)) {
Y_UNUSED(valueBuilder);
ui64 input = args[0].Get<ui64>();
ui64 hash = (ui64)NumericHash(input);
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TMd5Hex, char*(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TMd5Hex, char*(TAutoMap<char*>)) {
const auto& inputRef = args[0].AsStringRef();
MD5 md5;
const TString& hash = md5.Calc(inputRef);
return valueBuilder->NewString(hash);
}
- SIMPLE_UDF(TMd5Raw, char*(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TMd5Raw, char*(TAutoMap<char*>)) {
const auto& inputRef = args[0].AsStringRef();
MD5 md5;
const TString& hash = md5.CalcRaw(inputRef);
return valueBuilder->NewString(hash);
}
- SIMPLE_UDF(TMd5HalfMix, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TMd5HalfMix, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(MD5::CalcHalfMix(args[0].AsStringRef()));
}
- SIMPLE_UDF(TArgon2, char*(TAutoMap<char*>, TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TArgon2, char*(TAutoMap<char*>, TAutoMap<char*>)) {
const static ui32 outSize = 32;
const static NArgonish::TArgon2Factory afactory;
const static THolder<NArgonish::IArgon2Base> argon2 = afactory.Create(
@@ -157,7 +158,7 @@ namespace {
return valueBuilder->NewString(TStringRef(reinterpret_cast<char*>(&out[0]), outSize));
}
- SIMPLE_UDF_OPTIONS(TBlake2B, char*(TAutoMap<char*>, TOptional<char*>), builder.OptionalArgs(1)) {
+ SIMPLE_STRICT_UDF_OPTIONS(TBlake2B, char*(TAutoMap<char*>, TOptional<char*>), builder.OptionalArgs(1)) {
const static ui32 outSize = 32;
const static NArgonish::TBlake2BFactory bfactory;
const TStringRef inputRef = args[0].AsStringRef();
@@ -180,7 +181,7 @@ namespace {
return valueBuilder->NewString(TStringRef(reinterpret_cast<char*>(&out[0]), outSize));
}
- SIMPLE_UDF(TSipHash, ui64(ui64, ui64, TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TSipHash, ui64(ui64, ui64, TAutoMap<char*>)) {
using namespace highwayhash;
Y_UNUSED(valueBuilder);
const TStringRef inputRef = args[2].AsStringRef();
@@ -189,7 +190,7 @@ namespace {
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(THighwayHash, ui64(ui64, ui64, ui64, ui64, TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(THighwayHash, ui64(ui64, ui64, ui64, ui64, TAutoMap<char*>)) {
using namespace highwayhash;
Y_UNUSED(valueBuilder);
const TStringRef inputRef = args[4].AsStringRef();
@@ -202,14 +203,14 @@ namespace {
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TFarmHashFingerprint, ui64(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TFarmHashFingerprint, ui64(TAutoMap<ui64>)) {
Y_UNUSED(valueBuilder);
ui64 input = args[0].Get<ui64>();
ui64 hash = util::Fingerprint(input);
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TFarmHashFingerprint2, ui64(TAutoMap<ui64>, TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TFarmHashFingerprint2, ui64(TAutoMap<ui64>, TAutoMap<ui64>)) {
Y_UNUSED(valueBuilder);
ui64 low = args[0].Get<ui64>();
ui64 high = args[1].Get<ui64>();
@@ -217,14 +218,14 @@ namespace {
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TFarmHashFingerprint32, ui32(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TFarmHashFingerprint32, ui32(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
auto hash = util::Fingerprint32(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(ui32(hash));
}
- SIMPLE_UDF(TFarmHashFingerprint64, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TFarmHashFingerprint64, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
auto hash = util::Fingerprint64(inputRef.Data(), inputRef.Size());
@@ -251,6 +252,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new TFarmHashFingerprint128);
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -271,14 +273,14 @@ namespace {
}
};
- SIMPLE_UDF(TSuperFastHash, ui32(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TSuperFastHash, ui32(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
ui32 hash = SuperFastHash(inputRef.Data(), inputRef.Size());
return TUnboxedValuePod(hash);
}
- SIMPLE_UDF(TSha1, char*(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TSha1, char*(TAutoMap<char*>)) {
const auto& inputRef = args[0].AsStringRef();
SHA_CTX sha;
SHA1_Init(&sha);
@@ -288,7 +290,7 @@ namespace {
return valueBuilder->NewString(TStringRef(reinterpret_cast<char*>(hash), sizeof(hash)));
}
- SIMPLE_UDF(TSha256, char*(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TSha256, char*(TAutoMap<char*>)) {
const auto& inputRef = args[0].AsStringRef();
SHA256_CTX sha;
SHA256_Init(&sha);
@@ -298,7 +300,7 @@ namespace {
return valueBuilder->NewString(TStringRef(reinterpret_cast<char*>(hash), sizeof(hash)));
}
- SIMPLE_UDF(TIntHash64, ui64(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TIntHash64, ui64(TAutoMap<ui64>)) {
Y_UNUSED(valueBuilder);
ui64 x = args[0].Get<ui64>();
x ^= 0x4CF2D2BAAE6DA887ULL;
@@ -310,7 +312,7 @@ namespace {
return TUnboxedValuePod(x);
}
- SIMPLE_UDF(TXXH3, ui64(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TXXH3, ui64(TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const auto& inputRef = args[0].AsStringRef();
const ui64 hash = XXH3_64bits(inputRef.Data(), inputRef.Size());
@@ -332,6 +334,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new TXXH3_128);
}
+ builder.IsStrict();
return true;
} else {
return false;
diff --git a/ydb/library/yql/udfs/common/histogram/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/histogram/CMakeLists.darwin.txt
index f7f3563b36..9e6f739f06 100644
--- a/ydb/library/yql/udfs/common/histogram/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/histogram/CMakeLists.darwin.txt
@@ -19,7 +19,7 @@ target_link_libraries(histogram_udf INTERFACE
add_global_library_for(histogram_udf.global histogram_udf)
target_compile_options(histogram_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(histogram_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/histogram/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/histogram/CMakeLists.linux-aarch64.txt
index b99231af38..a66710237f 100644
--- a/ydb/library/yql/udfs/common/histogram/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/histogram/CMakeLists.linux-aarch64.txt
@@ -20,7 +20,7 @@ target_link_libraries(histogram_udf INTERFACE
add_global_library_for(histogram_udf.global histogram_udf)
target_compile_options(histogram_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(histogram_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/histogram/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/histogram/CMakeLists.linux.txt
index b99231af38..a66710237f 100644
--- a/ydb/library/yql/udfs/common/histogram/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/histogram/CMakeLists.linux.txt
@@ -20,7 +20,7 @@ target_link_libraries(histogram_udf INTERFACE
add_global_library_for(histogram_udf.global histogram_udf)
target_compile_options(histogram_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(histogram_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/histogram/histogram_udf.cpp b/ydb/library/yql/udfs/common/histogram/histogram_udf.cpp
index ecd0200690..5390817aca 100644
--- a/ydb/library/yql/udfs/common/histogram/histogram_udf.cpp
+++ b/ydb/library/yql/udfs/common/histogram/histogram_udf.cpp
@@ -697,6 +697,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new THistogramPrint(histogramIndexes));
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -767,6 +768,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new THistogramToCumulativeDistributionFunction(histogramIndexes));
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -855,6 +857,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new THistogramNormalize(histogramIndexes));
}
+ builder.IsStrict();
return true;
} else {
return false;
diff --git a/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.darwin.txt
index 8324bc96f2..2b2781e044 100644
--- a/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.darwin.txt
@@ -19,7 +19,7 @@ target_link_libraries(hyperloglog_udf INTERFACE
add_global_library_for(hyperloglog_udf.global hyperloglog_udf)
target_compile_options(hyperloglog_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(hyperloglog_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux-aarch64.txt
index bb7a83213b..f33d6a9c6d 100644
--- a/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux-aarch64.txt
@@ -20,7 +20,7 @@ target_link_libraries(hyperloglog_udf INTERFACE
add_global_library_for(hyperloglog_udf.global hyperloglog_udf)
target_compile_options(hyperloglog_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(hyperloglog_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux.txt
index bb7a83213b..f33d6a9c6d 100644
--- a/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/hyperloglog/CMakeLists.linux.txt
@@ -20,7 +20,7 @@ target_link_libraries(hyperloglog_udf INTERFACE
add_global_library_for(hyperloglog_udf.global hyperloglog_udf)
target_compile_options(hyperloglog_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(hyperloglog_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/hyperloglog/hyperloglog_udf.cpp b/ydb/library/yql/udfs/common/hyperloglog/hyperloglog_udf.cpp
index b4b52639dc..b12e775208 100644
--- a/ydb/library/yql/udfs/common/hyperloglog/hyperloglog_udf.cpp
+++ b/ydb/library/yql/udfs/common/hyperloglog/hyperloglog_udf.cpp
@@ -212,6 +212,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new THyperLogLog_AddValue(builder.GetSourcePosition()));
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -354,6 +355,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new THyperLogLog_Merge(builder.GetSourcePosition()));
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -398,6 +400,7 @@ namespace {
if (!typesOnly) {
builder.Implementation(new THyperLogLog_GetResult(builder.GetSourcePosition()));
}
+ builder.IsStrict();
return true;
} else {
return false;
diff --git a/ydb/library/yql/udfs/common/ip_base/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/ip_base/CMakeLists.darwin.txt
index b01a3028c2..58d2ad4cb8 100644
--- a/ydb/library/yql/udfs/common/ip_base/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/ip_base/CMakeLists.darwin.txt
@@ -20,7 +20,7 @@ target_link_libraries(ip_udf INTERFACE
add_global_library_for(ip_udf.global ip_udf)
target_compile_options(ip_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(ip_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux-aarch64.txt
index c90526626c..c1ad218e10 100644
--- a/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux-aarch64.txt
@@ -21,7 +21,7 @@ target_link_libraries(ip_udf INTERFACE
add_global_library_for(ip_udf.global ip_udf)
target_compile_options(ip_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(ip_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux.txt
index c90526626c..c1ad218e10 100644
--- a/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/ip_base/CMakeLists.linux.txt
@@ -21,7 +21,7 @@ target_link_libraries(ip_udf INTERFACE
add_global_library_for(ip_udf.global ip_udf)
target_compile_options(ip_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(ip_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.darwin.txt
index 94b1dd3e06..abc8f84be0 100644
--- a/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.darwin.txt
@@ -10,7 +10,7 @@
add_library(common-ip_base-lib)
target_compile_options(common-ip_base-lib PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(common-ip_base-lib PUBLIC
diff --git a/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux-aarch64.txt
index bb6f444f19..a8602f3b7c 100644
--- a/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux-aarch64.txt
@@ -10,7 +10,7 @@
add_library(common-ip_base-lib)
target_compile_options(common-ip_base-lib PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(common-ip_base-lib PUBLIC
diff --git a/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux.txt
index bb6f444f19..a8602f3b7c 100644
--- a/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/ip_base/lib/CMakeLists.linux.txt
@@ -10,7 +10,7 @@
add_library(common-ip_base-lib)
target_compile_options(common-ip_base-lib PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(common-ip_base-lib PUBLIC
diff --git a/ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h b/ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h
index b87bd95912..26d43cc160 100644
--- a/ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h
+++ b/ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h
@@ -22,7 +22,7 @@ namespace {
}
};
- SIMPLE_UDF(TFromString, TOptionalString(TAutoMapString)) {
+ SIMPLE_STRICT_UDF(TFromString, TOptionalString(TAutoMapString)) {
try {
TString input(args[0].AsStringRef());
const TIp4Or6& ip = Ip4Or6FromString(input.c_str());
@@ -48,7 +48,7 @@ namespace {
}
}
- SIMPLE_UDF(TIsIPv4, bool(TOptionalString)) {
+ SIMPLE_STRICT_UDF(TIsIPv4, bool(TOptionalString)) {
Y_UNUSED(valueBuilder);
bool result = false;
if (args[0]) {
@@ -58,7 +58,7 @@ namespace {
return TUnboxedValuePod(result);
}
- SIMPLE_UDF(TIsIPv6, bool(TOptionalString)) {
+ SIMPLE_STRICT_UDF(TIsIPv6, bool(TOptionalString)) {
Y_UNUSED(valueBuilder);
bool result = false;
if (args[0]) {
@@ -68,7 +68,7 @@ namespace {
return TUnboxedValuePod(result);
}
- SIMPLE_UDF(TIsEmbeddedIPv4, bool(TOptionalString)) {
+ SIMPLE_STRICT_UDF(TIsEmbeddedIPv4, bool(TOptionalString)) {
Y_UNUSED(valueBuilder);
bool result = false;
if (args[0]) {
diff --git a/ydb/library/yql/udfs/common/json/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/json/CMakeLists.darwin.txt
index 10dc66ccde..bb05bd57c1 100644
--- a/ydb/library/yql/udfs/common/json/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/json/CMakeLists.darwin.txt
@@ -19,7 +19,7 @@ target_link_libraries(json_udf INTERFACE
add_global_library_for(json_udf.global json_udf)
target_compile_options(json_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(json_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/json/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/json/CMakeLists.linux-aarch64.txt
index b2e4bb52d9..89e3726266 100644
--- a/ydb/library/yql/udfs/common/json/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/json/CMakeLists.linux-aarch64.txt
@@ -20,7 +20,7 @@ target_link_libraries(json_udf INTERFACE
add_global_library_for(json_udf.global json_udf)
target_compile_options(json_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(json_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/json/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/json/CMakeLists.linux.txt
index b2e4bb52d9..89e3726266 100644
--- a/ydb/library/yql/udfs/common/json/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/json/CMakeLists.linux.txt
@@ -20,7 +20,7 @@ target_link_libraries(json_udf INTERFACE
add_global_library_for(json_udf.global json_udf)
target_compile_options(json_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(json_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/json/json_udf.cpp b/ydb/library/yql/udfs/common/json/json_udf.cpp
index e994e589bd..49ffec496c 100644
--- a/ydb/library/yql/udfs/common/json/json_udf.cpp
+++ b/ydb/library/yql/udfs/common/json/json_udf.cpp
@@ -104,6 +104,8 @@ namespace {
if (!typesOnly) {
builder.Implementation(new TGetField);
}
+
+ builder.IsStrict();
return true;
} else {
return false;
diff --git a/ydb/library/yql/udfs/common/json2/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/json2/CMakeLists.darwin.txt
index c6e02893c9..c865c152fe 100644
--- a/ydb/library/yql/udfs/common/json2/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/json2/CMakeLists.darwin.txt
@@ -21,7 +21,7 @@ target_link_libraries(json2_udf INTERFACE
add_global_library_for(json2_udf.global json2_udf)
target_compile_options(json2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(json2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/json2/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/json2/CMakeLists.linux-aarch64.txt
index 9bfd5637f3..b446e10c52 100644
--- a/ydb/library/yql/udfs/common/json2/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/json2/CMakeLists.linux-aarch64.txt
@@ -22,7 +22,7 @@ target_link_libraries(json2_udf INTERFACE
add_global_library_for(json2_udf.global json2_udf)
target_compile_options(json2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(json2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/json2/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/json2/CMakeLists.linux.txt
index 9bfd5637f3..b446e10c52 100644
--- a/ydb/library/yql/udfs/common/json2/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/json2/CMakeLists.linux.txt
@@ -22,7 +22,7 @@ target_link_libraries(json2_udf INTERFACE
add_global_library_for(json2_udf.global json2_udf)
target_compile_options(json2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(json2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/json2/as_json_node.h b/ydb/library/yql/udfs/common/json2/as_json_node.h
index 442e4a90ba..4e190f8eb7 100644
--- a/ydb/library/yql/udfs/common/json2/as_json_node.h
+++ b/ydb/library/yql/udfs/common/json2/as_json_node.h
@@ -43,6 +43,8 @@ namespace NJson2Udf {
if (!typesOnly) {
builder.Implementation(new TAsJsonNode<TSource>(builder.GetSourcePosition()));
}
+
+ builder.IsStrict();
return true;
}
diff --git a/ydb/library/yql/udfs/common/json2/sql_exists.h b/ydb/library/yql/udfs/common/json2/sql_exists.h
index 32d5b84897..78aac2ce57 100644
--- a/ydb/library/yql/udfs/common/json2/sql_exists.h
+++ b/ydb/library/yql/udfs/common/json2/sql_exists.h
@@ -67,6 +67,9 @@ namespace NJson2Udf {
if (!typesOnly) {
builder.Implementation(new TSqlExists(builder.GetSourcePosition()));
}
+ if constexpr (!ThrowException) {
+ builder.IsStrict();
+ }
return true;
}
diff --git a/ydb/library/yql/udfs/common/json2/sql_query.h b/ydb/library/yql/udfs/common/json2/sql_query.h
index 85ed288fec..5b2f6a8a79 100644
--- a/ydb/library/yql/udfs/common/json2/sql_query.h
+++ b/ydb/library/yql/udfs/common/json2/sql_query.h
@@ -60,6 +60,8 @@ namespace NJson2Udf {
5. Bool. True - throw on error, false - otherwise
6. Resource<JsonNode>?. Default value to return on error. Ignored if 4th argument is true
*/
+ // we can't mark TSqlQuery as strict due to runtime throw policy setting
+ // TODO: optimizer can mark SqlQuery as strict if 3th/5th arguments are literal booleans
builder.Args()
->Add(inputOptionalType)
.Add(jsonPathType)
diff --git a/ydb/library/yql/udfs/common/json2/sql_value.h b/ydb/library/yql/udfs/common/json2/sql_value.h
index 5960c0749e..319fd855e8 100644
--- a/ydb/library/yql/udfs/common/json2/sql_value.h
+++ b/ydb/library/yql/udfs/common/json2/sql_value.h
@@ -156,6 +156,8 @@ namespace NJson2Udf {
.Done()
.Returns(returnType);
+ builder.IsStrict();
+
if (!typesOnly) {
builder.Implementation(new TSqlValue(builder.GetSourcePosition()));
}
diff --git a/ydb/library/yql/udfs/common/math/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/math/CMakeLists.darwin.txt
index d6c448f67b..99f85d3c08 100644
--- a/ydb/library/yql/udfs/common/math/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/math/CMakeLists.darwin.txt
@@ -21,7 +21,7 @@ target_link_libraries(math_udf INTERFACE
add_global_library_for(math_udf.global math_udf)
target_compile_options(math_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(math_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/math/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/math/CMakeLists.linux-aarch64.txt
index de33f9dcc0..21b962c059 100644
--- a/ydb/library/yql/udfs/common/math/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/math/CMakeLists.linux-aarch64.txt
@@ -22,7 +22,7 @@ target_link_libraries(math_udf INTERFACE
add_global_library_for(math_udf.global math_udf)
target_compile_options(math_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(math_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/math/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/math/CMakeLists.linux.txt
index de33f9dcc0..21b962c059 100644
--- a/ydb/library/yql/udfs/common/math/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/math/CMakeLists.linux.txt
@@ -22,7 +22,7 @@ target_link_libraries(math_udf INTERFACE
add_global_library_for(math_udf.global math_udf)
target_compile_options(math_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(math_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/math/math_udf.cpp b/ydb/library/yql/udfs/common/math/math_udf.cpp
index 3491a7bdac..394b8cdf7f 100644
--- a/ydb/library/yql/udfs/common/math/math_udf.cpp
+++ b/ydb/library/yql/udfs/common/math/math_udf.cpp
@@ -57,6 +57,13 @@
return res; \
}
+#define MATH_STRICT_UDF_IMPL(name, signature, options) \
+ UDF_IMPL(T##name, builder.SimpleSignature<signature>().IsStrict(); options;, ;, ;, "/llvm_bc/Math", #name "IR") { \
+ TUnboxedValuePod res; \
+ name##IR(this, &res, valueBuilder, args); \
+ return res; \
+ }
+
#define REGISTER_MATH_UDF(udfName, ...) T##udfName,
#define REGISTER_MATH_UDF_LAST(udfName, ...) T##udfName
@@ -70,7 +77,7 @@ namespace {
extern const char precision[] = "Precision";
using TPrecision = TNamedArg<int, precision>;
- MATH_UDF_MAP(MATH_UDF_IMPL, MATH_UDF_IMPL)
+ MATH_UDF_MAP(MATH_STRICT_UDF_IMPL, MATH_STRICT_UDF_IMPL)
SIMPLE_MODULE(TMathModule,
MATH_UDF_MAP(REGISTER_MATH_UDF, REGISTER_MATH_UDF_LAST))
diff --git a/ydb/library/yql/udfs/common/re2/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/re2/CMakeLists.darwin.txt
index 65a5834716..7689301d7e 100644
--- a/ydb/library/yql/udfs/common/re2/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/re2/CMakeLists.darwin.txt
@@ -20,7 +20,7 @@ target_link_libraries(re2_udf INTERFACE
add_global_library_for(re2_udf.global re2_udf)
target_compile_options(re2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(re2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/re2/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/re2/CMakeLists.linux-aarch64.txt
index 0e7ec7ce2d..0b378dee01 100644
--- a/ydb/library/yql/udfs/common/re2/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/re2/CMakeLists.linux-aarch64.txt
@@ -21,7 +21,7 @@ target_link_libraries(re2_udf INTERFACE
add_global_library_for(re2_udf.global re2_udf)
target_compile_options(re2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(re2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/re2/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/re2/CMakeLists.linux.txt
index 0e7ec7ce2d..0b378dee01 100644
--- a/ydb/library/yql/udfs/common/re2/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/re2/CMakeLists.linux.txt
@@ -21,7 +21,7 @@ target_link_libraries(re2_udf INTERFACE
add_global_library_for(re2_udf.global re2_udf)
target_compile_options(re2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(re2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/re2/re2_udf.cpp b/ydb/library/yql/udfs/common/re2/re2_udf.cpp
index b478675fb6..6b261f4019 100644
--- a/ydb/library/yql/udfs/common/re2/re2_udf.cpp
+++ b/ydb/library/yql/udfs/common/re2/re2_udf.cpp
@@ -256,7 +256,7 @@ namespace {
}
};
- SIMPLE_UDF(TEscape, char*(char*)) {
+ SIMPLE_STRICT_UDF(TEscape, char*(char*)) {
const std::string_view input(args[0].AsStringRef());
const auto& result = RE2::QuoteMeta(StringPiece(input.data(), input.size()));
return input == result ? TUnboxedValue(args[0]) : valueBuilder->NewString(result);
@@ -315,6 +315,8 @@ namespace {
bool typesOnly) {
Y_UNUSED(userType);
if (Name() == name) {
+ builder.IsStrict();
+
auto argsBuilder = builder.Args();
#define FIELD_HANDLE(name, index, type, ...) argsBuilder->Add<TOptional<type>>().Name(TStringRef::Of(#name));
OPTIONS_MAP(FIELD_HANDLE)
diff --git a/ydb/library/yql/udfs/common/set/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/set/CMakeLists.darwin.txt
index 6d1eda46b1..d6c732bd79 100644
--- a/ydb/library/yql/udfs/common/set/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/set/CMakeLists.darwin.txt
@@ -18,7 +18,7 @@ target_link_libraries(set_udf INTERFACE
add_global_library_for(set_udf.global set_udf)
target_compile_options(set_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(set_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/set/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/set/CMakeLists.linux-aarch64.txt
index 196c4fb87a..ac417111af 100644
--- a/ydb/library/yql/udfs/common/set/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/set/CMakeLists.linux-aarch64.txt
@@ -19,7 +19,7 @@ target_link_libraries(set_udf INTERFACE
add_global_library_for(set_udf.global set_udf)
target_compile_options(set_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(set_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/set/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/set/CMakeLists.linux.txt
index 196c4fb87a..ac417111af 100644
--- a/ydb/library/yql/udfs/common/set/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/set/CMakeLists.linux.txt
@@ -19,7 +19,7 @@ target_link_libraries(set_udf INTERFACE
add_global_library_for(set_udf.global set_udf)
target_compile_options(set_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(set_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/set/set_udf.cpp b/ydb/library/yql/udfs/common/set/set_udf.cpp
index f282c22842..878821a450 100644
--- a/ydb/library/yql/udfs/common/set/set_udf.cpp
+++ b/ydb/library/yql/udfs/common/set/set_udf.cpp
@@ -1,4 +1,3 @@
-
#include <ydb/library/yql/public/udf/udf_type_ops.h>
#include <ydb/library/yql/public/udf/udf_helpers.h>
@@ -454,6 +453,8 @@ public:
}
if (name == CreateName) {
+ builder.IsStrict();
+
builder.Args()->Add(valueType).Add<ui32>().Done().Returns(setType);
if (!typesOnly) {
@@ -468,6 +469,8 @@ public:
}
if (name == AddValueName) {
+ builder.IsStrict();
+
builder.Args()->Add(setType).Add(valueType).Done().Returns(setType);
if (!typesOnly) {
@@ -482,6 +485,8 @@ public:
}
if (name == WasChangedName) {
+ builder.IsStrict();
+
builder.Args()->Add(setType).Done().Returns<bool>();
if (!typesOnly) {
@@ -496,6 +501,8 @@ public:
}
if (name == MergeName) {
+ builder.IsStrict();
+
builder.Args()->Add(setType).Add(setType).Done().Returns(setType);
if (!typesOnly) {
@@ -510,6 +517,8 @@ public:
}
if (name == SerializeName) {
+ builder.IsStrict();
+
builder.Args()->Add(setType).Done().Returns(serializedType);
if (!typesOnly) {
@@ -540,6 +549,8 @@ public:
if (name == GetResultName) {
auto resultType = builder.List()->Item(valueType).Build();
+ builder.IsStrict();
+
builder.Args()->Add(setType).Done().Returns(resultType);
if (!typesOnly) {
diff --git a/ydb/library/yql/udfs/common/stat/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/stat/CMakeLists.darwin.txt
index 7b0ef957e1..6334870218 100644
--- a/ydb/library/yql/udfs/common/stat/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/stat/CMakeLists.darwin.txt
@@ -21,7 +21,7 @@ target_link_libraries(stat_udf INTERFACE
add_global_library_for(stat_udf.global stat_udf)
target_compile_options(stat_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(stat_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/stat/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/stat/CMakeLists.linux-aarch64.txt
index c19e76a165..0a1da407fa 100644
--- a/ydb/library/yql/udfs/common/stat/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/stat/CMakeLists.linux-aarch64.txt
@@ -22,7 +22,7 @@ target_link_libraries(stat_udf INTERFACE
add_global_library_for(stat_udf.global stat_udf)
target_compile_options(stat_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(stat_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/stat/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/stat/CMakeLists.linux.txt
index c19e76a165..0a1da407fa 100644
--- a/ydb/library/yql/udfs/common/stat/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/stat/CMakeLists.linux.txt
@@ -22,7 +22,7 @@ target_link_libraries(stat_udf INTERFACE
add_global_library_for(stat_udf.global stat_udf)
target_compile_options(stat_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(stat_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/stat/static/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/stat/static/CMakeLists.darwin.txt
index 9bddbe36b5..c712c4d8bb 100644
--- a/ydb/library/yql/udfs/common/stat/static/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/stat/static/CMakeLists.darwin.txt
@@ -10,7 +10,7 @@
add_library(common-stat-static)
target_compile_options(common-stat-static PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(common-stat-static PUBLIC
diff --git a/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux-aarch64.txt
index 69cd116ff0..c4e3f1f098 100644
--- a/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux-aarch64.txt
@@ -10,7 +10,7 @@
add_library(common-stat-static)
target_compile_options(common-stat-static PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(common-stat-static PUBLIC
diff --git a/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux.txt
index 69cd116ff0..c4e3f1f098 100644
--- a/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/stat/static/CMakeLists.linux.txt
@@ -10,7 +10,7 @@
add_library(common-stat-static)
target_compile_options(common-stat-static PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(common-stat-static PUBLIC
diff --git a/ydb/library/yql/udfs/common/stat/static/stat_udf.h b/ydb/library/yql/udfs/common/stat/static/stat_udf.h
index 7cc4f8abb5..208b467470 100644
--- a/ydb/library/yql/udfs/common/stat/static/stat_udf.h
+++ b/ydb/library/yql/udfs/common/stat/static/stat_udf.h
@@ -25,7 +25,7 @@ namespace {
return TUnboxedValuePod(new TDigestResource(delta, K, args[0].Get<double>()));
}
- SIMPLE_UDF(TTDigest_AddValue, TResource<DigestResourceName>(TResource<DigestResourceName>, double)) {
+ SIMPLE_STRICT_UDF(TTDigest_AddValue, TResource<DigestResourceName>(TResource<DigestResourceName>, double)) {
Y_UNUSED(valueBuilder);
TDigestResource::Validate(args[0]);
TDigestResource* resource = static_cast<TDigestResource*>(args[0].AsBoxed().Get());
@@ -33,13 +33,13 @@ namespace {
return TUnboxedValuePod(resource);
}
- SIMPLE_UDF(TTDigest_GetPercentile, double(TResource<DigestResourceName>, double)) {
+ SIMPLE_STRICT_UDF(TTDigest_GetPercentile, double(TResource<DigestResourceName>, double)) {
Y_UNUSED(valueBuilder);
TDigestResource::Validate(args[0]);
return TUnboxedValuePod(static_cast<TDigestResource*>(args[0].AsBoxed().Get())->Get()->GetPercentile(args[1].Get<double>()));
}
- SIMPLE_UDF(TTDigest_Serialize, char*(TResource<DigestResourceName>)) {
+ SIMPLE_STRICT_UDF(TTDigest_Serialize, char*(TResource<DigestResourceName>)) {
TDigestResource::Validate(args[0]);
return valueBuilder->NewString(static_cast<TDigestResource*>(args[0].AsBoxed().Get())->Get()->Serialize());
}
@@ -49,7 +49,7 @@ namespace {
return TUnboxedValuePod(new TDigestResource(TString(args[0].AsStringRef())));
}
- SIMPLE_UDF(TTDigest_Merge, TResource<DigestResourceName>(TResource<DigestResourceName>, TResource<DigestResourceName>)) {
+ SIMPLE_STRICT_UDF(TTDigest_Merge, TResource<DigestResourceName>(TResource<DigestResourceName>, TResource<DigestResourceName>)) {
Y_UNUSED(valueBuilder);
TDigestResource::Validate(args[0]);
TDigestResource::Validate(args[1]);
diff --git a/ydb/library/yql/udfs/common/string/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/string/CMakeLists.darwin.txt
index dfd971276d..fab9e78d57 100644
--- a/ydb/library/yql/udfs/common/string/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/string/CMakeLists.darwin.txt
@@ -24,7 +24,7 @@ target_link_libraries(string_udf INTERFACE
add_global_library_for(string_udf.global string_udf)
target_compile_options(string_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(string_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/string/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/string/CMakeLists.linux-aarch64.txt
index aa0ab9daf5..fa56bdce80 100644
--- a/ydb/library/yql/udfs/common/string/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/string/CMakeLists.linux-aarch64.txt
@@ -25,7 +25,7 @@ target_link_libraries(string_udf INTERFACE
add_global_library_for(string_udf.global string_udf)
target_compile_options(string_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(string_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/string/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/string/CMakeLists.linux.txt
index aa0ab9daf5..fa56bdce80 100644
--- a/ydb/library/yql/udfs/common/string/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/string/CMakeLists.linux.txt
@@ -25,7 +25,7 @@ target_link_libraries(string_udf INTERFACE
add_global_library_for(string_udf.global string_udf)
target_compile_options(string_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(string_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/string/string_udf.cpp b/ydb/library/yql/udfs/common/string/string_udf.cpp
index 170413e224..c2bce4ae42 100644
--- a/ydb/library/yql/udfs/common/string/string_udf.cpp
+++ b/ydb/library/yql/udfs/common/string/string_udf.cpp
@@ -27,53 +27,54 @@ using namespace NKikimr;
using namespace NUdf;
namespace {
-#define STRING_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, char*(TAutoMap<char*>)) { \
- const TString input(args[0].AsStringRef()); \
- const auto& result = function(input); \
- return valueBuilder->NewString(result); \
- }
-
-#define STRING_UNSAFE_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, TOptional<char*>(TOptional<char*>)) { \
- EMPTY_RESULT_ON_EMPTY_ARG(0); \
- const TString input(args[0].AsStringRef()); \
- try { \
- const auto& result = function(input); \
- return valueBuilder->NewString(result); \
- } catch (yexception&) { \
- return TUnboxedValue(); \
- } \
- }
-
-#define STROKA_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, TOptional<char*>(TOptional<char*>)) { \
- EMPTY_RESULT_ON_EMPTY_ARG(0) \
- const TString input(args[0].AsStringRef()); \
- try { \
- TUtf16String wide = UTF8ToWide(input); \
- function(wide); \
- return valueBuilder->NewString(WideToUTF8(wide)); \
- } catch (yexception&) { \
- return TUnboxedValue(); \
- } \
- }
-
-#define STROKA_CASE_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, TOptional<char*>(TOptional<char*>)) { \
- EMPTY_RESULT_ON_EMPTY_ARG(0) \
- const TString input(args[0].AsStringRef()); \
- try { \
- TUtf16String wide = UTF8ToWide(input); \
- function(wide.begin(), wide.size()); \
- return valueBuilder->NewString(WideToUTF8(wide)); \
- } catch (yexception&) { \
- return TUnboxedValue(); \
- } \
+#define STRING_UDF(udfName, function) \
+ SIMPLE_STRICT_UDF(T##udfName, char*(TAutoMap<char*>)) { \
+ const TString input(args[0].AsStringRef()); \
+ const auto& result = function(input); \
+ return valueBuilder->NewString(result); \
+ }
+
+// 'unsafe' udf is actually strict - it returns null on any exception
+#define STRING_UNSAFE_UDF(udfName, function) \
+ SIMPLE_STRICT_UDF(T##udfName, TOptional<char*>(TOptional<char*>)) {\
+ EMPTY_RESULT_ON_EMPTY_ARG(0); \
+ const TString input(args[0].AsStringRef()); \
+ try { \
+ const auto& result = function(input); \
+ return valueBuilder->NewString(result); \
+ } catch (yexception&) { \
+ return TUnboxedValue(); \
+ } \
+ }
+
+#define STROKA_UDF(udfName, function) \
+ SIMPLE_STRICT_UDF(T##udfName, TOptional<char*>(TOptional<char*>)) { \
+ EMPTY_RESULT_ON_EMPTY_ARG(0) \
+ const TString input(args[0].AsStringRef()); \
+ try { \
+ TUtf16String wide = UTF8ToWide(input); \
+ function(wide); \
+ return valueBuilder->NewString(WideToUTF8(wide)); \
+ } catch (yexception&) { \
+ return TUnboxedValue(); \
+ } \
+ }
+
+#define STROKA_CASE_UDF(udfName, function) \
+ SIMPLE_STRICT_UDF(T##udfName, TOptional<char*>(TOptional<char*>)) { \
+ EMPTY_RESULT_ON_EMPTY_ARG(0) \
+ const TString input(args[0].AsStringRef()); \
+ try { \
+ TUtf16String wide = UTF8ToWide(input); \
+ function(wide.begin(), wide.size()); \
+ return valueBuilder->NewString(WideToUTF8(wide)); \
+ } catch (yexception&) { \
+ return TUnboxedValue(); \
+ } \
}
#define STROKA_ASCII_CASE_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, char*(TAutoMap<char*>)) { \
+ SIMPLE_STRICT_UDF(T##udfName, char*(TAutoMap<char*>)) { \
TString input(args[0].AsStringRef()); \
if (input.function()) { \
return valueBuilder->NewString(input); \
@@ -82,46 +83,46 @@ namespace {
} \
}
-#define STROKA_FIND_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, bool(TOptional<char*>, char*)) { \
- Y_UNUSED(valueBuilder); \
- if (args[0]) { \
- const TString haystack(args[0].AsStringRef()); \
- const TString needle(args[1].AsStringRef()); \
- return TUnboxedValuePod(haystack.function(needle)); \
- } else { \
- return TUnboxedValuePod(false); \
- } \
- }
-
-#define STRING_TWO_ARGS_UDF(udfName, function) \
- SIMPLE_UDF(T##udfName, bool(TOptional<char*>, char*)) { \
- Y_UNUSED(valueBuilder); \
- if (args[0]) { \
- const TString haystack(args[0].AsStringRef()); \
- const TString needle(args[1].AsStringRef()); \
- return TUnboxedValuePod(function(haystack, needle)); \
- } else { \
- return TUnboxedValuePod(false); \
- } \
- }
-
-#define IS_ASCII_UDF(function) \
- SIMPLE_UDF(T##function, bool(TOptional<char*>)) { \
- Y_UNUSED(valueBuilder); \
- if (args[0]) { \
- const TStringBuf input(args[0].AsStringRef()); \
- bool result = true; \
- for (auto c : input) { \
- if (!function(c)) { \
- result = false; \
- break; \
- } \
- } \
- return TUnboxedValuePod(result); \
- } else { \
- return TUnboxedValuePod(false); \
- } \
+#define STROKA_FIND_UDF(udfName, function) \
+ SIMPLE_STRICT_UDF(T##udfName, bool(TOptional<char*>, char*)) { \
+ Y_UNUSED(valueBuilder); \
+ if (args[0]) { \
+ const TString haystack(args[0].AsStringRef()); \
+ const TString needle(args[1].AsStringRef()); \
+ return TUnboxedValuePod(haystack.function(needle)); \
+ } else { \
+ return TUnboxedValuePod(false); \
+ } \
+ }
+
+#define STRING_TWO_ARGS_UDF(udfName, function) \
+ SIMPLE_STRICT_UDF(T##udfName, bool(TOptional<char*>, char*)) { \
+ Y_UNUSED(valueBuilder); \
+ if (args[0]) { \
+ const TString haystack(args[0].AsStringRef()); \
+ const TString needle(args[1].AsStringRef()); \
+ return TUnboxedValuePod(function(haystack, needle)); \
+ } else { \
+ return TUnboxedValuePod(false); \
+ } \
+ }
+
+#define IS_ASCII_UDF(function) \
+ SIMPLE_STRICT_UDF(T##function, bool(TOptional<char*>)) { \
+ Y_UNUSED(valueBuilder); \
+ if (args[0]) { \
+ const TStringBuf input(args[0].AsStringRef()); \
+ bool result = true; \
+ for (auto c : input) { \
+ if (!function(c)) { \
+ result = false; \
+ break; \
+ } \
+ } \
+ return TUnboxedValuePod(result); \
+ } else { \
+ return TUnboxedValuePod(false); \
+ } \
}
#define STRING_UDF_MAP(XX) \
@@ -178,21 +179,21 @@ namespace {
XX(IsAsciiAlnum) \
XX(IsAsciiHex)
- SIMPLE_UDF(TCollapseText, char*(TAutoMap<char*>, ui64)) {
+ SIMPLE_STRICT_UDF(TCollapseText, char*(TAutoMap<char*>, ui64)) {
TString input(args[0].AsStringRef());
ui64 maxLength = args[1].Get<ui64>();
CollapseText(input, maxLength);
return valueBuilder->NewString(input);
}
- SIMPLE_UDF(TReplaceAll, char*(TAutoMap<char*>, char*, char*)) {
+ SIMPLE_STRICT_UDF(TReplaceAll, char*(TAutoMap<char*>, char*, char*)) {
if (TString result(args[0].AsStringRef()); SubstGlobal(result, args[1].AsStringRef(), args[2].AsStringRef()))
return valueBuilder->NewString(result);
else
return args[0];
}
- SIMPLE_UDF(TReplaceFirst, char*(TAutoMap<char*>, char*, char*)) {
+ SIMPLE_STRICT_UDF(TReplaceFirst, char*(TAutoMap<char*>, char*, char*)) {
std::string result(args[0].AsStringRef());
const std::string_view what(args[1].AsStringRef());
if (const auto index = result.find(what); index != std::string::npos) {
@@ -202,7 +203,7 @@ namespace {
return args[0];
}
- SIMPLE_UDF(TReplaceLast, char*(TAutoMap<char*>, char*, char*)) {
+ SIMPLE_STRICT_UDF(TReplaceLast, char*(TAutoMap<char*>, char*, char*)) {
std::string result(args[0].AsStringRef());
const std::string_view what(args[1].AsStringRef());
if (const auto index = result.rfind(what); index != std::string::npos) {
@@ -212,7 +213,7 @@ namespace {
return args[0];
}
- SIMPLE_UDF(TRemoveAll, char*(TAutoMap<char*>, char*)) {
+ SIMPLE_STRICT_UDF(TRemoveAll, char*(TAutoMap<char*>, char*)) {
std::string input(args[0].AsStringRef());
const std::string_view remove(args[1].AsStringRef());
const std::unordered_set<char> chars(remove.cbegin(), remove.cend());
@@ -229,7 +230,7 @@ namespace {
return args[0];
}
- SIMPLE_UDF(TRemoveFirst, char*(TAutoMap<char*>, char*)) {
+ SIMPLE_STRICT_UDF(TRemoveFirst, char*(TAutoMap<char*>, char*)) {
std::string input(args[0].AsStringRef());
const std::string_view remove(args[1].AsStringRef());
std::unordered_set<char> chars(remove.cbegin(), remove.cend());
@@ -242,7 +243,7 @@ namespace {
return args[0];
}
- SIMPLE_UDF(TRemoveLast, char*(TAutoMap<char*>, char*)) {
+ SIMPLE_STRICT_UDF(TRemoveLast, char*(TAutoMap<char*>, char*)) {
std::string input(args[0].AsStringRef());
const std::string_view remove(args[1].AsStringRef());
std::unordered_set<char> chars(remove.cbegin(), remove.cend());
@@ -255,7 +256,7 @@ namespace {
return args[0];
}
- SIMPLE_UDF_OPTIONS(TFind, i64(TAutoMap<char*>, char*, TOptional<ui64>),
+ SIMPLE_STRICT_UDF_OPTIONS(TFind, i64(TAutoMap<char*>, char*, TOptional<ui64>),
builder.OptionalArgs(1)) {
Y_UNUSED(valueBuilder);
const TString haystack(args[0].AsStringRef());
@@ -264,8 +265,8 @@ namespace {
return TUnboxedValuePod(haystack.find(needle, pos));
}
- SIMPLE_UDF_OPTIONS(TReverseFind, i64(TAutoMap<char*>, char*, TOptional<ui64>),
- builder.OptionalArgs(1)) {
+ SIMPLE_STRICT_UDF_OPTIONS(TReverseFind, i64(TAutoMap<char*>, char*, TOptional<ui64>),
+ builder.OptionalArgs(1)) {
Y_UNUSED(valueBuilder);
const TString haystack(args[0].AsStringRef());
const TString needle(args[1].AsStringRef());
@@ -273,8 +274,8 @@ namespace {
return TUnboxedValuePod(haystack.rfind(needle, pos));
}
- SIMPLE_UDF_OPTIONS(TSubstring, char*(TAutoMap<char*>, TOptional<ui64>, TOptional<ui64>),
- builder.OptionalArgs(1)) {
+ SIMPLE_STRICT_UDF_OPTIONS(TSubstring, char*(TAutoMap<char*>, TOptional<ui64>, TOptional<ui64>),
+ builder.OptionalArgs(1)) {
const TString input(args[0].AsStringRef());
const ui64 from = args[1].GetOrDefault<ui64>(0);
const ui64 count = args[2].GetOrDefault<ui64>(TString::npos);
@@ -317,7 +318,7 @@ namespace {
using TLimitArg = TNamedArg<ui64, limitName>;
- SIMPLE_UDF_OPTIONS(TSplitToList, TListType<char*>(
+ SIMPLE_STRICT_UDF_OPTIONS(TSplitToList, TListType<char*>(
TOptional<char*>,
char*,
TDelimeterStringArg,
@@ -353,7 +354,7 @@ namespace {
return valueBuilder->NewList(result.data(), result.size());
}
- SIMPLE_UDF(TJoinFromList, char*(TAutoMap<TListType<TOptional<char*>>>, char*)) {
+ SIMPLE_STRICT_UDF(TJoinFromList, char*(TAutoMap<TListType<TOptional<char*>>>, char*)) {
auto input = args[0].GetListIterator();
const TString delimeter(args[1].AsStringRef());
TVector<TString> items;
@@ -368,7 +369,7 @@ namespace {
return valueBuilder->NewString(JoinSeq(delimeter, items));
}
- SIMPLE_UDF(TLevensteinDistance, ui64(TAutoMap<char*>, TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TLevensteinDistance, ui64(TAutoMap<char*>, TAutoMap<char*>)) {
Y_UNUSED(valueBuilder);
const TStringBuf left(args[0].AsStringRef());
const TStringBuf right(args[1].AsStringRef());
@@ -414,69 +415,69 @@ namespace {
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(THex, char*(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(THex, char*(TAutoMap<ui64>)) {
TStringStream result;
result << Hex(args[0].Get<ui64>());
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(TSHex, char*(TAutoMap<i64>)) {
+ SIMPLE_STRICT_UDF(TSHex, char*(TAutoMap<i64>)) {
TStringStream result;
result << SHex(args[0].Get<i64>());
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(TBin, char*(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(TBin, char*(TAutoMap<ui64>)) {
TStringStream result;
result << Bin(args[0].Get<ui64>());
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(TSBin, char*(TAutoMap<i64>)) {
+ SIMPLE_STRICT_UDF(TSBin, char*(TAutoMap<i64>)) {
TStringStream result;
result << SBin(args[0].Get<i64>());
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(THexText, char*(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(THexText, char*(TAutoMap<char*>)) {
TStringStream result;
const TStringBuf input(args[0].AsStringRef());
result << HexText(input);
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(TBinText, char*(TAutoMap<char*>)) {
+ SIMPLE_STRICT_UDF(TBinText, char*(TAutoMap<char*>)) {
TStringStream result;
const TStringBuf input(args[0].AsStringRef());
result << BinText(input);
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(THumanReadableDuration, char*(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(THumanReadableDuration, char*(TAutoMap<ui64>)) {
TStringStream result;
result << HumanReadable(TDuration::MicroSeconds(args[0].Get<ui64>()));
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(THumanReadableQuantity, char*(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(THumanReadableQuantity, char*(TAutoMap<ui64>)) {
TStringStream result;
result << HumanReadableSize(args[0].Get<ui64>(), SF_QUANTITY);
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(THumanReadableBytes, char*(TAutoMap<ui64>)) {
+ SIMPLE_STRICT_UDF(THumanReadableBytes, char*(TAutoMap<ui64>)) {
TStringStream result;
result << HumanReadableSize(args[0].Get<ui64>(), SF_BYTES);
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(TPrec, char*(TAutoMap<double>, ui64)) {
+ SIMPLE_STRICT_UDF(TPrec, char*(TAutoMap<double>, ui64)) {
TStringStream result;
result << Prec(args[0].Get<double>(), args[1].Get<ui64>());
return valueBuilder->NewString(TStringRef(result.Data(), result.Size()));
}
- SIMPLE_UDF(TToByteList, TListType<ui8>(char*)) {
+ SIMPLE_STRICT_UDF(TToByteList, TListType<ui8>(char*)) {
const TStringBuf input(args[0].AsStringRef());
TUnboxedValue* items = nullptr;
TUnboxedValue result = valueBuilder->NewArray(input.size(), items);
@@ -486,7 +487,7 @@ namespace {
return result;
}
- SIMPLE_UDF(TFromByteList, char*(TListType<ui8>)) {
+ SIMPLE_STRICT_UDF(TFromByteList, char*(TListType<ui8>)) {
auto input = args[0];
if (auto elems = input.GetElements()) {
diff --git a/ydb/library/yql/udfs/common/yson2/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/yson2/CMakeLists.darwin.txt
index 36be7ce5fd..67a891e1f8 100644
--- a/ydb/library/yql/udfs/common/yson2/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/yson2/CMakeLists.darwin.txt
@@ -21,7 +21,7 @@ target_link_libraries(yson2_udf INTERFACE
add_global_library_for(yson2_udf.global yson2_udf)
target_compile_options(yson2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(yson2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/yson2/CMakeLists.linux-aarch64.txt b/ydb/library/yql/udfs/common/yson2/CMakeLists.linux-aarch64.txt
index 353a07476f..a1bfee9abb 100644
--- a/ydb/library/yql/udfs/common/yson2/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/udfs/common/yson2/CMakeLists.linux-aarch64.txt
@@ -22,7 +22,7 @@ target_link_libraries(yson2_udf INTERFACE
add_global_library_for(yson2_udf.global yson2_udf)
target_compile_options(yson2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(yson2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/yson2/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/yson2/CMakeLists.linux.txt
index 353a07476f..a1bfee9abb 100644
--- a/ydb/library/yql/udfs/common/yson2/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/yson2/CMakeLists.linux.txt
@@ -22,7 +22,7 @@ target_link_libraries(yson2_udf INTERFACE
add_global_library_for(yson2_udf.global yson2_udf)
target_compile_options(yson2_udf.global PRIVATE
-DUDF_ABI_VERSION_MAJOR=2
- -DUDF_ABI_VERSION_MINOR=27
+ -DUDF_ABI_VERSION_MINOR=28
-DUDF_ABI_VERSION_PATCH=0
)
target_link_libraries(yson2_udf.global PUBLIC
diff --git a/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp b/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp
index 1278ec565c..36a90f5a70 100644
--- a/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp
+++ b/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp
@@ -88,6 +88,7 @@ public:
builder.Implementation(new TOptions);
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -526,7 +527,7 @@ SIMPLE_UDF_OPTIONS(TConvertToStringDict, TStringDictType(TOptional<TNodeResource
return (options.AutoConvert ? &ConvertToDictImpl<false, true, &ConvertToString<false, true, false>> : &ConvertToDictImpl<false, false, &ConvertToString<false, false, false>>)(args[0], valueBuilder, Pos_);
}
-SIMPLE_UDF(TAttributes, TDictType(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TAttributes, TDictType(TAutoMap<TNodeResource>)) {
const auto x = args[0];
if (IsNodeType<ENodeType::Attr>(x)) {
return x;
@@ -549,7 +550,7 @@ SIMPLE_UDF_OPTIONS(TGetLength, TOptional<ui64>(TAutoMap<TNodeResource>, TOptiona
return (options.AutoConvert ? &GetLengthImpl<false, true> : &GetLengthImpl<false, false>)(args[0], valueBuilder, Pos_);
}
-SIMPLE_UDF_OPTIONS(TLookup, TOptional<TNodeResource>(TAutoMap<TNodeResource>, char*, TOptional<TOptionsResource>), builder.OptionalArgs(1)) {
+SIMPLE_STRICT_UDF_OPTIONS(TLookup, TOptional<TNodeResource>(TAutoMap<TNodeResource>, char*, TOptional<TOptionsResource>), builder.OptionalArgs(1)) {
return LookupImpl(args[0], args[1], valueBuilder, Pos_);
}
@@ -655,15 +656,15 @@ SIMPLE_UDF_OPTIONS(TYPathDict, TOptional<TDictType>(TAutoMap<TNodeResource>, cha
return (options.AutoConvert ? &YPathImpl<&ConvertToDictImpl<false, true>> : &YPathImpl<&ConvertToDictImpl<false, false>>)(args[0], args[1], valueBuilder, Pos_);
}
-SIMPLE_UDF(TSerialize, TYson(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TSerialize, TYson(TAutoMap<TNodeResource>)) {
return valueBuilder->NewString(SerializeYsonDomToBinary(args[0]));
}
-SIMPLE_UDF(TSerializeText, TYson(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TSerializeText, TYson(TAutoMap<TNodeResource>)) {
return valueBuilder->NewString(SerializeYsonDomToText(args[0]));
}
-SIMPLE_UDF(TSerializePretty, TYson(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TSerializePretty, TYson(TAutoMap<TNodeResource>)) {
return valueBuilder->NewString(SerializeYsonDomToPrettyText(args[0]));
}
@@ -679,7 +680,7 @@ SIMPLE_UDF_OPTIONS(TSerializeJson, TOptional<TJson>(TAutoMap<TNodeResource>, TOp
return {};
}
-SIMPLE_UDF(TWithAttributes, TOptional<TNodeResource>(TAutoMap<TNodeResource>, TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TWithAttributes, TOptional<TNodeResource>(TAutoMap<TNodeResource>, TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
auto x = args[0];
auto y = args[1];
@@ -724,52 +725,52 @@ TUnboxedValuePod IsTypeImpl(TUnboxedValuePod y) {
return TUnboxedValuePod(IsNodeType<Type>(y));
}
-SIMPLE_UDF(TIsString, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsString, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::String>(*args);
}
-SIMPLE_UDF(TIsInt64, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsInt64, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::Int64>(*args);
}
-SIMPLE_UDF(TIsUint64, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsUint64, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::Uint64>(*args);
}
-SIMPLE_UDF(TIsBool, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsBool, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::Bool>(*args);
}
-SIMPLE_UDF(TIsDouble, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsDouble, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::Double>(*args);
}
-SIMPLE_UDF(TIsList, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsList, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::List>(*args);
}
-SIMPLE_UDF(TIsDict, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsDict, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::Dict>(*args);
}
-SIMPLE_UDF(TIsEntity, bool(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TIsEntity, bool(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return IsTypeImpl<ENodeType::Entity>(*args);
}
-SIMPLE_UDF(TEquals, bool(TAutoMap<TNodeResource>, TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TEquals, bool(TAutoMap<TNodeResource>, TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(EquateDoms(args[0], args[1]));
}
-SIMPLE_UDF(TGetHash, ui64(TAutoMap<TNodeResource>)) {
+SIMPLE_STRICT_UDF(TGetHash, ui64(TAutoMap<TNodeResource>)) {
Y_UNUSED(valueBuilder);
return TUnboxedValuePod(HashDom(args[0]));
}
@@ -914,6 +915,7 @@ public:
if (!typesOnly) {
builder.Implementation(new TFrom(builder.GetSourcePosition(), typeHelper, inputType));
}
+ builder.IsStrict();
return true;
} else {
return false;
@@ -1062,6 +1064,7 @@ public:
switch (typeId) {
case TDataType<TYJson>::Id:
builder.Args()->Add<TAutoMap<TYJson>>().Add(optionsType).Done().Returns(builder.Resource(NodeResourceName));
+ builder.IsStrict();
break;
case TDataType<TUtf8>::Id:
builder.Args()->Add<TAutoMap<TUtf8>>().Add(optionsType).Done().Returns(builder.Optional()->Item(builder.Resource(NodeResourceName)).Build());
@@ -1131,6 +1134,7 @@ const TStringRef& TParse<TJson, true>::Name() {
}
+// TODO: optimizer that marks UDFs as strict if Yson::Options(false as Strict) is given
SIMPLE_MODULE(TYson2Module,
TOptions,
TParse<TYson>,
diff --git a/ydb/public/api/grpc/ydb_topic_v1.proto b/ydb/public/api/grpc/ydb_topic_v1.proto
index a65012e414..c991df6208 100644
--- a/ydb/public/api/grpc/ydb_topic_v1.proto
+++ b/ydb/public/api/grpc/ydb_topic_v1.proto
@@ -65,6 +65,8 @@ service TopicService {
// <----------------
rpc StreamRead(stream StreamReadMessage.FromClient) returns (stream StreamReadMessage.FromServer);
+ // Single commit offset request.
+ rpc CommitOffset(CommitOffsetRequest) returns (CommitOffsetResponse);
// Create topic command.
rpc CreateTopic(CreateTopicRequest) returns (CreateTopicResponse);
diff --git a/ydb/public/api/protos/draft/datastreams.proto b/ydb/public/api/protos/draft/datastreams.proto
index d2825e065e..7ab5299438 100644
--- a/ydb/public/api/protos/draft/datastreams.proto
+++ b/ydb/public/api/protos/draft/datastreams.proto
@@ -66,7 +66,7 @@ message HashKeyRange {
message Record {
// Timestamp that the record was inserted into the stream
- int64 timestamp = 1 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS];
+ int64 approximate_arrival_timestamp = 1 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS];
// Data blob
bytes data = 2 [(FieldTransformer) = TRANSFORM_BASE64];
// Encryption type used on record
diff --git a/ydb/public/api/protos/draft/persqueue_error_codes.proto b/ydb/public/api/protos/draft/persqueue_error_codes.proto
index 8b2a098631..f637fba468 100644
--- a/ydb/public/api/protos/draft/persqueue_error_codes.proto
+++ b/ydb/public/api/protos/draft/persqueue_error_codes.proto
@@ -40,5 +40,7 @@ enum EErrorCode {
CREATE_TIMEOUT = 22; // TODO: move to pqlib codes
IDLE_TIMEOUT = 23; // TODO: move to pqlib codes
+ SET_OFFSET_ERROR_COMMIT_TO_PAST = 25;
+
ERROR = 100;
}
diff --git a/ydb/public/api/protos/persqueue_error_codes_v1.proto b/ydb/public/api/protos/persqueue_error_codes_v1.proto
index c6658305c2..3620c4799b 100644
--- a/ydb/public/api/protos/persqueue_error_codes_v1.proto
+++ b/ydb/public/api/protos/persqueue_error_codes_v1.proto
@@ -39,5 +39,13 @@ enum ErrorCode {
WRONG_PARTITION_NUMBER = 500021;
PREFERRED_CLUSTER_MISMATCHED = 500022;
+
+ TABLET_PIPE_DISCONNECTED = 500023;
+ SET_OFFSET_ERROR_COMMIT_TO_PAST = 500025;
+
ERROR = 500100;
+
+ INVALID_ARGUMENT = 500040;
+ VALIDATION_ERROR = 500080;
+
}
diff --git a/ydb/public/api/protos/ydb_table.proto b/ydb/public/api/protos/ydb_table.proto
index 12e0c8918d..9405f11612 100644
--- a/ydb/public/api/protos/ydb_table.proto
+++ b/ydb/public/api/protos/ydb_table.proto
@@ -152,13 +152,24 @@ message Changefeed {
google.protobuf.Duration retention_period = 4;
// Emit virtual timestamps of changes along with data or not
bool virtual_timestamps = 5;
+ // Initial scan will output the current state of the table first
+ bool initial_scan = 6;
}
message ChangefeedDescription {
enum State {
STATE_UNSPECIFIED = 0;
+
+ // Normal state, from this state changefeed can be disabled
STATE_ENABLED = 1;
+
+ // No new change records are generated, but the old ones remain available
+ // From this state changefeed cannot be switched to any other state
STATE_DISABLED = 2;
+
+ // An initial scan is being performed.
+ // After its completion changefeed will switch to the normal state
+ STATE_INITIAL_SCAN = 3;
}
// Name of the feed
diff --git a/ydb/public/api/protos/ydb_topic.proto b/ydb/public/api/protos/ydb_topic.proto
index a5a6c5abde..5ade5338e7 100644
--- a/ydb/public/api/protos/ydb_topic.proto
+++ b/ydb/public/api/protos/ydb_topic.proto
@@ -540,9 +540,41 @@ message AddOffsetsToTransactionResponse {
message AddOffsetsToTransactionResult {
}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// CommitOffset
+
+
+// Commit offset request sent from client to server.
+message CommitOffsetRequest {
+ Ydb.Operations.OperationParams operation_params = 1;
+
+ // Topic path of partition.
+ string path = 2;
+ // Partition identifier.
+ int64 partition_id = 3;
+ // Path of consumer.
+ string consumer = 4;
+
+ // Processed offset.
+ int64 offset = 5;
+}
+
+// Commit offset response sent from server to client.
+message CommitOffsetResponse {
+ // Result of request will be inside operation.
+ Ydb.Operations.Operation operation = 1;
+}
+
+// Commit offset result message inside CommitOffsetResponse.operation.
+message CommitOffsetResult {
+}
+
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Control messages
+
// message representing statistics by seleveral windows
message MultipleWindowsStat {
int64 per_minute = 1;
@@ -768,7 +800,7 @@ message DescribeTopicResult {
// Minimum of timestamps of last write among all partitions.
google.protobuf.Timestamp min_last_write_time = 2;
- // Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
+ // Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
google.protobuf.Duration max_write_time_lag = 3;
// How much bytes were written statistics.
MultipleWindowsStat bytes_written = 4;
@@ -855,7 +887,7 @@ message PartitionStats {
int64 store_size_bytes = 2;
// Timestamp of last write.
google.protobuf.Timestamp last_write_time = 3;
- // Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
+ // Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
google.protobuf.Duration max_write_time_lag = 4;
// How much bytes were written during several windows in this partition.
MultipleWindowsStat bytes_written = 5;
diff --git a/ydb/public/lib/deprecated/kicli/cpp_ut.cpp b/ydb/public/lib/deprecated/kicli/cpp_ut.cpp
index a4f5e480ba..08238c3ddf 100644
--- a/ydb/public/lib/deprecated/kicli/cpp_ut.cpp
+++ b/ydb/public/lib/deprecated/kicli/cpp_ut.cpp
@@ -41,7 +41,6 @@ Tests::TServer StartupKikimr(NGRpcProxy::TGRpcClientConfig& clientConfig,
settings.SetLogBackend(logBackend);
settings.AppConfig.CopyFrom(config);
settings.SetEnableSystemViews(false);
- settings.SetEnableMvcc(false);
Tests::TServer Server(settings);
Server.EnableGRpc(grpcPort);
diff --git a/ydb/public/lib/validation/main.cpp b/ydb/public/lib/validation/main.cpp
index 39b6bbf5df..ffecf3e99a 100644
--- a/ydb/public/lib/validation/main.cpp
+++ b/ydb/public/lib/validation/main.cpp
@@ -8,7 +8,7 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
-#include <util/generic/hash.h>
+#include <util/generic/map.h>
#include <util/generic/maybe.h>
#include <util/generic/ptr.h>
#include <util/generic/vector.h>
@@ -471,7 +471,20 @@ class TMessageGenerator {
}
};
- using TItems = THashMap<const OneofDescriptor*, TItem>;
+ struct TOrderedCmp {
+ bool operator()(const OneofDescriptor* lhs, const OneofDescriptor* rhs) const noexcept {
+ if (!lhs && !rhs) {
+ return false;
+ } else if (!lhs) {
+ return true;
+ } else if (!rhs) {
+ return false;
+ }
+ return lhs->index() < rhs->index();
+ }
+ };
+
+ using TItems = TMap<const OneofDescriptor*, TItem, TOrderedCmp>;
void Declare(TPrinter& printer, const TItems& items) {
if (!items) {
diff --git a/ydb/public/lib/ydb_cli/commands/click_bench_schema.sql b/ydb/public/lib/ydb_cli/commands/click_bench_schema.sql
index 9590580527..3fcd7bd660 100644
--- a/ydb/public/lib/ydb_cli/commands/click_bench_schema.sql
+++ b/ydb/public/lib/ydb_cli/commands/click_bench_schema.sql
@@ -2,96 +2,96 @@
CREATE TABLE `{table}`
(
WatchID Int64 {notnull},
- JavaEnable Int32 {notnull},
+ JavaEnable Int16 {notnull},
Title Text {notnull},
- GoodEvent Int32 {notnull},
+ GoodEvent Int16 {notnull},
EventTime Timestamp {notnull},
- EventDate Timestamp {notnull},
+ EventDate Date {notnull},
CounterID Int32 {notnull},
ClientIP Int32 {notnull},
RegionID Int32 {notnull},
UserID Int64 {notnull},
- CounterClass Int32 {notnull},
- OS Int32 {notnull},
- UserAgent Int32 {notnull},
+ CounterClass Int16 {notnull},
+ OS Int16 {notnull},
+ UserAgent Int16 {notnull},
URL Text {notnull},
Referer Text {notnull},
- IsRefresh Int32 {notnull},
- RefererCategoryID Int32 {notnull},
+ IsRefresh Int16 {notnull},
+ RefererCategoryID Int16 {notnull},
RefererRegionID Int32 {notnull},
- URLCategoryID Int32 {notnull},
+ URLCategoryID Int16 {notnull},
URLRegionID Int32 {notnull},
- ResolutionWidth Int32 {notnull},
- ResolutionHeight Int32 {notnull},
- ResolutionDepth Int32 {notnull},
- FlashMajor Int32 {notnull},
- FlashMinor Int32 {notnull},
+ ResolutionWidth Int16 {notnull},
+ ResolutionHeight Int16 {notnull},
+ ResolutionDepth Int16 {notnull},
+ FlashMajor Int16 {notnull},
+ FlashMinor Int16 {notnull},
FlashMinor2 Text {notnull},
- NetMajor Int32 {notnull},
- NetMinor Int32 {notnull},
- UserAgentMajor Int32 {notnull},
+ NetMajor Int16 {notnull},
+ NetMinor Int16 {notnull},
+ UserAgentMajor Int16 {notnull},
UserAgentMinor Bytes {notnull},
- CookieEnable Int32 {notnull},
- JavascriptEnable Int32 {notnull},
- IsMobile Int32 {notnull},
- MobilePhone Int32 {notnull},
+ CookieEnable Int16 {notnull},
+ JavascriptEnable Int16 {notnull},
+ IsMobile Int16 {notnull},
+ MobilePhone Int16 {notnull},
MobilePhoneModel Text {notnull},
Params Text {notnull},
IPNetworkID Int32 {notnull},
- TraficSourceID Int32 {notnull},
- SearchEngineID Int32 {notnull},
+ TraficSourceID Int16 {notnull},
+ SearchEngineID Int16 {notnull},
SearchPhrase Text {notnull},
- AdvEngineID Int32 {notnull},
- IsArtifical Int32 {notnull},
- WindowClientWidth Int32 {notnull},
- WindowClientHeight Int32 {notnull},
- ClientTimeZone Int32 {notnull},
+ AdvEngineID Int16 {notnull},
+ IsArtifical Int16 {notnull},
+ WindowClientWidth Int16 {notnull},
+ WindowClientHeight Int16 {notnull},
+ ClientTimeZone Int16 {notnull},
ClientEventTime Timestamp {notnull},
- SilverlightVersion1 Int32 {notnull},
- SilverlightVersion2 Int32 {notnull},
+ SilverlightVersion1 Int16 {notnull},
+ SilverlightVersion2 Int16 {notnull},
SilverlightVersion3 Int32 {notnull},
- SilverlightVersion4 Int32 {notnull},
+ SilverlightVersion4 Int16 {notnull},
PageCharset Text {notnull},
CodeVersion Int32 {notnull},
- IsLink Int32 {notnull},
- IsDownload Int32 {notnull},
- IsNotBounce Int32 {notnull},
+ IsLink Int16 {notnull},
+ IsDownload Int16 {notnull},
+ IsNotBounce Int16 {notnull},
FUniqID Int64 {notnull},
OriginalURL Text {notnull},
HID Int32 {notnull},
- IsOldCounter Int32 {notnull},
- IsEvent Int32 {notnull},
- IsParameter Int32 {notnull},
- DontCountHits Int32 {notnull},
- WithHash Int32 {notnull},
- HitColor Bytes {notnull},
+ IsOldCounter Int16 {notnull},
+ IsEvent Int16 {notnull},
+ IsParameter Int16 {notnull},
+ DontCountHits Int16 {notnull},
+ WithHash Int16 {notnull},
+ HitColor Text {notnull},
LocalEventTime Timestamp {notnull},
- Age Int32 {notnull},
- Sex Int32 {notnull},
- Income Int32 {notnull},
- Interests Int32 {notnull},
- Robotness Int32 {notnull},
+ Age Int16 {notnull},
+ Sex Int16 {notnull},
+ Income Int16 {notnull},
+ Interests Int16 {notnull},
+ Robotness Int16 {notnull},
RemoteIP Int32 {notnull},
WindowName Int32 {notnull},
OpenerName Int32 {notnull},
- HistoryLength Int32 {notnull},
+ HistoryLength Int16 {notnull},
BrowserLanguage Text {notnull},
BrowserCountry Text {notnull},
SocialNetwork Text {notnull},
SocialAction Text {notnull},
- HTTPError Int32 {notnull},
+ HTTPError Int16 {notnull},
SendTiming Int32 {notnull},
DNSTiming Int32 {notnull},
ConnectTiming Int32 {notnull},
ResponseStartTiming Int32 {notnull},
ResponseEndTiming Int32 {notnull},
FetchTiming Int32 {notnull},
- SocialSourceNetworkID Int32 {notnull},
+ SocialSourceNetworkID Int16 {notnull},
SocialSourcePage Text {notnull},
ParamPrice Int64 {notnull},
ParamOrderID Text {notnull},
ParamCurrency Text {notnull},
- ParamCurrencyID Int32 {notnull},
+ ParamCurrencyID Int16 {notnull},
OpenstatServiceName Text {notnull},
OpenstatCampaignID Text {notnull},
OpenstatAdID Text {notnull},
@@ -102,11 +102,11 @@ CREATE TABLE `{table}`
UTMContent Text {notnull},
UTMTerm Text {notnull},
FromTag Text {notnull},
- HasGCLID Int32 {notnull},
+ HasGCLID Int16 {notnull},
RefererHash Int64 {notnull},
URLHash Int64 {notnull},
CLID Int32 {notnull},
- --PRIMARY KEY (CounterID, EventDate, UserID, EventTime, WatchID)
+
PRIMARY KEY (EventTime, CounterID, EventDate, UserID, WatchID)
)
{partition}
@@ -114,4 +114,4 @@ WITH (
{store}
AUTO_PARTITIONING_BY_SIZE = ENABLED,
AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 128
-);
+);
diff --git a/ydb/public/lib/ydb_cli/commands/ydb_service_scheme.cpp b/ydb/public/lib/ydb_cli/commands/ydb_service_scheme.cpp
index ed39b75b2c..c48fc04a25 100644
--- a/ydb/public/lib/ydb_cli/commands/ydb_service_scheme.cpp
+++ b/ydb/public/lib/ydb_cli/commands/ydb_service_scheme.cpp
@@ -343,7 +343,7 @@ namespace {
return;
}
- TPrettyTable table({ "Name", "Mode", "Format", "VirtualTimestamps" },
+ TPrettyTable table({ "Name", "Mode", "Format", "State", "VirtualTimestamps" },
TPrettyTableConfig().WithoutRowDelimiters());
for (const auto& changefeed : changefeeds) {
@@ -351,7 +351,8 @@ namespace {
.Column(0, changefeed.GetName())
.Column(1, changefeed.GetMode())
.Column(2, changefeed.GetFormat())
- .Column(3, changefeed.GetVirtualTimestamps() ? "on" : "off");
+ .Column(3, changefeed.GetState())
+ .Column(4, changefeed.GetVirtualTimestamps() ? "on" : "off");
}
Cout << Endl << "Changefeeds:" << Endl << table;
diff --git a/ydb/public/lib/ydb_cli/commands/ydb_service_topic.cpp b/ydb/public/lib/ydb_cli/commands/ydb_service_topic.cpp
index 7fd4c247ff..f4eb012cfb 100644
--- a/ydb/public/lib/ydb_cli/commands/ydb_service_topic.cpp
+++ b/ydb/public/lib/ydb_cli/commands/ydb_service_topic.cpp
@@ -253,7 +253,7 @@ namespace NYdb::NConsoleClient {
}
settings.RetentionPeriod(TDuration::Hours(RetentionPeriodHours_));
- settings.RetentionStorageMb(RetentionStorageMb_);
+ settings.RetentionStorageMb(RetentionStorageMb_ / 1_MB);
auto status = topicClient.CreateTopic(TopicName, settings).GetValueSync();
ThrowOnError(status);
diff --git a/ydb/public/lib/ydb_cli/import/import.cpp b/ydb/public/lib/ydb_cli/import/import.cpp
index 1d8e5b1928..4970441e80 100644
--- a/ydb/public/lib/ydb_cli/import/import.cpp
+++ b/ydb/public/lib/ydb_cli/import/import.cpp
@@ -51,10 +51,12 @@ TImportFileClient::TImportFileClient(const TDriver& driver, const TClientCommand
, TableClient(std::make_shared<NTable::TTableClient>(driver))
{
UpsertSettings
- .OperationTimeout(TDuration::Seconds(30))
- .ClientTimeout(TDuration::Seconds(35));
+ .OperationTimeout(TDuration::Seconds(TImportFileSettings::OperationTimeoutSec))
+ .ClientTimeout(TDuration::Seconds(TImportFileSettings::ClientTimeoutSec));
RetrySettings
- .MaxRetries(100000).Verbose(rootConfig.IsVerbose());
+ .MaxRetries(TImportFileSettings::MaxRetries)
+ .Idempotent(true)
+ .Verbose(rootConfig.IsVerbose());
}
TStatus TImportFileClient::Import(const TString& filePath, const TString& dbPath, const TImportFileSettings& settings) {
@@ -86,7 +88,7 @@ TStatus TImportFileClient::Import(const TString& filePath, const TString& dbPath
}
// If the filename passed is empty, read from stdin, else from the file.
- std::unique_ptr<TFileInput> fileInput = filePath.empty() ? nullptr
+ std::unique_ptr<TFileInput> fileInput = filePath.empty() ? nullptr
: std::make_unique<TFileInput>(filePath, settings.FileBufferSize_);
IInputStream& input = fileInput ? *fileInput : Cin;
@@ -230,7 +232,7 @@ TStatus TImportFileClient::UpsertJson(IInputStream& input, const TString& dbPath
return tableResult;
const TType tableType = GetTableType(tableResult.GetTableDescription());
- const NYdb::EBinaryStringEncoding stringEncoding =
+ const NYdb::EBinaryStringEncoding stringEncoding =
(settings.Format_==EOutputFormat::JsonBase64) ? NYdb::EBinaryStringEncoding::Base64 :
NYdb::EBinaryStringEncoding::Unicode;
@@ -275,7 +277,7 @@ TStatus TImportFileClient::UpsertJson(IInputStream& input, const TString& dbPath
TStatus TImportFileClient::UpsertParquet([[maybe_unused]]const TString& filename, [[maybe_unused]]const TString& dbPath, [[maybe_unused]]const TImportFileSettings& settings) {
#if defined (_WIN64) || defined (_WIN32) || defined (__WIN32__)
return MakeStatus(EStatus::BAD_REQUEST, TStringBuilder() << "Not supported on Windows");
- #else
+ #else
std::shared_ptr<arrow::io::ReadableFile> infile;
arrow::Result<std::shared_ptr<arrow::io::ReadableFile>> fileResult = arrow::io::ReadableFile::Open(filename);
if (!fileResult.ok()) {
@@ -309,7 +311,7 @@ TStatus TImportFileClient::UpsertParquet([[maybe_unused]]const TString& filename
}
std::deque<TAsyncStatus> inFlightRequests;
-
+
auto splitUpsertBatch = [this, &inFlightRequests, dbPath, settings](const std::shared_ptr<arrow::RecordBatch> &recordBatch){
std::vector<std::shared_ptr<arrow::RecordBatch>> slicedRecordBatches;
std::deque<std::shared_ptr<arrow::RecordBatch>> batchesDeque;
@@ -334,12 +336,12 @@ TStatus TImportFileClient::UpsertParquet([[maybe_unused]]const TString& filename
}
else {
std::shared_ptr<arrow::RecordBatch> left = nextBatch->Slice(0, nextBatch->num_rows() / 2);
- std::shared_ptr<arrow::RecordBatch> right = nextBatch->Slice(nextBatch->num_rows() / 2);
+ std::shared_ptr<arrow::RecordBatch> right = nextBatch->Slice(nextBatch->num_rows() / 2);
batchesDeque.push_front(right);
batchesDeque.push_front(left);
}
}
- auto schema = recordBatch->schema();
+ auto schema = recordBatch->schema();
TString strSchema = NYdb_cli::NArrow::SerializeSchema(*schema);
for (size_t i = 0; i < slicedRecordBatches.size(); i++) {
TString buffer = NYdb_cli::NArrow::SerializeBatchNoCompression(slicedRecordBatches[i]);
@@ -375,7 +377,7 @@ TStatus TImportFileClient::UpsertParquet([[maybe_unused]]const TString& filename
#endif
}
-inline
+inline
TAsyncStatus TImportFileClient::UpsertParquetBuffer(const TString& dbPath, const TString& buffer, const TString& strSchema) {
auto upsert = [this, dbPath, buffer, strSchema](NYdb::NTable::TTableClient& tableClient) -> TAsyncStatus {
return tableClient.BulkUpsert(dbPath, NTable::EDataFormat::ApacheArrow, buffer, strSchema, UpsertSettings)
diff --git a/ydb/public/lib/ydb_cli/import/import.h b/ydb/public/lib/ydb_cli/import/import.h
index 3eba2c9751..f6290fac71 100644
--- a/ydb/public/lib/ydb_cli/import/import.h
+++ b/ydb/public/lib/ydb_cli/import/import.h
@@ -32,6 +32,9 @@ struct TImportFileSettings : public TOperationRequestSettings<TImportFileSetting
static constexpr ui64 MaxBytesPerRequest = 8_MB;
static constexpr const char * DefaultDelimiter = ",";
+ static constexpr ui32 OperationTimeoutSec = 5 * 60;
+ static constexpr ui32 ClientTimeoutSec = OperationTimeoutSec + 5;
+ static constexpr ui32 MaxRetries = 10000;
// Allowed values: Csv, Tsv, JsonUnicode, JsonBase64. Default means Csv
FLUENT_SETTING_DEFAULT(EOutputFormat, Format, EOutputFormat::Default);
diff --git a/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.h b/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.h
index c04199d57e..3472777892 100644
--- a/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.h
+++ b/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.h
@@ -238,6 +238,10 @@ public:
return DoDecompress;
}
+ i64 GetServerBytesSize() const {
+ return ServerBytesSize;
+ }
+
TMaybe<std::pair<size_t, size_t>> GetReadyThreshold() const {
size_t readyCount = 0;
std::pair<size_t, size_t> ret;
@@ -270,7 +274,7 @@ public:
void PutDecompressionError(std::exception_ptr error, size_t batch, size_t message);
std::exception_ptr GetDecompressionError(size_t batch, size_t message);
- void OnDataDecompressed(i64 sourceSize, i64 estimatedDecompressedSize, i64 decompressedSize, size_t messagesCount, i64 serverBytesSize = 0);
+ void OnDataDecompressed(i64 sourceSize, i64 estimatedDecompressedSize, i64 decompressedSize, size_t messagesCount);
void OnUserRetrievedEvent(i64 decompressedDataSize, size_t messagesCount);
private:
@@ -962,7 +966,7 @@ public:
void Commit(const TPartitionStreamImpl<UseMigrationProtocol>* partitionStream, ui64 startOffset, ui64 endOffset);
void OnCreateNewDecompressionTask();
- void OnDecompressionInfoDestroy(i64 compressedSize, i64 decompressedSize, i64 messagesCount);
+ void OnDecompressionInfoDestroy(i64 compressedSize, i64 decompressedSize, i64 messagesCount, i64 serverBytesSize);
void OnDataDecompressed(i64 sourceSize, i64 estimatedDecompressedSize, i64 decompressedSize, size_t messagesCount, i64 serverBytesSize = 0);
diff --git a/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.ipp b/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.ipp
index 22f3088a8b..9a1948a174 100644
--- a/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.ipp
+++ b/ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/read_session.ipp
@@ -20,6 +20,7 @@
#include <util/stream/mem.h>
#include <util/system/env.h>
+#include <utility>
#include <variant>
// Forward delcarations
@@ -152,7 +153,7 @@ void TRawPartitionStreamEventQueue<UseMigrationProtocol>::SignalReadyEvents(TInt
{
auto moveToReadyQueue = [&](TRawPartitionStreamEvent<UseMigrationProtocol> &&event) {
queue.SignalEventImpl(stream, deferred, event.IsDataEvent());
-
+
Ready.push_back(std::move(event));
NotReady.pop_front();
};
@@ -474,7 +475,7 @@ inline void TSingleClusterReadSessionImpl<false>::InitImpl(TDeferredActions<fals
if (topic.MaxLag_) {
*topicSettings->mutable_max_lag() =
::google::protobuf::util::TimeUtil::MillisecondsToDuration(topic.MaxLag_->MilliSeconds());
- } else if (Settings.ReadFromTimestamp_) {
+ } else if (Settings.MaxLag_) {
*topicSettings->mutable_max_lag() =
::google::protobuf::util::TimeUtil::MillisecondsToDuration(Settings.MaxLag_->MilliSeconds());
}
@@ -503,7 +504,6 @@ void TSingleClusterReadSessionImpl<UseMigrationProtocol>::ContinueReadingDataImp
}
req.mutable_read_request()->set_bytes_size(ReadSizeBudget);
ReadSizeServerDelta += ReadSizeBudget;
-
ReadSizeBudget = 0;
}
@@ -1340,7 +1340,7 @@ void TSingleClusterReadSessionImpl<UseMigrationProtocol>::OnCreateNewDecompressi
}
template<bool UseMigrationProtocol>
-void TSingleClusterReadSessionImpl<UseMigrationProtocol>::OnDecompressionInfoDestroy(i64 compressedSize, i64 decompressedSize, i64 messagesCount)
+void TSingleClusterReadSessionImpl<UseMigrationProtocol>::OnDecompressionInfoDestroy(i64 compressedSize, i64 decompressedSize, i64 messagesCount, i64 serverBytesSize)
{
*Settings.Counters_->MessagesInflight -= messagesCount;
@@ -1355,6 +1355,10 @@ void TSingleClusterReadSessionImpl<UseMigrationProtocol>::OnDecompressionInfoDes
CompressedDataSize -= compressedSize;
DecompressedDataSize -= decompressedSize;
+ if constexpr (!UseMigrationProtocol) {
+ ReadSizeBudget += serverBytesSize;
+ }
+
ContinueReadingDataImpl();
StartDecompressionTasksImpl(deferred);
}
@@ -1820,7 +1824,7 @@ typename TAReadSessionEvent<UseMigrationProtocol>::TDataReceivedEvent
TReadSessionEventsQueue<UseMigrationProtocol>::GetDataEventImpl(TIntrusivePtr<TPartitionStreamImpl<UseMigrationProtocol>> stream,
size_t& maxByteSize,
TUserRetrievedEventsInfoAccumulator<UseMigrationProtocol>& accumulator) // Assumes that we're under lock.
-{
+{
TVector<typename TAReadSessionEvent<UseMigrationProtocol>::TDataReceivedEvent::TMessage> messages;
TVector<typename TAReadSessionEvent<UseMigrationProtocol>::TDataReceivedEvent::TCompressedMessage> compressedMessages;
@@ -2074,7 +2078,7 @@ template<bool UseMigrationProtocol>
TDataDecompressionInfo<UseMigrationProtocol>::~TDataDecompressionInfo()
{
if (auto session = Session.lock()) {
- session->OnDecompressionInfoDestroy(CompressedDataSize, DecompressedDataSize, MessagesInflight);
+ session->OnDecompressionInfoDestroy(CompressedDataSize, DecompressedDataSize, MessagesInflight, ServerBytesSize);
}
}
@@ -2305,13 +2309,15 @@ bool TDataDecompressionInfo<UseMigrationProtocol>::HasReadyUnreadData() const {
}
template<bool UseMigrationProtocol>
-void TDataDecompressionInfo<UseMigrationProtocol>::OnDataDecompressed(i64 sourceSize, i64 estimatedDecompressedSize, i64 decompressedSize, size_t messagesCount, i64 serverBytesSize)
+void TDataDecompressionInfo<UseMigrationProtocol>::OnDataDecompressed(i64 sourceSize, i64 estimatedDecompressedSize, i64 decompressedSize, size_t messagesCount)
{
CompressedDataSize -= sourceSize;
DecompressedDataSize += decompressedSize;
if (auto session = Session.lock()) {
- session->OnDataDecompressed(sourceSize, estimatedDecompressedSize, decompressedSize, messagesCount, serverBytesSize);
+ // TODO (ildar-khisam@): distribute total ServerBytesSize in proportion of source size
+ // Use CompressedDataSize, sourceSize, ServerBytesSize
+ session->OnDataDecompressed(sourceSize, estimatedDecompressedSize, decompressedSize, messagesCount, std::exchange(ServerBytesSize, 0));
}
}
@@ -2413,7 +2419,7 @@ void TDataDecompressionInfo<UseMigrationProtocol>::TDecompressionTask::operator(
Y_ASSERT(dataProcessed == SourceDataSize);
std::shared_ptr<TSingleClusterReadSessionImpl<UseMigrationProtocol>> session = Parent->Session.lock();
- Parent->OnDataDecompressed(SourceDataSize, EstimatedDecompressedSize, DecompressedSize, messagesProcessed, Parent->ServerBytesSize);
+ Parent->OnDataDecompressed(SourceDataSize, EstimatedDecompressedSize, DecompressedSize, messagesProcessed);
Parent->SourceDataNotProcessed -= dataProcessed;
Ready->Ready = true;
diff --git a/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/retry_policy_ut.cpp b/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/retry_policy_ut.cpp
index eb8e2cc1ef..73cb9d4df7 100644
--- a/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/retry_policy_ut.cpp
+++ b/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/retry_policy_ut.cpp
@@ -203,6 +203,7 @@ Y_UNIT_TEST_SUITE(RetryPolicy) {
setup1->EnableDataCenter("dc1");
Cerr << "Wait for writes to complete\n";
+
f.Wait();
f2.Wait();
//! Writer1 is not used any more.
@@ -221,7 +222,9 @@ Y_UNIT_TEST_SUITE(RetryPolicy) {
f = helper2->Write(false);
Cerr << "Enable dc2\n";
setup1->EnableDataCenter("dc2");
+
f.Wait();
+
helper2->EventLoop->AllowStop();
helper2->Policy->ExpectBreakDown();
diff --git a/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/ut_utils/sdk_test_setup.h b/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/ut_utils/sdk_test_setup.h
index f83f7a604f..1f516eb6c5 100644
--- a/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/ut_utils/sdk_test_setup.h
+++ b/ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/ut_utils/sdk_test_setup.h
@@ -105,7 +105,7 @@ public:
}
void SetNetDataViaFile(const TString& netDataTsv) {
- NetDataFile = MakeHolder<TTempFileHandle>("netData.tsv");
+ NetDataFile = MakeHolder<TTempFileHandle>();
NetDataFile->Write(netDataTsv.Data(), netDataTsv.Size());
NetDataFile->FlushData();
Server.ServerSettings.NetClassifierConfig.SetNetDataFilePath(NetDataFile->Name());
diff --git a/ydb/public/sdk/cpp/client/ydb_table/table.cpp b/ydb/public/sdk/cpp/client/ydb_table/table.cpp
index ee410153a8..01c75f3cc5 100644
--- a/ydb/public/sdk/cpp/client/ydb_table/table.cpp
+++ b/ydb/public/sdk/cpp/client/ydb_table/table.cpp
@@ -4407,6 +4407,11 @@ TChangefeedDescription& TChangefeedDescription::WithRetentionPeriod(const TDurat
return *this;
}
+TChangefeedDescription& TChangefeedDescription::WithInitialScan() {
+ InitialScan_ = true;
+ return *this;
+}
+
const TString& TChangefeedDescription::GetName() const {
return Name_;
}
@@ -4419,10 +4424,18 @@ EChangefeedFormat TChangefeedDescription::GetFormat() const {
return Format_;
}
+EChangefeedState TChangefeedDescription::GetState() const {
+ return State_;
+}
+
bool TChangefeedDescription::GetVirtualTimestamps() const {
return VirtualTimestamps_;
}
+bool TChangefeedDescription::GetInitialScan() const {
+ return InitialScan_;
+}
+
template <typename TProto>
TChangefeedDescription TChangefeedDescription::FromProto(const TProto& proto) {
EChangefeedMode mode;
@@ -4462,12 +4475,30 @@ TChangefeedDescription TChangefeedDescription::FromProto(const TProto& proto) {
ret.WithVirtualTimestamps();
}
+ if constexpr (std::is_same_v<TProto, Ydb::Table::ChangefeedDescription>) {
+ switch (proto.state()) {
+ case Ydb::Table::ChangefeedDescription::STATE_ENABLED:
+ ret.State_= EChangefeedState::Enabled;
+ break;
+ case Ydb::Table::ChangefeedDescription::STATE_DISABLED:
+ ret.State_ = EChangefeedState::Disabled;
+ break;
+ case Ydb::Table::ChangefeedDescription::STATE_INITIAL_SCAN:
+ ret.State_ = EChangefeedState::InitialScan;
+ break;
+ default:
+ ret.State_ = EChangefeedState::Unknown;
+ break;
+ }
+ }
+
return ret;
}
void TChangefeedDescription::SerializeTo(Ydb::Table::Changefeed& proto) const {
proto.set_name(Name_);
proto.set_virtual_timestamps(VirtualTimestamps_);
+ proto.set_initial_scan(InitialScan_);
switch (Mode_) {
case EChangefeedMode::KeysOnly:
diff --git a/ydb/public/sdk/cpp/client/ydb_table/table.h b/ydb/public/sdk/cpp/client/ydb_table/table.h
index c4e1295f6c..a13cde5856 100644
--- a/ydb/public/sdk/cpp/client/ydb_table/table.h
+++ b/ydb/public/sdk/cpp/client/ydb_table/table.h
@@ -205,11 +205,15 @@ public:
TChangefeedDescription& WithVirtualTimestamps();
// Customise retention period of underlying topic (24h by default).
TChangefeedDescription& WithRetentionPeriod(const TDuration& value);
+ // Initial scan will output the current state of the table first
+ TChangefeedDescription& WithInitialScan();
const TString& GetName() const;
EChangefeedMode GetMode() const;
EChangefeedFormat GetFormat() const;
+ EChangefeedState GetState() const;
bool GetVirtualTimestamps() const;
+ bool GetInitialScan() const;
void SerializeTo(Ydb::Table::Changefeed& proto) const;
TString ToString() const;
@@ -226,8 +230,10 @@ private:
TString Name_;
EChangefeedMode Mode_;
EChangefeedFormat Format_;
+ EChangefeedState State_ = EChangefeedState::Unknown;
bool VirtualTimestamps_ = false;
std::optional<TDuration> RetentionPeriod_;
+ bool InitialScan_ = false;
};
bool operator==(const TChangefeedDescription& lhs, const TChangefeedDescription& rhs);
diff --git a/ydb/public/sdk/cpp/client/ydb_table/table_enum.h b/ydb/public/sdk/cpp/client/ydb_table/table_enum.h
index 5664774bfc..7a96e160cb 100644
--- a/ydb/public/sdk/cpp/client/ydb_table/table_enum.h
+++ b/ydb/public/sdk/cpp/client/ydb_table/table_enum.h
@@ -45,5 +45,13 @@ enum class EChangefeedFormat {
Unknown = std::numeric_limits<int>::max()
};
+enum class EChangefeedState {
+ Enabled,
+ Disabled,
+ InitialScan,
+
+ Unknown = std::numeric_limits<int>::max()
+};
+
} // namespace NTable
} // namespace NYdb
diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.darwin.txt b/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.darwin.txt
index 8699300a9b..f50ca72261 100644
--- a/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.darwin.txt
+++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.darwin.txt
@@ -41,6 +41,7 @@ target_link_options(ydb-public-sdk-cpp-client-ydb_topic-ut PRIVATE
)
target_sources(ydb-public-sdk-cpp-client-ydb_topic-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp
)
add_test(
NAME
diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux-aarch64.txt b/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux-aarch64.txt
index 9c7fc5bcff..63ee17d80a 100644
--- a/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux-aarch64.txt
+++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux-aarch64.txt
@@ -44,6 +44,7 @@ target_link_options(ydb-public-sdk-cpp-client-ydb_topic-ut PRIVATE
)
target_sources(ydb-public-sdk-cpp-client-ydb_topic-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp
)
add_test(
NAME
diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux.txt b/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux.txt
index dc3c095432..44832a6760 100644
--- a/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux.txt
+++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/CMakeLists.linux.txt
@@ -46,6 +46,7 @@ target_link_options(ydb-public-sdk-cpp-client-ydb_topic-ut PRIVATE
)
target_sources(ydb-public-sdk-cpp-client-ydb_topic-ut PRIVATE
${CMAKE_SOURCE_DIR}/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp
)
add_test(
NAME
diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp b/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp
index fec5f36088..68c631a58b 100644
--- a/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp
+++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/basic_usage_ut.cpp
@@ -1,5 +1,7 @@
#include <ydb/public/sdk/cpp/client/ydb_topic/topic.h>
+#include <ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.h>
+
#include <ydb/public/sdk/cpp/client/ydb_persqueue_core/persqueue.h>
#include <ydb/public/sdk/cpp/client/ydb_persqueue_core/impl/common.h>
@@ -92,6 +94,115 @@ Y_UNIT_TEST_SUITE(BasicUsage) {
ReadSession->Close(TDuration::MilliSeconds(10));
AtomicSet(check, 0);
}
+
+
+ Y_UNIT_TEST(ReadWithRestarts) {
+
+ auto setup = std::make_shared<NPersQueue::NTests::TPersQueueYdbSdkTestSetup>(TEST_CASE_NAME);
+
+ NPersQueue::TWriteSessionSettings writeSettings;
+ writeSettings.Path(setup->GetTestTopic()).MessageGroupId("src_id");
+ writeSettings.Codec(NPersQueue::ECodec::RAW);
+ NPersQueue::IExecutor::TPtr executor = new NPersQueue::TSyncExecutor();
+ writeSettings.CompressionExecutor(executor);
+
+ auto& client = setup->GetPersQueueClient();
+ auto session = client.CreateSimpleBlockingWriteSession(writeSettings);
+
+ ui32 count = 700;
+ std::string message(2'000, 'x');
+ for (ui32 i = 1; i <= count; ++i) {
+ bool res = session->Write(message);
+ UNIT_ASSERT(res);
+ }
+ bool res = session->Close(TDuration::Seconds(10));
+ UNIT_ASSERT(res);
+
+ std::shared_ptr<NYdb::NTopic::IReadSession> ReadSession;
+
+ // Create topic client.
+ NYdb::NTopic::TTopicClient topicClient(setup->GetDriver());
+
+ // Create read session.
+ NYdb::NTopic::TReadSessionSettings readSettings;
+ readSettings
+ .ConsumerName(setup->GetTestClient())
+ .MaxMemoryUsageBytes(1_MB)
+ .AppendTopics(setup->GetTestTopic());
+
+ //
+ // controlled decompressor
+ //
+ auto decompressor = CreateThreadPoolManagedExecutor(1);
+ readSettings.DecompressionExecutor(decompressor);
+
+
+ //
+ // auxiliary functions for decompressor and handler control
+ //
+ auto WaitTasks = [&](auto f, size_t c) {
+ while (f() < c) {
+ Sleep(TDuration::MilliSeconds(100));
+ };
+ };
+ auto WaitPlannedTasks = [&](auto e, size_t count) {
+ WaitTasks([&]() { return e->GetPlannedCount(); }, count);
+ };
+ auto WaitExecutedTasks = [&](auto e, size_t count) {
+ WaitTasks([&]() { return e->GetExecutedCount(); }, count);
+ };
+
+ auto RunTasks = [&](auto e, const std::vector<size_t>& tasks) {
+ size_t n = tasks.size();
+ WaitPlannedTasks(e, n);
+ size_t completed = e->GetExecutedCount();
+ e->StartFuncs(tasks);
+ WaitExecutedTasks(e, completed + n);
+ };
+ Y_UNUSED(RunTasks);
+
+ auto PlanTasksAndRestart = [&](auto e, const std::vector<size_t>& tasks) {
+ size_t n = tasks.size();
+ WaitPlannedTasks(e, n);
+ size_t completed = e->GetExecutedCount();
+
+ setup->KillPqrb(setup->GetTestTopic(), setup->GetLocalCluster());
+ Cerr << ">>> TEST: PQRB killed" << Endl;
+ Sleep(TDuration::MilliSeconds(100));
+
+ e->StartFuncs(tasks);
+ WaitExecutedTasks(e, completed + n);
+ };
+ Y_UNUSED(PlanTasksAndRestart);
+
+
+ NThreading::TPromise<void> checkedPromise = NThreading::NewPromise<void>();
+ TAtomic lastOffset = 0u;
+
+ auto f = checkedPromise.GetFuture();
+ readSettings.EventHandlers_.SimpleDataHandlers(
+ [&]
+ (NYdb::NTopic::TReadSessionEvent::TDataReceivedEvent& ev) mutable {
+ AtomicSet(lastOffset, ev.GetMessages().back().GetOffset());
+ ev.Commit();
+ Cerr << ">>> TEST: last offset = " << lastOffset << Endl;
+ });
+
+ Cerr << ">>> TEST: Create session" << Endl;
+
+ ReadSession = topicClient.CreateReadSession(readSettings);
+
+ ui32 i = 0;
+ while (AtomicGet(lastOffset) + 1 < count) {
+ Cerr << ">>> TEST: last offset = " << AtomicGet(lastOffset) << Endl;
+ // TODO (ildar-khisam@): restarts with progress and check sdk budget
+ // PlanTasksAndRestart(decompressor, {i++});
+ RunTasks(decompressor, {i++});
+ }
+
+ ReadSession->Close(TDuration::MilliSeconds(10));
+ Cerr << ">>> TEST: Session gracefully closed" << Endl;
+ }
}
}
diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp b/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp
new file mode 100644
index 0000000000..d9826e7a08
--- /dev/null
+++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.cpp
@@ -0,0 +1,102 @@
+#include <ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.h>
+
+namespace NYdb::NTopic::NTests {
+
+TManagedExecutor::TManagedExecutor(TExecutorPtr executor) :
+ Executor{std::move(executor)}
+{
+}
+
+bool TManagedExecutor::IsAsync() const
+{
+ return Executor->IsAsync();
+}
+
+void TManagedExecutor::Post(TFunction &&f)
+{
+ with_lock (Mutex) {
+ Funcs.push_back(std::move(f));
+ ++Planned;
+ }
+}
+
+void TManagedExecutor::DoStart()
+{
+ Executor->Start();
+}
+
+auto TManagedExecutor::MakeTask(TFunction func) -> TFunction
+{
+ return [this, func = std::move(func)]() {
+ ++Running;
+
+ func();
+
+ --Running;
+ ++Executed;
+ };
+}
+
+void TManagedExecutor::RunTask(TFunction&& func)
+{
+ Y_VERIFY(Planned > 0);
+ --Planned;
+ Executor->Post(MakeTask(std::move(func)));
+}
+
+void TManagedExecutor::StartFuncs(const std::vector<size_t>& indicies)
+{
+ with_lock (Mutex) {
+ for (auto index : indicies) {
+ Y_VERIFY(index < Funcs.size());
+ Y_VERIFY(Funcs[index]);
+
+ RunTask(std::move(Funcs[index]));
+ }
+ }
+}
+
+size_t TManagedExecutor::GetFuncsCount() const
+{
+ with_lock (Mutex) {
+ return Funcs.size();
+ }
+}
+
+size_t TManagedExecutor::GetPlannedCount() const
+{
+ return Planned;
+}
+
+size_t TManagedExecutor::GetRunningCount() const
+{
+ return Running;
+}
+
+size_t TManagedExecutor::GetExecutedCount() const
+{
+ return Executed;
+}
+
+void TManagedExecutor::RunAllTasks()
+{
+ with_lock (Mutex) {
+ for (auto& func : Funcs) {
+ if (func) {
+ RunTask(std::move(func));
+ }
+ }
+ }
+}
+
+TIntrusivePtr<TManagedExecutor> CreateThreadPoolManagedExecutor(size_t threads)
+{
+ return MakeIntrusive<TManagedExecutor>(NYdb::NTopic::CreateThreadPoolExecutor(threads));
+}
+
+TIntrusivePtr<TManagedExecutor> CreateSyncManagedExecutor()
+{
+ return MakeIntrusive<TManagedExecutor>(NYdb::NTopic::CreateSyncExecutor());
+}
+
+}
diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.h b/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.h
new file mode 100644
index 0000000000..d32c0ff881
--- /dev/null
+++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/managed_executor.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include <ydb/public/sdk/cpp/client/ydb_topic/topic.h>
+#include <ydb/public/sdk/cpp/client/ydb_topic/impl/executor.h>
+#include <util/system/mutex.h>
+
+#include <vector>
+
+namespace NYdb::NTopic::NTests {
+
+class TManagedExecutor : public IExecutor {
+public:
+ using TExecutorPtr = IExecutor::TPtr;
+
+ explicit TManagedExecutor(TExecutorPtr executor);
+
+ bool IsAsync() const override;
+ void Post(TFunction&& f) override;
+
+ void StartFuncs(const std::vector<size_t>& indicies);
+
+ size_t GetFuncsCount() const;
+
+ size_t GetPlannedCount() const;
+ size_t GetRunningCount() const;
+ size_t GetExecutedCount() const;
+
+ void RunAllTasks();
+
+private:
+ void DoStart() override;
+
+ TFunction MakeTask(TFunction func);
+ void RunTask(TFunction&& func);
+
+ TExecutorPtr Executor;
+ TMutex Mutex;
+ std::vector<TFunction> Funcs;
+ std::atomic<size_t> Planned = 0;
+ std::atomic<size_t> Running = 0;
+ std::atomic<size_t> Executed = 0;
+};
+
+TIntrusivePtr<TManagedExecutor> CreateThreadPoolManagedExecutor(size_t threads);
+TIntrusivePtr<TManagedExecutor> CreateSyncManagedExecutor();
+
+}
diff --git a/ydb/public/tools/lib/cmds/__init__.py b/ydb/public/tools/lib/cmds/__init__.py
index b6c27419e0..326b9f9f4a 100644
--- a/ydb/public/tools/lib/cmds/__init__.py
+++ b/ydb/public/tools/lib/cmds/__init__.py
@@ -30,6 +30,7 @@ class EmptyArguments(object):
self.debug_logging = []
self.fixed_ports = False
self.public_http_config_path = None
+ self.dont_use_log_files = False
def ensure_path_exists(path):
@@ -300,6 +301,7 @@ def deploy(arguments):
fq_config_path=arguments.fq_config_path,
public_http_config_path=arguments.public_http_config_path,
auth_config_path=arguments.auth_config_path,
+ use_log_files=not arguments.dont_use_log_files,
**optionals
)
@@ -383,10 +385,10 @@ def _cleanup_working_dir(arguments):
def start(arguments):
recipe = Recipe(arguments)
- info = Recipe(arguments).read_metafile()
+ info = recipe.read_metafile()
for node_id, node_meta in info['nodes'].items():
files = {}
- if os.path.exists(node_meta['stderr_file']):
+ if node_meta['stderr_file'] is not None and os.path.exists(node_meta['stderr_file']):
files = {
'stdin_file': node_meta['stdin_file'],
'stderr_file': node_meta['stderr_file'],
diff --git a/ydb/public/tools/local_ydb/__main__.py b/ydb/public/tools/local_ydb/__main__.py
index 98862bcd28..5179a51929 100644
--- a/ydb/public/tools/local_ydb/__main__.py
+++ b/ydb/public/tools/local_ydb/__main__.py
@@ -132,6 +132,10 @@ To update cluster (stop + start):
'--public-http-config-path', default=None,
help='The path to public HTTP config'
)
+ sub_parser.add_argument(
+ '--dont-use-log-files', default=False, action='store_true',
+ help='Don\'t use log files (only STDOUT and STDERR output)'
+ )
arguments = parser.parse_args()
arguments.ydb_working_dir = cmds.wrap_path(arguments.ydb_working_dir)
diff --git a/ydb/services/bg_tasks/abstract/task.cpp b/ydb/services/bg_tasks/abstract/task.cpp
index 2fbe51fab0..860b95953d 100644
--- a/ydb/services/bg_tasks/abstract/task.cpp
+++ b/ydb/services/bg_tasks/abstract/task.cpp
@@ -2,4 +2,73 @@
namespace NKikimr::NBackgroundTasks {
+bool TTask::DeserializeFromRecord(const TDecoder& decoder, const Ydb::Value& rawValue) {
+ if (!decoder.Read(decoder.GetIdIdx(), Id, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task id";
+ return false;
+ }
+ if (!decoder.Read(decoder.GetClassIdx(), Class, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task class";
+ return false;
+ }
+ if (!decoder.Read(decoder.GetEnabledIdx(), EnabledFlag, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task enabled";
+ return false;
+ }
+ if (!decoder.Read(decoder.GetExecutorIdIdx(), ExecutorId, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task executor id";
+ return false;
+ }
+ if (!decoder.Read(decoder.GetLastPingIdx(), LastPing, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task last ping";
+ return false;
+ }
+ if (!decoder.Read(decoder.GetStartInstantIdx(), StartInstant, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task start instant";
+ return false;
+ }
+ if (!decoder.Read(decoder.GetConstructInstantIdx(), ConstructInstant, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task construct instant";
+ return false;
+ }
+ {
+ TString activityData;
+ if (!decoder.Read(decoder.GetActivityIdx(), activityData, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot read activity";
+ return false;
+ }
+ if (!Activity.DeserializeFromString(activityData)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot deserialize activity";
+ return false;
+ }
+ if (!Activity) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task activity";
+ return false;
+ }
+ }
+ {
+ TString schedulerData;
+ if (!decoder.Read(decoder.GetSchedulerIdx(), schedulerData, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot read scheduler";
+ return false;
+ }
+ if (!Scheduler.DeserializeFromString(schedulerData)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot deserialize scheduler";
+ return false;
+ }
+ }
+ {
+ TString stateData;
+ if (!decoder.Read(decoder.GetStateIdx(), stateData, rawValue)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot read state";
+ return false;
+ }
+ if (!State.DeserializeFromString(stateData)) {
+ ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot deserialize state";
+ return false;
+ }
+ }
+ return true;
+}
+
}
diff --git a/ydb/services/bg_tasks/abstract/task.h b/ydb/services/bg_tasks/abstract/task.h
index d866594f9f..e13eb90ddd 100644
--- a/ydb/services/bg_tasks/abstract/task.h
+++ b/ydb/services/bg_tasks/abstract/task.h
@@ -89,61 +89,7 @@ public:
}
};
- bool DeserializeFromRecord(const TDecoder& decoder, const Ydb::Value& rawValue) {
- if (!decoder.Read(decoder.GetIdIdx(), Id, rawValue)) {
- return false;
- }
- if (!decoder.Read(decoder.GetClassIdx(), Class, rawValue)) {
- return false;
- }
- if (!decoder.Read(decoder.GetEnabledIdx(), EnabledFlag, rawValue)) {
- return false;
- }
- if (!decoder.Read(decoder.GetExecutorIdIdx(), ExecutorId, rawValue)) {
- return false;
- }
- if (!decoder.Read(decoder.GetLastPingIdx(), LastPing, rawValue)) {
- return false;
- }
- if (!decoder.Read(decoder.GetStartInstantIdx(), StartInstant, rawValue)) {
- return false;
- }
- if (!decoder.Read(decoder.GetConstructInstantIdx(), ConstructInstant, rawValue)) {
- return false;
- }
- {
- TString activityData;
- if (!decoder.Read(decoder.GetActivityIdx(), activityData, rawValue)) {
- return false;
- }
- if (!Activity.DeserializeFromString(activityData)) {
- return false;
- }
- if (!Activity) {
- ALS_ERROR(NKikimrServices::BG_TASKS) << "cannot parse task activity";
- return false;
- }
- }
- {
- TString schedulerData;
- if (!decoder.Read(decoder.GetSchedulerIdx(), schedulerData, rawValue)) {
- return false;
- }
- if (!Scheduler.DeserializeFromString(schedulerData)) {
- return false;
- }
- }
- {
- TString stateData;
- if (!decoder.Read(decoder.GetStateIdx(), stateData, rawValue)) {
- return false;
- }
- if (!State.DeserializeFromString(stateData)) {
- return false;
- }
- }
- return true;
- }
+ bool DeserializeFromRecord(const TDecoder& decoder, const Ydb::Value& rawValue);
};
}
diff --git a/ydb/services/bg_tasks/ds_table/add_tasks.cpp b/ydb/services/bg_tasks/ds_table/add_tasks.cpp
index b4ceea8ef1..c39822887b 100644
--- a/ydb/services/bg_tasks/ds_table/add_tasks.cpp
+++ b/ydb/services/bg_tasks/ds_table/add_tasks.cpp
@@ -8,10 +8,10 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TAddTasksActor::
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
sb << "DECLARE $activityString AS String;" << Endl;
- sb << "DECLARE $taskId AS String;" << Endl;
+ sb << "DECLARE $taskId AS Utf8;" << Endl;
sb << "DECLARE $schedulerString AS String;" << Endl;
sb << "DECLARE $enabled AS Bool;" << Endl;
- sb << "DECLARE $className AS String;" << Endl;
+ sb << "DECLARE $className AS Utf8;" << Endl;
sb << "DECLARE $startInstant AS Uint32;" << Endl;
sb << "DECLARE $constructInstant AS Uint32;" << Endl;
sb << "UPSERT INTO `" + Controller->GetTableName() + "` (id, enabled, class, startInstant, constructInstant, activity, scheduler)" << Endl;
@@ -49,13 +49,13 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TAddTasksActor::
{
auto& param = (*request.mutable_parameters())["$className"];
- param.mutable_value()->set_bytes_value(Task.GetClass());
- param.mutable_type()->set_type_id(Ydb::Type::STRING);
+ param.mutable_value()->set_text_value(Task.GetClass());
+ param.mutable_type()->set_type_id(Ydb::Type::UTF8);
}
auto& idString = (*request.mutable_parameters())["$taskId"];
- idString.mutable_value()->set_bytes_value(Task.GetId());
- idString.mutable_type()->set_type_id(Ydb::Type::STRING);
+ idString.mutable_value()->set_text_value(Task.GetId());
+ idString.mutable_type()->set_type_id(Ydb::Type::UTF8);
auto& aString = (*request.mutable_parameters())["$activityString"];
aString.mutable_value()->set_bytes_value(Task.GetActivity().SerializeToString());
diff --git a/ydb/services/bg_tasks/ds_table/assign_tasks.cpp b/ydb/services/bg_tasks/ds_table/assign_tasks.cpp
index 4bff7f55e0..760a395607 100644
--- a/ydb/services/bg_tasks/ds_table/assign_tasks.cpp
+++ b/ydb/services/bg_tasks/ds_table/assign_tasks.cpp
@@ -6,7 +6,7 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TAssignTasksActo
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
const auto now = TActivationContext::Now();
- sb << "DECLARE $executorId AS String;" << Endl;
+ sb << "DECLARE $executorId AS Utf8;" << Endl;
sb << "DECLARE $lastPingCriticalBorder AS Uint32;" << Endl;
sb << "DECLARE $lastPingNewValue AS Uint32;" << Endl;
sb << "$ids = (SELECT id FROM `" << Controller->GetTableName() << "`"
@@ -28,8 +28,8 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TAssignTasksActo
}
{
auto& param = (*request.mutable_parameters())["$executorId"];
- param.mutable_value()->set_bytes_value(ExecutorId);
- param.mutable_type()->set_type_id(Ydb::Type::STRING);
+ param.mutable_value()->set_text_value(ExecutorId);
+ param.mutable_type()->set_type_id(Ydb::Type::UTF8);
}
request.mutable_query()->set_yql_text(sb);
request.set_session_id(sessionId);
diff --git a/ydb/services/bg_tasks/ds_table/fetch_tasks.cpp b/ydb/services/bg_tasks/ds_table/fetch_tasks.cpp
index 2ed0b7c533..bc5efb5567 100644
--- a/ydb/services/bg_tasks/ds_table/fetch_tasks.cpp
+++ b/ydb/services/bg_tasks/ds_table/fetch_tasks.cpp
@@ -24,10 +24,10 @@ void TFetchTasksActor::OnResult(const NMetadata::NRequest::TDialogYQLRequest::TR
std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TFetchTasksActor::OnSessionId(const TString& sessionId) {
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
- sb << "DECLARE $executorId AS String;" << Endl;
+ sb << "DECLARE $executorId AS Utf8;" << Endl;
sb << "DECLARE $lastPingCriticalBorder AS Uint32;" << Endl;
if (CurrentTaskIds.size()) {
- sb << "DECLARE $taskIds AS List<String>;" << Endl;
+ sb << "DECLARE $taskIds AS List<Utf8>;" << Endl;
}
sb << "SELECT * FROM `" + Controller->GetTableName() + "`" << Endl;
sb << "WHERE executorId = $executorId" << Endl;
@@ -36,17 +36,17 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TFetchTasksActor
if (CurrentTaskIds.size()) {
sb << " AND id NOT IN $taskIds" << Endl;
auto& idStrings = (*request.mutable_parameters())["$taskIds"];
- idStrings.mutable_type()->mutable_list_type();
+ idStrings.mutable_type()->mutable_list_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
for (auto&& i : CurrentTaskIds) {
auto* idString = idStrings.mutable_value()->add_items();
- idString->set_bytes_value(i);
+ idString->set_text_value(i);
}
}
{
auto& param = (*request.mutable_parameters())["$executorId"];
- param.mutable_value()->set_bytes_value(ExecutorId);
- param.mutable_type()->set_type_id(Ydb::Type::STRING);
+ param.mutable_value()->set_text_value(ExecutorId);
+ param.mutable_type()->set_type_id(Ydb::Type::UTF8);
}
{
auto& param = (*request.mutable_parameters())["$lastPingCriticalBorder"];
diff --git a/ydb/services/bg_tasks/ds_table/finish_task.cpp b/ydb/services/bg_tasks/ds_table/finish_task.cpp
index b5dbed8204..5301971d83 100644
--- a/ydb/services/bg_tasks/ds_table/finish_task.cpp
+++ b/ydb/services/bg_tasks/ds_table/finish_task.cpp
@@ -5,13 +5,13 @@ namespace NKikimr::NBackgroundTasks {
std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TDropTaskActor::OnSessionId(const TString& sessionId) {
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
- sb << "DECLARE $taskId AS String;" << Endl;
+ sb << "DECLARE $taskId AS Utf8;" << Endl;
sb << "DELETE FROM `" + Controller->GetTableName() + "` ON SELECT $taskId AS id";
request.mutable_query()->set_yql_text(sb);
auto& idString = (*request.mutable_parameters())["$taskId"];
- idString.mutable_value()->set_bytes_value(TaskId);
- idString.mutable_type()->set_type_id(Ydb::Type::STRING);
+ idString.mutable_value()->set_text_value(TaskId);
+ idString.mutable_type()->set_type_id(Ydb::Type::UTF8);
request.set_session_id(sessionId);
request.mutable_tx_control()->mutable_begin_tx()->mutable_serializable_read_write();
diff --git a/ydb/services/bg_tasks/ds_table/initialization.cpp b/ydb/services/bg_tasks/ds_table/initialization.cpp
index f0f1ea4566..87ddcf4706 100644
--- a/ydb/services/bg_tasks/ds_table/initialization.cpp
+++ b/ydb/services/bg_tasks/ds_table/initialization.cpp
@@ -14,7 +14,7 @@ void TBGTasksInitializer::DoPrepare(NMetadata::NInitializer::IInitializerInput::
{
auto& column = *request.add_columns();
column.set_name("id");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
@@ -24,12 +24,12 @@ void TBGTasksInitializer::DoPrepare(NMetadata::NInitializer::IInitializerInput::
{
auto& column = *request.add_columns();
column.set_name("class");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name("executorId");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
diff --git a/ydb/services/bg_tasks/ds_table/interrupt.cpp b/ydb/services/bg_tasks/ds_table/interrupt.cpp
index 5c22e3872f..4caefd3133 100644
--- a/ydb/services/bg_tasks/ds_table/interrupt.cpp
+++ b/ydb/services/bg_tasks/ds_table/interrupt.cpp
@@ -5,7 +5,7 @@ namespace NKikimr::NBackgroundTasks {
std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TInterruptTaskActor::OnSessionId(const TString& sessionId) {
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
- sb << "DECLARE $taskId AS String;" << Endl;
+ sb << "DECLARE $taskId AS Utf8;" << Endl;
sb << "DECLARE $stateString AS String;" << Endl;
sb << "DECLARE $startInstant AS Uint32;" << Endl;
sb << "UPDATE `" + ExecutorController->GetTableName() + "`" << Endl;
@@ -23,8 +23,8 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TInterruptTaskAc
}
auto& idString = (*request.mutable_parameters())["$taskId"];
- idString.mutable_value()->set_bytes_value(TaskId);
- idString.mutable_type()->set_type_id(Ydb::Type::STRING);
+ idString.mutable_value()->set_text_value(TaskId);
+ idString.mutable_type()->set_type_id(Ydb::Type::UTF8);
auto& sString = (*request.mutable_parameters())["$stateString"];
sString.mutable_value()->set_bytes_value(State.SerializeToString());
diff --git a/ydb/services/bg_tasks/ds_table/lock_pinger.cpp b/ydb/services/bg_tasks/ds_table/lock_pinger.cpp
index 049f28e950..b517c4b666 100644
--- a/ydb/services/bg_tasks/ds_table/lock_pinger.cpp
+++ b/ydb/services/bg_tasks/ds_table/lock_pinger.cpp
@@ -8,7 +8,7 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TLockPingerActor
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
const auto now = TActivationContext::Now();
- sb << "DECLARE $taskIds AS List<String>;" << Endl;
+ sb << "DECLARE $taskIds AS List<Utf8>;" << Endl;
sb << "DECLARE $lastPingNewValue AS Uint32;" << Endl;
sb << "UPDATE `" + ExecutorController->GetTableName() + "`" << Endl;
sb << "SET lastPing = $lastPingNewValue" << Endl;
@@ -22,9 +22,9 @@ std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TLockPingerActor
}
auto& idStrings = (*request.mutable_parameters())["$taskIds"];
- idStrings.mutable_type()->mutable_list_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ idStrings.mutable_type()->mutable_list_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
for (auto&& i : TaskIds) {
- idStrings.mutable_value()->add_items()->set_bytes_value(i);
+ idStrings.mutable_value()->add_items()->set_text_value(i);
}
request.set_session_id(sessionId);
diff --git a/ydb/services/bg_tasks/ds_table/task_enabled.cpp b/ydb/services/bg_tasks/ds_table/task_enabled.cpp
index 0be22d9954..e201935d74 100644
--- a/ydb/services/bg_tasks/ds_table/task_enabled.cpp
+++ b/ydb/services/bg_tasks/ds_table/task_enabled.cpp
@@ -7,15 +7,15 @@ namespace NKikimr::NBackgroundTasks {
std::optional<NMetadata::NRequest::TDialogYQLRequest::TRequest> TUpdateTaskEnabledActor::OnSessionId(const TString& sessionId) {
Ydb::Table::ExecuteDataQueryRequest request;
TStringBuilder sb;
- sb << "DECLARE $taskId AS String;" << Endl;
+ sb << "DECLARE $taskId AS Utf8;" << Endl;
sb << "UPDATE `" + ExecutorController->GetTableName() + "`" << Endl;
sb << "SET enabled = " << Enabled << Endl;
sb << "WHERE id = $taskId" << Endl;
request.mutable_query()->set_yql_text(sb);
auto& idString = (*request.mutable_parameters())["$taskId"];
- idString.mutable_value()->set_bytes_value(TaskId);
- idString.mutable_type()->set_type_id(Ydb::Type::STRING);
+ idString.mutable_value()->set_text_value(TaskId);
+ idString.mutable_type()->set_type_id(Ydb::Type::UTF8);
request.set_session_id(sessionId);
request.mutable_tx_control()->mutable_begin_tx()->mutable_serializable_read_write();
diff --git a/ydb/services/bg_tasks/service.cpp b/ydb/services/bg_tasks/service.cpp
index 9fbd6fcec2..488884fb2d 100644
--- a/ydb/services/bg_tasks/service.cpp
+++ b/ydb/services/bg_tasks/service.cpp
@@ -7,11 +7,13 @@ NActors::TActorId MakeServiceId(const ui32 nodeId) {
}
void TServiceOperator::Register() {
- Singleton<TServiceOperator>()->EnabledFlag = true;
+ auto* service = Singleton<TServiceOperator>();
+ service->EnabledFlag.store(true);
}
bool TServiceOperator::IsEnabled() {
- return Singleton<TServiceOperator>()->EnabledFlag;
+ auto* service = Singleton<TServiceOperator>();
+ return service->EnabledFlag.load();
}
}
diff --git a/ydb/services/bg_tasks/service.h b/ydb/services/bg_tasks/service.h
index 308836037f..58844f1f07 100644
--- a/ydb/services/bg_tasks/service.h
+++ b/ydb/services/bg_tasks/service.h
@@ -73,7 +73,7 @@ public:
class TServiceOperator {
private:
friend class TExecutor;
- bool EnabledFlag = false;
+ std::atomic<bool> EnabledFlag{ false };
static void Register();
public:
static bool IsEnabled();
diff --git a/ydb/services/datastreams/datastreams_codes.h b/ydb/services/datastreams/datastreams_codes.h
new file mode 100644
index 0000000000..f1435a90a8
--- /dev/null
+++ b/ydb/services/datastreams/datastreams_codes.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include <util/stream/output.h>
+#include <util/system/types.h>
+
+
+namespace NYds {
+
+enum class EErrorCodes : size_t {
+ // Server statuses
+ OK = 0, // compatible with PersQueue::ErrorCode
+
+ BAD_REQUEST = 500003, // compatible with PersQueue::ErrorCode
+ ERROR = 500100, // compatible with PersQueue::ErrorCode
+ ACCESS_DENIED = 500018, // compatible with PersQueue::ErrorCode
+
+ GENERIC_ERROR = 500030,
+ INVALID_ARGUMENT = 500040,
+ MISSING_PARAMETER = 500050,
+ NOT_FOUND = 500060,
+ IN_USE = 500070,
+
+ VALIDATION_ERROR = 500080,
+ MISSING_ACTION = 500090,
+
+ INVALID_PARAMETER_COMBINATION = 500110,
+
+ EXPIRED_ITERATOR = 500120,
+ EXPIRED_TOKEN = 500130,
+
+ INCOMPLETE_SIGNATURE = 500140,
+ MISSING_AUTHENTICATION_TOKEN = 500150,
+};
+
+}
diff --git a/ydb/services/datastreams/datastreams_proxy.cpp b/ydb/services/datastreams/datastreams_proxy.cpp
index adb1da7006..0f49a274fa 100644
--- a/ydb/services/datastreams/datastreams_proxy.cpp
+++ b/ydb/services/datastreams/datastreams_proxy.cpp
@@ -1,4 +1,5 @@
#include "datastreams_proxy.h"
+#include "datastreams_codes.h"
#include "put_records_actor.h"
#include "shard_iterator.h"
#include "next_token.h"
@@ -34,7 +35,6 @@ namespace NKikimr::NDataStreams::V1 {
using namespace NGRpcService;
using namespace NGRpcProxy::V1;
-
namespace {
template <class TRequest>
@@ -64,6 +64,7 @@ namespace NKikimr::NDataStreams::V1 {
}
}
+
class TCreateStreamActor : public TPQGrpcSchemaBase<TCreateStreamActor, NKikimr::NGRpcService::TEvDataStreamsCreateStreamRequest> {
using TBase = TPQGrpcSchemaBase<TCreateStreamActor, TEvDataStreamsCreateStreamRequest>;
using TProtoRequest = typename TBase::TProtoRequest;
@@ -138,13 +139,13 @@ namespace NKikimr::NDataStreams::V1 {
topicRequest.set_metering_mode(Ydb::Topic::METERING_MODE_REQUEST_UNITS);
break;
default:
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
"streams can't be created with unknown metering mode", ctx);
}
}
} else {
if (GetProtoRequest()->has_stream_mode_details()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
"streams can't be created with metering mode", ctx);
}
}
@@ -160,11 +161,10 @@ namespace NKikimr::NDataStreams::V1 {
pqDescr->SetPartitionPerTablet(1);
TString error;
- auto status = NKikimr::NGRpcProxy::V1::FillProposeRequestImpl(name, topicRequest, modifyScheme, ctx, error,
+ TYdbPqCodes codes = NKikimr::NGRpcProxy::V1::FillProposeRequestImpl(name, topicRequest, modifyScheme, ctx, error,
workingDir, proposal.Record.GetDatabaseName());
-
- if (status != Ydb::StatusIds::SUCCESS) {
- return ReplyWithError(status, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ if (codes.YdbCode != Ydb::StatusIds::SUCCESS) {
+ return ReplyWithError(codes.YdbCode, codes.PQCode, error, ctx);
}
}
@@ -175,7 +175,7 @@ namespace NKikimr::NDataStreams::V1 {
&& msg->Record.GetSchemeShardStatus() == NKikimrScheme::EStatus::StatusAlreadyExists)
{
return ReplyWithError(Ydb::StatusIds::ALREADY_EXISTS,
- Ydb::PersQueue::ErrorCode::ERROR,
+ static_cast<size_t>(NYds::EErrorCodes::IN_USE),
TStringBuilder() << "Stream with name " << GetProtoRequest()->stream_name() << " is already exists",
ctx);
}
@@ -245,7 +245,7 @@ namespace NKikimr::NDataStreams::V1 {
const auto& readRules = pqGroupDescription.GetPQTabletConfig().GetReadRules();
if (readRules.size() > 0 && EnforceDeletion == false) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::IN_USE),
TStringBuilder() << "Stream has registered consumers" <<
"and EnforceConsumerDeletion flag is false", ctx);
}
@@ -286,7 +286,7 @@ namespace NKikimr::NDataStreams::V1 {
TString error;
if (!ValidateShardsCount(*GetProtoRequest(), pqGroupDescription, error)) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT), error, ctx);
}
groupConfig.SetTotalGroupCount(GetProtoRequest()->target_shard_count());
@@ -325,7 +325,7 @@ namespace NKikimr::NDataStreams::V1 {
Y_UNUSED(selfInfo);
Y_UNUSED(pqGroupDescription);
if (!AppData(ctx)->PQConfig.GetBillingMeteringConfig().GetEnabled()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
"streams can't be created with metering mode", ctx);
}
@@ -337,7 +337,7 @@ namespace NKikimr::NDataStreams::V1 {
groupConfig.MutablePQTabletConfig()->SetMeteringMode(NKikimrPQ::TPQTabletConfig::METERING_MODE_REQUEST_UNITS);
break;
default:
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
"streams can't be created with unknown metering mode", ctx);
}
}
@@ -379,7 +379,7 @@ namespace NKikimr::NDataStreams::V1 {
TString error;
if (!ValidateShardsCount(*GetProtoRequest(), pqGroupDescription, error))
{
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::BAD_REQUEST), error, ctx);
}
groupConfig.SetTotalGroupCount(GetProtoRequest()->target_shard_count());
@@ -406,7 +406,7 @@ namespace NKikimr::NDataStreams::V1 {
if (GetProtoRequest()->has_stream_mode_details()) {
if (!AppData(ctx)->PQConfig.GetBillingMeteringConfig().GetEnabled()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
"streams can't be created with metering mode", ctx);
}
@@ -418,15 +418,17 @@ namespace NKikimr::NDataStreams::V1 {
groupConfig.MutablePQTabletConfig()->SetMeteringMode(NKikimrPQ::TPQTabletConfig::METERING_MODE_REQUEST_UNITS);
break;
default:
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
"streams can't be created with unknown metering mode", ctx);
}
}
auto serviceTypes = GetSupportedClientServiceTypes(ctx);
- auto status = CheckConfig(*pqConfig, serviceTypes, error, ctx);
+ auto status = CheckConfig(*pqConfig, serviceTypes, error, ctx, Ydb::StatusIds::ALREADY_EXISTS);
if (status != Ydb::StatusIds::SUCCESS) {
- return ReplyWithError(status, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ return ReplyWithError(status, status == Ydb::StatusIds::ALREADY_EXISTS ? static_cast<size_t>(NYds::EErrorCodes::IN_USE) :
+ static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR),
+ error, ctx);
}
}
@@ -472,9 +474,11 @@ namespace NKikimr::NDataStreams::V1 {
pqConfig->MutablePartitionConfig()->SetBurstSize(GetProtoRequest()->write_quota_kb_per_sec() * 1_KB);
auto serviceTypes = GetSupportedClientServiceTypes(ctx);
- auto status = CheckConfig(*pqConfig, serviceTypes, error, ctx);
+ auto status = CheckConfig(*pqConfig, serviceTypes, error, ctx, Ydb::StatusIds::ALREADY_EXISTS);
if (status != Ydb::StatusIds::SUCCESS) {
- return ReplyWithError(status, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ return ReplyWithError(status, status == Ydb::StatusIds::ALREADY_EXISTS? static_cast<size_t>(NYds::EErrorCodes::IN_USE) :
+ static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR),
+ error, ctx);
}
}
@@ -532,11 +536,12 @@ namespace NKikimr::NDataStreams::V1 {
pqConfig->MutablePartitionConfig()->SetLifetimeSeconds(newLifetime);
auto serviceTypes = GetSupportedClientServiceTypes(ctx);
- status = CheckConfig(*pqConfig, serviceTypes, error, ctx);
+ status = CheckConfig(*pqConfig, serviceTypes, error, ctx, Ydb::StatusIds::ALREADY_EXISTS);
}
if (status != Ydb::StatusIds::SUCCESS) {
- return TBase::ReplyWithError(status, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ return TBase::ReplyWithError(status, status == Ydb::StatusIds::ALREADY_EXISTS ? static_cast<size_t>(NYds::EErrorCodes::IN_USE) :
+ static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR), error, ctx);
}
}
@@ -563,13 +568,13 @@ namespace NKikimr::NDataStreams::V1 {
void Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActorContext& ctx) {
if (ev->Get()->Status != NKikimrProto::EReplyStatus::OK) {
- ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, static_cast<size_t>(NYds::EErrorCodes::ERROR),
TStringBuilder() << "Cannot connect to tablet " << ev->Get()->TabletId, ctx);
}
}
void Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext& ctx) {
- ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, static_cast<size_t>(NYds::EErrorCodes::ERROR),
TStringBuilder() << "Cannot connect to tablet " << ev->Get()->TabletId, ctx);
}
@@ -667,6 +672,7 @@ namespace NKikimr::NDataStreams::V1 {
ui32 writeSpeed = pqConfig.GetPartitionConfig().GetWriteSpeedInBytesPerSecond() / 1_KB;
auto& description = *result.mutable_stream_description();
description.set_stream_name(GetProtoRequest()->stream_name());
+ description.set_stream_arn(GetProtoRequest()->stream_name()); // Added by lpetrov02 for testing
ui32 retentionPeriodHours = TInstant::Seconds(pqConfig.GetPartitionConfig().GetLifetimeSeconds()).Hours();
description.set_retention_period_hours(retentionPeriodHours);
description.set_write_quota_kb_per_sec(writeSpeed);
@@ -727,7 +733,6 @@ namespace NKikimr::NDataStreams::V1 {
//-----------------------------------------------------------------------------------
-
class TListStreamsActor : public TRpcSchemeRequestActor<TListStreamsActor, NKikimr::NGRpcService::TEvDataStreamsListStreamsRequest> {
using TBase = TRpcSchemeRequestActor<TListStreamsActor, TEvDataStreamsListStreamsRequest>;
@@ -745,9 +750,10 @@ namespace NKikimr::NDataStreams::V1 {
void SendPendingRequests(const TActorContext& ctx);
void SendResponse(const TActorContext& ctx);
- void ReplyWithError(Ydb::StatusIds::StatusCode status, Ydb::PersQueue::ErrorCode::ErrorCode pqStatus,
+ void ReplyWithError(Ydb::StatusIds::StatusCode status, NYds::EErrorCodes errorCode,
const TString& messageText, const NActors::TActorContext& ctx) {
- this->Request_->RaiseIssue(FillIssue(messageText, pqStatus));
+
+ this->Request_->RaiseIssue(FillIssue(messageText, static_cast<size_t>(errorCode)));
this->Request_->ReplyWithYdbStatus(status);
this->Die(ctx);
}
@@ -768,13 +774,13 @@ namespace NKikimr::NDataStreams::V1 {
void TListStreamsActor::Bootstrap(const NActors::TActorContext& ctx) {
TBase::Bootstrap(ctx);
if (!Request_->GetDatabaseName()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, NYds::EErrorCodes::INVALID_ARGUMENT,
"Request without dabase is forbiden", ctx);
}
- if (this->Request_->GetInternalToken().empty()) {
+ if (this->Request_->GetSerializedToken().empty()) {
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
- return ReplyWithError(Ydb::StatusIds::UNAUTHORIZED, Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
+ return ReplyWithError(Ydb::StatusIds::UNAUTHORIZED, NYds::EErrorCodes::BAD_REQUEST,
"Unauthenticated access is forbidden, please provide credentials", ctx);
}
}
@@ -803,6 +809,7 @@ namespace NKikimr::NDataStreams::V1 {
int limit = GetProtoRequest()->limit() == 0 ? 100 : GetProtoRequest()->limit();
if (limit > 10000) {
+ Request_->RaiseIssue(FillIssue("'Limit' shoud not be higher than 10000", static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR)));
Request_->ReplyWithYdbStatus(Ydb::StatusIds::BAD_REQUEST);
return Die(ctx);
}
@@ -830,8 +837,8 @@ namespace NKikimr::NDataStreams::V1 {
NSchemeCache::TSchemeCacheNavigate::TEntry entry;
entry.Path = NKikimr::SplitPath(path);
- if (!this->Request_->GetInternalToken().empty()) {
- schemeCacheRequest->UserToken = new NACLib::TUserToken(this->Request_->GetInternalToken());
+ if (!this->Request_->GetSerializedToken().empty()) {
+ schemeCacheRequest->UserToken = new NACLib::TUserToken(this->Request_->GetSerializedToken());
}
entry.Operation = NSchemeCache::TSchemeCacheNavigate::OpList;
@@ -935,18 +942,26 @@ namespace NKikimr::NDataStreams::V1 {
void TListStreamConsumersActor::Bootstrap(const NActors::TActorContext& ctx) {
TBase::Bootstrap(ctx);
+ if (!GetProtoRequest()->next_token().empty() && !GetProtoRequest()->stream_arn().empty()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_PARAMETER_COMBINATION),
+ TStringBuilder() << "StreamArn and NextToken can not be provided together", ctx);
+ }
+ if (NextToken.IsExpired()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::EXPIRED_TOKEN),
+ TStringBuilder() << "Provided NextToken is expired", ctx);
+ }
+ if (!NextToken.IsValid()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
+ TStringBuilder() << "Provided NextToken is malformed", ctx);
+ }
+
auto maxResultsInRange = MIN_MAX_RESULTS <= MaxResults && MaxResults <= MAX_MAX_RESULTS;
if (!maxResultsInRange) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR),
TStringBuilder() << "Requested max_result value '" << MaxResults <<
"' is out of range [" << MIN_MAX_RESULTS << ", " << MAX_MAX_RESULTS <<
"]", ctx);
}
-
- if (!NextToken.IsValid()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
- TStringBuilder() << "Provided NextToken has expired or malformed", ctx);
- }
SendDescribeProposeRequest(ctx);
Become(&TListStreamConsumersActor::StateWork);
}
@@ -974,7 +989,7 @@ namespace NKikimr::NDataStreams::V1 {
const auto alreadyRead = NextToken.GetAlreadyRead();
if (alreadyRead > (ui32)streamReadRulesNames.size()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
TStringBuilder() << "Provided next_token is malformed - " <<
"everything is already read", ctx);
}
@@ -1065,15 +1080,22 @@ namespace NKikimr::NDataStreams::V1 {
readRule.set_version(selfInfo.GetVersion().GetPQVersion());
}
auto serviceTypes = GetSupportedClientServiceTypes(ctx);
- TString error = AddReadRuleToConfig(pqConfig, readRule, serviceTypes, ctx);
- auto status = error.empty() ? CheckConfig(*pqConfig, serviceTypes, error, ctx, Ydb::StatusIds::ALREADY_EXISTS)
- : Ydb::StatusIds::BAD_REQUEST;
+ auto messageAndCode = AddReadRuleToConfig(pqConfig, readRule, serviceTypes, ctx);
+ size_t issueCode = static_cast<size_t>(messageAndCode.PQCode);
+
+ Ydb::StatusIds::StatusCode status;
+ if (messageAndCode.PQCode == Ydb::PersQueue::ErrorCode::OK) {
+ status = CheckConfig(*pqConfig, serviceTypes, messageAndCode.Message, ctx, Ydb::StatusIds::ALREADY_EXISTS);
+ if (status == Ydb::StatusIds::ALREADY_EXISTS) {
+ issueCode = static_cast<size_t>(NYds::EErrorCodes::IN_USE);
+ }
+ } else {
+ status = Ydb::StatusIds::BAD_REQUEST;
+ }
+
if (status != Ydb::StatusIds::SUCCESS) {
- return ReplyWithError(status,
- status == Ydb::StatusIds::ALREADY_EXISTS ? Ydb::PersQueue::ErrorCode::OK
- : Ydb::PersQueue::ErrorCode::BAD_REQUEST,
- error, ctx);
+ return ReplyWithError(status, issueCode, messageAndCode.Message, ctx);
}
}
@@ -1136,7 +1158,7 @@ namespace NKikimr::NDataStreams::V1 {
ctx
);
if (!error.Empty()) {
- return ReplyWithError(Ydb::StatusIds::NOT_FOUND, Ydb::PersQueue::ErrorCode::BAD_REQUEST, error, ctx);
+ return ReplyWithError(Ydb::StatusIds::NOT_FOUND, static_cast<size_t>(NYds::EErrorCodes::NOT_FOUND), error, ctx);
}
}
@@ -1188,7 +1210,7 @@ namespace NKikimr::NDataStreams::V1 {
case TIteratorType::AT_SEQUENCE_NUMBER: {
auto sn = SequenceNumberToInt(GetProtoRequest()->starting_sequence_number());
if (!sn) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
TStringBuilder() << "Malformed sequence number", ctx);
}
SequenceNumber = sn.value() + (IteratorType == TIteratorType::AFTER_SEQUENCE_NUMBER ? 1u : 0u);
@@ -1197,7 +1219,7 @@ namespace NKikimr::NDataStreams::V1 {
case TIteratorType::AT_TIMESTAMP:
if (GetProtoRequest()->timestamp() == 0 ||
GetProtoRequest()->timestamp() > static_cast<i64>(TInstant::Now().MilliSeconds())) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
TStringBuilder() << "Shard iterator type is AT_TIMESTAMP, " <<
"but timestamp is either missed or too old or in future", ctx);
}
@@ -1210,7 +1232,7 @@ namespace NKikimr::NDataStreams::V1 {
ReadTimestampMs = TInstant::Now().MilliSeconds();
break;
default:
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
TStringBuilder() << "Shard iterator type '" <<
(ui32)IteratorType << "' is not known", ctx);
@@ -1235,12 +1257,12 @@ namespace NKikimr::NDataStreams::V1 {
auto topicInfo = navigate->ResultSet.begin();
StreamName = NKikimr::CanonizePath(topicInfo->Path);
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
- NACLib::TUserToken token(this->Request_->GetInternalToken());
+ NACLib::TUserToken token(this->Request_->GetSerializedToken());
if (!topicInfo->SecurityObject->CheckAccess(NACLib::EAccessRights::SelectRow,
token)) {
return this->ReplyWithError(Ydb::StatusIds::UNAUTHORIZED,
- Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
+ static_cast<size_t>(NYds::EErrorCodes::ACCESS_DENIED),
TStringBuilder() << "Access to stream "
<< this->GetProtoRequest()->stream_name()
<< " is denied for subject "
@@ -1262,7 +1284,7 @@ namespace NKikimr::NDataStreams::V1 {
}
}
- ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::NOT_FOUND),
TStringBuilder() << "No such shard: " << ShardId, ctx);
}
@@ -1335,14 +1357,18 @@ namespace NKikimr::NDataStreams::V1 {
void TGetRecordsActor::Bootstrap(const NActors::TActorContext& ctx) {
TBase::Bootstrap(ctx);
+ if (ShardIterator.IsExpired()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::EXPIRED_ITERATOR),
+ TStringBuilder() << "Provided shard iterator is expired", ctx);
+ }
if (!ShardIterator.IsValid()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
- TStringBuilder() << "Provided shard iterator is malformed or expired", ctx);
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
+ TStringBuilder() << "Provided shard iterator is malformed", ctx);
}
Limit = Limit == 0 ? MAX_LIMIT : Limit;
if (Limit < 1 || Limit > MAX_LIMIT) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR),
TStringBuilder() << "Limit '" << Limit << "' is out of bounds [1; " << MAX_LIMIT << "]", ctx);
}
@@ -1397,12 +1423,12 @@ namespace NKikimr::NDataStreams::V1 {
const auto response = result->ResultSet.front();
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
- NACLib::TUserToken token(this->Request_->GetInternalToken());
+ NACLib::TUserToken token(this->Request_->GetSerializedToken());
if (!response.SecurityObject->CheckAccess(NACLib::EAccessRights::SelectRow,
token)) {
return ReplyWithError(Ydb::StatusIds::UNAUTHORIZED,
- Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
+ static_cast<size_t>(NYds::EErrorCodes::ACCESS_DENIED),
TStringBuilder() << "Access to stream "
<< ShardIterator.GetStreamName()
<< " is denied for subject "
@@ -1423,7 +1449,7 @@ namespace NKikimr::NDataStreams::V1 {
}
}
- ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::NOT_FOUND),
TStringBuilder() << "No such shard: " << ShardIterator.GetShardId(), ctx);
}
@@ -1445,7 +1471,7 @@ namespace NKikimr::NDataStreams::V1 {
return;
default:
return ReplyWithError(ConvertPersQueueInternalCodeToStatus(record.GetErrorCode()),
- Ydb::PersQueue::ErrorCode::ERROR,
+ static_cast<size_t>(NYds::EErrorCodes::ERROR),
record.GetErrorReason(), ctx);
}
break;
@@ -1460,7 +1486,7 @@ namespace NKikimr::NDataStreams::V1 {
auto proto(NKikimr::GetDeserializedData(r.GetData()));
auto record = Result.add_records();
record->set_data(proto.GetData());
- record->set_timestamp(r.GetCreateTimestampMS());
+ record->set_approximate_arrival_timestamp(r.GetCreateTimestampMS());
record->set_encryption(Ydb::DataStreams::V1::EncryptionType::NONE);
record->set_partition_key(r.GetPartitionKey());
record->set_sequence_number(std::to_string(r.GetOffset()).c_str());
@@ -1470,7 +1496,7 @@ namespace NKikimr::NDataStreams::V1 {
}
if (!results.empty()) {
auto last = results.rbegin();
- shardIterator.SetReadTimestamp(last->GetCreateTimestampMS() + 1);
+ shardIterator.SetReadTimestamp(0);
shardIterator.SetSequenceNumber(last->GetOffset() + 1);
Result.set_millis_behind_latest(TInstant::Now().MilliSeconds() - last->GetWriteTimestampMS());
} else { // remove else?
@@ -1490,13 +1516,13 @@ namespace NKikimr::NDataStreams::V1 {
void TGetRecordsActor::Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActorContext& ctx) {
if (ev->Get()->Status != NKikimrProto::EReplyStatus::OK) {
- ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, static_cast<size_t>(NYds::EErrorCodes::ERROR),
TStringBuilder() << "Cannot connect to tablet " << ev->Get()->TabletId, ctx);
}
}
void TGetRecordsActor::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext& ctx) {
- ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, static_cast<size_t>(NYds::EErrorCodes::ERROR),
TStringBuilder() << "Cannot connect to tablet " << ev->Get()->TabletId, ctx);
}
@@ -1594,22 +1620,35 @@ namespace NKikimr::NDataStreams::V1 {
void TListShardsActor::Bootstrap(const NActors::TActorContext& ctx) {
TBase::Bootstrap(ctx);
+ if (!GetProtoRequest()->next_token().empty() && !GetProtoRequest()->stream_name().empty()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_PARAMETER_COMBINATION),
+ TStringBuilder() << "StreamName and NextToken can not be provided together", ctx);
+ }
+ if (NextToken.IsExpired()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::EXPIRED_TOKEN),
+ TStringBuilder() << "Provided next token is expired", ctx);
+ }
+ if (!NextToken.IsValid()) {
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
+ TStringBuilder() << "Provided next token is malformed", ctx);
+ }
+
if (!TShardFilter::ShardFilterType_IsValid(ShardFilter.type())) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
TStringBuilder() << "Shard filter '" <<
(ui32)ShardFilter.type() << "' is not known", ctx);
}
MaxResults = MaxResults == 0 ? DEFAULT_MAX_RESULTS : MaxResults;
if (MaxResults > MAX_MAX_RESULTS) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::VALIDATION_ERROR),
TStringBuilder() << "Max results '" << MaxResults <<
"' is out of bound [" << MIN_MAX_RESULTS << "; " <<
MAX_MAX_RESULTS << "]", ctx);
}
if (ShardFilter.type() == TShardFilter::AFTER_SHARD_ID && ShardFilter.shard_id() == "") {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::MISSING_PARAMETER),
TStringBuilder() << "Shard filter type is AFTER_SHARD_ID," <<
" but no ShardId provided", ctx);
}
@@ -1635,12 +1674,12 @@ namespace NKikimr::NDataStreams::V1 {
const NSchemeCache::TSchemeCacheNavigate* navigate = ev->Get()->Request.Get();
auto topicInfo = navigate->ResultSet.front();
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
- NACLib::TUserToken token(this->Request_->GetInternalToken());
+ NACLib::TUserToken token(this->Request_->GetSerializedToken());
if (!topicInfo.SecurityObject->CheckAccess(NACLib::EAccessRights::SelectRow,
token)) {
return this->ReplyWithError(Ydb::StatusIds::UNAUTHORIZED,
- Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
+ static_cast<size_t>(NYds::EErrorCodes::ACCESS_DENIED),
TStringBuilder() << "Access to stream "
<< this->GetProtoRequest()->stream_name()
<< " is denied for subject "
@@ -1699,7 +1738,7 @@ namespace NKikimr::NDataStreams::V1 {
const auto alreadyRead = NextToken.GetAlreadyRead();
if (alreadyRead > (ui32)partitions.size()) {
- return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::ERROR,
+ return ReplyWithError(Ydb::StatusIds::BAD_REQUEST, static_cast<size_t>(NYds::EErrorCodes::INVALID_ARGUMENT),
TStringBuilder() << "Provided next_token is malformed - "
"everything is already read", ctx);
}
@@ -1759,13 +1798,13 @@ namespace NKikimr::NDataStreams::V1 {
void TListShardsActor::Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActorContext& ctx) {
if (ev->Get()->Status != NKikimrProto::EReplyStatus::OK) {
- ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, static_cast<size_t>(NYds::EErrorCodes::ERROR),
TStringBuilder() << "Cannot connect to tablet " << ev->Get()->TabletId, ctx);
}
}
void TListShardsActor::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext& ctx) {
- ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR,
+ ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, static_cast<size_t>(NYds::EErrorCodes::ERROR),
TStringBuilder() << "Cannot connect to tablet " << ev->Get()->TabletId, ctx);
}
@@ -1906,7 +1945,7 @@ namespace NKikimr::NDataStreams::V1 {
void Bootstrap(const NActors::TActorContext& ctx) {
TBase::Bootstrap(ctx);
- this->Request_->RaiseIssue(FillIssue("Method is not implemented yet", Ydb::PersQueue::ErrorCode::ErrorCode::ERROR));
+ this->Request_->RaiseIssue(FillIssue("Method is not implemented yet", static_cast<size_t>(NYds::EErrorCodes::ERROR)));
this->Request_->ReplyWithYdbStatus(Ydb::StatusIds::UNSUPPORTED);
this->Die(ctx);
}
diff --git a/ydb/services/datastreams/datastreams_proxy.h b/ydb/services/datastreams/datastreams_proxy.h
index 7a3791a4d0..a6d186cab2 100644
--- a/ydb/services/datastreams/datastreams_proxy.h
+++ b/ydb/services/datastreams/datastreams_proxy.h
@@ -11,6 +11,7 @@
#include <library/cpp/actors/core/actor_bootstrapped.h>
#include <library/cpp/actors/core/actorsystem.h>
+
namespace NKikimr {
namespace NGRpcService {
diff --git a/ydb/services/datastreams/datastreams_ut.cpp b/ydb/services/datastreams/datastreams_ut.cpp
index 362e317e43..0addc976c4 100644
--- a/ydb/services/datastreams/datastreams_ut.cpp
+++ b/ydb/services/datastreams/datastreams_ut.cpp
@@ -253,6 +253,7 @@ Y_UNIT_TEST_SUITE(DataStreams) {
UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_description().stream_status(),
YDS_V1::StreamDescription::ACTIVE);
UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_description().stream_name(), streamName);
+ UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_description().stream_arn(), streamName);
UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_description().write_quota_kb_per_sec(), 1_KB);
UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_description().retention_period_hours(), 24);
@@ -1782,7 +1783,7 @@ Y_UNIT_TEST_SUITE(DataStreams) {
UNIT_ASSERT_VALUES_UNEQUAL(result.GetResult().next_token().size(), 0);
auto nextToken = result.GetResult().next_token();
- result = testServer.DataStreamsClient->ListStreamConsumers(streamName,
+ result = testServer.DataStreamsClient->ListStreamConsumers("",
NYDS_V1::TListStreamConsumersSettings().NextToken(nextToken)).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
@@ -1813,26 +1814,26 @@ Y_UNIT_TEST_SUITE(DataStreams) {
};
auto nextToken = makeNextToken(TInstant::Now().MilliSeconds() - 300001);
- result = testServer.DataStreamsClient->ListStreamConsumers(streamName,
+ result = testServer.DataStreamsClient->ListStreamConsumers("",
NYDS_V1::TListStreamConsumersSettings().NextToken(nextToken)).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
nextToken = makeNextToken(TInstant::Now().MilliSeconds() + 1000);
- result = testServer.DataStreamsClient->ListStreamConsumers(streamName,
+ result = testServer.DataStreamsClient->ListStreamConsumers("",
NYDS_V1::TListStreamConsumersSettings().NextToken(nextToken)).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
nextToken = makeNextToken(0);
- result = testServer.DataStreamsClient->ListStreamConsumers(streamName,
+ result = testServer.DataStreamsClient->ListStreamConsumers("",
NYDS_V1::TListStreamConsumersSettings().NextToken(nextToken)).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
- result = testServer.DataStreamsClient->ListStreamConsumers(streamName,
+ result = testServer.DataStreamsClient->ListStreamConsumers("",
NYDS_V1::TListStreamConsumersSettings().NextToken("some_garbage")).ExtractValueSync();
- result = testServer.DataStreamsClient->ListStreamConsumers(streamName,
+ result = testServer.DataStreamsClient->ListStreamConsumers("",
NYDS_V1::TListStreamConsumersSettings().NextToken("some_garbage")).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
@@ -2511,7 +2512,8 @@ Y_UNIT_TEST_SUITE(DataStreams) {
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
}
-/* { //TODO: datastreams api uses only one retention parameter
+ /*
+ { //TODO: datastreams api uses only one retention parameter
auto result = testServer.DataStreamsClient->CreateStream(streamName,
NYDS_V1::TCreateStreamSettings().ShardCount(shardCount)
.RetentionStorageMegabytes(55_KB).RetentionPeriodHours(8 * 24)).ExtractValueSync();
@@ -2612,4 +2614,18 @@ Y_UNIT_TEST_SUITE(DataStreams) {
UNIT_ASSERT_VALUES_EQUAL(result.GetResult().records().size(), 0);
}
}
+
+ Y_UNIT_TEST(ListStreamsValidation) {
+ TInsecureDatastreamsTestServer testServer;
+
+ {
+ auto result = testServer.DataStreamsClient->ListStreams(
+ NYdb::NDataStreams::V1::TListStreamsSettings().Limit(1000000000).Recurse(false)
+ ).ExtractValueSync();
+ UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
+ UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::BAD_REQUEST, result.GetIssues().ToString());
+
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
+ }
+ }
}
diff --git a/ydb/services/datastreams/put_records_actor.h b/ydb/services/datastreams/put_records_actor.h
index c8bb8ca970..efd1d716b4 100644
--- a/ydb/services/datastreams/put_records_actor.h
+++ b/ydb/services/datastreams/put_records_actor.h
@@ -279,7 +279,7 @@ namespace NKikimr::NDataStreams::V1 {
error, ctx);
}
- if (this->Request_->GetInternalToken().empty()) {
+ if (this->Request_->GetSerializedToken().empty()) {
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
return this->ReplyWithError(Ydb::StatusIds::UNAUTHORIZED,
Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
@@ -288,7 +288,7 @@ namespace NKikimr::NDataStreams::V1 {
<< " is denied", ctx);
}
}
- NACLib::TUserToken token(this->Request_->GetInternalToken());
+ NACLib::TUserToken token(this->Request_->GetSerializedToken());
ShouldBeCharged = std::find(
AppData(ctx)->PQConfig.GetNonChargeableUser().begin(),
@@ -319,7 +319,7 @@ namespace NKikimr::NDataStreams::V1 {
const NSchemeCache::TSchemeCacheNavigate* navigate = ev->Get()->Request.Get();
auto topicInfo = navigate->ResultSet.begin();
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
- NACLib::TUserToken token(this->Request_->GetInternalToken());
+ NACLib::TUserToken token(this->Request_->GetSerializedToken());
if (!topicInfo->SecurityObject->CheckAccess(NACLib::EAccessRights::UpdateRow, token)) {
return this->ReplyWithError(Ydb::StatusIds::UNAUTHORIZED,
Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
@@ -330,9 +330,20 @@ namespace NKikimr::NDataStreams::V1 {
}
}
+
PQGroupInfo = topicInfo->PQGroupInfo;
SetMeteringMode(PQGroupInfo->Description.GetPQTabletConfig().GetMeteringMode());
+ if (!AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen() && !PQGroupInfo->Description.GetPQTabletConfig().GetLocalDC()) {
+
+ return this->ReplyWithError(Ydb::StatusIds::BAD_REQUEST,
+ Ydb::PersQueue::ErrorCode::BAD_REQUEST,
+ TStringBuilder() << "write to mirrored stream "
+ << this->GetProtoRequest()->stream_name()
+ << " is forbidden", ctx);
+ }
+
+
if (IsQuotaRequired()) {
const auto ru = 1 + CalcRuConsumption(GetPayloadSize());
Y_VERIFY(MaybeRequestQuota(ru, EWakeupTag::RlAllowed, ctx));
diff --git a/ydb/services/datastreams/shard_iterator.h b/ydb/services/datastreams/shard_iterator.h
index 41b5014268..262081df76 100644
--- a/ydb/services/datastreams/shard_iterator.h
+++ b/ydb/services/datastreams/shard_iterator.h
@@ -8,6 +8,7 @@
namespace NKikimr::NDataStreams::V1 {
class TShardIterator {
+
using TPartitionOffset =
std::invoke_result_t<decltype(&NKikimrClient::TCmdReadResult_TResult::GetOffset),
NKikimrClient::TCmdReadResult_TResult>;
@@ -25,7 +26,7 @@ using TYdsTimestamp =
NKikimrPQ::TYdsShardIterator>;
static_assert(std::is_same<TCreationTimestamp, TYdsTimestamp>::value,
"Types of partition message creation timestamp and yds record timestamp should match");
-
+
public:
static constexpr ui64 LIFETIME_MS = TDuration::Minutes(5).MilliSeconds();
diff --git a/ydb/services/kesus/grpc_service.cpp b/ydb/services/kesus/grpc_service.cpp
index 2ee2515df8..5aad2069a3 100644
--- a/ydb/services/kesus/grpc_service.cpp
+++ b/ydb/services/kesus/grpc_service.cpp
@@ -105,7 +105,7 @@ private:
private:
void BeginAuth() {
- if (const auto& token = RequestEvent->GetInternalToken()) {
+ if (const auto& token = RequestEvent->GetSerializedToken()) {
UserToken.Reset(new TUserToken(token));
}
ReadyToStart();
diff --git a/ydb/services/lib/actors/pq_schema_actor.cpp b/ydb/services/lib/actors/pq_schema_actor.cpp
index f080b3f99a..9de74a9c83 100644
--- a/ydb/services/lib/actors/pq_schema_actor.cpp
+++ b/ydb/services/lib/actors/pq_schema_actor.cpp
@@ -11,6 +11,7 @@
#include <library/cpp/digest/md5/md5.h>
+
namespace NKikimr::NGRpcProxy::V1 {
constexpr TStringBuf GRPCS_ENDPOINT_PREFIX = "grpcs://";
@@ -65,7 +66,7 @@ namespace NKikimr::NGRpcProxy::V1 {
return "";
}
- TString AddReadRuleToConfig(
+ TMsgPqCodes AddReadRuleToConfig(
NKikimrPQ::TPQTabletConfig* config,
const Ydb::PersQueue::V1::TopicSettings::ReadRule& rr,
const TClientServiceTypes& supportedClientServiceTypes,
@@ -73,66 +74,96 @@ namespace NKikimr::NGRpcProxy::V1 {
) {
auto consumerName = NPersQueue::ConvertNewConsumerName(rr.consumer_name(), ctx);
+ if (consumerName.empty()) {
+ return TMsgPqCodes(TStringBuilder() << "consumer with empty name is forbidden", Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
+ }
if(consumerName.find("/") != TString::npos || consumerName.find("|") != TString::npos) {
- return TStringBuilder() << "consumer '" << rr.consumer_name() << "' has illegal symbols";
+ return TMsgPqCodes(
+ TStringBuilder() << "consumer '" << rr.consumer_name() << "' has illegal symbols",
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
+ );
}
{
TString migrationError = ReadRuleServiceTypeMigration(config, ctx);
if (migrationError) {
- return migrationError;
+ return TMsgPqCodes(migrationError, Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
}
config->AddReadRules(consumerName);
if (rr.starting_message_timestamp_ms() < 0) {
- return TStringBuilder() << "starting_message_timestamp_ms in read_rule can't be negative, provided " << rr.starting_message_timestamp_ms();
+ return TMsgPqCodes(
+ TStringBuilder() << "starting_message_timestamp_ms in read_rule can't be negative, provided " << rr.starting_message_timestamp_ms(),
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
config->AddReadFromTimestampsMs(rr.starting_message_timestamp_ms());
if (!Ydb::PersQueue::V1::TopicSettings::Format_IsValid((int)rr.supported_format()) || rr.supported_format() == 0) {
- return TStringBuilder() << "Unknown format version with value " << (int)rr.supported_format() << " for " << rr.consumer_name();
+ return TMsgPqCodes(
+ TStringBuilder() << "Unknown format version with value " << (int)rr.supported_format() << " for " << rr.consumer_name(),
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
+ );
}
config->AddConsumerFormatVersions(rr.supported_format() - 1);
if (rr.version() < 0) {
- return TStringBuilder() << "version in read_rule can't be negative, provided " << rr.version();
+ return TMsgPqCodes(
+ TStringBuilder() << "version in read_rule can't be negative, provided " << rr.version(),
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
config->AddReadRuleVersions(rr.version());
auto ct = config->AddConsumerCodecs();
if (rr.supported_codecs().size() > MAX_SUPPORTED_CODECS_COUNT) {
- return TStringBuilder() << "supported_codecs count cannot be more than "
- << MAX_SUPPORTED_CODECS_COUNT << ", provided " << rr.supported_codecs().size();
+ return TMsgPqCodes(
+ TStringBuilder() << "supported_codecs count cannot be more than "
+ << MAX_SUPPORTED_CODECS_COUNT << ", provided " << rr.supported_codecs().size(),
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
for (const auto& codec : rr.supported_codecs()) {
if (!Ydb::PersQueue::V1::Codec_IsValid(codec) || codec == 0)
- return TStringBuilder() << "Unknown codec with value " << codec << " for " << rr.consumer_name();
+ return TMsgPqCodes(
+ TStringBuilder() << "Unknown codec with value " << codec << " for " << rr.consumer_name(),
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
+ );
ct->AddIds(codec - 1);
ct->AddCodecs(to_lower(Ydb::PersQueue::V1::Codec_Name((Ydb::PersQueue::V1::Codec)codec)).substr(6));
}
if (rr.important()) {
if (AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen()) {
- return TStringBuilder() << "important flag is forbiden for consumer " << rr.consumer_name();
+ return TMsgPqCodes(
+ TStringBuilder() << "important flag is forbiden for consumer " << rr.consumer_name(),
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
config->MutablePartitionConfig()->AddImportantClientId(consumerName);
}
if (!rr.service_type().empty()) {
if (!supportedClientServiceTypes.contains(rr.service_type())) {
- return TStringBuilder() << "Unknown read rule service type '" << rr.service_type()
- << "' for consumer '" << rr.consumer_name() << "'";
+ return TMsgPqCodes(
+ TStringBuilder() << "Unknown read rule service type '" << rr.service_type()
+ << "' for consumer '" << rr.consumer_name() << "'",
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
+ );
}
config->AddReadRuleServiceTypes(rr.service_type());
} else {
const auto& pqConfig = AppData(ctx)->PQConfig;
if (pqConfig.GetDisallowDefaultClientServiceType()) {
- return TStringBuilder() << "service type cannot be empty for consumer '" << rr.consumer_name() << "'";
+ return TMsgPqCodes(
+ TStringBuilder() << "service type cannot be empty for consumer '" << rr.consumer_name() << "'",
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
const auto& defaultCientServiceType = pqConfig.GetDefaultClientServiceType().GetName();
config->AddReadRuleServiceTypes(defaultCientServiceType);
}
- return "";
+ return TMsgPqCodes("", Ydb::PersQueue::ErrorCode::OK);
}
@@ -151,7 +182,7 @@ namespace NKikimr::NGRpcProxy::V1 {
}
}
- TString AddReadRuleToConfig(
+ TMsgPqCodes AddReadRuleToConfig(
NKikimrPQ::TPQTabletConfig* config,
const Ydb::Topic::Consumer& rr,
const TClientServiceTypes& supportedClientServiceTypes,
@@ -160,22 +191,25 @@ namespace NKikimr::NGRpcProxy::V1 {
) {
auto consumerName = NPersQueue::ConvertNewConsumerName(rr.name(), ctx);
if (consumerName.find("/") != TString::npos || consumerName.find("|") != TString::npos) {
- return TStringBuilder() << "consumer '" << rr.name() << "' has illegal symbols";
+ return TMsgPqCodes(TStringBuilder() << "consumer '" << rr.name() << "' has illegal symbols", Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
if (consumerName.empty()) {
- return TStringBuilder() << "consumer with empty name is forbidden";
+ return TMsgPqCodes(TStringBuilder() << "consumer with empty name is forbidden", Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
{
TString migrationError = ReadRuleServiceTypeMigration(config, ctx);
if (migrationError) {
- return migrationError;
+ return TMsgPqCodes(migrationError, migrationError.empty() ? Ydb::PersQueue::ErrorCode::OK : Ydb::PersQueue::ErrorCode::VALIDATION_ERROR); //find better issueCode
}
}
config->AddReadRules(consumerName);
if (rr.read_from().seconds() < 0) {
- return TStringBuilder() << "starting_message_timestamp_ms in read_rule can't be negative, provided " << rr.read_from().seconds();
+ return TMsgPqCodes(
+ TStringBuilder() << "starting_message_timestamp_ms in read_rule can't be negative, provided " << rr.read_from().seconds(),
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
config->AddReadFromTimestampsMs(rr.read_from().seconds() * 1000);
@@ -196,13 +230,16 @@ namespace NKikimr::NGRpcProxy::V1 {
if (!pair.second.empty())
version = FromString<ui32>(pair.second);
} catch(...) {
- return TStringBuilder() << "Attribute for consumer '" << rr.name() << "' _version is " << pair.second << ", which is not ui32";
+ return TMsgPqCodes(
+ TStringBuilder() << "Attribute for consumer '" << rr.name() << "' _version is " << pair.second << ", which is not ui32",
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
+ );
}
} else if (pair.first == "_service_type") {
if (!pair.second.empty()) {
if (!supportedClientServiceTypes.contains(pair.second)) {
- return TStringBuilder() << "Unknown _service_type '" << pair.second
- << "' for consumer '" << rr.name() << "'";
+ return TMsgPqCodes(TStringBuilder() << "Unknown _service_type '" << pair.second
+ << "' for consumer '" << rr.name() << "'", Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
serviceType = pair.second;
}
@@ -213,7 +250,7 @@ namespace NKikimr::NGRpcProxy::V1 {
}
}
if (serviceType.empty()) {
- return TStringBuilder() << "service type cannot be empty for consumer '" << rr.name() << "'";
+ return TMsgPqCodes(TStringBuilder() << "service type cannot be empty for consumer '" << rr.name() << "'", Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
Y_VERIFY(supportedClientServiceTypes.find(serviceType) != supportedClientServiceTypes.end());
@@ -229,10 +266,10 @@ namespace NKikimr::NGRpcProxy::V1 {
}
if (!found) {
if (hasPassword) {
- return "incorrect client service type password";
+ return TMsgPqCodes("incorrect client service type password", Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
if (AppData(ctx)->PQConfig.GetForceClientServiceTypePasswordCheck()) { // no password and check is required
- return "no client service type password provided";
+ return TMsgPqCodes("no client service type password provided", Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
}
}
@@ -244,7 +281,10 @@ namespace NKikimr::NGRpcProxy::V1 {
for(const auto& codec : rr.supported_codecs().codecs()) {
if ((!Ydb::Topic::Codec_IsValid(codec) && codec < Ydb::Topic::CODEC_CUSTOM) || codec == 0) {
- return TStringBuilder() << "Unknown codec for consumer '" << rr.name() << "' with value " << codec;
+ return TMsgPqCodes(
+ TStringBuilder() << "Unknown codec for consumer '" << rr.name() << "' with value " << codec,
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
+ );
}
ct->AddIds(codec - 1);
ct->AddCodecs(Ydb::Topic::Codec_IsValid(codec) ? LegacySubstr(to_lower(Ydb::Topic::Codec_Name((Ydb::Topic::Codec)codec)), 6) : "CUSTOM");
@@ -252,12 +292,12 @@ namespace NKikimr::NGRpcProxy::V1 {
if (rr.important()) {
if (AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen()) {
- return TStringBuilder() << "important flag is forbiden for consumer " << rr.name();
+ return TMsgPqCodes(TStringBuilder() << "important flag is forbiden for consumer " << rr.name(), Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
config->MutablePartitionConfig()->AddImportantClientId(consumerName);
}
- return "";
+ return TMsgPqCodes("", Ydb::PersQueue::ErrorCode::OK);
}
@@ -433,10 +473,15 @@ namespace NKikimr::NGRpcProxy::V1 {
return error.empty() ? Ydb::StatusIds::SUCCESS : (hasDuplicates ? dubsStatus : Ydb::StatusIds::BAD_REQUEST);
}
- NYql::TIssue FillIssue(const TString &errorReason, const Ydb::PersQueue::ErrorCode::ErrorCode errorCode) {
+ NYql::TIssue FillIssue(const TString& errorReason, const Ydb::PersQueue::ErrorCode::ErrorCode errorCode) {
NYql::TIssue res(NYql::TPosition(), errorReason);
res.SetCode(errorCode, NYql::ESeverity::TSeverityIds_ESeverityId_S_ERROR);
+ return res;
+ }
+ NYql::TIssue FillIssue(const TString& errorReason, const size_t errorCode) {
+ NYql::TIssue res(NYql::TPosition(), errorReason);
+ res.SetCode(errorCode, NYql::ESeverity::TSeverityIds_ESeverityId_S_ERROR);
return res;
}
@@ -752,8 +797,9 @@ namespace NKikimr::NGRpcProxy::V1 {
}
const auto& supportedClientServiceTypes = GetSupportedClientServiceTypes(ctx);
for (const auto& rr : settings.read_rules()) {
- error = AddReadRuleToConfig(config, rr, supportedClientServiceTypes, ctx);
- if (!error.Empty()) {
+ auto messageAndCode = AddReadRuleToConfig(config, rr, supportedClientServiceTypes, ctx);
+ if (messageAndCode.PQCode != Ydb::PersQueue::ErrorCode::OK) {
+ error = messageAndCode.Message;
return Ydb::StatusIds::BAD_REQUEST;
}
}
@@ -879,7 +925,7 @@ namespace NKikimr::NGRpcProxy::V1 {
return true;
}
- Ydb::StatusIds::StatusCode FillProposeRequestImpl(
+ TYdbPqCodes FillProposeRequestImpl(
const TString& name, const Ydb::Topic::CreateTopicRequest& request,
NKikimrSchemeOp::TModifyScheme& modifyScheme, const TActorContext& ctx,
TString& error, const TString& path, const TString& database, const TString& localDc
@@ -894,7 +940,7 @@ namespace NKikimr::NGRpcProxy::V1 {
if (request.has_partitioning_settings()) {
if (request.partitioning_settings().min_active_partitions() < 0) {
error = TStringBuilder() << "Partitions count must be positive, provided " << request.partitioning_settings().min_active_partitions();
- return Ydb::StatusIds::BAD_REQUEST;
+ return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
parts = request.partitioning_settings().min_active_partitions();
if (parts == 0) parts = 1;
@@ -916,7 +962,7 @@ namespace NKikimr::NGRpcProxy::V1 {
auto res = ProcessAttributes(request.attributes(), pqDescr, error, false);
if (res != Ydb::StatusIds::SUCCESS) {
- return res;
+ return TYdbPqCodes(res, Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
bool local = true; // TODO: check here cluster;
@@ -930,7 +976,7 @@ namespace NKikimr::NGRpcProxy::V1 {
if (!converter->IsValid()) {
error = TStringBuilder() << "Bad topic: " << converter->GetReason();
- return Ydb::StatusIds::BAD_REQUEST;
+ return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
config->SetLocalDC(local);
config->SetDC(converter->GetCluster());
@@ -951,6 +997,11 @@ namespace NKikimr::NGRpcProxy::V1 {
partConfig->MutableExplicitChannelProfiles()->CopyFrom(channelProfiles);
}
if (request.has_retention_period()) {
+ if (request.retention_period().seconds() <= 0) {
+ error = TStringBuilder() << "retention_period must be not negative, provided " <<
+ request.retention_period().DebugString();
+ return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
+ }
partConfig->SetLifetimeSeconds(request.retention_period().seconds());
} else {
partConfig->SetLifetimeSeconds(TDuration::Days(1).Seconds());
@@ -979,7 +1030,7 @@ namespace NKikimr::NGRpcProxy::V1 {
for(const auto& codec : request.supported_codecs().codecs()) {
if ((!Ydb::Topic::Codec_IsValid(codec) && codec < Ydb::Topic::CODEC_CUSTOM) || codec == 0) {
error = TStringBuilder() << "Unknown codec with value " << codec;
- return Ydb::StatusIds::BAD_REQUEST;
+ return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
ct->AddIds(codec - 1);
ct->AddCodecs(Ydb::Topic::Codec_IsValid(codec) ? LegacySubstr(to_lower(Ydb::Topic::Codec_Name((Ydb::Topic::Codec)codec)), 6) : "CUSTOM");
@@ -988,32 +1039,33 @@ namespace NKikimr::NGRpcProxy::V1 {
if (request.consumers_size() > MAX_READ_RULES_COUNT) {
error = TStringBuilder() << "consumers count cannot be more than "
<< MAX_READ_RULES_COUNT << ", provided " << request.consumers_size();
- return Ydb::StatusIds::BAD_REQUEST;
+ return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
{
error = ReadRuleServiceTypeMigration(config, ctx);
if (error) {
- return Ydb::StatusIds::INTERNAL_ERROR;
+ return TYdbPqCodes(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
}
Ydb::StatusIds::StatusCode code;
if (!FillMeteringMode(request.metering_mode(), *config, pqConfig.GetBillingMeteringConfig().GetEnabled(), false, code, error)) {
- return code;
+ return TYdbPqCodes(code, Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
}
const auto& supportedClientServiceTypes = GetSupportedClientServiceTypes(ctx);
for (const auto& rr : request.consumers()) {
- error = AddReadRuleToConfig(config, rr, supportedClientServiceTypes, true, ctx);
- if (!error.Empty()) {
- return Ydb::StatusIds::BAD_REQUEST;
+ auto messageAndCode = AddReadRuleToConfig(config, rr, supportedClientServiceTypes, true, ctx);
+ if (messageAndCode.PQCode != Ydb::PersQueue::ErrorCode::OK) {
+ error = messageAndCode.Message;
+ return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, messageAndCode.PQCode);
}
}
- return CheckConfig(*config, supportedClientServiceTypes, error, ctx, Ydb::StatusIds::BAD_REQUEST);
+ return TYdbPqCodes(CheckConfig(*config, supportedClientServiceTypes, error, ctx, Ydb::StatusIds::BAD_REQUEST), Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
}
Ydb::StatusIds::StatusCode FillProposeRequestImpl(
@@ -1183,8 +1235,9 @@ namespace NKikimr::NGRpcProxy::V1 {
config->ClearReadRuleVersions();
for (const auto& rr : consumers) {
- error = AddReadRuleToConfig(config, rr.second, supportedClientServiceTypes, rr.first, ctx);
- if (!error.Empty()) {
+ auto messageAndCode = AddReadRuleToConfig(config, rr.second, supportedClientServiceTypes, rr.first, ctx);
+ if (messageAndCode.PQCode != Ydb::PersQueue::ErrorCode::OK) {
+ error = messageAndCode.Message;
return Ydb::StatusIds::BAD_REQUEST;
}
}
diff --git a/ydb/services/lib/actors/pq_schema_actor.h b/ydb/services/lib/actors/pq_schema_actor.h
index 08fe0a71db..6d1f6ee3d3 100644
--- a/ydb/services/lib/actors/pq_schema_actor.h
+++ b/ydb/services/lib/actors/pq_schema_actor.h
@@ -10,6 +10,25 @@
#include <library/cpp/actors/core/event_local.h>
#include <library/cpp/actors/core/hfunc.h>
+
+struct TMsgPqCodes {
+ TString Message;
+ Ydb::PersQueue::ErrorCode::ErrorCode PQCode;
+
+ TMsgPqCodes(TString const& message, Ydb::PersQueue::ErrorCode::ErrorCode pqCode)
+ : Message(message), PQCode(pqCode) {}
+};
+
+struct TYdbPqCodes {
+ Ydb::StatusIds::StatusCode YdbCode;
+ Ydb::PersQueue::ErrorCode::ErrorCode PQCode;
+
+ TYdbPqCodes(Ydb::StatusIds::StatusCode YdbCode, Ydb::PersQueue::ErrorCode::ErrorCode PQCode)
+ : YdbCode(YdbCode),
+ PQCode(PQCode) {}
+};
+
+
namespace NKikimr::NGRpcProxy::V1 {
Ydb::StatusIds::StatusCode FillProposeRequestImpl(
@@ -24,7 +43,7 @@ namespace NKikimr::NGRpcProxy::V1 {
const TString& localDc = TString()
);
- Ydb::StatusIds::StatusCode FillProposeRequestImpl(
+ TYdbPqCodes FillProposeRequestImpl(
const TString& name,
const Ydb::Topic::CreateTopicRequest& request,
NKikimrSchemeOp::TModifyScheme& modifyScheme,
@@ -33,7 +52,6 @@ namespace NKikimr::NGRpcProxy::V1 {
const TString& path,
const TString& database = TString(),
const TString& localDc = TString()
-
);
Ydb::StatusIds::StatusCode FillProposeRequestImpl(
@@ -58,7 +76,7 @@ namespace NKikimr::NGRpcProxy::V1 {
TString& error, const TActorContext& ctx,
const Ydb::StatusIds::StatusCode dubsStatus = Ydb::StatusIds::BAD_REQUEST);
- TString AddReadRuleToConfig(
+ TMsgPqCodes AddReadRuleToConfig(
NKikimrPQ::TPQTabletConfig *config,
const Ydb::PersQueue::V1::TopicSettings::ReadRule& rr,
const TClientServiceTypes& supportedReadRuleServiceTypes,
@@ -71,7 +89,7 @@ namespace NKikimr::NGRpcProxy::V1 {
const TActorContext& ctx
);
NYql::TIssue FillIssue(const TString &errorReason, const Ydb::PersQueue::ErrorCode::ErrorCode errorCode);
-
+ NYql::TIssue FillIssue(const TString &errorReason, const size_t errorCode);
template <typename T>
class THasCdcStreamCompatibility {
@@ -134,13 +152,13 @@ namespace NKikimr::NGRpcProxy::V1 {
SetDatabase(proposal.get(), *this->Request_);
- if (this->Request_->GetInternalToken().empty()) {
+ if (this->Request_->GetSerializedToken().empty()) {
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
return ReplyWithError(Ydb::StatusIds::UNAUTHORIZED, Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
"Unauthenticated access is forbidden, please provide credentials", ctx);
}
} else {
- proposal->Record.SetUserToken(this->Request_->GetInternalToken());
+ proposal->Record.SetUserToken(this->Request_->GetSerializedToken());
}
static_cast<TDerived*>(this)->FillProposeRequest(*proposal, ctx, workingDir, name);
@@ -161,13 +179,13 @@ namespace NKikimr::NGRpcProxy::V1 {
entry.Operation = NSchemeCache::TSchemeCacheNavigate::OpList;
navigateRequest->ResultSet.emplace_back(entry);
- if (this->Request_->GetInternalToken().empty()) {
+ if (this->Request_->GetSerializedToken().empty()) {
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
return ReplyWithError(Ydb::StatusIds::UNAUTHORIZED, Ydb::PersQueue::ErrorCode::ACCESS_DENIED,
"Unauthenticated access is forbidden, please provide credentials", ctx);
}
} else {
- navigateRequest->UserToken = new NACLib::TUserToken(this->Request_->GetInternalToken());
+ navigateRequest->UserToken = new NACLib::TUserToken(this->Request_->GetSerializedToken());
}
if (!IsDead) {
ctx.Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvNavigateKeySet(navigateRequest.release()));
@@ -185,8 +203,8 @@ namespace NKikimr::NGRpcProxy::V1 {
NSchemeCache::TSchemeCacheNavigate::KindTopic) {
this->Request_->RaiseIssue(
FillIssue(
- TStringBuilder() << "path '" << path << "' is not a topic",
- Ydb::PersQueue::ErrorCode::ERROR
+ TStringBuilder() << "path '" << path << "' is not a stream",
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
)
);
TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -221,7 +239,7 @@ namespace NKikimr::NGRpcProxy::V1 {
this->Request_->RaiseIssue(
FillIssue(
TStringBuilder() << "path '" << path << "' is not compatible scheme object",
- Ydb::PersQueue::ErrorCode::ERROR
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
)
);
return TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -229,7 +247,7 @@ namespace NKikimr::NGRpcProxy::V1 {
this->Request_->RaiseIssue(
FillIssue(
TStringBuilder() << "path '" << path << "' creation is not completed",
- Ydb::PersQueue::ErrorCode::ERROR
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
)
);
return TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -242,7 +260,7 @@ namespace NKikimr::NGRpcProxy::V1 {
FillIssue(
TStringBuilder() << "path '" << path << "' does not exist or you " <<
"do not have access rights",
- Ydb::PersQueue::ErrorCode::ERROR
+ Ydb::PersQueue::ErrorCode::ACCESS_DENIED
)
);
return TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -251,7 +269,7 @@ namespace NKikimr::NGRpcProxy::V1 {
this->Request_->RaiseIssue(
FillIssue(
TStringBuilder() << "table creation is not completed",
- Ydb::PersQueue::ErrorCode::ERROR
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
)
);
return TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -261,7 +279,7 @@ namespace NKikimr::NGRpcProxy::V1 {
this->Request_->RaiseIssue(
FillIssue(
TStringBuilder() << "path '" << path << "' is not a table",
- Ydb::PersQueue::ErrorCode::ERROR
+ Ydb::PersQueue::ErrorCode::VALIDATION_ERROR
)
);
return TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -271,7 +289,7 @@ namespace NKikimr::NGRpcProxy::V1 {
this->Request_->RaiseIssue(
FillIssue(
TStringBuilder() << "unknown database root",
- Ydb::PersQueue::ErrorCode::ERROR
+ Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT
)
);
return TBase::Reply(Ydb::StatusIds::SCHEME_ERROR, ctx);
@@ -292,6 +310,14 @@ namespace NKikimr::NGRpcProxy::V1 {
IsDead = true;
}
+ void ReplyWithError(Ydb::StatusIds::StatusCode status, size_t additionalStatus,
+ const TString& messageText, const NActors::TActorContext& ctx) {
+ this->Request_->RaiseIssue(FillIssue(messageText, additionalStatus));
+ this->Request_->ReplyWithYdbStatus(status);
+ this->Die(ctx);
+ IsDead = true;
+ }
+
void ReplyWithResult(Ydb::StatusIds::StatusCode status, const NActors::TActorContext& ctx) {
this->Request_->ReplyWithYdbStatus(status);
this->Die(ctx);
diff --git a/ydb/services/lib/actors/type_definitions.h b/ydb/services/lib/actors/type_definitions.h
index 9db7e6e686..f0435d7835 100644
--- a/ydb/services/lib/actors/type_definitions.h
+++ b/ydb/services/lib/actors/type_definitions.h
@@ -20,6 +20,7 @@ struct TTopicInitInfo {
bool IsServerless = false;
TString FolderId;
NKikimrPQ::TPQTabletConfig::EMeteringMode MeteringMode;
+ THashMap<ui32, ui64> PartitionIdToTabletId;
};
using TTopicInitInfoMap = THashMap<TString, TTopicInitInfo>;
@@ -40,6 +41,8 @@ struct TTopicHolder {
TVector<ui32> Groups;
TMap<ui64, ui64> Partitions;
+ THashMap<ui32, ui64> PartitionIdToTabletId;
+
inline static TTopicHolder FromTopicInfo(const TTopicInitInfo& info) {
return TTopicHolder{
@@ -52,6 +55,7 @@ struct TTopicHolder {
.FolderId = info.FolderId,
.MeteringMode = info.MeteringMode,
.FullConverter = info.TopicNameConverter,
+ .PartitionIdToTabletId = info.PartitionIdToTabletId,
};
}
};
diff --git a/ydb/services/metadata/abstract/decoder.cpp b/ydb/services/metadata/abstract/decoder.cpp
index 5b70d3ef05..f182f1487e 100644
--- a/ydb/services/metadata/abstract/decoder.cpp
+++ b/ydb/services/metadata/abstract/decoder.cpp
@@ -21,7 +21,14 @@ bool TDecoderBase::Read(const i32 columnIdx, TString& result, const Ydb::Value&
if (columnIdx >= (i32)r.items().size() || columnIdx < 0) {
return false;
}
- result = r.items()[columnIdx].bytes_value();
+ if (r.items()[columnIdx].has_bytes_value()) {
+ result = r.items()[columnIdx].bytes_value();
+ } else if (r.items()[columnIdx].has_text_value()) {
+ result = r.items()[columnIdx].text_value();
+ } else {
+ // its normally for empty strings
+ result = "";
+ }
return true;
}
@@ -75,9 +82,17 @@ bool TDecoderBase::ReadJson(const i32 columnIdx, NJson::TJsonValue& result, cons
if (columnIdx >= (i32)r.items().size() || columnIdx < 0) {
return false;
}
- const TString& s = r.items()[columnIdx].bytes_value();
- if (!NJson::ReadJsonFastTree(s, &result)) {
- ALS_ERROR(0) << "cannot parse json string: " << s;
+ const TString* jsonString = nullptr;
+ if (r.items()[columnIdx].has_bytes_value()) {
+ jsonString = &r.items()[columnIdx].bytes_value();
+ } else if (r.items()[columnIdx].has_text_value()) {
+ jsonString = &r.items()[columnIdx].text_value();
+ } else {
+ ALS_ERROR(0) << "no data for json string";
+ return false;
+ }
+ if (!NJson::ReadJsonFastTree(*jsonString, &result)) {
+ ALS_ERROR(0) << "cannot parse json string: " << *jsonString;
return false;
}
return true;
@@ -87,9 +102,17 @@ bool TDecoderBase::ReadDebugProto(const i32 columnIdx, ::google::protobuf::Messa
if (columnIdx >= (i32)r.items().size() || columnIdx < 0) {
return false;
}
- const TString& s = r.items()[columnIdx].bytes_value();
- if (!::google::protobuf::TextFormat::ParseFromString(s, &result)) {
- ALS_ERROR(0) << "cannot parse proto string: " << s;
+ const TString* jsonString = nullptr;
+ if (r.items()[columnIdx].has_bytes_value()) {
+ jsonString = &r.items()[columnIdx].bytes_value();
+ } else if (r.items()[columnIdx].has_text_value()) {
+ jsonString = &r.items()[columnIdx].text_value();
+ } else {
+ ALS_ERROR(0) << "no data for debug proto string";
+ return false;
+ }
+ if (!::google::protobuf::TextFormat::ParseFromString(*jsonString, &result)) {
+ ALS_ERROR(0) << "cannot parse proto string: " << *jsonString;
return false;
}
return true;
diff --git a/ydb/services/metadata/initializer/behaviour.cpp b/ydb/services/metadata/initializer/behaviour.cpp
index 3485476633..a53180040a 100644
--- a/ydb/services/metadata/initializer/behaviour.cpp
+++ b/ydb/services/metadata/initializer/behaviour.cpp
@@ -22,8 +22,8 @@ IInitializationBehaviour::TPtr TDBObjectBehaviour::ConstructInitializer() const
std::shared_ptr<NKikimr::NMetadata::NModifications::IOperationsManager> TDBObjectBehaviour::ConstructOperationsManager() const {
auto result = std::make_shared<TManager>();
NModifications::TTableSchema schema;
- schema.AddColumn(true, NInternal::TYDBColumn::Bytes(TDBInitialization::TDecoder::ComponentId));
- schema.AddColumn(true, NInternal::TYDBColumn::Bytes(TDBInitialization::TDecoder::ModificationId));
+ schema.AddColumn(true, NInternal::TYDBColumn::Utf8(TDBInitialization::TDecoder::ComponentId));
+ schema.AddColumn(true, NInternal::TYDBColumn::Utf8(TDBInitialization::TDecoder::ModificationId));
schema.AddColumn(false, NInternal::TYDBColumn::UInt32(TDBInitialization::TDecoder::Instant));
result->SetActualSchema(schema);
return result;
diff --git a/ydb/services/metadata/initializer/initializer.cpp b/ydb/services/metadata/initializer/initializer.cpp
index 26905a30e5..d8cd145659 100644
--- a/ydb/services/metadata/initializer/initializer.cpp
+++ b/ydb/services/metadata/initializer/initializer.cpp
@@ -13,12 +13,12 @@ void TInitializer::DoPrepare(IInitializerInput::TPtr controller) const {
{
auto& column = *request.add_columns();
column.set_name(TDBInitialization::TDecoder::ComponentId);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name(TDBInitialization::TDecoder::ModificationId);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
diff --git a/ydb/services/metadata/initializer/object.cpp b/ydb/services/metadata/initializer/object.cpp
index dcc6c41728..966132ec8f 100644
--- a/ydb/services/metadata/initializer/object.cpp
+++ b/ydb/services/metadata/initializer/object.cpp
@@ -20,8 +20,8 @@ bool TDBInitialization::DeserializeFromRecord(const TDecoder& decoder, const Ydb
NInternal::TTableRecord TDBInitialization::SerializeToRecord() const {
NInternal::TTableRecord result;
- result.SetColumn(TDecoder::ComponentId, NInternal::TYDBValue::Bytes(ComponentId));
- result.SetColumn(TDecoder::ModificationId, NInternal::TYDBValue::Bytes(ModificationId));
+ result.SetColumn(TDecoder::ComponentId, NInternal::TYDBValue::Utf8(ComponentId));
+ result.SetColumn(TDecoder::ModificationId, NInternal::TYDBValue::Utf8(ModificationId));
result.SetColumn(TDecoder::Instant, NInternal::TYDBValue::UInt32(Instant.Seconds()));
return result;
}
diff --git a/ydb/services/metadata/manager/modification.h b/ydb/services/metadata/manager/modification.h
index 795826390d..156b23b665 100644
--- a/ydb/services/metadata/manager/modification.h
+++ b/ydb/services/metadata/manager/modification.h
@@ -37,10 +37,10 @@ protected:
return;
}
if (UserToken) {
- Objects.AddColumn(NInternal::TYDBColumn::Bytes("historyUserId"), NInternal::TYDBValue::Bytes(UserToken->GetUserSID()));
+ Objects.AddColumn(NInternal::TYDBColumn::Utf8("historyUserId"), NInternal::TYDBValue::Utf8(UserToken->GetUserSID()));
}
Objects.AddColumn(NInternal::TYDBColumn::UInt64("historyInstant"), NInternal::TYDBValue::UInt64(TActivationContext::Now().MicroSeconds()));
- Objects.AddColumn(NInternal::TYDBColumn::Bytes("historyAction"), NInternal::TYDBValue::Bytes(GetModifyType()));
+ Objects.AddColumn(NInternal::TYDBColumn::Utf8("historyAction"), NInternal::TYDBValue::Utf8(GetModifyType()));
Ydb::Table::ExecuteDataQueryRequest request = Objects.BuildInsertQuery(TObject::GetBehaviour()->GetStorageHistoryTablePath());
request.set_session_id(SessionId);
request.mutable_tx_control()->set_tx_id(TransactionId);
diff --git a/ydb/services/metadata/manager/object.cpp b/ydb/services/metadata/manager/object.cpp
index 34b1137550..9493df23e6 100644
--- a/ydb/services/metadata/manager/object.cpp
+++ b/ydb/services/metadata/manager/object.cpp
@@ -9,12 +9,12 @@ Ydb::Table::CreateTableRequest TBaseObject::AddHistoryTableScheme(const Ydb::Tab
{
auto& column = *result.add_columns();
column.set_name("historyAction");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *result.add_columns();
column.set_name("historyUserId");
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *result.add_columns();
diff --git a/ydb/services/metadata/manager/ydb_value_operator.cpp b/ydb/services/metadata/manager/ydb_value_operator.cpp
index 13abd05f90..783c670616 100644
--- a/ydb/services/metadata/manager/ydb_value_operator.cpp
+++ b/ydb/services/metadata/manager/ydb_value_operator.cpp
@@ -78,24 +78,42 @@ Ydb::Value TYDBValue::NullValue() {
return result;
}
-Ydb::Value TYDBValue::Bytes(const TString& value) {
+Ydb::Value TYDBValue::RawBytes(const TString& value) {
Ydb::Value result;
result.set_bytes_value(value);
return result;
}
-Ydb::Value TYDBValue::Bytes(const TStringBuf& value) {
+Ydb::Value TYDBValue::RawBytes(const TStringBuf& value) {
Ydb::Value result;
result.set_bytes_value(TString(value.data(), value.size()));
return result;
}
-Ydb::Value TYDBValue::Bytes(const char* value) {
+Ydb::Value TYDBValue::RawBytes(const char* value) {
Ydb::Value result;
result.set_bytes_value(TString(value));
return result;
}
+Ydb::Value TYDBValue::Utf8(const TString& value) {
+ Ydb::Value result;
+ result.set_text_value(value);
+ return result;
+}
+
+Ydb::Value TYDBValue::Utf8(const TStringBuf& value) {
+ Ydb::Value result;
+ result.set_text_value(TString(value.data(), value.size()));
+ return result;
+}
+
+Ydb::Value TYDBValue::Utf8(const char* value) {
+ Ydb::Value result;
+ result.set_text_value(TString(value));
+ return result;
+}
+
Ydb::Value TYDBValue::UInt64(const ui64 value) {
Ydb::Value result;
result.set_uint64_value(value);
@@ -108,13 +126,20 @@ Ydb::Value TYDBValue::UInt32(const ui32 value) {
return result;
}
-Ydb::Column TYDBColumn::Bytes(const TString& columnId) {
+Ydb::Column TYDBColumn::RawBytes(const TString& columnId) {
Ydb::Column result;
result.set_name(columnId);
result.mutable_type()->set_type_id(Ydb::Type::STRING);
return result;
}
+Ydb::Column TYDBColumn::Utf8(const TString& columnId) {
+ Ydb::Column result;
+ result.set_name(columnId);
+ result.mutable_type()->set_type_id(Ydb::Type::UTF8);
+ return result;
+}
+
Ydb::Column TYDBColumn::Boolean(const TString& columnId) {
Ydb::Column result;
result.set_name(columnId);
diff --git a/ydb/services/metadata/manager/ydb_value_operator.h b/ydb/services/metadata/manager/ydb_value_operator.h
index 280c603fbb..624e93a782 100644
--- a/ydb/services/metadata/manager/ydb_value_operator.h
+++ b/ydb/services/metadata/manager/ydb_value_operator.h
@@ -6,7 +6,8 @@ namespace NKikimr::NMetadata::NInternal {
class TYDBColumn {
public:
- static Ydb::Column Bytes(const TString& columnId);
+ static Ydb::Column RawBytes(const TString& columnId);
+ static Ydb::Column Utf8(const TString& columnId);
static Ydb::Column Boolean(const TString& columnId);
static Ydb::Column UInt64(const TString& columnId);
static Ydb::Column UInt32(const TString& columnId);
@@ -19,9 +20,12 @@ public:
static bool Compare(const Ydb::Value& l, const Ydb::Value& r);
static TString TypeToString(const Ydb::Type& type);
static Ydb::Value NullValue();
- static Ydb::Value Bytes(const char* value);
- static Ydb::Value Bytes(const TString& value);
- static Ydb::Value Bytes(const TStringBuf& value);
+ static Ydb::Value RawBytes(const char* value);
+ static Ydb::Value RawBytes(const TString& value);
+ static Ydb::Value RawBytes(const TStringBuf& value);
+ static Ydb::Value Utf8(const char* value);
+ static Ydb::Value Utf8(const TString& value);
+ static Ydb::Value Utf8(const TStringBuf& value);
static Ydb::Value UInt64(const ui64 value);
static Ydb::Value UInt32(const ui32 value);
};
diff --git a/ydb/services/metadata/secret/access.cpp b/ydb/services/metadata/secret/access.cpp
index aae13342d0..dcf8b1221b 100644
--- a/ydb/services/metadata/secret/access.cpp
+++ b/ydb/services/metadata/secret/access.cpp
@@ -25,9 +25,9 @@ bool TAccess::DeserializeFromRecord(const TDecoder& decoder, const Ydb::Value& r
NInternal::TTableRecord TAccess::SerializeToRecord() const {
NInternal::TTableRecord result;
- result.SetColumn(TDecoder::OwnerUserId, NInternal::TYDBValue::Bytes(OwnerUserId));
- result.SetColumn(TDecoder::SecretId, NInternal::TYDBValue::Bytes(SecretId));
- result.SetColumn(TDecoder::AccessSID, NInternal::TYDBValue::Bytes(AccessSID));
+ result.SetColumn(TDecoder::OwnerUserId, NInternal::TYDBValue::Utf8(OwnerUserId));
+ result.SetColumn(TDecoder::SecretId, NInternal::TYDBValue::Utf8(SecretId));
+ result.SetColumn(TDecoder::AccessSID, NInternal::TYDBValue::Utf8(AccessSID));
return result;
}
diff --git a/ydb/services/metadata/secret/initializer.cpp b/ydb/services/metadata/secret/initializer.cpp
index db36f1263f..045f83898d 100644
--- a/ydb/services/metadata/secret/initializer.cpp
+++ b/ydb/services/metadata/secret/initializer.cpp
@@ -15,17 +15,17 @@ void TSecretInitializer::DoPrepare(NInitializer::IInitializerInput::TPtr control
{
auto& column = *request.add_columns();
column.set_name(TSecret::TDecoder::OwnerUserId);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name(TSecret::TDecoder::SecretId);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name(TSecret::TDecoder::Value);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
result.emplace_back(new NInitializer::TGenericTableModifier<NRequest::TDialogCreateTable>(request, "create"));
auto hRequest = TSecret::AddHistoryTableScheme(request);
@@ -48,17 +48,17 @@ void TAccessInitializer::DoPrepare(NInitializer::IInitializerInput::TPtr control
{
auto& column = *request.add_columns();
column.set_name(TAccess::TDecoder::OwnerUserId);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name(TAccess::TDecoder::SecretId);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
{
auto& column = *request.add_columns();
column.set_name(TAccess::TDecoder::AccessSID);
- column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
+ column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UTF8);
}
result.emplace_back(new NInitializer::TGenericTableModifier<NRequest::TDialogCreateTable>(request, "create"));
auto hRequest = TAccess::AddHistoryTableScheme(request);
diff --git a/ydb/services/metadata/secret/manager.cpp b/ydb/services/metadata/secret/manager.cpp
index 8642dee62c..a8f7494eff 100644
--- a/ydb/services/metadata/secret/manager.cpp
+++ b/ydb/services/metadata/secret/manager.cpp
@@ -29,17 +29,17 @@ NModifications::TOperationParsingResult TAccessManager::DoBuildPatchFromSettings
if (!sb.TrySplit(':', l, r)) {
return "incorrect objectId format (secretId:accessSID)";
}
- result.SetColumn(TAccess::TDecoder::SecretId, NInternal::TYDBValue::Bytes(l));
- result.SetColumn(TAccess::TDecoder::AccessSID, NInternal::TYDBValue::Bytes(r));
+ result.SetColumn(TAccess::TDecoder::SecretId, NInternal::TYDBValue::Utf8(l));
+ result.SetColumn(TAccess::TDecoder::AccessSID, NInternal::TYDBValue::Utf8(r));
if (!context.GetUserToken()) {
auto it = settings.GetFeatures().find(TAccess::TDecoder::OwnerUserId);
if (it != settings.GetFeatures().end()) {
- result.SetColumn(TAccess::TDecoder::OwnerUserId, NInternal::TYDBValue::Bytes(it->second));
+ result.SetColumn(TAccess::TDecoder::OwnerUserId, NInternal::TYDBValue::Utf8(it->second));
} else {
return "OwnerUserId not defined";
}
} else {
- result.SetColumn(TAccess::TDecoder::OwnerUserId, NInternal::TYDBValue::Bytes(context.GetUserToken()->GetUserSID()));
+ result.SetColumn(TAccess::TDecoder::OwnerUserId, NInternal::TYDBValue::Utf8(context.GetUserToken()->GetUserSID()));
}
return result;
}
@@ -49,12 +49,12 @@ NModifications::TOperationParsingResult TSecretManager::DoBuildPatchFromSettings
if (!context.GetUserToken()) {
auto it = settings.GetFeatures().find(TSecret::TDecoder::OwnerUserId);
if (it != settings.GetFeatures().end()) {
- result.SetColumn(TSecret::TDecoder::OwnerUserId, NInternal::TYDBValue::Bytes(it->second));
+ result.SetColumn(TSecret::TDecoder::OwnerUserId, NInternal::TYDBValue::Utf8(it->second));
} else {
return "OwnerUserId not defined";
}
} else {
- result.SetColumn(TSecret::TDecoder::OwnerUserId, NInternal::TYDBValue::Bytes(context.GetUserToken()->GetUserSID()));
+ result.SetColumn(TSecret::TDecoder::OwnerUserId, NInternal::TYDBValue::Utf8(context.GetUserToken()->GetUserSID()));
}
for (auto&& c : settings.GetObjectId()) {
if (c >= '0' && c <= '9') {
@@ -72,12 +72,12 @@ NModifications::TOperationParsingResult TSecretManager::DoBuildPatchFromSettings
return "incorrect character for secret id: '" + TString(c) + "'";
}
{
- result.SetColumn(TSecret::TDecoder::SecretId, NInternal::TYDBValue::Bytes(settings.GetObjectId()));
+ result.SetColumn(TSecret::TDecoder::SecretId, NInternal::TYDBValue::Utf8(settings.GetObjectId()));
}
{
auto it = settings.GetFeatures().find(TSecret::TDecoder::Value);
if (it != settings.GetFeatures().end()) {
- result.SetColumn(TSecret::TDecoder::Value, NInternal::TYDBValue::Bytes(it->second));
+ result.SetColumn(TSecret::TDecoder::Value, NInternal::TYDBValue::Utf8(it->second));
}
}
return result;
diff --git a/ydb/services/metadata/secret/secret.cpp b/ydb/services/metadata/secret/secret.cpp
index 5e42f4e8e5..7cc57bcfc6 100644
--- a/ydb/services/metadata/secret/secret.cpp
+++ b/ydb/services/metadata/secret/secret.cpp
@@ -21,9 +21,9 @@ bool TSecret::DeserializeFromRecord(const TDecoder& decoder, const Ydb::Value& r
NInternal::TTableRecord TSecret::SerializeToRecord() const {
NInternal::TTableRecord result;
- result.SetColumn(TDecoder::OwnerUserId, NInternal::TYDBValue::Bytes(OwnerUserId));
- result.SetColumn(TDecoder::SecretId, NInternal::TYDBValue::Bytes(SecretId));
- result.SetColumn(TDecoder::Value, NInternal::TYDBValue::Bytes(Value));
+ result.SetColumn(TDecoder::OwnerUserId, NInternal::TYDBValue::Utf8(OwnerUserId));
+ result.SetColumn(TDecoder::SecretId, NInternal::TYDBValue::Utf8(SecretId));
+ result.SetColumn(TDecoder::Value, NInternal::TYDBValue::Utf8(Value));
return result;
}
diff --git a/ydb/services/metadata/service.cpp b/ydb/services/metadata/service.cpp
index 1f8bf69bba..617e8fb40b 100644
--- a/ydb/services/metadata/service.cpp
+++ b/ydb/services/metadata/service.cpp
@@ -9,16 +9,22 @@ NActors::TActorId MakeServiceId(const ui32 nodeId) {
}
void TServiceOperator::Register(const TConfig& config) {
- Singleton<TServiceOperator>()->EnabledFlag = true;
- Singleton<TServiceOperator>()->Path = config.GetPath();
+ auto* service = Singleton<TServiceOperator>();
+ std::unique_lock<std::shared_mutex> lock(service->Lock);
+ service->EnabledFlag = true;
+ service->Path = config.GetPath();
}
bool TServiceOperator::IsEnabled() {
- return Singleton<TServiceOperator>()->EnabledFlag;
+ auto* service = Singleton<TServiceOperator>();
+ std::shared_lock<std::shared_mutex> lock(service->Lock);
+ return service->EnabledFlag;
}
-const TString& TServiceOperator::GetPath() {
- return Singleton<TServiceOperator>()->Path;
+TString TServiceOperator::GetPath() {
+ auto* service = Singleton<TServiceOperator>();
+ std::shared_lock<std::shared_mutex> lock(service->Lock);
+ return service->Path;
}
}
diff --git a/ydb/services/metadata/service.h b/ydb/services/metadata/service.h
index a144249101..9cdb3c255a 100644
--- a/ydb/services/metadata/service.h
+++ b/ydb/services/metadata/service.h
@@ -1,6 +1,7 @@
#pragma once
#include <ydb/services/metadata/abstract/common.h>
#include <library/cpp/actors/core/event_local.h>
+#include <shared_mutex>
namespace NKikimr::NMetadata::NProvider {
@@ -72,12 +73,13 @@ class TConfig;
class TServiceOperator {
private:
friend class TService;
+ std::shared_mutex Lock;
bool EnabledFlag = false;
TString Path = ".metadata";
static void Register(const TConfig& config);
public:
static bool IsEnabled();
- static const TString& GetPath();
+ static TString GetPath();
};
}
diff --git a/ydb/services/persqueue_v1/actors/CMakeLists.darwin.txt b/ydb/services/persqueue_v1/actors/CMakeLists.darwin.txt
index 182006ca30..7887f7ed78 100644
--- a/ydb/services/persqueue_v1/actors/CMakeLists.darwin.txt
+++ b/ydb/services/persqueue_v1/actors/CMakeLists.darwin.txt
@@ -30,6 +30,7 @@ target_link_libraries(services-persqueue_v1-actors PUBLIC
)
target_sources(services-persqueue_v1-actors PRIVATE
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/codecs.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/commit_offset_actor.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/persqueue_utils.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/helpers.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/partition_actor.cpp
diff --git a/ydb/services/persqueue_v1/actors/CMakeLists.linux-aarch64.txt b/ydb/services/persqueue_v1/actors/CMakeLists.linux-aarch64.txt
index be5980b588..9407b949c1 100644
--- a/ydb/services/persqueue_v1/actors/CMakeLists.linux-aarch64.txt
+++ b/ydb/services/persqueue_v1/actors/CMakeLists.linux-aarch64.txt
@@ -31,6 +31,7 @@ target_link_libraries(services-persqueue_v1-actors PUBLIC
)
target_sources(services-persqueue_v1-actors PRIVATE
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/codecs.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/commit_offset_actor.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/persqueue_utils.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/helpers.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/partition_actor.cpp
diff --git a/ydb/services/persqueue_v1/actors/CMakeLists.linux.txt b/ydb/services/persqueue_v1/actors/CMakeLists.linux.txt
index be5980b588..9407b949c1 100644
--- a/ydb/services/persqueue_v1/actors/CMakeLists.linux.txt
+++ b/ydb/services/persqueue_v1/actors/CMakeLists.linux.txt
@@ -31,6 +31,7 @@ target_link_libraries(services-persqueue_v1-actors PUBLIC
)
target_sources(services-persqueue_v1-actors PRIVATE
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/codecs.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/commit_offset_actor.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/persqueue_utils.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/helpers.cpp
${CMAKE_SOURCE_DIR}/ydb/services/persqueue_v1/actors/partition_actor.cpp
diff --git a/ydb/services/persqueue_v1/actors/commit_offset_actor.cpp b/ydb/services/persqueue_v1/actors/commit_offset_actor.cpp
new file mode 100644
index 0000000000..a06c054b56
--- /dev/null
+++ b/ydb/services/persqueue_v1/actors/commit_offset_actor.cpp
@@ -0,0 +1,190 @@
+#include "commit_offset_actor.h"
+
+#include "persqueue_utils.h"
+#include "read_init_auth_actor.h"
+
+#include <ydb/core/client/server/msgbus_server_persqueue.h>
+
+#include <ydb/public/api/protos/ydb_persqueue_v1.pb.h>
+#include <ydb/public/lib/base/msgbus_status.h>
+
+namespace NKikimr::NGRpcProxy::V1 {
+
+using namespace PersQueue::V1;
+
+
+TCommitOffsetActor::TCommitOffsetActor(
+ TEvCommitOffsetRequest* request, const NPersQueue::TTopicsListController& topicsHandler,
+ const TActorId& schemeCache, const TActorId& newSchemeCache,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters
+)
+ : TBase(request)
+ , SchemeCache(schemeCache)
+ , NewSchemeCache(newSchemeCache)
+ , AuthInitActor()
+ , Counters(counters)
+ , TopicsHandler(topicsHandler)
+{
+ Y_ASSERT(request);
+}
+
+
+
+TCommitOffsetActor::~TCommitOffsetActor() = default;
+
+
+void TCommitOffsetActor::Bootstrap(const TActorContext& ctx) {
+ TBase::Bootstrap(ctx);
+ Become(&TThis::StateFunc);
+
+ auto request = dynamic_cast<const Ydb::Topic::CommitOffsetRequest*>(GetProtoRequest());
+ Y_VERIFY(request);
+ ClientId = NPersQueue::ConvertNewConsumerName(request->consumer(), ctx);
+ PartitionId = request->Getpartition_id();
+
+ TIntrusivePtr<NACLib::TUserToken> token;
+ if (Request_->GetSerializedToken().empty()) {
+ if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
+ AnswerError("Unauthenticated access is forbidden, please provide credentials", PersQueue::ErrorCode::ACCESS_DENIED, ctx);
+ return;
+ }
+ } else {
+ token = new NACLib::TUserToken(Request_->GetSerializedToken());
+ }
+
+ THashSet<TString> topicsToResolve;
+
+ if (request->path().empty()) {
+ AnswerError("empty topic in commit offset request", PersQueue::ErrorCode::BAD_REQUEST, ctx);
+ return;
+ }
+ topicsToResolve.insert(request->path());
+
+ auto topicsList = TopicsHandler.GetReadTopicsList(
+ topicsToResolve, true, Request().GetDatabaseName().GetOrElse(TString())
+ );
+ if (!topicsList.IsValid) {
+ return AnswerError(
+ topicsList.Reason,
+ PersQueue::ErrorCode::BAD_REQUEST, ctx
+ );
+ }
+
+ AuthInitActor = ctx.Register(new TReadInitAndAuthActor(
+ ctx, ctx.SelfID, ClientId, 0, TString("read_info:") + Request().GetPeerName(),
+ SchemeCache, NewSchemeCache, Counters, token, topicsList, TopicsHandler.GetLocalCluster()
+ ));
+}
+
+
+void TCommitOffsetActor::Die(const TActorContext& ctx) {
+ if (PipeClient)
+ NTabletPipe::CloseClient(ctx, PipeClient);
+
+ ctx.Send(AuthInitActor, new TEvents::TEvPoisonPill());
+
+ TActorBootstrapped<TCommitOffsetActor>::Die(ctx);
+}
+
+void TCommitOffsetActor::Handle(TEvPQProxy::TEvAuthResultOk::TPtr& ev, const TActorContext& ctx) {
+
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_READ_PROXY, "CommitOffset auth ok, got " << ev->Get()->TopicAndTablets.size() << " topics");
+ TopicAndTablets = std::move(ev->Get()->TopicAndTablets);
+ if (TopicAndTablets.empty()) {
+ AnswerError("empty list of topics", PersQueue::ErrorCode::UNKNOWN_TOPIC, ctx);
+ return;
+ }
+ Y_VERIFY(TopicAndTablets.size() == 1);
+ auto& [topic, topicInitInfo] = *TopicAndTablets.begin();
+
+ // AnswerError("test auth ok", Ydb::PersQueue::ErrorCode::ERROR, ctx);
+
+ if (topicInitInfo.PartitionIdToTabletId.find(PartitionId) == topicInitInfo.PartitionIdToTabletId.end()) {
+ AnswerError("partition id not found in topic", PersQueue::ErrorCode::WRONG_PARTITION_NUMBER, ctx);
+ }
+
+ ui64 tabletId = topicInitInfo.PartitionIdToTabletId.at(PartitionId);
+
+ NTabletPipe::TClientConfig clientConfig;
+ clientConfig.RetryPolicy = {
+ .RetryLimitCount = 6,
+ .MinRetryTime = TDuration::MilliSeconds(10),
+ .MaxRetryTime = TDuration::MilliSeconds(100),
+ .BackoffMultiplier = 2,
+ .DoFirstRetryInstantly = true
+ };
+
+ PipeClient = ctx.Register(NTabletPipe::CreateClient(ctx.SelfID, tabletId, clientConfig));
+
+ auto client_req = dynamic_cast<const Ydb::Topic::CommitOffsetRequest*>(GetProtoRequest());
+
+ NKikimrClient::TPersQueueRequest request;
+ request.MutablePartitionRequest()->SetTopic(topicInitInfo.TopicNameConverter->GetPrimaryPath());
+ request.MutablePartitionRequest()->SetPartition(client_req->partition_id());
+
+ Y_VERIFY(PipeClient);
+
+ auto commit = request.MutablePartitionRequest()->MutableCmdSetClientOffset();
+ commit->SetClientId(ClientId);
+ commit->SetOffset(client_req->offset());
+ commit->SetStrict(true);
+
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_READ_PROXY, "strict CommitOffset, partition " << client_req->partition_id()
+ << " committing to position " << client_req->offset() /*<< " prev " << CommittedOffset
+ << " end " << EndOffset << " by cookie " << readId*/);
+
+ TAutoPtr<TEvPersQueue::TEvRequest> req(new TEvPersQueue::TEvRequest);
+ req->Record.Swap(&request);
+
+ NTabletPipe::SendData(ctx, PipeClient, req.Release());
+}
+
+
+void TCommitOffsetActor::Handle(TEvPersQueue::TEvResponse::TPtr& ev, const TActorContext& ctx) {
+ if (ev->Get()->Record.GetStatus() != NMsgBusProxy::MSTATUS_OK) {
+ return AnswerError(ev->Get()->Record.GetErrorReason(), PersQueue::ErrorCode::ERROR, ctx);
+ }
+
+ // Convert to correct response.
+
+ const auto& partitionResult = ev->Get()->Record.GetPartitionResponse();
+ Y_VERIFY(!partitionResult.HasCmdReadResult());
+
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_READ_PROXY, "CommitOffset, commit done.");
+
+ Ydb::Topic::CommitOffsetResult result;
+ Request().SendResult(result, Ydb::StatusIds::SUCCESS);
+ Die(ctx);
+}
+
+
+void TCommitOffsetActor::AnswerError(const TString& errorReason, const PersQueue::ErrorCode::ErrorCode errorCode, const NActors::TActorContext& ctx) {
+
+ Ydb::Topic::CommitOffsetResponse response;
+ response.mutable_operation()->set_ready(true);
+ auto issue = response.mutable_operation()->add_issues();
+ FillIssue(issue, errorCode, errorReason);
+ response.mutable_operation()->set_status(ConvertPersQueueInternalCodeToStatus(errorCode));
+ Reply(ConvertPersQueueInternalCodeToStatus(errorCode), response.operation().issues(), ctx);
+}
+
+
+void TCommitOffsetActor::Handle(TEvPQProxy::TEvCloseSession::TPtr& ev, const TActorContext& ctx) {
+ AnswerError(ev->Get()->Reason, ev->Get()->ErrorCode, ctx);
+}
+
+void TCommitOffsetActor::Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActorContext& ctx) {
+ TEvTabletPipe::TEvClientConnected *msg = ev->Get();
+
+ if (msg->Status != NKikimrProto::OK) {
+ AnswerError(TStringBuilder() <<"pipe to tablet is dead" << msg->TabletId, PersQueue::ErrorCode::TABLET_PIPE_DISCONNECTED, ctx);
+ return;
+ }
+}
+
+void TCommitOffsetActor::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext& ctx) {
+ AnswerError(TStringBuilder() <<"pipe to tablet destroyed" << ev->Get()->TabletId, PersQueue::ErrorCode::TABLET_PIPE_DISCONNECTED, ctx);
+}
+
+
+}
diff --git a/ydb/services/persqueue_v1/actors/commit_offset_actor.h b/ydb/services/persqueue_v1/actors/commit_offset_actor.h
new file mode 100644
index 0000000000..6eefc867eb
--- /dev/null
+++ b/ydb/services/persqueue_v1/actors/commit_offset_actor.h
@@ -0,0 +1,89 @@
+#pragma once
+
+#include "events.h"
+
+#include <ydb/core/grpc_services/rpc_deferrable.h>
+#include <ydb/core/client/server/msgbus_server_pq_metacache.h>
+
+#include <ydb/core/persqueue/events/global.h>
+
+
+namespace NKikimr::NGRpcProxy::V1 {
+
+using namespace NKikimr::NGRpcService;
+
+class TCommitOffsetActor : public TRpcOperationRequestActor<TCommitOffsetActor, TEvCommitOffsetRequest> {
+
+ using TBase = TRpcOperationRequestActor<TCommitOffsetActor, TEvCommitOffsetRequest>;
+
+ using TEvDescribeTopicsResponse = NMsgBusProxy::NPqMetaCacheV2::TEvPqNewMetaCache::TEvDescribeTopicsResponse;
+ using TEvDescribeTopicsRequest = NMsgBusProxy::NPqMetaCacheV2::TEvPqNewMetaCache::TEvDescribeTopicsRequest;
+
+public:
+ static constexpr ui32 MAX_PIPE_RESTARTS = 100; //after 100 restarts without progress kill session
+
+public:
+ TCommitOffsetActor(
+ NKikimr::NGRpcService::TEvCommitOffsetRequest* request, const NPersQueue::TTopicsListController& topicsHandler,
+ const NActors::TActorId& schemeCache, const NActors::TActorId& newSchemeCache,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters
+ );
+ ~TCommitOffsetActor();
+
+ void Bootstrap(const NActors::TActorContext& ctx);
+
+
+ static constexpr NKikimrServices::TActivity::EType ActorActivityType() { return NKikimrServices::TActivity::FRONT_PQ_COMMIT; }
+
+ bool HasCancelOperation() {
+ return false;
+ }
+
+private:
+
+ void Die(const NActors::TActorContext& ctx) override;
+
+ STFUNC(StateFunc) {
+ switch (ev->GetTypeRewrite()) {
+ HFunc(TEvPQProxy::TEvAuthResultOk, Handle); // from auth actor
+ HFunc(TEvPQProxy::TEvCloseSession, Handle); // from auth actor
+
+ HFunc(TEvTabletPipe::TEvClientConnected, Handle);
+ HFunc(TEvTabletPipe::TEvClientDestroyed, Handle);
+
+ HFunc(TEvPersQueue::TEvResponse, Handle);
+ default:
+ break;
+ };
+ }
+
+ void Handle(TEvPQProxy::TEvCloseSession::TPtr& ev, const NActors::TActorContext& ctx);
+ void Handle(TEvPQProxy::TEvAuthResultOk::TPtr& ev, const NActors::TActorContext& ctx);
+
+ void Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const NActors::TActorContext& ctx);
+ void Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const NActors::TActorContext& ctx);
+
+ void Handle(TEvPersQueue::TEvResponse::TPtr& ev, const TActorContext& ctx);
+
+ void AnswerError(const TString& errorReason, const PersQueue::ErrorCode::ErrorCode errorCode, const NActors::TActorContext& ctx);
+ void ProcessAnswers(const TActorContext& ctx);
+
+private:
+ TActorId SchemeCache;
+ TActorId NewSchemeCache;
+
+ TActorId AuthInitActor;
+
+ TTopicInitInfoMap TopicAndTablets;
+
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> Counters;
+
+ TString ClientId;
+ ui64 PartitionId;
+
+ TActorId PipeClient;
+
+ NPersQueue::TTopicsListController TopicsHandler;
+};
+
+}
diff --git a/ydb/services/persqueue_v1/actors/partition_actor.cpp b/ydb/services/persqueue_v1/actors/partition_actor.cpp
index d1b18bf5a2..402a93cf51 100644
--- a/ydb/services/persqueue_v1/actors/partition_actor.cpp
+++ b/ydb/services/persqueue_v1/actors/partition_actor.cpp
@@ -440,7 +440,9 @@ void TPartitionActor::Handle(TEvPersQueue::TEvResponse::TPtr& ev, const TActorCo
if (ev->Get()->Record.HasErrorCode() && ev->Get()->Record.GetErrorCode() != NPersQueue::NErrorCode::OK) {
const auto errorCode = ev->Get()->Record.GetErrorCode();
- if (errorCode == NPersQueue::NErrorCode::WRONG_COOKIE || errorCode == NPersQueue::NErrorCode::BAD_REQUEST) {
+ if (errorCode == NPersQueue::NErrorCode::WRONG_COOKIE
+ || errorCode == NPersQueue::NErrorCode::BAD_REQUEST
+ || errorCode == NPersQueue::NErrorCode::READ_ERROR_NO_SESSION) {
Counters.Errors.Inc();
ctx.Send(ParentId, new TEvPQProxy::TEvCloseSession("status is not ok: " + ev->Get()->Record.GetErrorReason(), ConvertOldCode(ev->Get()->Record.GetErrorCode())));
} else {
@@ -925,6 +927,7 @@ void TPartitionActor::Handle(TEvPQProxy::TEvRead::TPtr& ev, const TActorContext&
auto read = request.MutablePartitionRequest()->MutableCmdRead();
read->SetClientId(ClientId);
read->SetClientDC(ClientDC);
+ read->SetSessionId(Session);
if (req->MaxCount) {
read->SetCount(req->MaxCount);
}
diff --git a/ydb/services/persqueue_v1/actors/persqueue_utils.cpp b/ydb/services/persqueue_v1/actors/persqueue_utils.cpp
index 1b286f6c3d..8ca421a3e9 100644
--- a/ydb/services/persqueue_v1/actors/persqueue_utils.cpp
+++ b/ydb/services/persqueue_v1/actors/persqueue_utils.cpp
@@ -94,6 +94,7 @@ Ydb::StatusIds::StatusCode ConvertPersQueueInternalCodeToStatus(const Ydb::PersQ
return Ydb::StatusIds::SUCCESS;
case INITIALIZING:
case CLUSTER_DISABLED:
+ case TABLET_PIPE_DISCONNECTED:
return Ydb::StatusIds::UNAVAILABLE;
case PREFERRED_CLUSTER_MISMATCHED:
return Ydb::StatusIds::ABORTED;
@@ -114,6 +115,7 @@ Ydb::StatusIds::StatusCode ConvertPersQueueInternalCodeToStatus(const Ydb::PersQ
case READ_ERROR_TOO_SMALL_OFFSET:
case READ_ERROR_TOO_BIG_OFFSET:
case SET_OFFSET_ERROR_COMMIT_TO_FUTURE:
+ case SET_OFFSET_ERROR_COMMIT_TO_PAST:
case READ_NOT_DONE:
return Ydb::StatusIds::GENERIC_ERROR;
case TABLET_IS_DROPPED:
diff --git a/ydb/services/persqueue_v1/actors/persqueue_utils.h b/ydb/services/persqueue_v1/actors/persqueue_utils.h
index 1442536e6b..ea90f8b427 100644
--- a/ydb/services/persqueue_v1/actors/persqueue_utils.h
+++ b/ydb/services/persqueue_v1/actors/persqueue_utils.h
@@ -61,6 +61,7 @@ static inline bool InternalErrorCode(Ydb::PersQueue::ErrorCode::ErrorCode errorC
case Ydb::PersQueue::ErrorCode::INITIALIZING:
case Ydb::PersQueue::ErrorCode::OVERLOAD:
case Ydb::PersQueue::ErrorCode::WRITE_ERROR_DISK_IS_FULL:
+ case Ydb::PersQueue::ErrorCode::TABLET_PIPE_DISCONNECTED:
return true;
default:
return false;
diff --git a/ydb/services/persqueue_v1/actors/read_info_actor.cpp b/ydb/services/persqueue_v1/actors/read_info_actor.cpp
index 1147c9f989..6cfe69b348 100644
--- a/ydb/services/persqueue_v1/actors/read_info_actor.cpp
+++ b/ydb/services/persqueue_v1/actors/read_info_actor.cpp
@@ -44,13 +44,13 @@ void TReadInfoActor::Bootstrap(const TActorContext& ctx) {
bool readOnlyLocal = request->get_only_original();
TIntrusivePtr<NACLib::TUserToken> token;
- if (Request_->GetInternalToken().empty()) {
+ if (Request_->GetSerializedToken().empty()) {
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
AnswerError("Unauthenticated access is forbidden, please provide credentials", PersQueue::ErrorCode::ACCESS_DENIED, ctx);
return;
}
} else {
- token = new NACLib::TUserToken(Request_->GetInternalToken());
+ token = new NACLib::TUserToken(Request_->GetSerializedToken());
}
THashSet<TString> topicsToResolve;
diff --git a/ydb/services/persqueue_v1/actors/read_init_auth_actor.cpp b/ydb/services/persqueue_v1/actors/read_init_auth_actor.cpp
index 587dcf9042..d864f00f1f 100644
--- a/ydb/services/persqueue_v1/actors/read_init_auth_actor.cpp
+++ b/ydb/services/persqueue_v1/actors/read_init_auth_actor.cpp
@@ -12,7 +12,7 @@ namespace NKikimr::NGRpcProxy::V1 {
TReadInitAndAuthActor::TReadInitAndAuthActor(
const TActorContext& ctx, const TActorId& parentId, const TString& clientId, const ui64 cookie,
const TString& session, const NActors::TActorId& metaCache, const NActors::TActorId& newSchemeCache,
- TIntrusivePtr<::NMonitoring::TDynamicCounters> counters, TIntrusivePtr<NACLib::TUserToken> token,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters, TIntrusiveConstPtr<NACLib::TUserToken> token,
const NPersQueue::TTopicsToConverter& topics, const TString& localCluster
)
: ParentId(parentId)
@@ -39,7 +39,7 @@ void TReadInitAndAuthActor::Bootstrap(const TActorContext &ctx) {
LOG_DEBUG_S(ctx, NKikimrServices::PQ_READ_PROXY, PQ_LOG_PREFIX << " auth for : " << ClientId);
Become(&TThis::StateFunc);
DoCheckACL = AppData(ctx)->PQConfig.GetCheckACL() && Token;
- DescribeTopics(ctx);
+ DescribeTopics(ctx, true);
}
void TReadInitAndAuthActor::DescribeTopics(const NActors::TActorContext& ctx, bool showPrivate) {
@@ -101,6 +101,11 @@ bool TReadInitAndAuthActor::ProcessTopicSchemeCacheResponse(
topicsIter->second.DbPath = pqDescr.GetPQTabletConfig().GetYdbDatabasePath();
topicsIter->second.IsServerless = entry.DomainInfo->IsServerless();
+ for (const auto& partitionDescription : pqDescr.GetPartitions()) {
+ topicsIter->second.PartitionIdToTabletId[partitionDescription.GetPartitionId()] =
+ partitionDescription.GetTabletId();
+ }
+
if (!topicsIter->second.DiscoveryConverter->IsValid()) {
TString errorReason = Sprintf("Internal server error with topic '%s', Marker# PQ503",
topicsIter->second.DiscoveryConverter->GetPrintableString().c_str());
@@ -265,7 +270,7 @@ void TReadInitAndAuthActor::FinishInitialization(const TActorContext& ctx) {
TTopicInitInfoMap res;
for (auto& [name, holder] : Topics) {
res.insert(std::make_pair(name, TTopicInitInfo{
- holder.FullConverter, holder.TabletID, holder.CloudId, holder.DbId, holder.DbPath, holder.IsServerless, holder.FolderId, holder.MeteringMode
+ holder.FullConverter, holder.TabletID, holder.CloudId, holder.DbId, holder.DbPath, holder.IsServerless, holder.FolderId, holder.MeteringMode, holder.PartitionIdToTabletId
}));
}
ctx.Send(ParentId, new TEvPQProxy::TEvAuthResultOk(std::move(res)));
diff --git a/ydb/services/persqueue_v1/actors/read_init_auth_actor.h b/ydb/services/persqueue_v1/actors/read_init_auth_actor.h
index 2891c8ff1f..23245cc494 100644
--- a/ydb/services/persqueue_v1/actors/read_init_auth_actor.h
+++ b/ydb/services/persqueue_v1/actors/read_init_auth_actor.h
@@ -21,7 +21,7 @@ class TReadInitAndAuthActor : public NActors::TActorBootstrapped<TReadInitAndAut
public:
TReadInitAndAuthActor(const TActorContext& ctx, const TActorId& parentId, const TString& clientId, const ui64 cookie,
const TString& session, const NActors::TActorId& schemeCache, const NActors::TActorId& newSchemeCache,
- TIntrusivePtr<::NMonitoring::TDynamicCounters> counters, TIntrusivePtr<NACLib::TUserToken> token,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters, TIntrusiveConstPtr<NACLib::TUserToken> token,
const NPersQueue::TTopicsToConverter& topics, const TString& localCluster);
~TReadInitAndAuthActor();
@@ -72,7 +72,7 @@ private:
const TString ClientId;
const TString ClientPath;
- TIntrusivePtr<NACLib::TUserToken> Token;
+ TIntrusiveConstPtr<NACLib::TUserToken> Token;
THashMap<TString, TTopicHolder> Topics; // topic -> info
diff --git a/ydb/services/persqueue_v1/actors/read_session_actor.h b/ydb/services/persqueue_v1/actors/read_session_actor.h
index 8dde6b616f..a402a7e5bb 100644
--- a/ydb/services/persqueue_v1/actors/read_session_actor.h
+++ b/ydb/services/persqueue_v1/actors/read_session_actor.h
@@ -303,7 +303,7 @@ private:
TActorId NewSchemeCache;
TActorId AuthInitActor;
- TIntrusivePtr<NACLib::TUserToken> Token;
+ TIntrusiveConstPtr<NACLib::TUserToken> Token;
TString ClientId;
TString ClientPath;
diff --git a/ydb/services/persqueue_v1/actors/read_session_actor.ipp b/ydb/services/persqueue_v1/actors/read_session_actor.ipp
index 0c772d4c8b..d40e6c6eb4 100644
--- a/ydb/services/persqueue_v1/actors/read_session_actor.ipp
+++ b/ydb/services/persqueue_v1/actors/read_session_actor.ipp
@@ -248,7 +248,7 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(typename IContext::TEvReadF
if (const auto token = request.update_token_request().token()) { // TODO: refresh token here
ctx.Send(ctx.SelfID, new TEvPQProxy::TEvAuth(token));
}
- break;
+ return (void)ReadFromStreamOrDie(ctx);
}
default: {
@@ -662,6 +662,7 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(typename TEvReadInit::TPtr&
return ::google::protobuf::util::TimeUtil::TimestampToMilliseconds(settings.read_from());
}
};
+ auto database = Request->GetDatabaseName().GetOrElse(TString());
for (const auto& topic : init.topics_read_settings()) {
const TString path = getTopicPath(topic);
@@ -677,7 +678,7 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(typename TEvReadInit::TPtr&
TopicsToResolve.insert(path);
}
- if (Request->GetInternalToken().empty()) {
+ if (Request->GetSerializedToken().empty()) {
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
return CloseSession(PersQueue::ErrorCode::ACCESS_DENIED,
"unauthenticated access is forbidden, please provide credentials", ctx);
@@ -685,11 +686,10 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(typename TEvReadInit::TPtr&
} else {
Y_VERIFY(Request->GetYdbToken());
Auth = *(Request->GetYdbToken());
- Token = new NACLib::TUserToken(Request->GetInternalToken());
+ Token = new NACLib::TUserToken(Request->GetSerializedToken());
}
- TopicsList = TopicsHandler.GetReadTopicsList(TopicsToResolve, ReadOnlyLocal,
- Request->GetDatabaseName().GetOrElse(TString()));
+ TopicsList = TopicsHandler.GetReadTopicsList(TopicsToResolve, ReadOnlyLocal, database);
if (!TopicsList.IsValid) {
return CloseSession(PersQueue::ErrorCode::BAD_REQUEST, TopicsList.Reason, ctx);
@@ -813,16 +813,16 @@ void TReadSessionActor<UseMigrationProtocol>::SetupTopicCounters(const NPersQueu
{
auto& topicCounters = TopicCounters[topic->GetInternalName()];
auto subGroup = NPersQueue::GetCountersForTopic(Counters, isServerless);
- auto aggr = NPersQueue::GetLabelsForTopic(topic, cloudId, dbId, dbPath, folderId);
- const TVector<std::pair<TString, TString>> cons{{"consumer", ClientPath}};
+ auto subgroups = NPersQueue::GetSubgroupsForTopic(topic, cloudId, dbId, dbPath, folderId);
+ subgroups.push_back({"consumer", ClientPath});
- topicCounters.PartitionsLocked = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.partition_session.started"}, true, "name");
- topicCounters.PartitionsReleased = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.partition_session.stopped"}, true, "name");
- topicCounters.PartitionsToBeReleased = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.partition_session.stopping_count"}, false, "name");
- topicCounters.PartitionsToBeLocked = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.partition_session.starting_count"}, false, "name");
- topicCounters.PartitionsInfly = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.partition_session.count"}, false, "name");
- topicCounters.Errors = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.partition_session.errors"}, true, "name");
- topicCounters.Commits = NPQ::TMultiCounter(subGroup, aggr, cons, {"api.grpc.topic.stream_read.commits"}, true, "name");
+ topicCounters.PartitionsLocked = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.partition_session.started"}, true, "name");
+ topicCounters.PartitionsReleased = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.partition_session.stopped"}, true, "name");
+ topicCounters.PartitionsToBeReleased = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.partition_session.stopping_count"}, false, "name");
+ topicCounters.PartitionsToBeLocked = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.partition_session.starting_count"}, false, "name");
+ topicCounters.PartitionsInfly = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.partition_session.count"}, false, "name");
+ topicCounters.Errors = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.partition_session.errors"}, true, "name");
+ topicCounters.Commits = NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_read.commits"}, true, "name");
topicCounters.CommitLatency = CommitLatency;
topicCounters.SLIBigLatency = SLIBigLatency;
@@ -1074,8 +1074,14 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(TEvPQProxy::TEvPartitionSta
result.mutable_assigned()->set_read_offset(ev->Get()->Offset);
result.mutable_assigned()->set_end_offset(ev->Get()->EndOffset);
} else {
- // TODO: GetFederationPath() -> GetFederationPathWithDC()
- result.mutable_start_partition_session_request()->mutable_partition_session()->set_path(it->second.Topic->GetFederationPath());
+ auto database = Request->GetDatabaseName().GetOrElse(AppData(ctx)->PQConfig.GetRoot());
+
+ if (AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen() || database == AppData(ctx)->PQConfig.GetRoot()) {
+ result.mutable_start_partition_session_request()->mutable_partition_session()->set_path(it->second.Topic->GetFederationPathWithDC());
+ } else {
+ result.mutable_start_partition_session_request()->mutable_partition_session()->set_path(it->second.Topic->GetModernName());
+ }
+
result.mutable_start_partition_session_request()->mutable_partition_session()->set_partition_id(ev->Get()->Partition.Partition);
result.mutable_start_partition_session_request()->mutable_partition_session()->set_partition_session_id(it->first);
@@ -1402,8 +1408,8 @@ void TReadSessionActor<UseMigrationProtocol>::ProcessBalancerDead(ui64 tabletId,
template <bool UseMigrationProtocol>
void TReadSessionActor<UseMigrationProtocol>::Handle(NGRpcService::TGRpcRequestProxy::TEvRefreshTokenResponse::TPtr& ev , const TActorContext& ctx) {
- if (ev->Get()->Authenticated && !ev->Get()->InternalToken.empty()) {
- Token = new NACLib::TUserToken(ev->Get()->InternalToken);
+ if (ev->Get()->Authenticated && ev->Get()->InternalToken && !ev->Get()->InternalToken->GetSerializedToken().empty()) {
+ Token = ev->Get()->InternalToken;
ForceACLCheck = true;
if constexpr (!UseMigrationProtocol) {
diff --git a/ydb/services/persqueue_v1/actors/schema_actors.cpp b/ydb/services/persqueue_v1/actors/schema_actors.cpp
index 0eddfe0cf2..f9bdd72464 100644
--- a/ydb/services/persqueue_v1/actors/schema_actors.cpp
+++ b/ydb/services/persqueue_v1/actors/schema_actors.cpp
@@ -237,14 +237,17 @@ void TAddReadRuleActor::ModifyPersqueueConfig(
rule.set_version(selfInfo.GetVersion().GetPQVersion());
}
auto serviceTypes = GetSupportedClientServiceTypes(ctx);
- TString error = AddReadRuleToConfig(pqConfig, rule, serviceTypes, ctx);
- auto status = error.empty() ? CheckConfig(*pqConfig, serviceTypes, error, ctx, Ydb::StatusIds::ALREADY_EXISTS)
+
+ TString error;
+ auto messageAndCode = AddReadRuleToConfig(pqConfig, rule, serviceTypes, ctx);
+ auto status = messageAndCode.PQCode == Ydb::PersQueue::ErrorCode::OK ?
+ CheckConfig(*pqConfig, serviceTypes, messageAndCode.Message, ctx, Ydb::StatusIds::ALREADY_EXISTS)
: Ydb::StatusIds::BAD_REQUEST;
if (status != Ydb::StatusIds::SUCCESS) {
return ReplyWithError(status,
status == Ydb::StatusIds::ALREADY_EXISTS ? Ydb::PersQueue::ErrorCode::OK
: Ydb::PersQueue::ErrorCode::BAD_REQUEST,
- error, ctx);
+ messageAndCode.Message, ctx);
}
}
@@ -333,7 +336,6 @@ void TPQCreateTopicActor::FillProposeRequest(TEvTxUserProxy::TEvProposeTransacti
{
TString error;
-
auto status = FillProposeRequestImpl(name, GetProtoRequest()->settings(), modifyScheme, ctx, false, error,
workingDir, proposal.Record.GetDatabaseName(), LocalCluster);
if (!error.empty()) {
@@ -367,7 +369,7 @@ void TCreateTopicActor::FillProposeRequest(TEvTxUserProxy::TEvProposeTransaction
TString error;
auto status = FillProposeRequestImpl(name, *GetProtoRequest(), modifyScheme, ctx, error,
- workingDir, proposal.Record.GetDatabaseName(), LocalCluster);
+ workingDir, proposal.Record.GetDatabaseName(), LocalCluster).YdbCode;
if (!error.empty()) {
Request_->RaiseIssue(FillIssue(error, Ydb::PersQueue::ErrorCode::BAD_REQUEST));
diff --git a/ydb/services/persqueue_v1/actors/write_session_actor.h b/ydb/services/persqueue_v1/actors/write_session_actor.h
index c2ef61c8f3..c52a40da55 100644
--- a/ydb/services/persqueue_v1/actors/write_session_actor.h
+++ b/ydb/services/persqueue_v1/actors/write_session_actor.h
@@ -267,7 +267,7 @@ private:
NKikimr::NPQ::TMultiCounter Errors;
std::vector<NKikimr::NPQ::TMultiCounter> CodecCounters;
- TIntrusivePtr<NACLib::TUserToken> Token;
+ TIntrusiveConstPtr<NACLib::TUserToken> Token;
TString Auth;
// Got 'update_token_request', authentication or authorization in progress,
// or 'update_token_response' is not sent yet.
diff --git a/ydb/services/persqueue_v1/actors/write_session_actor.ipp b/ydb/services/persqueue_v1/actors/write_session_actor.ipp
index 6887857823..e563fb5241 100644
--- a/ydb/services/persqueue_v1/actors/write_session_actor.ipp
+++ b/ydb/services/persqueue_v1/actors/write_session_actor.ipp
@@ -445,7 +445,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(typename TEvWriteInit::TPt
UserAgent = "pqv1 server";
LogSession(ctx);
- if (Request->GetInternalToken().empty()) { // session without auth
+ if (Request->GetSerializedToken().empty()) { // session without auth
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
Request->ReplyUnauthenticated("Unauthenticated access is forbidden, please provide credentials");
Die(ctx);
@@ -531,12 +531,11 @@ void TWriteSessionActor<UseMigrationProtocol>::SetupCounters(const TString& clou
//now topic is checked, can create group for real topic, not garbage
auto subGroup = NPersQueue::GetCountersForTopic(Counters, isServerless);
- auto aggr = NPersQueue::GetLabelsForTopic(FullConverter, cloudId, dbId, dbPath, folderId);
-
- SessionsCreated = NKikimr::NPQ::TMultiCounter(subGroup, aggr, {}, {"api.grpc.topic.stream_write.sessions_created"}, true, "name");
- SessionsActive = NKikimr::NPQ::TMultiCounter(subGroup, aggr, {}, {"api.grpc.topic.stream_write.sessions_active_count"}, false, "name");
- Errors = NKikimr::NPQ::TMultiCounter(subGroup, aggr, {}, {"api.grpc.topic.stream_write.errors"}, true, "name");
+ auto subgroups = NPersQueue::GetSubgroupsForTopic(FullConverter, cloudId, dbId, dbPath, folderId);
+ SessionsCreated = NKikimr::NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_write.sessions_created"}, true, "name");
+ SessionsActive = NKikimr::NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_write.sessions_active_count"}, false, "name");
+ Errors = NKikimr::NPQ::TMultiCounter(subGroup, {}, subgroups, {"api.grpc.topic.stream_write.errors"}, true, "name");
SessionsCreated.Inc();
SessionsActive.Inc();
@@ -577,6 +576,12 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvDescribeTopicsResponse:
CloseSession(errorReason, PersQueue::ErrorCode::ERROR, ctx);
return;
}
+ if (!AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen() && !description.GetPQTabletConfig().GetLocalDC()) {
+ errorReason = Sprintf("Write to mirrored topic '%s' is forbidden", DiscoveryConverter->GetPrintableString().c_str());
+ CloseSession(errorReason, PersQueue::ErrorCode::BAD_REQUEST, ctx);
+ return;
+ }
+
FullConverter = DiscoveryConverter->UpgradeToFullConverter(InitialPQTabletConfig,
AppData(ctx)->PQConfig.GetTestDatabaseRoot());
InitAfterDiscovery(ctx);
@@ -608,7 +613,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvDescribeTopicsResponse:
SetMeteringMode(meteringMode);
- if (Request->GetInternalToken().empty()) { // session without auth
+ if (Request->GetSerializedToken().empty()) { // session without auth
if (AppData(ctx)->PQConfig.GetRequireCredentialsInNewProtocol()) {
Request->ReplyUnauthenticated("Unauthenticated access is forbidden, please provide credentials");
Die(ctx);
@@ -620,7 +625,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvDescribeTopicsResponse:
} else {
Y_VERIFY(Request->GetYdbToken());
Auth = *Request->GetYdbToken();
- Token = new NACLib::TUserToken(Request->GetInternalToken());
+ Token = new NACLib::TUserToken(Request->GetSerializedToken());
if (FirstACLCheck && IsQuotaRequired()) {
Y_VERIFY(MaybeRequestQuota(1, EWakeupTag::RlInit, ctx));
@@ -1247,7 +1252,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(NPQ::TEvPartitionWriter::T
template<bool UseMigrationProtocol>
void TWriteSessionActor<UseMigrationProtocol>::Handle(NPQ::TEvPartitionWriter::TEvDisconnected::TPtr&, const TActorContext& ctx) {
- CloseSession("pipe to partition's tablet is dead", PersQueue::ErrorCode::ERROR, ctx);
+ CloseSession("pipe to partition's tablet is dead", PersQueue::ErrorCode::TABLET_PIPE_DISCONNECTED, ctx);
}
template<bool UseMigrationProtocol>
@@ -1255,7 +1260,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvTabletPipe::TEvClientCo
TEvTabletPipe::TEvClientConnected *msg = ev->Get();
//TODO: add here retries for connecting to PQRB
if (msg->Status != NKikimrProto::OK) {
- CloseSession(TStringBuilder() << "pipe to tablet is dead " << msg->TabletId, PersQueue::ErrorCode::ERROR, ctx);
+ CloseSession(TStringBuilder() << "pipe to tablet is dead " << msg->TabletId, PersQueue::ErrorCode::TABLET_PIPE_DISCONNECTED, ctx);
return;
}
}
@@ -1263,7 +1268,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvTabletPipe::TEvClientCo
template<bool UseMigrationProtocol>
void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext& ctx) {
//TODO: add here retries for connecting to PQRB
- CloseSession(TStringBuilder() << "pipe to tablet is dead " << ev->Get()->TabletId, PersQueue::ErrorCode::ERROR, ctx);
+ CloseSession(TStringBuilder() << "pipe to tablet is dead " << ev->Get()->TabletId, PersQueue::ErrorCode::TABLET_PIPE_DISCONNECTED, ctx);
}
template<bool UseMigrationProtocol>
@@ -1271,7 +1276,7 @@ void TWriteSessionActor<UseMigrationProtocol>::PrepareRequest(THolder<TEvWrite>&
if (!PendingRequest) {
PendingRequest = new TWriteRequestInfo(++NextRequestCookie);
}
-
+
auto& request = PendingRequest->PartitionWriteRequest->Record;
ui64 payloadSize = 0;
@@ -1396,8 +1401,8 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(NGRpcService::TGRpcRequest
Y_UNUSED(ctx);
LOG_INFO_S(ctx, NKikimrServices::PQ_WRITE_PROXY, "updating token");
- if (ev->Get()->Authenticated && !ev->Get()->InternalToken.empty()) {
- Token = new NACLib::TUserToken(ev->Get()->InternalToken);
+ if (ev->Get()->Authenticated && ev->Get()->InternalToken && !ev->Get()->InternalToken->GetSerializedToken().empty()) {
+ Token = ev->Get()->InternalToken;
Request->SetInternalToken(ev->Get()->InternalToken);
UpdateTokenAuthenticated = true;
if (!ACLCheckInProgress) {
diff --git a/ydb/services/persqueue_v1/grpc_pq_read.cpp b/ydb/services/persqueue_v1/grpc_pq_read.cpp
index 33b0723c30..0e2b67f8aa 100644
--- a/ydb/services/persqueue_v1/grpc_pq_read.cpp
+++ b/ydb/services/persqueue_v1/grpc_pq_read.cpp
@@ -1,6 +1,7 @@
#include "grpc_pq_read.h"
#include "actors/read_info_actor.h"
+#include "actors/commit_offset_actor.h"
#include <ydb/core/grpc_services/grpc_helper.h>
#include <ydb/core/tx/scheme_board/cache.h>
@@ -121,11 +122,25 @@ void TPQReadService::Handle(NGRpcService::TEvStreamPQMigrationReadRequest::TPtr&
HandleStreamPQReadRequest<NGRpcService::TEvStreamPQMigrationReadRequest>(ev, ctx);
}
+void TPQReadService::Handle(NGRpcService::TEvCommitOffsetRequest::TPtr& ev, const TActorContext& ctx) {
+
+ LOG_DEBUG_S(ctx, NKikimrServices::PQ_READ_PROXY, "new commit offset request");
+
+ if (HaveClusters && (Clusters.empty() || LocalCluster.empty())) {
+ LOG_INFO_S(ctx, NKikimrServices::PQ_READ_PROXY, "new commit offset request failed - cluster is not known yet");
+
+ ev->Get()->SendResult(ConvertPersQueueInternalCodeToStatus(PersQueue::ErrorCode::INITIALIZING), FillInfoResponse("cluster initializing", PersQueue::ErrorCode::INITIALIZING)); //CANCELLED
+ return;
+ } else {
+ ctx.Register(new TCommitOffsetActor(ev->Release().Release(), *TopicsHandler, SchemeCache, NewSchemeCache, Counters));
+ }
+}
+
void TPQReadService::Handle(NGRpcService::TEvPQReadInfoRequest::TPtr& ev, const TActorContext& ctx) {
LOG_DEBUG_S(ctx, NKikimrServices::PQ_READ_PROXY, "new read info request");
- if (Clusters.empty() || LocalCluster.empty()) {
+ if (HaveClusters && (Clusters.empty() || LocalCluster.empty())) {
LOG_INFO_S(ctx, NKikimrServices::PQ_READ_PROXY, "new read info request failed - cluster is not known yet");
ev->Get()->SendResult(ConvertPersQueueInternalCodeToStatus(PersQueue::ErrorCode::INITIALIZING), FillInfoResponse("cluster initializing", PersQueue::ErrorCode::INITIALIZING)); //CANCELLED
@@ -156,6 +171,10 @@ void NKikimr::NGRpcService::TGRpcRequestProxy::Handle(NKikimr::NGRpcService::TEv
ctx.Send(NKikimr::NGRpcProxy::V1::GetPQReadServiceActorID(), ev->Release().Release());
}
+void NKikimr::NGRpcService::TGRpcRequestProxy::Handle(NKikimr::NGRpcService::TEvCommitOffsetRequest::TPtr& ev, const TActorContext& ctx) {
+ ctx.Send(NKikimr::NGRpcProxy::V1::GetPQReadServiceActorID(), ev->Release().Release());
+}
+
void NKikimr::NGRpcService::TGRpcRequestProxy::Handle(NKikimr::NGRpcService::TEvPQReadInfoRequest::TPtr& ev, const TActorContext& ctx) {
ctx.Send(NKikimr::NGRpcProxy::V1::GetPQReadServiceActorID(), ev->Release().Release());
}
diff --git a/ydb/services/persqueue_v1/grpc_pq_read.h b/ydb/services/persqueue_v1/grpc_pq_read.h
index 9ab9c57d92..36a9dfa137 100644
--- a/ydb/services/persqueue_v1/grpc_pq_read.h
+++ b/ydb/services/persqueue_v1/grpc_pq_read.h
@@ -43,6 +43,7 @@ private:
switch (ev->GetTypeRewrite()) {
HFunc(NGRpcService::TEvStreamTopicReadRequest, Handle);
HFunc(NGRpcService::TEvStreamPQMigrationReadRequest, Handle);
+ HFunc(NGRpcService::TEvCommitOffsetRequest, Handle);
HFunc(NGRpcService::TEvPQReadInfoRequest, Handle);
HFunc(NPQ::NClusterTracker::TEvClusterTracker::TEvClustersUpdate, Handle);
HFunc(NNetClassifier::TEvNetClassifier::TEvClassifierUpdate, Handle);
@@ -56,6 +57,7 @@ private:
private:
void Handle(NGRpcService::TEvStreamTopicReadRequest::TPtr& ev, const TActorContext& ctx);
void Handle(NGRpcService::TEvStreamPQMigrationReadRequest::TPtr& ev, const TActorContext& ctx);
+ void Handle(NGRpcService::TEvCommitOffsetRequest::TPtr& ev, const TActorContext& ctx);
void Handle(NGRpcService::TEvPQReadInfoRequest::TPtr& ev, const TActorContext& ctx);
void Handle(NPQ::NClusterTracker::TEvClusterTracker::TEvClustersUpdate::TPtr& ev, const TActorContext& ctx);
void Handle(NNetClassifier::TEvNetClassifier::TEvClassifierUpdate::TPtr& ev, const TActorContext& ctx);
diff --git a/ydb/services/persqueue_v1/persqueue_compat_ut.cpp b/ydb/services/persqueue_v1/persqueue_compat_ut.cpp
index b396f149c2..dc84826b8d 100644
--- a/ydb/services/persqueue_v1/persqueue_compat_ut.cpp
+++ b/ydb/services/persqueue_v1/persqueue_compat_ut.cpp
@@ -1,6 +1,7 @@
#include <ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/ut_utils/test_server.h>
#include <ydb/public/sdk/cpp/client/ydb_persqueue_public/persqueue.h>
#include <ydb/public/sdk/cpp/client/ydb_driver/driver.h>
+#include <ydb/public/api/grpc/ydb_topic_v1.grpc.pb.h>
using namespace NYdb;
using namespace NYdb::NPersQueue;
@@ -9,13 +10,13 @@ using namespace NYdb::NPersQueue;
namespace NKikimr::NPersQueueTests {
class TPQv1CompatTestBase {
-private:
+public:
THolder<::NPersQueue::TTestServer> Server;
THolder<TDriver> Driver;
THolder<TPersQueueClient> PQClient;
TString DbRoot;
TString DbPath;
-public:
+
TPQv1CompatTestBase()
{
Server = MakeHolder<::NPersQueue::TTestServer>(false);
@@ -26,16 +27,17 @@ public:
Server->StartServer();
//Server->EnableLogs()
Server->EnableLogs({ NKikimrServices::KQP_PROXY }, NActors::NLog::PRI_EMERG);
- Server->EnableLogs({ NKikimrServices::PQ_READ_PROXY, NKikimrServices::PQ_WRITE_PROXY });
+ Server->EnableLogs({ NKikimrServices::PQ_READ_PROXY, NKikimrServices::PQ_WRITE_PROXY, NKikimrServices::PQ_METACACHE });
+
- Server->AnnoyingClient->CreateTopicNoLegacy("rt3.dc2--account--topic1", 1, false);
+ Server->AnnoyingClient->CreateTopicNoLegacy("rt3.dc2--account--topic1", 1, true, false);
Server->AnnoyingClient->CreateTopicNoLegacy("rt3.dc1--account--topic1", 1, true);
Server->WaitInit("account/topic1");
Server->AnnoyingClient->MkDir("/Root", "LbCommunal");
Server->AnnoyingClient->MkDir("/Root/LbCommunal", "account");
Server->AnnoyingClient->CreateTopicNoLegacy(
- "/Root/LbCommunal/account/topic2", 1, false, true, {}, {}, "account"
+ "/Root/LbCommunal/account/topic2", 1, true, true, {}, {}, "account"
);
Server->AnnoyingClient->CreateTopicNoLegacy(
@@ -45,6 +47,10 @@ public:
InitPQLib();
}
+ ~TPQv1CompatTestBase() {
+ Server->ShutdownServer();
+ }
+
void InitPQLib() {
TDriverConfig driverConfig(TStringBuilder() << "localhost:" << Server->GrpcPort);
driverConfig.SetDatabase("/Root/");
@@ -71,6 +77,7 @@ public:
TReadSessionSettings settings;
settings.ConsumerName("test-consumer").ReadMirrored("dc1");
+
for (const auto& path : paths) {
settings.AppendTopics(TTopicReadSettings{path});
}
@@ -94,7 +101,7 @@ Y_UNIT_TEST_SUITE(TPQCompatTest) {
void GetLocks(const THashSet<TString>& paths, std::shared_ptr<IReadSession>& readSession) {
THashMap<TString, THashSet<TString>> clustersFound;
- for (auto i = 0u; i < paths.size() * 2 /* 2 locks from 2 clusters for each topic */; i++) {
+ for (auto i = 0u; i < paths.size() * 2; i++) {
auto ev = readSession->GetEvent(true);
Y_VERIFY(ev.Defined());
auto* lockEvent = std::get_if<NYdb::NPersQueue::TReadSessionEvent::TCreatePartitionStreamEvent>(&*ev);
@@ -179,9 +186,153 @@ Y_UNIT_TEST_SUITE(TPQCompatTest) {
// Just to verify it even creates anything at all
testServer.CreateTopic("/Root/LbCommunal/account/some-topic-mirrored-from-dc2", "account", false, false);
+ }
+
+ Y_UNIT_TEST(CommitOffsets) {
+ TPQv1CompatTestBase testServer;
+ std::shared_ptr<grpc::Channel> Channel_;
+ Channel_ = grpc::CreateChannel(
+ "localhost:" + ToString(testServer.Server->GrpcPort),
+ grpc::InsecureChannelCredentials()
+ );
+ auto TopicStubP_ = Ydb::Topic::V1::TopicService::NewStub(Channel_);
+
+ {
+ grpc::ClientContext rcontext;
+
+ rcontext.AddMetadata("x-ydb-database", "/Root/LbCommunal/account");
+
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("topic2");
+ req.set_consumer("user");
+ req.set_offset(0);
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::SUCCESS);
+ }
+
+ {
+ grpc::ClientContext rcontext;
+
+ rcontext.AddMetadata("x-ydb-database", "/Root/LbCommunal/account");
+
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("topic2-mirrored-from-dc2");
+ req.set_consumer("user");
+ req.set_offset(0);
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::SUCCESS);
+ }
+
+ }
+
+ Y_UNIT_TEST(ReadWriteSessions) {
+ TPQv1CompatTestBase testServer;
+ std::shared_ptr<grpc::Channel> Channel_;
+ Channel_ = grpc::CreateChannel(
+ "localhost:" + ToString(testServer.Server->GrpcPort),
+ grpc::InsecureChannelCredentials()
+ );
+ auto TopicStubP_ = Ydb::Topic::V1::TopicService::NewStub(Channel_);
+
+
+ for (auto topic : std::vector<TString> {"topic2", "topic2-mirrored-from-dc2"}) {
+ grpc::ClientContext wcontext;
+ wcontext.AddMetadata("x-ydb-database", "/Root/LbCommunal/account");
+
+ auto writeStream = TopicStubP_->StreamWrite(&wcontext);
+ UNIT_ASSERT(writeStream);
+
+ Ydb::Topic::StreamWriteMessage::FromClient req;
+ Ydb::Topic::StreamWriteMessage::FromServer resp;
+
+ req.mutable_init_request()->set_path(topic);
+ req.mutable_init_request()->set_producer_id("A");
+ req.mutable_init_request()->set_partition_id(0);
+ UNIT_ASSERT(writeStream->Write(req));
+ UNIT_ASSERT(writeStream->Read(&resp));
+
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ if (topic == "topic2") {
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamWriteMessage::FromServer::kInitResponse);
+ } else {
+ UNIT_ASSERT(resp.status() == Ydb::StatusIds::BAD_REQUEST);
+ break;
+ }
+ req.Clear();
+
+ auto* write = req.mutable_write_request();
+ write->set_codec(Ydb::Topic::CODEC_RAW);
+
+ auto* msg = write->add_messages();
+ msg->set_seq_no(1);
+ msg->set_data("x");
+ UNIT_ASSERT(writeStream->Write(req));
+ UNIT_ASSERT(writeStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamWriteMessage::FromServer::kWriteResponse);
+ }
+
+ for (auto topic : std::vector<TString> {"topic2", "topic2-mirrored-from-dc2"}) {
+ grpc::ClientContext rcontext;
+ rcontext.AddMetadata("x-ydb-database", "/Root/LbCommunal/account");
+
+ auto readStream = TopicStubP_->StreamRead(&rcontext);
+ UNIT_ASSERT(readStream);
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ req.mutable_init_request()->add_topics_read_settings()->set_path(topic);
+
+ req.mutable_init_request()->set_consumer("user");
+
+ UNIT_ASSERT(readStream->Write(req));
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kInitResponse);
+
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kStartPartitionSessionRequest);
+ UNIT_ASSERT(resp.start_partition_session_request().partition_session().path() == topic);
+ }
+
+ for (auto topic : std::vector<TString> {"account/topic2", "account/topic2-mirrored-from-dc2"}) {
+ grpc::ClientContext rcontext;
+
+ auto readStream = TopicStubP_->StreamRead(&rcontext);
+ UNIT_ASSERT(readStream);
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ req.mutable_init_request()->add_topics_read_settings()->set_path(topic);
+
+ req.mutable_init_request()->set_consumer("user");
+
+ Cerr << "BEFORE PARSING " << topic << "\n";
+
+ UNIT_ASSERT(readStream->Write(req));
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kInitResponse);
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kStartPartitionSessionRequest);
+ UNIT_ASSERT(resp.start_partition_session_request().partition_session().path() == topic);
+ }
}
}
} // namespace NKikimr::NPersQueueTests
-
diff --git a/ydb/services/persqueue_v1/persqueue_ut.cpp b/ydb/services/persqueue_v1/persqueue_ut.cpp
index 51066713fe..ab61e48198 100644
--- a/ydb/services/persqueue_v1/persqueue_ut.cpp
+++ b/ydb/services/persqueue_v1/persqueue_ut.cpp
@@ -660,8 +660,445 @@ Y_UNIT_TEST_SUITE(TPersQueueTest) {
UNIT_ASSERT_C(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kUpdateTokenResponse, resp);
}
+
+ // write and read some more
+ {
+ auto writer = CreateSimpleWriter(*driver, "acc/topic1", "source");
+ for (int i = 17; i < 37; ++i) {
+ bool res = writer->Write("valuevaluevalue" + ToString(i), i);
+ UNIT_ASSERT(res);
+ }
+ bool res = writer->Close(TDuration::Seconds(10));
+ UNIT_ASSERT(res);
+
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ req.mutable_read_request()->set_bytes_size(1_MB);
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+ }
+ // expect answer to read
+ resp.Clear();
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "Got response " << resp << "\n";
+ UNIT_ASSERT_C(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kReadResponse, resp);
}
+
+ Y_UNIT_TEST(StreamReadManyUpdateTokenAndRead) {
+ TPersQueueV1TestServer server;
+ SET_LOCALS;
+ MAKE_INSECURE_STUB(Ydb::Topic::V1::TopicService);
+ server.EnablePQLogs({ NKikimrServices::PQ_METACACHE, NKikimrServices::PQ_READ_PROXY });
+ server.EnablePQLogs({ NKikimrServices::KQP_PROXY }, NLog::EPriority::PRI_EMERG);
+ server.EnablePQLogs({ NKikimrServices::FLAT_TX_SCHEMESHARD }, NLog::EPriority::PRI_ERROR);
+
+ auto readStream = StubP_->StreamRead(&rcontext);
+ UNIT_ASSERT(readStream);
+
+ // init read session
+ {
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ req.mutable_init_request()->add_topics_read_settings()->set_path("acc/topic1");
+
+ req.mutable_init_request()->set_consumer("user");
+
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kInitResponse);
+ // send some reads
+ req.Clear();
+ req.mutable_read_request()->set_bytes_size(2_KB);
+ // for (ui32 i = 0; i < 10; ++i) {
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+ // }
+ }
+
+ // await and confirm CreatePartitionStreamRequest from server
+ i64 assignId = 0;
+ {
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ //lock partition
+ UNIT_ASSERT(readStream->Read(&resp));
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kStartPartitionSessionRequest);
+ UNIT_ASSERT_VALUES_EQUAL(resp.start_partition_session_request().partition_session().path(), "acc/topic1");
+ UNIT_ASSERT(resp.start_partition_session_request().partition_session().partition_id() == 0);
+
+ assignId = resp.start_partition_session_request().partition_session().partition_session_id();
+ req.Clear();
+ req.mutable_start_partition_session_response()->set_partition_session_id(assignId);
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+ }
+
+ // write to partition in 1 session
+ auto driver = pqClient->GetDriver();
+ {
+ auto writer = CreateSimpleWriter(*driver, "acc/topic1", "source", /*partitionGroup=*/{}, /*codec=*/{"raw"});
+ for (int i = 1; i < 1000; ++i) {
+ bool res = writer->Write(TString(2_KB, 'x'), i);
+ UNIT_ASSERT(res);
+ }
+ bool res = writer->Close(TDuration::Seconds(10));
+ UNIT_ASSERT(res);
+ }
+
+ //check read results
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ for (ui32 i = 0; i < 10; ++i) {
+ resp.Clear();
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Expect ReadResponse, got " << resp << "\n";
+ UNIT_ASSERT_C(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kReadResponse, resp);
+
+ // send update token request, await response
+ const TString token = TString("test_user_" + ToString(i) + "@") + BUILTIN_ACL_DOMAIN;;
+ req.Clear();
+ resp.Clear();
+ req.mutable_update_token_request()->set_token(token);
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Expect UpdateTokenResponse, got response: " << resp.ShortDebugString() << Endl;
+
+ UNIT_ASSERT_C(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kUpdateTokenResponse, resp);
+
+ req.Clear();
+ req.mutable_read_request()->set_bytes_size(2208);
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+ }
+ }
+
+ Y_UNIT_TEST(TopicServiceCommitOffset) {
+ TPersQueueV1TestServer server;
+ SET_LOCALS;
+ MAKE_INSECURE_STUB(Ydb::Topic::V1::TopicService);
+ server.EnablePQLogs({ NKikimrServices::PQ_METACACHE, NKikimrServices::PQ_READ_PROXY });
+ server.EnablePQLogs({ NKikimrServices::KQP_PROXY }, NLog::EPriority::PRI_EMERG);
+ server.EnablePQLogs({ NKikimrServices::FLAT_TX_SCHEMESHARD }, NLog::EPriority::PRI_ERROR);
+ server.EnablePQLogs({ NKikimrServices::PERSQUEUE }, NLog::EPriority::PRI_DEBUG);
+
+ auto driver = pqClient->GetDriver();
+ {
+ auto writer = CreateSimpleWriter(*driver, "acc/topic1", "source");
+ for (int i = 1; i < 17; ++i) {
+ bool res = writer->Write("valuevaluevalue" + ToString(i), i);
+ UNIT_ASSERT(res);
+ }
+ bool res = writer->Close(TDuration::Seconds(10));
+ UNIT_ASSERT(res);
+ }
+
+ auto TopicStubP_ = Ydb::Topic::V1::TopicService::NewStub(Channel_);
+
+ grpc::ClientContext readContext;
+ auto readStream = TopicStubP_ -> StreamRead(&readContext);
+ UNIT_ASSERT(readStream);
+
+ i64 assignId = 0;
+ // init read session
+ {
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ req.mutable_init_request()->add_topics_read_settings()->set_path("acc/topic1");
+
+ req.mutable_init_request()->set_consumer("user");
+
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "===Got response: " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kInitResponse);
+
+ req.Clear();
+ // await and confirm StartPartitionSessionRequest from server
+ UNIT_ASSERT(readStream->Read(&resp));
+ UNIT_ASSERT(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kStartPartitionSessionRequest);
+ UNIT_ASSERT_VALUES_EQUAL(resp.start_partition_session_request().partition_session().path(), "acc/topic1");
+ UNIT_ASSERT(resp.start_partition_session_request().partition_session().partition_id() == 0);
+ UNIT_ASSERT(resp.start_partition_session_request().committed_offset() == 0);
+
+ assignId = resp.start_partition_session_request().partition_session().partition_session_id();
+ req.Clear();
+ req.mutable_start_partition_session_response()->set_partition_session_id(assignId);
+
+ req.mutable_start_partition_session_response()->set_read_offset(0);
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+
+ //send some reads
+ req.Clear();
+ req.mutable_read_request()->set_bytes_size(1);
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+
+ resp.Clear();
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "Got read response " << resp << "\n";
+ UNIT_ASSERT_C(resp.server_message_case() == Ydb::Topic::StreamReadMessage::FromServer::kReadResponse, resp);
+ UNIT_ASSERT(resp.read_response().partition_data_size() == 1);
+ UNIT_ASSERT(resp.read_response().partition_data(0).batches_size() == 1);
+ UNIT_ASSERT(resp.read_response().partition_data(0).batches(0).message_data_size() >= 1);
+ }
+
+ // commit offset
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic1");
+ req.set_consumer("user");
+ req.set_offset(5);
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::SUCCESS);
+ }
+
+
+ {
+ Ydb::Topic::StreamReadMessage::FromClient req;
+ Ydb::Topic::StreamReadMessage::FromServer resp;
+
+ req.mutable_read_request()->set_bytes_size(10000);
+
+ // auto commit = req.mutable_commit_offset_request()->add_commit_offsets();
+ // commit->set_partition_session_id(assignId);
+
+ // auto offsets = commit->add_offsets();
+ // offsets->set_start(0);
+ // offsets->set_end(7);
+
+ if (!readStream->Write(req)) {
+ ythrow yexception() << "write fail";
+ }
+
+ UNIT_ASSERT(readStream->Read(&resp));
+ Cerr << "=== Got response (expect session expired): " << resp.ShortDebugString() << Endl;
+ UNIT_ASSERT_VALUES_EQUAL(resp.status(), Ydb::StatusIds::SESSION_EXPIRED);
+ }
+ }
+
+ Y_UNIT_TEST(TopicServiceCommitOffsetBadOffsets) {
+ TPersQueueV1TestServer server;
+ SET_LOCALS;
+ MAKE_INSECURE_STUB(Ydb::Topic::V1::TopicService);
+ server.EnablePQLogs({ NKikimrServices::PQ_METACACHE, NKikimrServices::PQ_READ_PROXY });
+ server.EnablePQLogs({ NKikimrServices::KQP_PROXY }, NLog::EPriority::PRI_EMERG);
+ server.EnablePQLogs({ NKikimrServices::FLAT_TX_SCHEMESHARD }, NLog::EPriority::PRI_ERROR);
+ server.EnablePQLogs({ NKikimrServices::PERSQUEUE }, NLog::EPriority::PRI_DEBUG);
+
+ auto TopicStubP_ = Ydb::Topic::V1::TopicService::NewStub(Channel_);
+
+ {
+ Ydb::Topic::CreateTopicRequest request;
+ Ydb::Topic::CreateTopicResponse response;
+ request.set_path(TStringBuilder() << "/Root/PQ/rt3.dc1--acc--topic2");
+
+ request.set_retention_storage_mb(1);
+
+ request.mutable_supported_codecs()->add_codecs(Ydb::Topic::CODEC_RAW);
+ request.mutable_supported_codecs()->add_codecs(Ydb::Topic::CODEC_GZIP);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CreateTopic(&rcontext, request, &response);
+
+ UNIT_ASSERT(status.ok());
+ Ydb::Topic::CreateTopicResult res;
+ response.operation().result().UnpackTo(&res);
+ Cerr << response << "\n" << res << "\n";
+ UNIT_ASSERT_VALUES_EQUAL(response.operation().status(), Ydb::StatusIds::SUCCESS);
+
+ server.Server->AnnoyingClient->WaitTopicInit("acc/topic2");
+ server.Server->AnnoyingClient->AddTopic("acc/topic2");
+ }
+
+ auto driver = pqClient->GetDriver();
+ {
+ auto writer = CreateSimpleWriter(*driver, "acc/topic2", "source", /*partitionGroup=*/{}, /*codec=*/{"raw"});
+ TString blob{1_MB, 'x'};
+ for (int i = 1; i <= 20; ++i) {
+ bool res = writer->Write(blob + ToString(i), i);
+ UNIT_ASSERT(res);
+ }
+
+ bool res = writer->Close(TDuration::Seconds(10));
+ UNIT_ASSERT(res);
+ }
+
+ {
+ using namespace NYdb::NTopic;
+ auto settings = TDescribeTopicSettings().IncludeStats(true);
+ auto client = TTopicClient(server.Server->GetDriver());
+ auto desc = client.DescribeTopic("/Root/PQ/rt3.dc1--acc--topic2", settings)
+ .ExtractValueSync()
+ .GetTopicDescription();
+ Cerr << ">>>Describe result: partitions count is " << desc.GetTotalPartitionsCount() << Endl;
+ for (const auto& partInfo: desc.GetPartitions()) {
+ Cerr << ">>>Describe result: partition id = " << partInfo.GetPartitionId() << ", ";
+ auto stats = partInfo.GetPartitionStats();
+ UNIT_ASSERT(stats.Defined());
+ Cerr << "offsets: [ " << stats.Get()->GetStartOffset() << ", " << stats.Get()->GetEndOffset() << " )" << Endl;
+ }
+
+ TAlterTopicSettings alterSettings;
+ alterSettings
+ .BeginAddConsumer("first-consumer")
+ .EndAddConsumer()
+ .BeginAddConsumer("second-consumer").Important(true)
+ .EndAddConsumer();
+ auto res = client.AlterTopic("/Root/PQ/rt3.dc1--acc--topic2", alterSettings);
+ res.Wait();
+ Cerr << res.GetValue().IsSuccess() << " " << res.GetValue().GetIssues().ToString() << "\n";
+ UNIT_ASSERT(res.GetValue().IsSuccess());
+
+ }
+ // unimportant consumer
+ // commit to future - expect bad request
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic2");
+ req.set_consumer("first-consumer");
+ req.set_offset(25);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::GENERIC_ERROR);
+ // TODO: change to BAD_REQUEST
+ // UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::BAD_REQUEST);
+ }
+
+ // commit to past - expect bad request
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic2");
+ req.set_consumer("first-consumer");
+ req.set_offset(3);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::GENERIC_ERROR);
+ // TODO: change to BAD_REQUEST
+ // UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::BAD_REQUEST);
+ }
+
+ // commit to valid offset - expect successful commit
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic2");
+ req.set_consumer("first-consumer");
+ req.set_offset(18);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::SUCCESS);
+ }
+
+ // important consumer
+ // normal commit - expect successful commit
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic2");
+ req.set_consumer("second-consumer");
+ req.set_offset(18);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::SUCCESS);
+ }
+
+ // commit to past - expect error
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic2");
+ req.set_consumer("second-consumer");
+ req.set_offset(3);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::GENERIC_ERROR);
+ // TODO: change to BAD_REQUEST
+ // UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::BAD_REQUEST);
+ }
+
+ // commit to future - expect bad request
+ {
+ Ydb::Topic::CommitOffsetRequest req;
+ Ydb::Topic::CommitOffsetResponse resp;
+
+ req.set_path("acc/topic2");
+ req.set_consumer("second-consumer");
+ req.set_offset(25);
+
+ grpc::ClientContext rcontext;
+
+ auto status = TopicStubP_->CommitOffset(&rcontext, req, &resp);
+
+ Cerr << resp << "\n";
+ UNIT_ASSERT(status.ok());
+ UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::GENERIC_ERROR);
+ // TODO: change to BAD_REQUEST
+ // UNIT_ASSERT_VALUES_EQUAL(resp.operation().status(), Ydb::StatusIds::BAD_REQUEST);
+ }
+ }
+
+
Y_UNIT_TEST(TopicServiceReadBudget) {
TPersQueueV1TestServer server;
SET_LOCALS;
@@ -2577,27 +3014,27 @@ Y_UNIT_TEST_SUITE(TPersQueueTest) {
UNIT_FAIL("incorrect mode");
}
-
+
Y_UNIT_TEST(WhenTheTopicIsDeletedBeforeDataIsDecompressed_Compressed) {
WhenTheTopicIsDeletedImpl(AFTER_WRITES, 1_MB + 1, true, 1_MB - 1_KB, 1050);
}
-
+
Y_UNIT_TEST(WhenTheTopicIsDeletedAfterDecompressingTheData_Compressed) {
WhenTheTopicIsDeletedImpl(AFTER_START_TASKS, 1_MB + 1, true, 1_MB - 1_KB, 1050);
}
-
+
Y_UNIT_TEST(WhenTheTopicIsDeletedAfterReadingTheData_Compressed) {
WhenTheTopicIsDeletedImpl(AFTER_DOREAD, 1_MB + 1, true, 1_MB - 1_KB, 1050);
}
-
+
Y_UNIT_TEST(WhenTheTopicIsDeletedBeforeDataIsDecompressed_Uncompressed) {
WhenTheTopicIsDeletedImpl(AFTER_WRITES, 1_MB + 1, false, 1_MB - 1_KB, 1_MB - 1_KB);
}
-
+
Y_UNIT_TEST(WhenTheTopicIsDeletedAfterDecompressingTheData_Uncompressed) {
WhenTheTopicIsDeletedImpl(AFTER_START_TASKS, 1_MB + 1, false, 1_MB - 1_KB, 1_MB - 1_KB);
}
-
+
Y_UNIT_TEST(WhenTheTopicIsDeletedAfterReadingTheData_Uncompressed) {
WhenTheTopicIsDeletedImpl(AFTER_DOREAD, 1_MB + 1, false, 1_MB - 1_KB, 1_MB - 1_KB);
}
@@ -5702,7 +6139,7 @@ Y_UNIT_TEST_SUITE(TPersQueueTest) {
UNIT_ASSERT(partId == 1 || partId == 3);
}
}
-
+
Y_UNIT_TEST(LOGBROKER_7820) {
//
// 700 messages of 2000 characters are sent in the test
diff --git a/ydb/services/persqueue_v1/topic.cpp b/ydb/services/persqueue_v1/topic.cpp
index 730b03dabe..464c8a9341 100644
--- a/ydb/services/persqueue_v1/topic.cpp
+++ b/ydb/services/persqueue_v1/topic.cpp
@@ -108,6 +108,10 @@ void TGRpcTopicService::SetupIncomingRequests(NGrpc::TLoggerPtr logger) {
}, &Ydb::Topic::V1::SVC::AsyncService::Request ## NAME, \
"TopicService/"#NAME, logger, getCounterBlock("topic", #NAME))->Run();
+ ADD_REQUEST(CommitOffset, TopicService, CommitOffsetRequest, CommitOffsetResponse, {
+ ActorSystem_->Send(GRpcRequestProxyId_, new NGRpcService::TEvCommitOffsetRequest(ctx));
+ })
+
ADD_REQUEST(DropTopic, TopicService, DropTopicRequest, DropTopicResponse, {
ActorSystem_->Send(GRpcRequestProxyId_, new NGRpcService::TEvDropTopicRequest(ctx, IsRlAllowed()));
})
diff --git a/ydb/services/ydb/ydb_bulk_upsert_olap_ut.cpp b/ydb/services/ydb/ydb_bulk_upsert_olap_ut.cpp
index c671389d95..63eb6fd97d 100644
--- a/ydb/services/ydb/ydb_bulk_upsert_olap_ut.cpp
+++ b/ydb/services/ydb/ydb_bulk_upsert_olap_ut.cpp
@@ -6,12 +6,13 @@
#include <ydb/library/yql/public/issue/yql_issue.h>
#include <ydb/library/yql/public/issue/yql_issue_message.h>
+#include <ydb/core/formats/arrow_helpers.h>
using namespace NYdb;
namespace {
-std::vector<TString> ScanQuerySelect(
+std::vector<TString> ScanQuerySelectSimple(
NYdb::NTable::TTableClient client, const TString& tablePath,
const std::vector<std::pair<TString, NYdb::EPrimitiveType>>& ydbSchema = TTestOlap::PublicSchema())
{
@@ -90,6 +91,21 @@ std::vector<TString> ScanQuerySelect(
return out;
}
+std::vector<TString> ScanQuerySelect(
+ NYdb::NTable::TTableClient client, const TString& tablePath,
+ const std::vector<std::pair<TString, NYdb::EPrimitiveType>>& ydbSchema = TTestOlap::PublicSchema())
+{
+ for(ui32 iter = 0; iter < 3; iter++) {
+ try {
+ return ScanQuerySelectSimple(client, tablePath, ydbSchema);
+ } catch(...) {
+ /// o_O
+ }
+ }
+
+ return ScanQuerySelectSimple(client, tablePath, ydbSchema);
+}
+
}
Y_UNIT_TEST_SUITE(YdbTableBulkUpsertOlap) {
@@ -179,6 +195,75 @@ Y_UNIT_TEST_SUITE(YdbTableBulkUpsertOlap) {
}
}
+ Y_UNIT_TEST(ParquetImportBug) {
+ NKikimrConfig::TAppConfig appConfig;
+ TKikimrWithGrpcAndRootSchema server(appConfig);
+ server.Server_->GetRuntime()->SetLogPriority(NKikimrServices::TX_COLUMNSHARD, NActors::NLog::PRI_DEBUG);
+
+ ui16 grpc = server.GetPort();
+ TString location = TStringBuilder() << "localhost:" << grpc;
+ auto connection = NYdb::TDriver(TDriverConfig().SetEndpoint(location));
+
+ NYdb::NTable::TTableClient client(connection);
+ auto session = client.GetSession().ExtractValueSync().GetSession();
+ TString tablePath = TTestOlap::TablePath;
+
+ std::vector<std::pair<TString, NYdb::EPrimitiveType>> schema = {
+ { "id", NYdb::EPrimitiveType::Uint32 },
+ { "timestamp", NYdb::EPrimitiveType::Timestamp },
+ { "date", NYdb::EPrimitiveType::Date }
+ };
+
+ auto tableBuilder = client.GetTableBuilder();
+ for (auto& [name, type] : schema) {
+ if (name == "id") {
+ tableBuilder.AddNonNullableColumn(name, type);
+ } else {
+ tableBuilder.AddNullableColumn(name, type);
+ }
+ }
+ tableBuilder.SetPrimaryKeyColumns({"id"});
+ auto result = session.CreateTable(tablePath, tableBuilder.Build(), {}).ExtractValueSync();
+
+ UNIT_ASSERT_EQUAL(result.IsTransportError(), false);
+ UNIT_ASSERT_EQUAL(result.GetStatus(), EStatus::SUCCESS);
+
+ auto batchSchema = std::make_shared<arrow::Schema>(
+ std::vector<std::shared_ptr<arrow::Field>>{
+ arrow::field("id", arrow::uint32()),
+ arrow::field("timestamp", arrow::int64()),
+ arrow::field("date", arrow::uint16())
+ });
+
+ size_t rowsCount = 100;
+ auto builders = NArrow::MakeBuilders(batchSchema, rowsCount);
+
+ for (size_t i = 0; i < rowsCount; ++i) {
+ Y_VERIFY(NArrow::Append<arrow::UInt32Type>(*builders[0], i));
+ Y_VERIFY(NArrow::Append<arrow::Int64Type>(*builders[1], i));
+ Y_VERIFY(NArrow::Append<arrow::UInt16Type>(*builders[2], i));
+ }
+
+ auto srcBatch = arrow::RecordBatch::Make(batchSchema, rowsCount, NArrow::Finish(std::move(builders)));
+ TString strSchema = NArrow::SerializeSchema(*batchSchema);
+ TString strBatch = NArrow::SerializeBatchNoCompression(srcBatch);
+
+ TInstant start = TInstant::Now();
+ {
+ auto res = client.BulkUpsert(tablePath,
+ NYdb::NTable::EDataFormat::ApacheArrow, strBatch, strSchema).GetValueSync();
+
+ Cerr << res.GetStatus() << Endl;
+ UNIT_ASSERT_EQUAL_C(res.GetStatus(), EStatus::SUCCESS, res.GetIssues().ToString());
+ }
+ Cerr << "Upsert done: " << TInstant::Now() - start << Endl;
+
+ { // Read all
+ auto rows = ScanQuerySelect(client, tablePath, schema);
+ UNIT_ASSERT_GT(rows.size(), 0);
+ }
+ }
+
Y_UNIT_TEST(UpsertCsvBug) {
NKikimrConfig::TAppConfig appConfig;
TKikimrWithGrpcAndRootSchema server(appConfig);
diff --git a/ydb/services/ydb/ydb_olapstore_ut.cpp b/ydb/services/ydb/ydb_olapstore_ut.cpp
index 2f42612495..2fdced9f4a 100644
--- a/ydb/services/ydb/ydb_olapstore_ut.cpp
+++ b/ydb/services/ydb/ydb_olapstore_ut.cpp
@@ -78,8 +78,10 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
TString HashFunction = "HASH_FUNCTION_CLOUD_LOGS";
};
+ template<bool NotNull>
void CreateOlapTable(const TServerSettings& settings, const TString& tableName, TTestOlapTableOptions opts = {})
{
+ auto notNullStr = (NotNull ? "NotNull: true" : "");
TString tableDescr = Sprintf(R"(
Name: "OlapStore"
ColumnShardCount: 4
@@ -88,10 +90,10 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
Schema {
Columns { Name: "message" Type: "Utf8" }
Columns { Name: "json_payload" Type: "JsonDocument" }
- Columns { Name: "resource_id" Type: "Utf8" }
- Columns { Name: "uid" Type: "Utf8" }
- Columns { Name: "timestamp" Type: "%s" }
- Columns { Name: "resource_type" Type: "Utf8" }
+ Columns { Name: "resource_id" Type: "Utf8" %s }
+ Columns { Name: "uid" Type: "Utf8" %s }
+ Columns { Name: "timestamp" Type: "%s" %s }
+ Columns { Name: "resource_type" Type: "Utf8" %s }
Columns { Name: "level" Type: "Int32" }
Columns { Name: "ingested_at" Type: "Timestamp" }
Columns { Name: "saved_at" Type: "Timestamp" }
@@ -100,7 +102,7 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
Engine: COLUMN_ENGINE_REPLACING_TIMESERIES
}
}
- )", allowedTypes[opts.TsType].c_str());
+ )", notNullStr, notNullStr, allowedTypes[opts.TsType].c_str(), notNullStr, notNullStr);
TClient annoyingClient(settings);
NMsgBusProxy::EResponseStatus status = annoyingClient.CreateOlapStore("/Root", tableDescr);
@@ -120,21 +122,23 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
UNIT_ASSERT_VALUES_EQUAL(status, NMsgBusProxy::EResponseStatus::MSTATUS_OK);
}
+ template<bool NotNull>
void CreateTable(const TServerSettings& settings, const TString& tableName) {
+ auto notNullStr = (NotNull ? "NotNull: true" : "");
TString tableDescr = Sprintf(R"(
Name: "%s"
- Columns { Name: "uid" Type: "Utf8" }
+ Columns { Name: "uid" Type: "Utf8" %s }
Columns { Name: "message" Type: "Utf8" }
Columns { Name: "json_payload" Type: "JsonDocument" }
- Columns { Name: "resource_id" Type: "Utf8" }
+ Columns { Name: "resource_id" Type: "Utf8" %s }
Columns { Name: "ingested_at" Type: "Timestamp" }
- Columns { Name: "timestamp" Type: "Timestamp" }
- Columns { Name: "resource_type" Type: "Utf8" }
+ Columns { Name: "timestamp" Type: "Timestamp" %s }
+ Columns { Name: "resource_type" Type: "Utf8" %s }
Columns { Name: "level" Type: "Int32" }
Columns { Name: "saved_at" Type: "Timestamp" }
Columns { Name: "request_id" Type: "Utf8" }
KeyColumnNames: ["timestamp", "resource_type", "resource_id", "uid"]
- )", tableName.c_str());
+ )", tableName.c_str(), notNullStr, notNullStr, notNullStr, notNullStr);
TClient annoyingClient(settings);
NMsgBusProxy::EResponseStatus status = annoyingClient.CreateTable("/Root", tableDescr);
@@ -264,7 +268,7 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
}
}
- TString RunQuery(TDriver& connection, const TString& query) {
+ TString RunQuerySimple(TDriver& connection, const TString& query) {
auto client = NYdb::NTable::TTableClient(connection);
NYdb::NTable::TStreamExecScanQuerySettings execSettings;
@@ -280,12 +284,25 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
return result.ResultSetYson;
}
+ TString RunQuery(TDriver& connection, const TString& query) {
+ for(ui32 iter = 0; iter < 3; iter++) {
+ try {
+ return RunQuerySimple(connection, query);
+ } catch(...) {
+ /// o_O
+ }
+ }
+
+ return RunQuerySimple(connection, query);
+ }
+
// Create OLTP and OLAP tables with the same set of columns and same PK
+ template<bool NotNull>
void CreateTestTables(const TServerSettings& settings, const TString& tableName, const TString& sharding) {
TTestOlapTableOptions opts;
opts.Sharding = sharding;
- CreateOlapTable(settings, tableName, opts);
- CreateTable(settings, "oltp_" + tableName);
+ CreateOlapTable<NotNull>(settings, tableName, opts);
+ CreateTable<NotNull>(settings, "oltp_" + tableName);
}
// Write the same set or rows to OLTP and OLAP table
@@ -312,6 +329,7 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
return result;
}
+ template<bool NotNull>
void TestBulkUpsert(EPrimitiveType pkFirstType) {
NKikimrConfig::TAppConfig appConfig;
TKikimrWithGrpcAndRootSchema server(appConfig);
@@ -322,7 +340,7 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
TTestOlapTableOptions opts;
opts.TsType = pkFirstType;
opts.HashFunction = "HASH_FUNCTION_MODULO_N";
- CreateOlapTable(*server.ServerSettings, "log1", opts);
+ CreateOlapTable<NotNull>(*server.ServerSettings, "log1", opts);
TClient annoyingClient(*server.ServerSettings);
annoyingClient.ModifyOwner("/Root/OlapStore", "log1", "alice@builtin");
@@ -365,12 +383,13 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
}
}
- Y_UNIT_TEST(BulkUpsert) {
+ Y_UNIT_TEST_TWIN(BulkUpsert, NotNull) {
for (auto& [type, name] : allowedTypes) {
- TestBulkUpsert(type);
+ TestBulkUpsert<NotNull>(type);
}
}
+ template<bool NotNull>
void TestManyTables(const TString& sharding) {
NKikimrConfig::TAppConfig appConfig;
TKikimrWithGrpcAndRootSchema server(appConfig);
@@ -378,9 +397,9 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
auto connection = ConnectToServer(server);
- CreateTestTables(*server.ServerSettings, "log1", sharding);
- CreateTestTables(*server.ServerSettings, "log2", sharding);
- CreateTestTables(*server.ServerSettings, "log3", sharding);
+ CreateTestTables<NotNull>(*server.ServerSettings, "log1", sharding);
+ CreateTestTables<NotNull>(*server.ServerSettings, "log2", sharding);
+ CreateTestTables<NotNull>(*server.ServerSettings, "log3", sharding);
size_t rowCount = WriteTestRows(connection, "log1", 0, 1, 50);
UNIT_ASSERT_VALUES_EQUAL(rowCount, 50);
@@ -402,12 +421,13 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
CompareQueryResults(connection, "log1", "SELECT count(*) FROM <TABLE>;");
}
- Y_UNIT_TEST(ManyTables) {
+ Y_UNIT_TEST_TWIN(ManyTables, NotNull) {
for (auto& sharding : testShardingVariants) {
- TestManyTables(sharding);
+ TestManyTables<NotNull>(sharding);
}
}
+ template<bool NotNull>
void TestDuplicateRows(const TString& sharding) {
NKikimrConfig::TAppConfig appConfig;
TKikimrWithGrpcAndRootSchema server(appConfig);
@@ -418,7 +438,7 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
TTestOlapTableOptions opts;
opts.Sharding = sharding;
- CreateOlapTable(*server.ServerSettings, "log1", opts);
+ CreateOlapTable<NotNull>(*server.ServerSettings, "log1", opts);
const ui64 batchCount = 100;
const ui64 batchSize = 1000;
@@ -454,22 +474,23 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
}
}
- Y_UNIT_TEST(DuplicateRows) {
+ Y_UNIT_TEST_TWIN(DuplicateRows, NotNull) {
for (auto& sharding : testShardingVariants) {
- TestDuplicateRows(sharding);
+ TestDuplicateRows<NotNull>(sharding);
}
}
+ template<bool NotNull>
void TestQuery(const TString& query, const TString& sharding) {
NKikimrConfig::TAppConfig appConfig;
TKikimrWithGrpcAndRootSchema server(appConfig, {}, {}, false, &UdfFrFactory);
auto connection = ConnectToServer(server);
- CreateTestTables(*server.ServerSettings, "log1", sharding);
-
- // EnableDebugLogs(server);
+ CreateTestTables<NotNull>(*server.ServerSettings, "log1", sharding);
+ EnableDebugLogs(server);
+ Cerr << "Run on empty table:" << Endl;
// Run with empty tables first
CompareQueryResults(connection, "log1", query);
@@ -478,12 +499,13 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
size_t rowCount = WriteTestRows(connection, "log1", 0, batchCount, batchSize);
UNIT_ASSERT_VALUES_EQUAL(rowCount, batchCount * batchSize);
- // EnableDebugLogs(server);
+ EnableDebugLogs(server);
+ Cerr << "Run on filled table:" << Endl;
CompareQueryResults(connection, "log1", query);
}
- Y_UNIT_TEST(LogLast50) {
+ Y_UNIT_TEST_TWIN(LogLast50, NotNull) {
TString query(R"(
SELECT `timestamp`, `resource_type`, `resource_id`, `uid`, `level`, `message`
FROM <TABLE>
@@ -492,11 +514,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogLast50ByResource) {
+ Y_UNIT_TEST_TWIN(LogLast50ByResource, NotNull) {
TString query(R"(
SELECT `timestamp`, `resource_type`, `resource_id`, `uid`, `level`, `message`
FROM <TABLE>
@@ -506,11 +528,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogGrepNonExisting) {
+ Y_UNIT_TEST_TWIN(LogGrepNonExisting, NotNull) {
TString query(R"(
SELECT `timestamp`, `resource_type`, `resource_id`, `uid`, `level`, `message`
FROM <TABLE>
@@ -520,11 +542,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogGrepExisting) {
+ Y_UNIT_TEST_TWIN(LogGrepExisting, NotNull) {
TString query(R"(
SELECT `timestamp`, `resource_type`, `resource_id`, `uid`, `level`, `message`
FROM <TABLE>
@@ -534,11 +556,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogNonExistingRequest) {
+ Y_UNIT_TEST_TWIN(LogNonExistingRequest, NotNull) {
TString query(R"(
$request_id = '0xfaceb00c';
@@ -550,11 +572,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogExistingRequest) {
+ Y_UNIT_TEST_TWIN(LogExistingRequest, NotNull) {
TString query(R"(
$request_id = '1f';
@@ -566,11 +588,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogNonExistingUserId) {
+ Y_UNIT_TEST_TWIN(LogNonExistingUserId, NotNull) {
TString query(R"(
$user_id = '111';
@@ -582,11 +604,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogExistingUserId) {
+ Y_UNIT_TEST_TWIN(LogExistingUserId, NotNull) {
TString query(R"(
$user_id = '1000042';
@@ -598,11 +620,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogPagingBefore) {
+ Y_UNIT_TEST_TWIN(LogPagingBefore, NotNull) {
TString query(R"(
PRAGMA kikimr.OptEnablePredicateExtract = "true";
@@ -620,11 +642,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogPagingBetween) {
+ Y_UNIT_TEST_TWIN(LogPagingBetween, NotNull) {
TString query(R"(
PRAGMA kikimr.OptEnablePredicateExtract = "true";
@@ -648,11 +670,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogPagingAfter) {
+ Y_UNIT_TEST_TWIN(LogPagingAfter, NotNull) {
TString query(R"(
PRAGMA kikimr.OptEnablePredicateExtract = "true";
@@ -676,11 +698,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogCountByResource) {
+ Y_UNIT_TEST_TWIN(LogCountByResource, NotNull) {
TString query(R"(
SELECT count(*)
FROM <TABLE>
@@ -689,11 +711,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogWithUnionAllAscending) {
+ Y_UNIT_TEST_TWIN(LogWithUnionAllAscending, NotNull) {
TString query(R"(
PRAGMA AnsiInForEmptyOrNullableItemsCollections;
@@ -721,11 +743,11 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogWithUnionAllDescending) {
+ Y_UNIT_TEST_TWIN(LogWithUnionAllDescending, NotNull) {
TString query(R"(
PRAGMA AnsiInForEmptyOrNullableItemsCollections;
@@ -753,11 +775,15 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
- Y_UNIT_TEST(LogTsRangeDescending) {
+ Y_UNIT_TEST_TWIN(LogTsRangeDescending, NotNull) {
+ if (NotNull) {
+ // Wait for fix https://st.yandex-team.ru/KIKIMR-16920
+ return;
+ }
TString query(R"(
--PRAGMA AnsiInForEmptyOrNullableItemsCollections;
@@ -775,7 +801,7 @@ Y_UNIT_TEST_SUITE(YdbOlapStore) {
)");
for (auto& sharding : testShardingVariants) {
- TestQuery(query, sharding);
+ TestQuery<NotNull>(query, sharding);
}
}
}
diff --git a/ydb/services/ydb/ydb_table.cpp b/ydb/services/ydb/ydb_table.cpp
index 35d55fa4b9..f0bb08649a 100644
--- a/ydb/services/ydb/ydb_table.cpp
+++ b/ydb/services/ydb/ydb_table.cpp
@@ -7,8 +7,31 @@
namespace NKikimr {
namespace NGRpcService {
+TGRpcYdbTableService::TGRpcYdbTableService(NActors::TActorSystem *system,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters,
+ const NActors::TActorId& proxyId,
+ bool rlAllowed,
+ size_t handlersPerCompletionQueue)
+ : TGrpcServiceBase(system, counters, proxyId, rlAllowed)
+ , HandlersPerCompletionQueue(Max(size_t{1}, handlersPerCompletionQueue))
+{
+}
+
+TGRpcYdbTableService::TGRpcYdbTableService(NActors::TActorSystem *system,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters,
+ const TVector<NActors::TActorId>& proxies,
+ bool rlAllowed,
+ size_t handlersPerCompletionQueue)
+ : TGrpcServiceBase(system, counters, proxies, rlAllowed)
+ , HandlersPerCompletionQueue(Max(size_t{1}, handlersPerCompletionQueue))
+{
+}
+
void TGRpcYdbTableService::SetupIncomingRequests(NGrpc::TLoggerPtr logger) {
auto getCounterBlock = CreateCounterCb(Counters_, ActorSystem_);
+
+ size_t proxyCounter = 0;
+
#ifdef ADD_REQUEST_LIMIT
#error ADD_REQUEST_LIMIT macro already defined
#endif
@@ -17,27 +40,37 @@ void TGRpcYdbTableService::SetupIncomingRequests(NGrpc::TLoggerPtr logger) {
#error ADD_STREAM_REQUEST_LIMIT macro already defined
#endif
-#define ADD_REQUEST_LIMIT(NAME, CB, LIMIT_TYPE) \
- MakeIntrusive<TGRpcRequest<Ydb::Table::NAME##Request, Ydb::Table::NAME##Response, TGRpcYdbTableService>> \
- (this, &Service_, CQ_, \
- [this](NGrpc::IRequestContextBase *ctx) { \
- NGRpcService::ReportGrpcReqToMon(*ActorSystem_, ctx->GetPeer()); \
- ActorSystem_->Send(GRpcRequestProxyId_, \
- new TGrpcRequestOperationCall<Ydb::Table::NAME##Request, Ydb::Table::NAME##Response> \
- (ctx, &CB, TRequestAuxSettings{RLSWITCH(TRateLimiterMode::LIMIT_TYPE), nullptr})); \
- }, &Ydb::Table::V1::TableService::AsyncService::Request ## NAME, \
- #NAME, logger, getCounterBlock("table", #NAME))->Run();
+#define ADD_REQUEST_LIMIT(NAME, CB, LIMIT_TYPE) \
+ for (size_t i = 0; i < HandlersPerCompletionQueue; ++i) { \
+ for (auto* cq: CQS) { \
+ MakeIntrusive<TGRpcRequest<Ydb::Table::NAME##Request, Ydb::Table::NAME##Response, TGRpcYdbTableService>> \
+ (this, &Service_, cq, \
+ [this, proxyCounter](NGrpc::IRequestContextBase *ctx) { \
+ NGRpcService::ReportGrpcReqToMon(*ActorSystem_, ctx->GetPeer()); \
+ ActorSystem_->Send(GRpcProxies_[proxyCounter % GRpcProxies_.size()], \
+ new TGrpcRequestOperationCall<Ydb::Table::NAME##Request, Ydb::Table::NAME##Response> \
+ (ctx, &CB, TRequestAuxSettings{RLSWITCH(TRateLimiterMode::LIMIT_TYPE), nullptr})); \
+ }, &Ydb::Table::V1::TableService::AsyncService::Request ## NAME, \
+ #NAME, logger, getCounterBlock("table", #NAME))->Run(); \
+ ++proxyCounter; \
+ } \
+ }
#define ADD_STREAM_REQUEST_LIMIT(NAME, IN, OUT, CB, LIMIT_TYPE) \
- MakeIntrusive<TGRpcRequest<Ydb::Table::IN, Ydb::Table::OUT, TGRpcYdbTableService>> \
- (this, &Service_, CQ_, \
- [this](NGrpc::IRequestContextBase *ctx) { \
- NGRpcService::ReportGrpcReqToMon(*ActorSystem_, ctx->GetPeer()); \
- ActorSystem_->Send(GRpcRequestProxyId_, \
- new TGrpcRequestNoOperationCall<Ydb::Table::IN, Ydb::Table::OUT> \
- (ctx, &CB, TRequestAuxSettings{RLSWITCH(TRateLimiterMode::LIMIT_TYPE), nullptr})); \
- }, &Ydb::Table::V1::TableService::AsyncService::Request ## NAME, \
- #NAME, logger, getCounterBlock("table", #NAME))->Run();
+ for (size_t i = 0; i < HandlersPerCompletionQueue; ++i) { \
+ for (auto* cq: CQS) { \
+ MakeIntrusive<TGRpcRequest<Ydb::Table::IN, Ydb::Table::OUT, TGRpcYdbTableService>> \
+ (this, &Service_, cq, \
+ [this, proxyCounter](NGrpc::IRequestContextBase *ctx) { \
+ NGRpcService::ReportGrpcReqToMon(*ActorSystem_, ctx->GetPeer()); \
+ ActorSystem_->Send(GRpcProxies_[proxyCounter % GRpcProxies_.size()], \
+ new TGrpcRequestNoOperationCall<Ydb::Table::IN, Ydb::Table::OUT> \
+ (ctx, &CB, TRequestAuxSettings{RLSWITCH(TRateLimiterMode::LIMIT_TYPE), nullptr})); \
+ }, &Ydb::Table::V1::TableService::AsyncService::Request ## NAME, \
+ #NAME, logger, getCounterBlock("table", #NAME))->Run(); \
+ ++proxyCounter; \
+ } \
+ }
ADD_REQUEST_LIMIT(CreateSession, DoCreateSessionRequest, Rps)
ADD_REQUEST_LIMIT(KeepAlive, DoKeepAliveRequest, Rps)
diff --git a/ydb/services/ydb/ydb_table.h b/ydb/services/ydb/ydb_table.h
index 38f9ea77c0..da248ea6e4 100644
--- a/ydb/services/ydb/ydb_table.h
+++ b/ydb/services/ydb/ydb_table.h
@@ -14,8 +14,25 @@ class TGRpcYdbTableService
public:
using TGrpcServiceBase<Ydb::Table::V1::TableService>::TGrpcServiceBase;
+ TGRpcYdbTableService(
+ NActors::TActorSystem *system,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters,
+ const NActors::TActorId& proxyId,
+ bool rlAllowed,
+ size_t handlersPerCompletionQueue = 1);
+
+ TGRpcYdbTableService(
+ NActors::TActorSystem *system,
+ TIntrusivePtr<::NMonitoring::TDynamicCounters> counters,
+ const TVector<NActors::TActorId>& proxies,
+ bool rlAllowed,
+ size_t handlersPerCompletionQueue);
+
private:
void SetupIncomingRequests(NGrpc::TLoggerPtr logger);
+
+private:
+ const size_t HandlersPerCompletionQueue;
};
} // namespace NGRpcService
diff --git a/ydb/services/ydb/ydb_table_split_ut.cpp b/ydb/services/ydb/ydb_table_split_ut.cpp
index bb497a448c..8e1b82e514 100644
--- a/ydb/services/ydb/ydb_table_split_ut.cpp
+++ b/ydb/services/ydb/ydb_table_split_ut.cpp
@@ -215,7 +215,9 @@ Y_UNIT_TEST_SUITE(YdbTableSplit) {
"SELECT * FROM `/Root/Foo` \n"
"WHERE NameHash = $name_hash AND Name = $name";
- TKikimrWithGrpcAndRootSchema server;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ TKikimrWithGrpcAndRootSchema server(appConfig);
DoTestSplitByLoad(server, query, /* fill with data */ true, /* at least two splits */ 2);
}
@@ -365,7 +367,9 @@ Y_UNIT_TEST_SUITE(YdbTableSplit) {
TIntrusivePtr<TTestTimeProvider> testTimeProvider = new TTestTimeProvider(originalTimeProvider);
NKikimr::TAppData::TimeProvider = testTimeProvider;
- TKikimrWithGrpcAndRootSchema server;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ TKikimrWithGrpcAndRootSchema server(appConfig);
// Set min uptime before merge by load to 10h
TAtomic unused;
diff --git a/ydb/services/ydb/ydb_table_ut.cpp b/ydb/services/ydb/ydb_table_ut.cpp
index 8ee196614a..2aa8cf08b6 100644
--- a/ydb/services/ydb/ydb_table_ut.cpp
+++ b/ydb/services/ydb/ydb_table_ut.cpp
@@ -1396,7 +1396,9 @@ R"___(<main>: Error: Transaction not found: , code: 2015
}
Y_UNIT_TEST(TestExecError) {
- TKikimrWithGrpcAndRootSchema server;
+ NKikimrConfig::TAppConfig appConfig;
+ appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(false);
+ TKikimrWithGrpcAndRootSchema server(appConfig);
ui16 grpc = server.GetPort();
TString location = TStringBuilder() << "localhost:" << grpc;
@@ -2936,7 +2938,7 @@ R"___(<main>: Error: Transaction not found: , code: 2015
for (bool returnStats : {false, true}) {
NYdb::NTable::TExecDataQuerySettings execSettings;
if (returnStats) {
- execSettings.CollectQueryStats(ECollectQueryStatsMode::Basic);
+ execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile);
}
{
auto query = "UPSERT INTO `/Root/Foo` (Key, Value) VALUES (0, 'aa');";
diff --git a/ydb/services/ydb/ydb_ut.cpp b/ydb/services/ydb/ydb_ut.cpp
index 69de63ed05..526d8a5837 100644
--- a/ydb/services/ydb/ydb_ut.cpp
+++ b/ydb/services/ydb/ydb_ut.cpp
@@ -2064,7 +2064,7 @@ tx_meta {
Stub_ = Ydb::Table::V1::TableService::NewStub(Channel_);
Ydb::Table::ExecuteDataQueryRequest request;
request.set_session_id(sessionId);
- request.mutable_query()->set_yql_text("DECLARE $param1 AS \"Tuple<Int32,Bool>\"; SELECT $param1 AS Tuple;");
+ request.mutable_query()->set_yql_text("DECLARE $param1 AS Tuple<Int32,Bool>; SELECT $param1 AS Tuple;");
request.mutable_tx_control()->mutable_begin_tx()->mutable_serializable_read_write();
request.mutable_tx_control()->set_commit_tx(true);
diff --git a/ydb/tests/functional/api/test_session_grace_shutdown.py b/ydb/tests/functional/api/test_session_grace_shutdown.py
index de5ac6a7fc..f7c152727d 100644
--- a/ydb/tests/functional/api/test_session_grace_shutdown.py
+++ b/ydb/tests/functional/api/test_session_grace_shutdown.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import logging
+import time
from ydb.tests.library.harness.kikimr_cluster import kikimr_cluster_factory
import ydb
@@ -49,3 +50,40 @@ class Test(object):
assert iterations < 10
pool.release(session)
+
+
+class TestIdle(object):
+ @classmethod
+ def setup_class(cls):
+ cls.cluster = kikimr_cluster_factory()
+ cls.cluster.start()
+ cls.driver_config = ydb.DriverConfig(
+ "%s:%s" % (cls.cluster.nodes[1].host, cls.cluster.nodes[1].port), database='/Root')
+ cls.driver = ydb.Driver(cls.driver_config)
+ cls.driver.wait(timeout=10)
+
+ @classmethod
+ def teardown_class(cls):
+ if hasattr(cls, 'driver'):
+ cls.driver.stop()
+
+ if hasattr(cls, 'cluster'):
+ cls.cluster.stop()
+
+ def test_idle_shutdown_of_session(self):
+ self.cluster.client.add_config_item("TableServiceConfig { SessionIdleDurationSeconds: 1 }")
+ pool = ydb.SessionPool(self.driver, size=1000)
+ sessions = [pool.acquire() for _ in range(1000)]
+
+ time.sleep(5)
+ closed_idle = 0
+
+ for session in sessions:
+ try:
+ session.transaction().execute('select 1;', commit_tx=True)
+ except ydb.BadSession:
+ closed_idle += 1
+ finally:
+ pool.release(session)
+
+ assert closed_idle == 1000
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan
index 742eb7c912..577cc4a80a 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan
@@ -73,7 +73,7 @@
"Name": "Aggregate"
},
{
- "ReadRanges": [
+ "ReadRange": [
"Key (-\u221e, +\u221e)"
],
"ReadColumns": null,
@@ -238,7 +238,7 @@
"Name": "Aggregate"
},
{
- "ReadRanges": [
+ "ReadRange": [
"Key (-\u221e, +\u221e)"
],
"ReadColumns": null,
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan
index fcd0dad63b..e124f9185e 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan
@@ -193,7 +193,7 @@
"PlanNodeId": 1,
"Operators": [
{
- "ReadRanges": [
+ "ReadRange": [
"Group (-\u221e, +\u221e)",
"Name (-\u221e, +\u221e)"
],
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_composite.sql-plan_/pk_predicate_pk_predicate_composite.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_composite.sql-plan_/pk_predicate_pk_predicate_composite.sql.plan
index e07bb78cf4..bee72432de 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_composite.sql-plan_/pk_predicate_pk_predicate_composite.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_composite.sql-plan_/pk_predicate_pk_predicate_composite.sql.plan
@@ -14,12 +14,26 @@
"Group",
"Name"
],
- "limit": "1001",
"scan_by": [
"Group (4, +\u221e)",
- "Name (Name1, +\u221e)"
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "lookup_by": [
+ "Group (4)"
+ ],
+ "scan_by": [
+ "Name (Name1, +\u221e)"
+ ],
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_point_range_rp.sql-plan_/pk_predicate_pk_predicate_point_range_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_point_range_rp.sql-plan_/pk_predicate_pk_predicate_point_range_rp.sql.plan
index e91a047285..a5fcb81ad8 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_point_range_rp.sql-plan_/pk_predicate_pk_predicate_point_range_rp.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_point_range_rp.sql-plan_/pk_predicate_pk_predicate_point_range_rp.sql.plan
@@ -14,11 +14,13 @@
"Group",
"Name"
],
+ "lookup_by": [
+ "Group (1)"
+ ],
"scan_by": [
- "Group [1, 1)",
"Name [Name1, Name3)"
],
- "type": "Scan"
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_nonkey_rp.sql-plan_/pk_predicate_pk_predicate_range_nonkey_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_nonkey_rp.sql-plan_/pk_predicate_pk_predicate_range_nonkey_rp.sql.plan
index 62b43d7b55..ec483d113b 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_nonkey_rp.sql-plan_/pk_predicate_pk_predicate_range_nonkey_rp.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_nonkey_rp.sql-plan_/pk_predicate_pk_predicate_range_nonkey_rp.sql.plan
@@ -15,7 +15,8 @@
"Name"
],
"scan_by": [
- "Group (-\u221e, 4)"
+ "Group (-\u221e, 4)",
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp.sql-plan_/pk_predicate_pk_predicate_range_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp.sql-plan_/pk_predicate_pk_predicate_range_rp.sql.plan
index d8659d8331..28a9e34d6d 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp.sql-plan_/pk_predicate_pk_predicate_range_rp.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp.sql-plan_/pk_predicate_pk_predicate_range_rp.sql.plan
@@ -15,7 +15,8 @@
"Name"
],
"scan_by": [
- "Group [3, 6)"
+ "Group [3, 6)",
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp_1.sql-plan_/pk_predicate_pk_predicate_range_rp_1.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp_1.sql-plan_/pk_predicate_pk_predicate_range_rp_1.sql.plan
index ce60883ac2..c925568ee4 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp_1.sql-plan_/pk_predicate_pk_predicate_range_rp_1.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_rp_1.sql-plan_/pk_predicate_pk_predicate_range_rp_1.sql.plan
@@ -15,7 +15,8 @@
"Name"
],
"scan_by": [
- "Group [100001, +\u221e)"
+ "Group [100001, +\u221e)",
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_single_rp.sql-plan_/pk_predicate_pk_predicate_range_single_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_single_rp.sql-plan_/pk_predicate_pk_predicate_range_single_rp.sql.plan
index f20cc1658d..e73c7f5e89 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_single_rp.sql-plan_/pk_predicate_pk_predicate_range_single_rp.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_range_single_rp.sql-plan_/pk_predicate_pk_predicate_range_single_rp.sql.plan
@@ -15,7 +15,8 @@
"Name"
],
"scan_by": [
- "Group (1, 4]"
+ "Group (1, 4]",
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_1.sql-plan_/pk_predicate_pk_predicate_ranges_1.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_1.sql-plan_/pk_predicate_pk_predicate_ranges_1.sql.plan
index 476003f42b..ee6f80bde9 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_1.sql-plan_/pk_predicate_pk_predicate_ranges_1.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_1.sql-plan_/pk_predicate_pk_predicate_ranges_1.sql.plan
@@ -14,13 +14,43 @@
"Group",
"Name"
],
- "limit": "1001",
+ "lookup_by": [
+ "Group (10)"
+ ],
+ "scan_by": [
+ "Name [Name1, Name3)"
+ ],
+ "type": "Lookup"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "lookup_by": [
+ "Group (10)"
+ ],
+ "scan_by": [
+ "Name [Name3, Name5]"
+ ],
+ "type": "Lookup"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "lookup_by": [
+ "Group (2)"
+ ],
"scan_by": [
- "Group [2, 2]",
- "Group [10, 10]",
- "Name [Name1, Name5]"
+ "Name (-\u221e, +\u221e)"
],
- "type": "Scan"
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int.sql-plan_/pk_predicate_pk_predicate_ranges_int.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int.sql-plan_/pk_predicate_pk_predicate_ranges_int.sql.plan
index b8a9487eca..fd8ebb8af4 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int.sql-plan_/pk_predicate_pk_predicate_ranges_int.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int.sql-plan_/pk_predicate_pk_predicate_ranges_int.sql.plan
@@ -14,11 +14,11 @@
"Group",
"Name"
],
- "limit": "1001",
"scan_by": [
- "Group (1, 6)"
+ "Group (-\u221e, +\u221e)",
+ "Name (-\u221e, +\u221e)"
],
- "type": "Scan"
+ "type": "FullScan"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int_1.sql-plan_/pk_predicate_pk_predicate_ranges_int_1.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int_1.sql-plan_/pk_predicate_pk_predicate_ranges_int_1.sql.plan
index a802b99692..aa7d16ec02 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int_1.sql-plan_/pk_predicate_pk_predicate_ranges_int_1.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_int_1.sql-plan_/pk_predicate_pk_predicate_ranges_int_1.sql.plan
@@ -14,12 +14,11 @@
"Group",
"Name"
],
- "limit": "1001",
"scan_by": [
- "Group [10, 10]",
- "Name [Name1, Name5]"
+ "Group (-\u221e, +\u221e)",
+ "Name (-\u221e, +\u221e)"
],
- "type": "Scan"
+ "type": "FullScan"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp.sql-plan_/pk_predicate_pk_predicate_ranges_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp.sql-plan_/pk_predicate_pk_predicate_ranges_rp.sql.plan
index c40f981671..3032cfd2a9 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp.sql-plan_/pk_predicate_pk_predicate_ranges_rp.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp.sql-plan_/pk_predicate_pk_predicate_ranges_rp.sql.plan
@@ -16,7 +16,20 @@
],
"scan_by": [
"Group (1, 3]",
- "Group [4, 10)"
+ "Name (-\u221e, +\u221e)"
+ ],
+ "type": "Scan"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "scan_by": [
+ "Group [4, 10)",
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp_1.sql-plan_/pk_predicate_pk_predicate_ranges_rp_1.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp_1.sql-plan_/pk_predicate_pk_predicate_ranges_rp_1.sql.plan
index 3c4dc90d68..9a3a2901d7 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp_1.sql-plan_/pk_predicate_pk_predicate_ranges_rp_1.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_ranges_rp_1.sql-plan_/pk_predicate_pk_predicate_ranges_rp_1.sql.plan
@@ -16,12 +16,27 @@
],
"scan_by": [
"Group [3, 5)",
- "Group [6, 6]",
- "Name [Name1, Name1]",
- "Group [10, 10]",
- "Name [Name5, Name5]"
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "type": "Lookup"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_reverse_1.sql-plan_/pk_predicate_pk_predicate_reverse_1.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_reverse_1.sql-plan_/pk_predicate_pk_predicate_reverse_1.sql.plan
index 7bd9ec5467..0b94c6609e 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_reverse_1.sql-plan_/pk_predicate_pk_predicate_reverse_1.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_reverse_1.sql-plan_/pk_predicate_pk_predicate_reverse_1.sql.plan
@@ -15,11 +15,13 @@
"Name"
],
"limit": "1001",
+ "lookup_by": [
+ "Group (10)"
+ ],
"scan_by": [
- "Group [10, 10)",
"Name [Name2, Name4)"
],
- "type": "Scan"
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range.sql-plan_/topsort_topsort_multi_range.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range.sql-plan_/topsort_topsort_multi_range.sql.plan
index dfa0c0ffcb..84a8f7b6c1 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range.sql-plan_/topsort_topsort_multi_range.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range.sql-plan_/topsort_topsort_multi_range.sql.plan
@@ -15,10 +15,25 @@
"Name"
],
"scan_by": [
- "Group [10, +\u221e)",
- "Name [Name3, +\u221e)"
+ "Group (10, +\u221e)",
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "lookup_by": [
+ "Group (10)"
+ ],
+ "scan_by": [
+ "Name [Name3, +\u221e)"
+ ],
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_pk.sql-plan_/topsort_topsort_multi_range_pk.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_pk.sql-plan_/topsort_topsort_multi_range_pk.sql.plan
index 5326bf25d8..f83b145ce8 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_pk.sql-plan_/topsort_topsort_multi_range_pk.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_pk.sql-plan_/topsort_topsort_multi_range_pk.sql.plan
@@ -16,9 +16,24 @@
],
"scan_by": [
"Group (10, +\u221e)",
- "Name (Name4, +\u221e)"
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "lookup_by": [
+ "Group (10)"
+ ],
+ "scan_by": [
+ "Name (Name4, +\u221e)"
+ ],
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_skip.sql-plan_/topsort_topsort_multi_range_skip.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_skip.sql-plan_/topsort_topsort_multi_range_skip.sql.plan
index ca0601f059..69ad78e4e8 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_skip.sql-plan_/topsort_topsort_multi_range_skip.sql.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_topsort_topsort_multi_range_skip.sql-plan_/topsort_topsort_multi_range_skip.sql.plan
@@ -16,9 +16,24 @@
],
"scan_by": [
"Group (10, +\u221e)",
- "Name (Name2, +\u221e)"
+ "Name (-\u221e, +\u221e)"
],
"type": "Scan"
+ },
+ {
+ "columns": [
+ "Amount",
+ "Comment",
+ "Group",
+ "Name"
+ ],
+ "lookup_by": [
+ "Group (10)"
+ ],
+ "scan_by": [
+ "Name (Name2, +\u221e)"
+ ],
+ "type": "Lookup"
}
]
}
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage.script-script_/write_multi_usage.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage.script-script_/write_multi_usage.script.plan
index eb9c3f9bc2..2d193a6108 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage.script-script_/write_multi_usage.script.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage.script-script_/write_multi_usage.script.plan
@@ -64,10 +64,10 @@
"Limit": "1001"
},
{
- "ReadLimit": "1001",
- "ReadRanges": [
+ "ReadRange": [
"Name (-\u221e, +\u221e)"
],
+ "ReadLimit": "1001",
"ReadColumns": [
"Name",
"Value"
@@ -118,11 +118,11 @@
"Limit": "1001"
},
{
- "ReadLimit": "1001",
- "ReadRanges": [
+ "ReadRange": [
"Group (-\u221e, +\u221e)",
"Name (-\u221e, +\u221e)"
],
+ "ReadLimit": "1001",
"ReadColumns": [
"Amount",
"Comment",
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage_key.script-script_/write_multi_usage_key.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage_key.script-script_/write_multi_usage_key.script.plan
index 7d4854f8cc..79a45a3f36 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage_key.script-script_/write_multi_usage_key.script.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage_key.script-script_/write_multi_usage_key.script.plan
@@ -160,7 +160,7 @@
"Name": "Filter"
},
{
- "ReadRanges": [
+ "ReadRange": [
"Group (-\u221e, +\u221e)",
"Name (-\u221e, +\u221e)"
],
diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_write_group_by.script-script_/write_write_group_by.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_write_group_by.script-script_/write_write_group_by.script.plan
index f244160552..0fab253375 100644
--- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_write_group_by.script-script_/write_write_group_by.script.plan
+++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_write_group_by.script-script_/write_write_group_by.script.plan
@@ -165,7 +165,7 @@
"PlanNodeId": 1,
"Operators": [
{
- "ReadRanges": [
+ "ReadRange": [
"Group (-\u221e, +\u221e)",
"Name (-\u221e, +\u221e)"
],
diff --git a/ydb/tests/functional/canonical/test_sql.py b/ydb/tests/functional/canonical/test_sql.py
index d2e2419085..c749d78601 100644
--- a/ydb/tests/functional/canonical/test_sql.py
+++ b/ydb/tests/functional/canonical/test_sql.py
@@ -109,7 +109,15 @@ class BaseCanonicalTest(object):
set_canondata_root('ydb/tests/functional/canonical/canondata')
cls.database = '/local'
- cls.cluster = kikimr_cluster_factory(KikimrConfigGenerator(load_udfs=True, domain_name='local', use_in_memory_pdisks=True))
+ cls.cluster = kikimr_cluster_factory(
+ KikimrConfigGenerator(
+ load_udfs=True,
+ domain_name='local',
+ use_in_memory_pdisks=True,
+ disable_iterator_reads=True,
+ disable_iterator_lookups=True
+ )
+ )
cls.cluster.start()
cls.driver = ydb.Driver(
ydb.DriverConfig("%s:%s" % (cls.cluster.nodes[1].host, cls.cluster.nodes[1].port), cls.database))
diff --git a/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_bs_controller_/flat_bs_controller.schema b/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_bs_controller_/flat_bs_controller.schema
index dc3706617e..00cd34dd26 100644
--- a/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_bs_controller_/flat_bs_controller.schema
+++ b/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_bs_controller_/flat_bs_controller.schema
@@ -1415,6 +1415,11 @@
"ColumnId": 9,
"ColumnName": "PDiskConfig",
"ColumnType": "String"
+ },
+ {
+ "ColumnId": 10,
+ "ColumnName": "Path",
+ "ColumnType": "String"
}
],
"ColumnsDropped": [],
@@ -1429,7 +1434,8 @@
6,
7,
8,
- 9
+ 9,
+ 10
],
"RoomID": 0,
"Codec": 0,
diff --git a/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_datashard_/flat_datashard.schema b/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_datashard_/flat_datashard.schema
index 20d676d546..0c51c0565c 100644
--- a/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_datashard_/flat_datashard.schema
+++ b/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_datashard_/flat_datashard.schema
@@ -1814,6 +1814,92 @@
}
},
{
+ "TableId": 34,
+ "TableName": "CdcStreamScans",
+ "TableKey": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "ColumnsAdded": [
+ {
+ "ColumnId": 1,
+ "ColumnName": "TableOwnerId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 2,
+ "ColumnName": "TablePathId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 3,
+ "ColumnName": "StreamOwnerId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 4,
+ "ColumnName": "StreamPathId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 5,
+ "ColumnName": "LastKey",
+ "ColumnType": "String"
+ },
+ {
+ "ColumnId": 6,
+ "ColumnName": "SnapshotStep",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 7,
+ "ColumnName": "SnapshotTxId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 8,
+ "ColumnName": "RowsProcessed",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 9,
+ "ColumnName": "BytesProcessed",
+ "ColumnType": "Uint64"
+ }
+ ],
+ "ColumnsDropped": [],
+ "ColumnFamilies": {
+ "0": {
+ "Columns": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "RoomID": 0,
+ "Codec": 0,
+ "InMemory": false,
+ "Cache": 0,
+ "Small": 4294967295,
+ "Large": 4294967295
+ }
+ },
+ "Rooms": {
+ "0": {
+ "Main": 1,
+ "Outer": 1,
+ "Blobs": 1
+ }
+ }
+ },
+ {
"TableId": 101,
"TableName": "LockChangeRecords",
"TableKey": [
diff --git a/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_schemeshard_/flat_schemeshard.schema b/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_schemeshard_/flat_schemeshard.schema
index 771cf1fd6f..a53dde2a59 100644
--- a/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_schemeshard_/flat_schemeshard.schema
+++ b/ydb/tests/functional/scheme_tests/canondata/tablet_scheme_tests.TestTabletSchemes.test_tablet_schemes_flat_schemeshard_/flat_schemeshard.schema
@@ -6708,5 +6708,126 @@
"Blobs": 1
}
}
+ },
+ {
+ "TableId": 103,
+ "TableName": "CdcStreamScanShardStatus",
+ "TableKey": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "ColumnsAdded": [
+ {
+ "ColumnId": 1,
+ "ColumnName": "OwnerPathId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 2,
+ "ColumnName": "LocalPathId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 3,
+ "ColumnName": "OwnerShardIdx",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 4,
+ "ColumnName": "LocalShardIdx",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 5,
+ "ColumnName": "Status",
+ "ColumnType": "Uint32"
+ }
+ ],
+ "ColumnsDropped": [],
+ "ColumnFamilies": {
+ "0": {
+ "Columns": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ "RoomID": 0,
+ "Codec": 0,
+ "InMemory": false,
+ "Cache": 0,
+ "Small": 4294967295,
+ "Large": 4294967295
+ }
+ },
+ "Rooms": {
+ "0": {
+ "Main": 1,
+ "Outer": 1,
+ "Blobs": 1
+ }
+ }
+ },
+ {
+ "TableId": 106,
+ "TableName": "PersQueueGroupStats",
+ "TableKey": [
+ 1
+ ],
+ "ColumnsAdded": [
+ {
+ "ColumnId": 1,
+ "ColumnName": "PathId",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 2,
+ "ColumnName": "SeqNoGeneration",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 3,
+ "ColumnName": "SeqNoRound",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 4,
+ "ColumnName": "DataSize",
+ "ColumnType": "Uint64"
+ },
+ {
+ "ColumnId": 5,
+ "ColumnName": "UsedReserveSize",
+ "ColumnType": "Uint64"
+ }
+ ],
+ "ColumnsDropped": [],
+ "ColumnFamilies": {
+ "0": {
+ "Columns": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ "RoomID": 0,
+ "Codec": 0,
+ "InMemory": false,
+ "Cache": 0,
+ "Small": 4294967295,
+ "Large": 4294967295
+ }
+ },
+ "Rooms": {
+ "0": {
+ "Main": 1,
+ "Outer": 1,
+ "Blobs": 1
+ }
+ }
}
] \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_10.plan
index 35fbb4682a..654df32e79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_11.plan
index 8782aaf5a4..6382cefc57 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.Simplest_Math\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"Simplest_Math (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.Simplest_Math\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"Simplest_Math (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_12.plan
index 35fbb4682a..654df32e79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_13.plan
index 35fbb4682a..654df32e79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_14.plan
index 877be74711..a0448e78b8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f\",\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 == 4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f\",\n \"i\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f\",\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 == 4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f\",\n \"i\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_7.plan
index 35fbb4682a..654df32e79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_8.plan
index 35fbb4682a..654df32e79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-case.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_case.test_plan\\/CASE_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_case.test_plan\\/CASE_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_case.test_plan\\/CASE_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan
index e0c5d6f47d..72d3f37df9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_4\",\n \"PlanNodeId\":32,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":31,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":30,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.a_y\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":29,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":28,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_4_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_2_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":27\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":26,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":25,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_4_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_3_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":23,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a_y (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_3\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":21,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":20\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_3_0\"\n },\n {\n \"Node Type\":\"Precompute_2\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_2_0\"\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadRanges\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_4\",\n \"PlanNodeId\":32,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":31,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":30,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.a_y\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":29,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":28,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_4_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_2_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":27\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":26,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":25,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_4_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_3_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":23,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a_y (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_3\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":21,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":20\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_3_0\"\n },\n {\n \"Node Type\":\"Precompute_2\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_2_0\"\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadRange\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan
index 820595a41a..a10a4d6973 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.a_y\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a_y (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadRanges\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.a_y\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a_y (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadRange\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan
index cb754f0d90..eaf9adfe84 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.pv_x\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"pv_x (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"ReadRanges\":\n [\n \"x (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.pv_x\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"pv_x (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\"\n ],\n \"ReadRange\":\n [\n \"x (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan
index 7190d35df2..2fefa3029f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/xx\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"pkxx\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/yy\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"pkxx\",\n \"pkyy\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.yy_pkyy\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.pkxx)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"pkxx\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"yy_pkyy (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"pkxx\",\n \"pkyy\"\n ],\n \"ReadRanges\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/xx\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"pkxx\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/yy\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"pkxx\",\n \"pkyy\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.yy_pkyy\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.pkxx)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"pkxx\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"yy_pkyy (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"pkxx\",\n \"pkyy\"\n ],\n \"ReadRange\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_5.plan
index efc5b422e8..9639b1b926 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/xx\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"pkxx (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"pkxx\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/yy\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"pkxx\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"pkxx\"\n ],\n \"ReadRanges\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"pkxx\"\n ],\n \"ReadRanges\":\n [\n \"pkxx (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/xx\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"pkxx (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"pkxx\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/coalesce-and-join.test_plan\\/yy\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"pkxx\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"pkxx\"\n ],\n \"ReadRange\":\n [\n \"pkxx (-\u221e, +\u221e)\",\n \"pkyy (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/yy\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"pkxx\"\n ],\n \"ReadRange\":\n [\n \"pkxx (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/coalesce-and-join.test_plan\\/xx\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan
index 7f1b90a114..cfac4c45ec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"q1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"q1\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q2)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"q1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"q1\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q2)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan
index 0d5b8ab916..12037110cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"q1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"q1\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q2)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"q1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"q1\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.q2)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan
index 8b7e5f4f76..0b883b4e94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":7,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":7,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan
index 224b444515..669d27d721 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.q2\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"t1.q2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join-group-by-with-null.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan
index a50eca53e1..d714b9124b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i1q1 (Asc)\",\n \"i1q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i1q1 (Asc)\",\n \"i1q2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_10.plan
index 41daefcf93..30e9867a82 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"thousand\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.b.thousand == item.a.q1 And item.a.q1 == item.b.hundred\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"thousand\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.b.thousand == item.a.q1 And item.a.q1 == item.b.hundred\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_11.plan
index b85258abe5..e5dbf9ec2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_12.plan
index e22775ea54..15d00799f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 10\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 10\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"thousand\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_13.plan
index 2180e4ff2c..aadeba8fd9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"[{join_key: 0},{join_key: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":11\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"[{join_key: 0},{join_key: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":11\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_14.plan
index 92278cdc13..baa8044c6a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"FullJoin (JoinDict)-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"FullJoin (JoinDict)\"\n },\n {\n \"Iterator\":\"[{id: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"unique1\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"[{id: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"FullJoin (JoinDict)-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"FullJoin (JoinDict)\"\n },\n {\n \"Iterator\":\"[{id: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"unique1\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"[{id: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_15.plan
index c857c42798..501665f253 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"ten\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"ten\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n },\n {\n \"Iterator\":\"[{f1: 0}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"ten\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"ten\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n },\n {\n \"Iterator\":\"[{f1: 0}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_16.plan
index 115975769b..9de8ca5ed1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Filter-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Nth.unique2 == 42\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"unique2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"unique2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Filter-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Nth.unique2 == 42\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"unique2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"unique2\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_2.plan
index 888e12e8c8..51e6489207 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"tenthous\",\n \"thousand\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":8,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-Aggregate-InnerJoin (MapJoin)-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"tenthous\",\n \"thousand\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":6,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"tenthous\",\n \"thousand\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":8,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-Aggregate-InnerJoin (MapJoin)-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"tenthous\",\n \"thousand\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":6,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_3.plan
index 5c90b38830..6240a4ba84 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.hundred)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items2) And items0 % 10 \\u003C 10\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.hundred)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items2) And items0 % 10 \\u003C 10\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"fivethous\",\n \"hundred\",\n \"thousand\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_4.plan
index 40b825817a..b229f5afcd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"tenthous\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"unique1 (42)\"\n ],\n \"scan_by\":\n [\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"ten\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Not And item.a.ten == 2 Or item.b.hundred == 3\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"tenthous\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"ten\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (42)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"tenthous\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"unique1 (42)\"\n ],\n \"scan_by\":\n [\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"ten\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Not And item.a.ten == 2 Or item.b.hundred == 3\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"tenthous\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"ten\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (42)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan
index e1b22397d8..e2712d8fb5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.qq\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.qq)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"qq\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"qq\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"qq (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.qq\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.qq)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"qq\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"qq\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"qq (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_6.plan
index 493f0f74c6..c58428498d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/ononequery1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/ononequery2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"stringu2\",\n \"unique1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":36,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":35,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":34,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.t1.stringu1 \\u003E item.t2.stringu2\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":33,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":32,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":31\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":30,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":29,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":28,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.unique1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"stringu2\",\n \"unique1\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":27,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":25,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.subq1.y1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":24\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.unique2)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/ononequery1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/ononequery1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"ReadRanges\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/ononequery2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/ononequery2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items1 \\u003C 42\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":17,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int4_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/ononequery1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/ononequery2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"stringu2\",\n \"unique1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":36,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":35,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":34,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.t1.stringu1 \\u003E item.t2.stringu2\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":33,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":32,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":31\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":30,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":29,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":28,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.unique1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"stringu2\",\n \"unique1\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":27,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":25,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.subq1.y1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":24\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.unique2)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/ononequery1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/ononequery1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"ReadRange\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/ononequery2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/ononequery2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int4_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items1 \\u003C 42\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":17,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_7.plan
index 554f492fc1..9ff3b65ada 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"unique1 (1)\"\n ],\n \"scan_by\":\n [\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.thousand)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\"\n ],\n \"ReadRange\":\n [\n \"unique1 (1)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"unique1 (1)\"\n ],\n \"scan_by\":\n [\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.thousand)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\"\n ],\n \"ReadRange\":\n [\n \"unique1 (1)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_8.plan
index 0df861669b..219e6da776 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.thousand)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.thousand)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"hundred\",\n \"ten\",\n \"thousand\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_9.plan
index a94c998d79..afa3f946cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.fault\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"fault (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join0.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.fault\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join0.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"fault (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan
index 60f0796142..805dd02657 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a (Asc)\",\n \"e (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a (Asc)\",\n \"e (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan
index c4dd905903..d2f32c914a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan
index fbbd5315ee..2b95c04912 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan
index 13cb58d916..e5011655ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\",\n \"j (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"i\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\",\n \"j (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_13.plan
index 0242403597..831136a7e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.J2_TBL.k == 1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.J2_TBL.k == 1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan
index 71c3fbaa50..af6542c729 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan
index 71c3fbaa50..af6542c729 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan
index 1c942529e5..d7a5781d01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.j)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"b (Asc)\",\n \"a (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.j)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"b (Asc)\",\n \"a (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan
index 1a81f55e1a..d8f4fd8e7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Limit-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Limit-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan
index f65c4e34ea..ce8ccf08ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.i\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.i\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan
index 7049ff0ea0..14d7bc1c6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan
index 7049ff0ea0..14d7bc1c6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"k (Asc)\",\n \"t (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan
index c4dd905903..d2f32c914a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"j (-\u221e, +\u221e)\",\n \"t (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J1_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\",\n \"k\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\",\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join1.test_plan\\/J2_TBL\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"i (Asc)\",\n \"j (Asc)\",\n \"t (Asc)\",\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_1.plan
index b203063b46..3e8a6e0b4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_10.plan
index d064fdc7aa..d2c9f57c04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_11.plan
index f07cdf0947..4819d7b2d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y.y2)\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y.y2)\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_12.plan
index 14ce1d42dd..36874be1ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan
index e87be8e598..855777ca54 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan
index 1095a7a123..fd9769ea83 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.name)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_4.plan
index d86a6a6be9..c104971f9c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/t3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"n\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-FullJoin (JoinDict)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"FullJoin (JoinDict)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"KeyColumns\":\n [\n \"name\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"n\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\",\n \"n (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/t2\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/t2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_5.plan
index bd0235ee4a..7c92f3ee9e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\",\n \"x2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\",\n \"x2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_6.plan
index 3cf5add1ed..0fe2510fe3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"y1 (Asc)\",\n \"y2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"y1 (-\u221e, +\u221e)\",\n \"y2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"y1 (Asc)\",\n \"y2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_7.plan
index a4c6a38127..34436a94cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_8.plan
index 1a42ddb325..f2eeb4f45e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y.y2)\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y.y2)\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_9.plan
index 14ce1d42dd..36874be1ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRanges\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/x\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"x1\",\n \"x2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join2.test_plan\\/y\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"y1\",\n \"y2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":24,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":23,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":22,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.x1\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":21,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":20,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":19,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":17\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.y1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"y1\",\n \"y2\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/y\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/y\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x1\",\n \"x2\"\n ],\n \"ReadRange\":\n [\n \"x1 (-\u221e, +\u221e)\",\n \"x2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join2.test_plan\\/x\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join2.test_plan\\/x\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_1.plan
index 7b8f0f2e5e..5103db9ada 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"item.b.q1 \\u003E 0\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\",\n \"q1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"item.b.q1 \\u003E 0\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"q2 (Asc)\",\n \"q1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan
index aec1150024..cf8854ca9a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/child\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/parent\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\",\n \"pd\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.k\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.k)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/child\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/child\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.k)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\",\n \"pd\"\n ],\n \"ReadRanges\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/parent\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/parent\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/child\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/parent\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\",\n \"pd\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.k\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.k)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"k\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/child\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/child\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.k)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\",\n \"pd\"\n ],\n \"ReadRange\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/parent\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/parent\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_3.plan
index 4323022a7e..19bf12df5c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/child\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/parent\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\",\n \"pd\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.k\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\"\n ],\n \"ReadRanges\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/child\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/child\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\",\n \"pd\"\n ],\n \"ReadRanges\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/parent\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/parent\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/child\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/parent\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"k\",\n \"pd\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.k\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\"\n ],\n \"ReadRange\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/child\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/child\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"k\",\n \"pd\"\n ],\n \"ReadRange\":\n [\n \"k (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/parent\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/parent\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"k (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_6.plan
index b9eda25fb5..7c39702521 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qa\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qb\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a_id\",\n \"id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or item.qa.id \\u003E 0\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.id)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"id\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qa\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qa\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a_id)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a_id\",\n \"id\"\n ],\n \"ReadRanges\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qb\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qb\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qa\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qb\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a_id\",\n \"id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or item.qa.id \\u003E 0\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.id)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"id\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qa\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qa\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a_id)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a_id\",\n \"id\"\n ],\n \"ReadRange\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qb\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qb\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_7.plan
index b9eda25fb5..7c39702521 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qa\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qb\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a_id\",\n \"id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or item.qa.id \\u003E 0\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.id)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"id\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qa\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qa\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a_id)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a_id\",\n \"id\"\n ],\n \"ReadRanges\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qb\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qb\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qa\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/qb\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a_id\",\n \"id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or item.qa.id \\u003E 0\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.id)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"id\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qa\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qa\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a_id)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a_id\",\n \"id\"\n ],\n \"ReadRange\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/qb\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/qb\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan
index 46a9a5b81a..79f236de4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"[{x: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x (Asc)\",\n \"q1 (Asc)\",\n \"q2 (Asc)\",\n \"y (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join3.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join3.test_plan\\/int8_tbl\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"[{x: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"x (Asc)\",\n \"q1 (Asc)\",\n \"q2 (Asc)\",\n \"y (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_1.plan
index 9efe55d0b0..03d0a9b2a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/nt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a1\",\n \"a2\",\n \"id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/nt2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b1\",\n \"b2\",\n \"id\",\n \"nt1_id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/nt3\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"id\",\n \"nt2_id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"{b1: FilterNullMembers.nt2.b1,b2: FilterNullMembers.nt2.b2,b3: FilterNullMembers.nt2.b1 And {a1: FilterNullMembers.a1,a2: FilterNullMembers.a2,a3: Exist(FilterNullMembers.id),id: FilterNullMembers.id}.a3,id: FilterNullMembers.nt2.id,nt1_id: FilterNullMembers.nt2.nt1_id}.b3\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a1\",\n \"a2\",\n \"id\"\n ],\n \"ReadRanges\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/nt1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/nt1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b1\",\n \"b2\",\n \"id\",\n \"nt1_id\"\n ],\n \"ReadRanges\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/nt2\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/nt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"id\",\n \"nt2_id\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/nt3\"\n },\n {\n \"Iterator\":\"[{id: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/nt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/nt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a1\",\n \"a2\",\n \"id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/nt2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b1\",\n \"b2\",\n \"id\",\n \"nt1_id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/nt3\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"id\",\n \"nt2_id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"{b1: FilterNullMembers.nt2.b1,b2: FilterNullMembers.nt2.b2,b3: FilterNullMembers.nt2.b1 And {a1: FilterNullMembers.a1,a2: FilterNullMembers.a2,a3: Exist(FilterNullMembers.id),id: FilterNullMembers.id}.a3,id: FilterNullMembers.nt2.id,nt1_id: FilterNullMembers.nt2.nt1_id}.b3\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":13,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a1\",\n \"a2\",\n \"id\"\n ],\n \"ReadRange\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/nt1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/nt1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b1\",\n \"b2\",\n \"id\",\n \"nt1_id\"\n ],\n \"ReadRange\":\n [\n \"id (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/nt2\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/nt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"id\",\n \"nt2_id\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/nt3\"\n },\n {\n \"Iterator\":\"[{id: 1}]\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":11,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/nt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_10.plan
index dcf75b4cb8..047348ba5d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_11.plan
index dcf75b4cb8..047348ba5d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_12.plan
index dcf75b4cb8..047348ba5d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt3\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"x (-\u221e, +\u221e)\",\n \"y (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt3\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt3\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan
index 9ed1492960..947c81d20c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt2\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt2\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a1 (Asc)\",\n \"b2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/qrt2\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt2\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"a1 (Asc)\",\n \"b2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.a)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/qrt1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/qrt1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_4.plan
index 5c2d95d99e..38d7a055d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"code (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"code\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"num (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/c\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"a\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"num (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/b\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"code\"\n ],\n \"ReadRanges\":\n [\n \"code (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/a\"\n }\n ],\n \"PlanNodeId\":7,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"name\"\n ],\n \"ReadRanges\":\n [\n \"name (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/c\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/c\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/a\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"code (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"code\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/b\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"num (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/c\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"name (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"name\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.name\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"a\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"num (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/b\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/b\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"code\"\n ],\n \"ReadRange\":\n [\n \"code (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/a\"\n }\n ],\n \"PlanNodeId\":7,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/a\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"name\"\n ],\n \"ReadRange\":\n [\n \"name (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/c\"\n }\n ],\n \"PlanNodeId\":13,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/c\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"name (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_5.plan
index c74cb44a01..482ae64877 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tqa\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tqb\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x) And Exist(item.y)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tqb\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tqb\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"item.i == item.i And Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadRanges\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tqa\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tqa\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tqa\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tqb\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"x\",\n \"y\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":18,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":17,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":16,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":15,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":14,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":13\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.x) And Exist(item.y)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"x\",\n \"y\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tqb\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tqb\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Filter\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.i)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.i == item.i\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"i\"\n ],\n \"ReadRange\":\n [\n \"i (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tqa\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tqa\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan
index 45fe8f63db..f2ce4610a6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt5\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\",\n \"f2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt6\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.tt5.f1 == item.tt5.f2 - item.tt6.f2\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.f1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"f1\",\n \"f2\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt6\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt6\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.f1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\",\n \"f2\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\",\n \"f2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt5\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt5\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt5\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\",\n \"f2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt6\",\n \"reads\":\n [\n {\n \"type\":\"Lookup\",\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_2\",\n \"PlanNodeId\":12,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":11,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_2_0\",\n \"Node Type\":\"Filter-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"item.tt5.f1 == item.tt5.f2 - item.tt6.f2\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.f1)\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"f1\",\n \"f2\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt6\"\n },\n {\n \"Iterator\":\"%kqp%tx_result_binding_1_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":9,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt6\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-Limit\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(item.f1)\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":6\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_1_0\"\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\",\n \"f2\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\",\n \"f2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt5\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt5\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_8.plan
index 17d0fdf99c..195135e69e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt1_id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt2_id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt2_id\"\n ],\n \"ReadRanges\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt1_id\"\n ],\n \"ReadRanges\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt1_id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt2_id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt2_id\"\n ],\n \"ReadRange\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt1_id\"\n ],\n \"ReadRange\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_9.plan
index 17d0fdf99c..195135e69e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt1_id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt2_id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt2_id\"\n ],\n \"ReadRanges\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt1_id\"\n ],\n \"ReadRanges\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt1_id\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"joincol\",\n \"tt2_id\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-LeftJoin (MapJoin)\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"LeftJoin (MapJoin)\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Collect\",\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt2_id\"\n ],\n \"ReadRange\":\n [\n \"tt2_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"joincol\",\n \"tt1_id\"\n ],\n \"ReadRange\":\n [\n \"tt1_id (-\u221e, +\u221e)\",\n \"joincol (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_jointest\\/join4.test_plan\\/tt1\"\n }\n ],\n \"PlanNodeId\":5,\n \"Tables\":\n [\n \"postgres_jointest\\/join4.test_plan\\/tt1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_12.plan
index 61dbe4d11c..ada38ad7cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-InnerJoin (MapJoin)-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items6) And Exist(items14)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-InnerJoin (MapJoin)-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"InnerJoin (MapJoin)\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items6) And Exist(items14)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_14.plan
index bb8bfb045b..f2d563a237 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Sort-Union\",\n \"Operators\":\n [\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"\"\n },\n {\n \"Name\":\"Union\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRanges\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/int8_tbl\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"column0 (Asc)\",\n \"column1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"column0 (Asc)\",\n \"column1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/int8_tbl\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"q1\",\n \"q2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Sort-Union\",\n \"Operators\":\n [\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"\"\n },\n {\n \"Name\":\"Union\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"q1\",\n \"q2\"\n ],\n \"ReadRange\":\n [\n \"q1 (-\u221e, +\u221e)\",\n \"q2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/int8_tbl\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/int8_tbl\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"column0 (Asc)\",\n \"column1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"column0 (Asc)\",\n \"column1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_15.plan
index 2f2bf0ce96..3bcb53a411 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/foo\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/foo\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/foo\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"f1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/foo\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/foo\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/foo\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"f1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_16.plan
index 2f2bf0ce96..3bcb53a411 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/foo\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/foo\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/foo\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"f1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/foo\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/foo\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/foo\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"f1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_17.plan
index 8438d70fc6..01e88aed5d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/foo\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"reverse\":true,\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRanges\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Reverse\":true,\n \"Table\":\"postgres_select.test_plan\\/foo\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/foo\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"f1 (Desc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/foo\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"reverse\":true,\n \"columns\":\n [\n \"f1\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"f1\"\n ],\n \"ReadRange\":\n [\n \"f1 (-\u221e, +\u221e)\"\n ],\n \"Reverse\":true,\n \"Table\":\"postgres_select.test_plan\\/foo\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/foo\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"f1 (Desc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_18.plan
index 54ac973c19..c6771b709f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items15 == 11 And items6 == \\\"ATAAAA\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items15 == 11 And items6 == \\\"ATAAAA\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_19.plan
index 4266e63d3b..0e64f2440c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 == \\\"ATAAAA\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 == \\\"ATAAAA\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_20.plan
index 52d03014c7..122c0da1fd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items15 == 11 And items6 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items15 == 11 And items6 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_21.plan
index 0698b4f9bc..fba863a508 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_22.plan
index d02169d1f3..5f5c3a1ba8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 \\u003C \\\"C\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 \\u003C \\\"C\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_23.plan
index 0698b4f9bc..fba863a508 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 == 11 And items0 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_24.plan
index f20e67c809..20f0c812eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.unique2\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 == 11 Or items1 == 0 And items0 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"unique2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.unique2\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 == 11 Or items1 == 0 And items0 \\u003C \\\"B\\\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"unique2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_25.plan
index d76b5621ea..15a60100bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.unique2\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 == 11 And items0 \\u003C \\\"B\\\" Or items1 == 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"unique2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.unique2\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 == 11 And items0 \\u003C \\\"B\\\" Or items1 == 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"stringu1\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"unique2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_8.plan
index 7a8f01250f..3edd60a82b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"limit\":\"10\",\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadLimit\":\"10\",\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"unique1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select.test_plan\\/onek2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"limit\":\"10\",\n \"columns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"10\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"even\",\n \"fivethous\",\n \"four\",\n \"hundred\",\n \"odd\",\n \"string4\",\n \"stringu1\",\n \"stringu2\",\n \"ten\",\n \"tenthous\",\n \"thousand\",\n \"twenty\",\n \"two\",\n \"twothousand\",\n \"unique1\",\n \"unique2\"\n ],\n \"ReadLimit\":\"10\",\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select.test_plan\\/onek2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select.test_plan\\/onek2\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"unique1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_1.plan
index ca0f0ad5fd..3fd13d5533 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"two\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.two\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"two\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"two\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"two (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"two\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.two\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"two\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"two\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"two (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_2.plan
index 648d2cb1b4..1ff4e0a1d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"ten\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.ten\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"ten\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"ten\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"ten (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"ten\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.ten\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"ten\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"ten\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"ten (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_3.plan
index 4a711de060..3ec866c78f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"string4\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.string4\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"string4\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"string4\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"string4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"string4\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.string4\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"string4\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"string4\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"string4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_4.plan
index 200e19b449..0e27b696d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"string4\",\n \"ten\",\n \"two\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"string4\",\n \"ten\",\n \"two\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"string4\",\n \"ten\",\n \"two\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"two (Asc)\",\n \"string4 (Asc)\",\n \"ten (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/onek\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"string4\",\n \"ten\",\n \"two\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"string4\",\n \"ten\",\n \"two\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"string4\",\n \"ten\",\n \"two\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/onek\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/onek\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"two (Asc)\",\n \"string4 (Asc)\",\n \"ten (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_5.plan
index de37a69c85..2598714213 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-select_distinct.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"four\",\n \"two\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"four\",\n \"two\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"four\",\n \"two\"\n ],\n \"ReadRanges\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_select_distinct.test_plan\\/tenk1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"four\",\n \"two\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"four\",\n \"two\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"four\",\n \"two\"\n ],\n \"ReadRange\":\n [\n \"unique1 (-\u221e, +\u221e)\",\n \"unique2 (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_select_distinct.test_plan\\/tenk1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_select_distinct.test_plan\\/tenk1\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_1.plan
index 887f4d6cb7..2cfc496a4f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.nsum\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"depname (Asc)\",\n \"salary (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.nsum\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"depname (Asc)\",\n \"salary (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_2.plan
index 72ac803454..f4c2c9a879 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"depname (Asc)\",\n \"rank (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"depname (Asc)\",\n \"rank (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_3.plan
index 72ac803454..f4c2c9a879 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"depname (Asc)\",\n \"rank (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"depname (Asc)\",\n \"rank (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_4.plan
index c31c2e03f8..f3c6920b23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"rank (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"empno\",\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"rank (Asc)\",\n \"empno (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan
index 7a74527e2e..e3e4eedb40 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.row_number\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.depname\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.depname\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"row_number (Desc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":10,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":9,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":8,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.row_number\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.depname\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":7,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.depname\"\n },\n {\n \"Iterator\":\"list\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"row_number (Desc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_6.plan
index 0db211a798..3f81341de3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_7.plan
index 6f08cba68d..175a49b5f0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"salary\"\n ],\n \"ReadRanges\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/postgres_window.test_plan\\/empsalary\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"depname\",\n \"salary\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":5,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-Sort-ConstantExpr\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Sort\",\n \"SortBy\":\"row.salary\"\n },\n {\n \"Iterator\":\"item\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"KeyColumns\":\n [\n \"depname\"\n ],\n \"Node Type\":\"HashShuffle\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"depname\",\n \"salary\"\n ],\n \"ReadRange\":\n [\n \"empno (-\u221e, +\u221e)\"\n ],\n \"Table\":\"postgres_window.test_plan\\/empsalary\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"postgres_window.test_plan\\/empsalary\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_1.plan
index f1e7d29615..ed5918cb68 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_insert.test_plan\\/a2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":null,\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_insert.test_plan\\/a2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_insert.test_plan\\/a2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_insert.test_plan\\/a2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":null,\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_insert.test_plan\\/a2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_insert.test_plan\\/a2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_2.plan
index f1e7d29615..ed5918cb68 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_insert.test_plan\\/a2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":null,\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_insert.test_plan\\/a2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_insert.test_plan\\/a2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_insert.test_plan\\/a2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":null,\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_insert.test_plan\\/a2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_insert.test_plan\\/a2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_3.plan
index f6dbeb57f1..ff83a1232d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-insert.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_insert.test_plan\\/a2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_insert.test_plan\\/a2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_insert.test_plan\\/a2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_insert.test_plan\\/a2\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"limit\":\"1001\",\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadLimit\":\"1001\",\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_insert.test_plan\\/a2\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_insert.test_plan\\/a2\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan
index b94771bfa4..d1801e4d35 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_100.plan
index 9f44b593b0..cfd0b73f6d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_101.plan
index 403c98f149..1dbeb8d7f6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_102.plan
index 5f569baad8..b47234cf2c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_103.plan
index b3d6c76c07..3e9b61483c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_104.plan
index fc3fcf73be..c0de544938 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_105.plan
index ee89622e32..41e7d7edf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_106.plan
index 43edec01e4..8a87192f07 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_107.plan
index 14a223d61c..434c285b64 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_108.plan
index 046dc93767..cbbadacaaa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_109.plan
index 271c83cbf7..75cd9b858a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_11.plan
index 3a7c6b9f4f..12c2d2ea50 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_110.plan
index b16e8b47c1..1641500894 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_111.plan
index 1580e490df..a21f4e2012 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_112.plan
index 06a1f626a6..458dfa6659 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_113.plan
index 56df286143..9fc8d1ad70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_114.plan
index 8924beaae5..5353eb1723 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_115.plan
index eec48f8d78..e27dbbbc02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_116.plan
index ed78fac8c8..ed04a03c57 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_117.plan
index f20d5e87a1..feef16d0f2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_118.plan
index 726b06f227..5810eac89d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_119.plan
index bdb3e024b0..2b48fb7561 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_12.plan
index cf5d06413f..2cb38e4be9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_120.plan
index 5eee9e15d5..0b4578dba4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_121.plan
index c41b41b949..568db2d32e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_122.plan
index 54a5dec978..343982dc88 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_123.plan
index cee8edb1cb..9e7d6c729b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_124.plan
index ca24329380..128bd3e064 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_125.plan
index b23ca3f42e..5026f0741f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_126.plan
index fefb927fa4..ba23ecddd5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_127.plan
index 06e56d2a36..89a911124f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_13.plan
index 19f324dede..902e32f3e3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_14.plan
index 42b78bd4b5..d5a31d3c54 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_15.plan
index ac01c0a82b..42759f6f77 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_16.plan
index 575ee9cbcd..f1125a7ef5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_17.plan
index 4c6a5394c7..ac99043038 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_18.plan
index 65b72e4f46..6084a6fa7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_19.plan
index 41ac9840d0..3cca48a442 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_2.plan
index a142347628..831f82131a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_20.plan
index cecd4d5449..0c7fa50bde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_21.plan
index 753d8a8e0b..6851451526 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_22.plan
index 49b26c10b9..2702b980e6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_23.plan
index 991f2b1e1b..74b8a4f52c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_24.plan
index 88c35bfd0b..e6dc5ee510 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_25.plan
index 457708d539..dfd6f106b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_26.plan
index f468692893..0493656be2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_27.plan
index 131ed92e0f..698a43616a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_28.plan
index 228b456af1..d8ce50fc54 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_29.plan
index e5b6aae9d0..b07e4dde0f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_3.plan
index f97e645192..019506ccb9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_30.plan
index e5b6aae9d0..b07e4dde0f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_31.plan
index 85a06916b5..69375501b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_32.plan
index 97cba881be..b8bcecea2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_33.plan
index 9c58331507..8e85f4f872 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_34.plan
index 924b09e0dd..fd8da85b7e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_35.plan
index bb5cbfa970..f8f927fccc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_36.plan
index 48c3b11b23..0e4f83ad85 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_37.plan
index 2f75a794fc..906c53e0f6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_38.plan
index a0092c6a04..575233d46a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_39.plan
index daf825c1e7..b73b1d9157 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_4.plan
index 24257624c0..0c7fa45668 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_40.plan
index 82a104459d..aa13269dae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_41.plan
index 7eff920d90..854f317b68 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_42.plan
index 144f3b9967..ee18fdea96 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_43.plan
index e4b6b52b0a..bd02ac85b4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_44.plan
index f3aa6211a3..454a5456e6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_45.plan
index 5d9fba2e90..9332096d51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_46.plan
index b47a213ce0..0924e2f9b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_47.plan
index 6264eae27f..f2c7ffaf2a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_48.plan
index ac4bde0d76..73bf148966 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_49.plan
index 99a3925574..ded287797d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_5.plan
index b6166f1ccb..9bd95d308d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_50.plan
index c849d8dbe9..0c560d0a96 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_51.plan
index 6a562a9d92..fbfd1c6e73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_52.plan
index 6a919d1594..31e5396fbb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_53.plan
index be82e5be3c..a23629c978 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_54.plan
index 63e5c17a15..6d07b6ed4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_55.plan
index de8b86d574..c903cc76b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_56.plan
index d331af24fa..c97c2bb34f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_57.plan
index 42c0b5bfec..7ca96d7081 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan
index 19fdd34f52..6584fe4e8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_59.plan
index 1d4bf75be7..4d54177ec4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_6.plan
index 95d5ffe3ac..fe4a9d5682 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_60.plan
index 416e6b6d73..fb05729448 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_61.plan
index 8aba5f49c9..fc3c6f29d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_62.plan
index 73a4240fca..b5db110d01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_63.plan
index f633d0eaa9..2117810b25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_64.plan
index 7b08787ca1..80d3464c25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_65.plan
index b975f58d55..8fd9558c8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_66.plan
index 4045f83ec9..d35b0b5c7d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_67.plan
index 12e3b92839..8a971fc2ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_68.plan
index 4ca4fdb66c..430f93e3b2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_69.plan
index faa4eafcb0..06e10462bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_7.plan
index 1d4bf75be7..4d54177ec4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_70.plan
index e1df56e7d7..7264395db9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_71.plan
index f8ee8f8efb..f5adbc03c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003C= items1 - 2 Or items0 \\u003E= items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003C= items1 - 2 Or items0 \\u003E= items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_72.plan
index 534e6ca8a7..7b8c9b6df2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_73.plan
index 624a48d7fe..6f5a6c0ed4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_74.plan
index a142347628..831f82131a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_75.plan
index a3615f693a..e82c84f934 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_76.plan
index 4b1483430a..6c74f85c5a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_77.plan
index 2252fade84..54e753b25b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_78.plan
index ee81372194..c2d8fdc643 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_79.plan
index c1095fdac3..6f6998b75b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_8.plan
index 5203acac68..37b4d6773f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_80.plan
index 9dc72a1fc3..b02498b895 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_81.plan
index 4378cf28c1..d6d854b2e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_82.plan
index ea697520e8..9dcb9ec897 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_83.plan
index 5cb5b6a5a8..56bc9c11dd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_84.plan
index 9b1dfb85a2..f6257b7555 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_85.plan
index e320cf2e63..a9a7fb8b32 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_86.plan
index e41020c919..6dbf54f09d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_87.plan
index c97d6efcb9..5f4adc0237 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_88.plan
index 6c587d2d6e..1ec525c099 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_89.plan
index 5ec5246d06..60f0705da5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_9.plan
index df38602555..0d0168a35a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_90.plan
index d003ed553b..9cec122a72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_91.plan
index 93d7222985..4031ff134e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan
index 411d578cfd..3114767157 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_93.plan
index 97cba881be..b8bcecea2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_94.plan
index 8b3ca31f6b..89b795d52b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_95.plan
index d321ba4163..6133bda45c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_96.plan
index d6215da207..2aa7f2fe7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_97.plan
index f4cdda4978..8cd92af56f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_98.plan
index 49ae7db606..f66685baf4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_99.plan
index 05c9fd6d7d..d2993b76bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_1.plan
index e5a6bbae89..ff6b96a0c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_10.plan
index afe41c6ebf..55ad731066 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_100.plan
index 9be936b1ba..6dd30077bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_101.plan
index d203e0dd27..0cb4065e02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_102.plan
index 9a37577bc9..4a1a8bb0e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_103.plan
index f46df65b5d..c23be77afa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_104.plan
index 11750edada..c19cf31265 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_105.plan
index 2536caeb11..9e74047999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_106.plan
index 3b78bb55c5..a05b70e1b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_107.plan
index f50da89b34..5202d58dc9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_108.plan
index 20ea16c7e9..e89701a494 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_109.plan
index 9a878df2fa..dbc2735fa7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_11.plan
index 1f963ea69d..0b555a244d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_110.plan
index 951b9e1d73..7f8ac01142 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_111.plan
index 4b441529f7..a99b1f8bcb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_112.plan
index 45a5918f80..590c14a5d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_113.plan
index f8bdc4cf0d..7b8d2ee597 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_114.plan
index 870fb31f29..89b7ec2955 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_115.plan
index c9bf0fbc56..c9b5f82767 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_116.plan
index c5bf879a9d..00bbcd9f76 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_117.plan
index 52a7cb6371..113f18ad92 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_118.plan
index f8438ed5b7..406058c270 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_119.plan
index 239cd2a08a..3529597267 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_12.plan
index 3406ad69a6..e103abd61c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_120.plan
index 3673583788..a153bf4606 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_121.plan
index dd208a3c9b..466217c0e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_122.plan
index 1a53a3ffde..1bae0547be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_123.plan
index 35f41c5ebe..b60b7581cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_124.plan
index 3406ad69a6..e103abd61c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_125.plan
index 36853cf775..2b022f0bd5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_126.plan
index 794ecfe1e1..5e29e332c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_127.plan
index b3370fc7bf..abd80a3f1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_128.plan
index e395042236..2e24479696 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_129.plan
index 28da23abc3..4d7d9ca779 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan
index 7c93aae596..950e4d0df8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_130.plan
index 301b877000..b9cf90d559 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_131.plan
index c6b782362c..006bc3ce7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_132.plan
index 417752be60..f98c59299f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_133.plan
index 0d9b3307e8..8417124621 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_134.plan
index 02d5d58748..92efb6d32a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_135.plan
index 98eeb86b40..df7e685394 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_136.plan
index c4c39088de..9cd5fa7a2b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_137.plan
index 78c3e68e2a..150d29dce3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_138.plan
index 9c6711e369..439ac098f3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_139.plan
index 3370582fde..5658448b71 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_14.plan
index aad622b0b2..b8deeb6d8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_140.plan
index 25260210f9..b4046b8bde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_141.plan
index b13eb79896..5da3d045eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_142.plan
index 1091156029..8bd6e1498e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_143.plan
index 733b532a20..75351c3bbc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_144.plan
index bda09b4fd6..e1de0f37fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_145.plan
index 358e1efa2b..bacdef8446 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_15.plan
index 680a44920a..704e1b4929 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_16.plan
index cb887d1653..ff15440003 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_17.plan
index c467f0ffed..bac34f0b01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_18.plan
index 58a1231a45..671b416b96 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_19.plan
index 5aa8d6c7b7..bbd2712eb2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_2.plan
index aa3c9afd33..fb666e0533 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_20.plan
index 8dc843824e..7966e743cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_21.plan
index 3eb8cd3ba7..5f1f375c8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_22.plan
index 49ea9ee464..9de4a8aa47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_23.plan
index f50da89b34..5202d58dc9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_24.plan
index 076463b657..ff5bae8e61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_25.plan
index 2536caeb11..9e74047999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_26.plan
index 4a5b1a92a0..4c2f1fd35f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_27.plan
index e070326c1b..fb8e71b519 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_28.plan
index c7221090fa..fc9eff2da8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_29.plan
index 0b44c867a3..c3143d3389 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_3.plan
index 0137753be7..20e1d7e956 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan
index 79eb48e7cc..572429b367 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_31.plan
index 8ba349dce6..6ca6e3ef84 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_32.plan
index 52a248de0e..c8157a6ed9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_33.plan
index 835ab0a8f3..f0707966b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_34.plan
index 2d6e7e6862..9d64a10b94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_35.plan
index 73efa907a1..c4d58ff38c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_36.plan
index a08c1ba8d3..8aec73528f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_37.plan
index 9dc76b328c..1a441ab2ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_38.plan
index 519cb40b54..b83ace6162 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_39.plan
index 6d87d2f857..556168a8e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_4.plan
index 67ac4ff0ab..f54dbe9c15 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_40.plan
index 9332049c23..519b0755ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_41.plan
index 1abafe7350..2bbeb3f9a4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_42.plan
index f286ee4817..19b11785b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_43.plan
index f995184b3c..88ebb6c27b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_44.plan
index 299d49c4c2..9bc2e08cb3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_45.plan
index 02c99e1245..fb13c874ed 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_46.plan
index 50f14c4882..2ed6a16833 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_47.plan
index e5a6bbae89..ff6b96a0c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_48.plan
index 207fa75f89..3574f9abb6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_49.plan
index 870fb31f29..89b7ec2955 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_5.plan
index 216f01bd4e..12056b86ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_50.plan
index a5b7819d5b..ad7bd4f15f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_51.plan
index f797c44632..5d823a2e86 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_52.plan
index 06da8d1b9e..0c7220cd2b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_53.plan
index f4c56da16b..a7914f10c1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_54.plan
index 39d47d4232..37ae115a2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_55.plan
index d842cd5621..f29963c738 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_56.plan
index 28bc1d8c94..05f1bb81fc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_57.plan
index bd75167db7..0f2aa61ddf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_58.plan
index 340badaa31..92c44f4468 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_59.plan
index 51bdd2bf2c..c589130115 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_6.plan
index 5f194f6016..c463646391 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_60.plan
index b051a49aa8..561a5d2ade 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_61.plan
index 52be054bfc..6e25d90f44 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_62.plan
index 67688fec79..0eb0dc493f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_63.plan
index 30a3146e28..425c5940ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_64.plan
index c7da02ae14..14813e2cd0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_65.plan
index 22aa85169b..3ffb376f75 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_66.plan
index 0b7eabeaf3..438f05218c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_67.plan
index 2612d91d08..b36a2d5377 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_68.plan
index 7cf4f7c979..e6afe1b501 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_69.plan
index c33578f606..3b0762fbb6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_7.plan
index a5cff51eac..f463a30761 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_70.plan
index d2d35a86fa..5731f2e708 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_71.plan
index 35bc855141..81dac13b4e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_72.plan
index 845293a04e..1ed71e1f81 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_73.plan
index a6fdae4964..09a24adea6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_74.plan
index 3a92a37897..e4a1b5675c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_75.plan
index 0bb1cadb7c..6f3decf3e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_76.plan
index b222b0b430..9af566dac9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_77.plan
index 6826b23722..894ed89bfd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_78.plan
index 7812a21ae1..d1f140509c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_79.plan
index 335349fced..3c9c985384 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_8.plan
index 7dd24254ed..721031a4af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_80.plan
index b13d7381dc..8bdf156987 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_81.plan
index dbbc61dcbc..4064b5fd26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_82.plan
index 68613a8c14..4c7b43fc84 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_83.plan
index 5f6d9f5f05..923f20cec8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan
index 68adca58d2..fdf2ba5af3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_85.plan
index 17f2505936..b6c2be4176 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_86.plan
index 034974adfc..66e21778c9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_87.plan
index 48b2fcd273..56bdaa7d75 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan
index 98e11b24cd..af0801c03f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_89.plan
index 85fb665fcd..68c75a6dc6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_9.plan
index 38142c409e..049c4de46e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_90.plan
index 8f9cec0acb..ea921ec889 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_91.plan
index aa2bcb97b0..4204dda43a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_92.plan
index 01920770a3..533d881baf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_93.plan
index 8327405cc5..b2f44759f6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_94.plan
index dd84609194..1b5299d659 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_95.plan
index 47161f06f0..dd533eb260 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_96.plan
index f50da89b34..5202d58dc9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_97.plan
index 6acd8b5889..e653fca5b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_98.plan
index 5337ecf450..8114233c74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_99.plan
index 7dc3c6392f..7248912b0f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_1.plan
index cb0c93612a..a545db6f4b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_10.plan
index 94101c3df8..f6a735157e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_100.plan
index 47237777e9..86d4fa1d35 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_101.plan
index 23b3c8b931..02eae578c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_102.plan
index 417fab0ce6..2eabb6bbc9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_103.plan
index 4b7fe3d4a8..2724b034c9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_104.plan
index 4f2926e93e..63f79f61c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_105.plan
index 8ee8d41acb..00138378b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_106.plan
index 4c21d02eb9..d8ba046d2c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_107.plan
index 58c59def51..72e9023b43 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_108.plan
index c261594541..127103409f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_109.plan
index 6bfeb1b840..55bb0007ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_11.plan
index 3be3ce04fd..1ccb56a60f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_110.plan
index f908ca39b5..1478a9107d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_111.plan
index a988ae251f..d64df123fc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_112.plan
index 9f012cc4fd..35453d1e36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_113.plan
index ae807dc8f1..7e089174ee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_114.plan
index 9db5c97da0..feca1cf777 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_115.plan
index 9a35b64bad..6641025d66 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_116.plan
index 5a531a9b55..eb76e9809a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_117.plan
index 8495afd1a8..b3989375ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_118.plan
index a210de429b..95c6591e70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_119.plan
index 763bf6fe60..af2e32755a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan
index 61ba0463fc..579ecbae8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_120.plan
index 2be10363af..9582962f64 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_121.plan
index b6c38ac0da..349c1628f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_122.plan
index 1707f6e8fc..e03b4e582b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_123.plan
index 85bee92d34..a81d3efd3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_124.plan
index d61ca19c05..45362b37b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_125.plan
index 2d2e5671a5..c98b6f435b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_126.plan
index 2f49c1aa50..f68f9ab04e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_127.plan
index 8064632fd3..b062f34393 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_128.plan
index 94a6a9b534..78e50f60da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_129.plan
index 2a7c0a5be6..1b81467b23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_13.plan
index 21579a9eb8..6da2d81834 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_130.plan
index 9a35b64bad..6641025d66 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_131.plan
index a8f287112f..9018749467 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_132.plan
index 71f4d27fe9..6a2e983bc1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_133.plan
index 0db3eb0637..48feeff203 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_134.plan
index 6de0c6ba13..784f102dac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_135.plan
index 0047f44041..d344f175e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_136.plan
index 0aac7b66d9..6ebaeae0b8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_137.plan
index a5262d816e..a3eb1031e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_138.plan
index 8ee496a26d..d11116430e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_139.plan
index a9c51b8727..a1191de1df 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_14.plan
index 3113685aff..c043f07c3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_140.plan
index 30c93d3e5e..898fb2aa4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_141.plan
index 60a4a25b1f..befbe783fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_15.plan
index 74928b0103..50e68acea5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_16.plan
index ccd6ffbe64..b5fcde688a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_17.plan
index ccffa0c9c0..6148005415 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_18.plan
index 8495afd1a8..b3989375ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_19.plan
index 8276508dd0..6d215d5308 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_2.plan
index b80e331105..f31521deca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_20.plan
index ef99e2b63b..0373aede29 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_21.plan
index b1458a76e5..9949576c4f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_22.plan
index 8495afd1a8..b3989375ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_23.plan
index 85e51cfdf1..ceeea67b0d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan
index 61ba0463fc..579ecbae8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_25.plan
index 23eb3da74e..e3dbe69837 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_26.plan
index 7b3c2e9b24..316550386f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_27.plan
index 940df4e1c2..3f8df599c0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_28.plan
index 0a24c982e1..a3f605e791 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_29.plan
index d5e9c3644c..5a4f251e52 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_3.plan
index af6008b2e4..a08cf58b3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_30.plan
index 8ee496a26d..d11116430e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_31.plan
index a9f4fc0fd2..4399cf85ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_32.plan
index 49417ff619..15be227fb9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_33.plan
index 1258d481c1..bb0119b2c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_34.plan
index be51495fc1..9c611b3706 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_35.plan
index 316e25c784..81311554bb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_36.plan
index b62116327b..8a3b7f67dd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_37.plan
index fcd3fe1667..b640a07712 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_38.plan
index 2dd6d1ce0e..9207d2a100 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_39.plan
index 5aaeb84fe3..c3796e9b26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_4.plan
index 45b4ecc483..ba6da03c9a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_40.plan
index 7221af4be1..355fc7b339 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_41.plan
index 8433aa36fe..51f3439455 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_42.plan
index 145a4c13f4..957d608b67 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_43.plan
index 7b5ace5923..5648cd3a63 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_44.plan
index 2768fb4560..e5a7946fab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_45.plan
index 8a33cf1eba..552d99c22b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_46.plan
index ee4cf0a20b..fd0ece09ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_47.plan
index 13262ea6ec..e795c930cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_48.plan
index 8ee496a26d..d11116430e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_49.plan
index e47902a599..222484c886 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_5.plan
index 86912e5c41..2e98ebfc04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_50.plan
index 789aa4b47d..46b17f4fd1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_51.plan
index 14f5aeefb3..c688648d3c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_52.plan
index 2e9f333d24..493410cd52 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_53.plan
index 04577813fc..aed9b1f437 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_54.plan
index 93f28b159c..bbb7f260c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_55.plan
index e93e4b5ecc..af23f9af80 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_56.plan
index 3e34133640..98480b69a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_57.plan
index 8a7938f11c..67e960d918 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_58.plan
index 8a33cf1eba..552d99c22b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_59.plan
index e59d77922f..959147c67e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_6.plan
index 300fd68031..9e03e59cfe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_60.plan
index ac57d0543b..cc6b59c26b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_61.plan
index 3be3ce04fd..1ccb56a60f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_62.plan
index 25f1ab675d..c2d1a72338 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_63.plan
index 82b19c549a..7418461511 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_64.plan
index 35783ad36c..1f15d061ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_65.plan
index 9707fd0a6a..be0d97c974 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_66.plan
index c4dbabf6e5..7e14a1d5f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_67.plan
index f21c76bb68..ba7723ed87 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_68.plan
index d7f5075d7a..e3351583ac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan
index 22e9cc473b..be95cb5f3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_7.plan
index 090238e32d..c01acd38f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_70.plan
index 75930f1389..e492c5818c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_71.plan
index adb9ea5bdd..aa91256ab0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_72.plan
index 176162e7f6..bfe202618e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_73.plan
index 1adc2bb2aa..cac7fde3a2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_74.plan
index 0189239f33..78a23c1278 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_75.plan
index 77e50b6cd2..22db772bbf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_76.plan
index b8cf55cff9..047060a9df 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_77.plan
index 14f5aeefb3..c688648d3c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_78.plan
index 3a516cadeb..c683585e18 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_79.plan
index 6349b374ba..146e6cd33a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_8.plan
index 353f264634..5430d70d1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_80.plan
index 39912f47a8..5e01481ce8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_81.plan
index 49417ff619..15be227fb9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_82.plan
index 1a096e08ed..eb22cff49d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_83.plan
index a189d43934..0380e5e778 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_84.plan
index 7d91e94f6e..d23e9781ca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_85.plan
index 354cb2f76e..f5211c2832 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_86.plan
index 191550189c..58d1041d84 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_87.plan
index 40e16007dd..1d513fb472 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_88.plan
index 3e10666413..d4451b4ab2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_89.plan
index 7062d10b2e..a5fd3946c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_9.plan
index d8dd0e20cf..0b086fe84d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_90.plan
index 8ee496a26d..d11116430e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_91.plan
index c55ede5311..9860c862be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_92.plan
index 475f27ed92..3dd966bab9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_93.plan
index de42e563ec..06dc159084 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_94.plan
index 7bab502479..9151ef50da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_95.plan
index e401feb1d4..a313065b6d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_96.plan
index faf126d4c9..3f1cbe6a04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_97.plan
index e9f344b928..bb0ab7dac9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_98.plan
index dfdd0e0a4b..ecbe6783e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_99.plan
index cd55070eed..e55505d2f4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_1.plan
index f5560b99bc..5864e7a88c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_10.plan
index d506fe29ae..21aa9b8fad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_100.plan
index b904993db3..ae7f3ac52a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_101.plan
index d3de085e84..d955e0138d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_102.plan
index 6bed006c84..fc35eddd7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_103.plan
index 040eec4b37..05c9353c2b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_104.plan
index e8eb23bbc6..d91e6bf550 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_105.plan
index a3a2a4c8cd..5244184cf7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_106.plan
index 2130e1be4e..a9cdda7612 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_107.plan
index 20225d1ef8..363ba19655 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_108.plan
index 168076b834..9b9b917c0c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_109.plan
index 217a3593a6..6942acb6cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_11.plan
index f30200a58b..5fea91dc68 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_110.plan
index 30bcdd5703..a54fb8652c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_111.plan
index a097171953..39913f00a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_112.plan
index 5cf3ddfa73..127f245602 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_113.plan
index 9ed85b1fbb..2abaa0a1f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_114.plan
index c4afd74b8d..fde5d2a3d6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_115.plan
index d14d0a31f7..9511295c24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_116.plan
index b843f3d26c..3076ae3e09 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_117.plan
index 797c9b3fc8..9e5fed6c60 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_118.plan
index 41c488af6e..5841b4a1e3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_119.plan
index 361bdc1d44..2409935b26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_12.plan
index 311d82bc3d..509a08d1fc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_120.plan
index c3673b416c..f2f6c89ea5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_121.plan
index c5a5511d96..2298db4a30 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_122.plan
index a00a3ec809..e8f596b933 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_123.plan
index f66e0a0bb5..d98536b9f3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_124.plan
index 6d58ed12ca..d5e7be38bd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan
index af5bca268d..f2d3039bef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_126.plan
index 0cece8b90c..7f3b42eb15 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_127.plan
index 24a36f06c8..491d5b8328 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_128.plan
index 2d34f0017a..6364e98c26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_129.plan
index c9f105f2ad..692ea83cd4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_13.plan
index 172abb608f..435e0a8c8a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_130.plan
index b603104d9b..b66f5b720d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_131.plan
index bbe6a1337e..cabc12c9ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_132.plan
index 2d8666591e..aa27c3521f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_133.plan
index 6a69d9f019..63730c33ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_134.plan
index ed6413d0f3..4008ed88f0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_135.plan
index c8cde977cd..2f28c9b5d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_136.plan
index 1d9b6c8944..03deba0ac3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_14.plan
index 991cfcb8db..4f266a03a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_15.plan
index 11c9df8c2c..1c1e7d55d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_16.plan
index b014992aac..baa2230502 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_17.plan
index 0dfa2c2cbf..7552fcca9b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_18.plan
index fec8c5378e..c8ff4dbdde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_19.plan
index 5e9ecb0570..6823d4aba9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_2.plan
index 2207626c9d..e062036f2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_20.plan
index ad7a3f7b8b..3c6d14c0a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_21.plan
index 4f1bddcc2d..fc34ac0d04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_22.plan
index 2a8db3177d..8873d33084 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_23.plan
index 87f1bb4221..a4b1a4ac7f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_24.plan
index f9fefbcf7c..f3367d4fb8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_25.plan
index 2a1e237577..09a7857d51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_26.plan
index f5560b99bc..5864e7a88c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_27.plan
index 52dcec10d9..4b59726881 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_28.plan
index cb1e92d37c..061f8ae665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_29.plan
index 7a43206706..1fba099f54 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items0 And items3 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items0 And items3 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_3.plan
index c0bcb8aff5..9f127b091a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_30.plan
index f5560b99bc..5864e7a88c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_31.plan
index f6c15b85bb..438c704273 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_32.plan
index 9aece57642..424e7523e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_33.plan
index fb1f46dffe..63514769e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_34.plan
index 05d602a60a..be6485c62e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_35.plan
index 9833faf87f..d2d5141776 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_36.plan
index 02e3991334..5921e14beb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_37.plan
index 78cb8e37d4..10c122a70c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_38.plan
index 157bdb490b..8cb4316495 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_39.plan
index 74afa29cf2..743de800b8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_4.plan
index 5ed1bf7296..883891b948 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_40.plan
index e9f2bf5112..410a166796 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_41.plan
index 6ecf60a9b2..f244db046b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_42.plan
index f2c265e33a..aaf08aa229 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_43.plan
index 2cc2e353bb..f36f627854 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_44.plan
index 7d668eaea5..804d6a9a8a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_45.plan
index eb806ad4bd..bfb6f950f3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_46.plan
index d1d2f47463..f62a51a863 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_47.plan
index 9ac640e02a..c01469993a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_48.plan
index f71ddccb2b..04d16e9657 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_49.plan
index 532f608a59..90c5e764ac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_5.plan
index ac9b66825a..6344244c7f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_50.plan
index a60cf7f930..bfb4f6b6d6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_51.plan
index c223a837df..04828dd8c0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_52.plan
index f1df514fb2..dcb718fb7f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_53.plan
index 4a95f8fdae..148a3b9d9d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_54.plan
index 0b528777ba..e3251bd751 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_55.plan
index 1bea73cd96..016f6103ca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_56.plan
index 6c0b65bfa1..723d8b0443 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_57.plan
index c223a837df..04828dd8c0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_58.plan
index 3cc1abdd7e..3f0af7a74e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_59.plan
index 44ae431a77..8a9c84b828 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_6.plan
index d1021eac5e..35f1455312 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_60.plan
index 0860bb267b..cd1ca7781d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_61.plan
index 9e83ac139d..a929032a3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_62.plan
index e41ed1b5d3..13d70789bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_63.plan
index d43a90be09..722b817869 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_64.plan
index 2f4d2a8689..336b66a0b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_65.plan
index 61c5ac8d90..4897257047 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_66.plan
index d8ae23ee4b..7f99ecb64e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_67.plan
index a46da19af5..aa5aac682b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_68.plan
index 44f3014fe3..656f16d4ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_69.plan
index ec3700b89a..b32f39f61f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_7.plan
index ab67a8e218..4cc1dc1343 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_70.plan
index e7fa6eecee..d4219d61ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_71.plan
index 1a80559f37..cdb9cede23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_72.plan
index c7e5e06870..0498a9d95c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_73.plan
index be7b5c9002..6e304f3ec5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_74.plan
index 88ce9f5be3..d175c33ad6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_75.plan
index 33dd8eb045..076fc178e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_76.plan
index 86edad9952..5ce80fb53f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_77.plan
index ded955d8e6..13283ec6a0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_78.plan
index 44c335c928..50d09be419 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_79.plan
index 077d10b032..18600f7f2c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_8.plan
index d02ff88502..630c7d7314 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_80.plan
index 8084864f5c..42ef3cf9c9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_81.plan
index 095633a6ed..5c2ea09f13 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_82.plan
index 5d7b9e7fd4..f9054a8707 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_83.plan
index 2db9ee7063..0cd6235ae0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_84.plan
index 5280e58178..9efe30ab80 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_85.plan
index 161eaf7d55..acfb5e9934 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_86.plan
index 5e0934954d..0a4e90b53c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_87.plan
index 6229cbd2c1..01adc04b31 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_88.plan
index 0c1fd005a1..2d35a27545 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_89.plan
index b9e3b379c9..d8a520d00a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_9.plan
index 2b88f5b6e7..d86a45b603 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_90.plan
index a76809bacd..fda8fc7dcc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_91.plan
index f255fecbbf..762d154139 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_92.plan
index 62684bc297..c2251df42f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_93.plan
index dbadd7caa3..a6060f5cd0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_94.plan
index 7d025f3e48..d7ed9e120b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_95.plan
index af384c33ef..968028b4a4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_96.plan
index 82f9ba5753..5b534ff6cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_97.plan
index 6a103f2620..8760bd02c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_98.plan
index 327f3ca624..b61912c9ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_99.plan
index 2d8666591e..aa27c3521f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_1.plan
index 675999cbc8..f9b667f11a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_10.plan
index 2c20164e4d..a4c7a611b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_11.plan
index ee687df2dd..f77c71ec33 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_12.plan
index c896af1274..cf02847d23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_13.plan
index e0276ceed1..c6b766af52 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_14.plan
index 88614b26a2..76532082c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_15.plan
index 86dab2dc0f..d389a35498 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_16.plan
index b516875e6e..4befbf1135 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_17.plan
index dcc4de2c7c..81edd4dcf0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_18.plan
index 125ccfaa62..9940482348 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_19.plan
index feecae6ac7..238e5cb2f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_2.plan
index bc83b99e1a..07aab26cbc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_20.plan
index ba5ee76c70..5ef0bebef5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_21.plan
index 14e3480efd..ea6a7949cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_22.plan
index 6809af4009..b80d3434e2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_23.plan
index 1fad868736..25c8fadfcd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_24.plan
index 5f199e36e8..243c55d5a1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_25.plan
index afe0f88883..3a646b2933 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_26.plan
index 3cd1e6377d..971d875cea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_27.plan
index 46271f1999..56e6fbefe0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_28.plan
index 5cdc362afd..83f4aec9cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_29.plan
index 2d64432ebf..66de801564 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_3.plan
index 204a60415b..47f077c647 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_30.plan
index 47cfdb5b11..a1fc0c5912 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_31.plan
index e63441a11b..098137357b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_32.plan
index 94531cf659..06a59df1d9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_33.plan
index cdb4d7c481..4a3a4b652d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_34.plan
index 05140bc630..c50cffa1e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_35.plan
index b4c47f5661..a15842b97b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_36.plan
index 8b81a51bbe..d86ef517cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_37.plan
index 2d112c3d0f..fdf66efff9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_38.plan
index a8c74091e8..7e8b334323 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_39.plan
index 214ce56132..2f9c17ae28 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_4.plan
index 1a003186c8..badd24c4d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_5.plan
index c13317fc5b..af24720aa2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_6.plan
index 4c9694fbaf..3153d1f3c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_7.plan
index 7c000580c6..95fe560b2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_8.plan
index 80ac53f287..fbdab1ccd7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_9.plan
index 214ce56132..2f9c17ae28 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-5.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select1-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select1-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select1-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_1.plan
index c2cdc43aee..2dd9c08b61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_10.plan
index a11c72d095..9bac6f0c96 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_100.plan
index 29a596b0cf..11e35ab602 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_101.plan
index 7880738564..5599c9a546 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_102.plan
index 06b21dcd09..b04bf0ff16 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_103.plan
index 2151ef0554..c7d594a558 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_104.plan
index 554875e354..6ad679735b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_105.plan
index 69fbc80726..1be4315284 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or Exist(items0) Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or Exist(items0) Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_106.plan
index 650c55eec2..60435f882a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_107.plan
index c2cdc43aee..2dd9c08b61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_108.plan
index ec06b4cf6a..acfd2d4964 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_109.plan
index 53c2f81009..e97621cb6b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or Not Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or Not Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_11.plan
index c45a0bcc41..6b6c183156 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_110.plan
index 02b3e0e8be..9ad5e9d6be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_111.plan
index 1a849d10d4..a395a53e5c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_112.plan
index 50ca4c76e7..1ccc180b9a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_113.plan
index eb334e4dcb..1f4d371bc7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_114.plan
index ea38f1be07..36d5f4f2cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_115.plan
index 661738bb89..540890f7db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_116.plan
index 2a87b9c535..c1ba04aebb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_117.plan
index efbb5a18e4..3c31b5d9bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_118.plan
index bb8abb5785..a5cd7ecbcb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_119.plan
index 44c73e1bfe..552f2fe2e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_12.plan
index 0174659a0c..865382ee27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 != 0 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 != 0 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan
index 2e6f6d82ac..dfa109949f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_121.plan
index 702d466155..0ad70a5f16 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_122.plan
index be3767884d..703ca54443 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_123.plan
index 8b0f108523..a27ba15132 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_124.plan
index 00bc1dfe28..e9bde07d24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_125.plan
index c06065b5a4..cb9fdab1f8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 And items2 \\u003E items3 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 And items2 \\u003E items3 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_126.plan
index d726a12881..c79fe03ec7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_127.plan
index d4a7db7ce8..66b0862d73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_128.plan
index 11fb777d67..ad7c397f27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_129.plan
index d1555f63e4..863d1f5b7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_13.plan
index e9a96ddd5f..03af48337c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_130.plan
index 28f0dc408b..c0edadb86d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_131.plan
index 1f43c265c8..3de8167fe2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_132.plan
index 5b0fce6cec..38acd0f744 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_133.plan
index 196562161b..764def29c7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_134.plan
index 1352732398..13792c03d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_135.plan
index 537c688072..96710d70c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_136.plan
index 69281962bd..922d7a8ff8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_137.plan
index 0be6e26b02..8b1619f691 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_14.plan
index 0f70793130..fb819af698 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_15.plan
index d56e74d4fb..96f68d7fc8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_16.plan
index b8f83b5d25..9a131578ad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_17.plan
index 8e83479344..8a8cc0f756 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_18.plan
index 9c616b66a2..8c620d3705 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items0 != 0 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items0 != 0 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_19.plan
index 7f3fa86d6e..b097ec6294 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_2.plan
index bcad9ce140..86f90a5241 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_20.plan
index e4dc46a4b1..4f4122fcf4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_21.plan
index cfec873325..47e4b10082 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_22.plan
index c01f5303f2..2f2a4a420c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003C= items1 - 2 Or items0 \\u003E= items1 + 2 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003C= items1 - 2 Or items0 \\u003E= items1 + 2 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_23.plan
index 6473e33ad6..f37a7f33d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_24.plan
index d4a7db7ce8..66b0862d73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_25.plan
index 67858cf119..27838a81f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_26.plan
index debfab7e09..64c03d40e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_27.plan
index 60cbf1f187..2ed77bc0f6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_28.plan
index b106e826d6..fd10957b63 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_29.plan
index 4fee3d6e3d..98706373b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_3.plan
index 6d26c8dfc5..87daa0cca2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_31.plan
index 1ad84840e5..d1084e68a4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_32.plan
index 5284f8172e..25c9fd57a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_33.plan
index 3bbf379dff..d81183f870 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_34.plan
index 47a11a71c4..4ab5b52b80 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan
index a16ef67a1a..fb3e8fef90 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_36.plan
index 2ef24cfadc..2ac80d525c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_37.plan
index 854b16e0c6..4019951d8e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And Exist(items1) And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And Exist(items1) And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_38.plan
index aa5813859d..40c03b0c3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_39.plan
index 8976609318..0a430dcdb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_4.plan
index 781bcce187..933d9c02a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_40.plan
index 5ab9fb6e1b..c394ea380b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_41.plan
index 3f9578828c..a833f11dd3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_43.plan
index 53a317f443..5ed14b6d13 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items0 And items4 \\u003C items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items0 And items4 \\u003C items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_44.plan
index 10ba5b1a39..95c5779e8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_45.plan
index 1778ae45e3..768f4926a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_46.plan
index 3f854ccbbf..9d5a58cfc8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_47.plan
index 80596c4f73..235c45ab58 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_48.plan
index a183dd4bad..8bb033f27e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_49.plan
index 9ce3078372..894a8af46c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_5.plan
index 194fc6c557..4ce0aa66ca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And Exist(items1) And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And Exist(items1) And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_50.plan
index ed034e1b60..c4aed47a5d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_51.plan
index c8cf21da61..ac47031fad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_52.plan
index 45ec889ffc..ba3ba25bcf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_53.plan
index 8a115f99bf..b937bcf107 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_54.plan
index 1a9db9790e..4f5e6f4686 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_55.plan
index 1f43c265c8..3de8167fe2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_56.plan
index 663b048541..6df2e3fb78 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_58.plan
index d8c5439b8f..2acec778e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_59.plan
index c487eff0b9..c62f32d56e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_6.plan
index 8bd34be68c..ad18e31895 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_60.plan
index df902248e6..0a37a1010e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_61.plan
index 2ba7b697cc..d12242553e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_62.plan
index da47973c73..e7ba554e9f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_63.plan
index 5b95c30fc3..c41861f69b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_64.plan
index b001fbb24f..1ba70b561a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_65.plan
index 9862d60ccc..0bded74713 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_66.plan
index e4ee91d3c8..e7bcd7d291 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_67.plan
index ec32781cb2..6c7fe93787 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_68.plan
index 5dfdc0f0b3..b69ed144a1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_69.plan
index 01426d627c..84ffb4255d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_7.plan
index c892890369..a0b130d398 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_70.plan
index d1fe910ee9..a116a0ce66 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_71.plan
index b4b04b597b..5862c87fca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_72.plan
index 9ccef6b52f..f1196d7bf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_73.plan
index aa30a57817..34fa559016 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_75.plan
index 310309de48..7bb7d84f8e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_76.plan
index 18c3083cda..4698c9dd74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_77.plan
index e3dcf643fd..4887f3a2f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_79.plan
index cf8aefdce7..db62a4736d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_8.plan
index 5b8394d0af..5b13a5805a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_80.plan
index 55d6b3a3b0..a31214f958 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_81.plan
index 74e4f25fce..d9e4436173 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_82.plan
index 93b519d72a..1781105a32 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_83.plan
index 930bdd568e..0446573a72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_84.plan
index 9510bb3f9f..4fdcdd8ab5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_85.plan
index 0ffcc060ae..783a0260a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_86.plan
index 038e5339e3..d600ff8028 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And Exist(items1) And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And Exist(items1) And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_87.plan
index 23ed5bff99..aa6998a09d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And Exist(items1) And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And Exist(items1) And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_88.plan
index 7948ab7cb1..68ef0e6cb9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_89.plan
index 6a401276dd..960ea2a649 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_9.plan
index d419296d8d..6430bd1388 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_90.plan
index 5fe0e2d2fd..e0615e36bd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_91.plan
index ab7e1cfd7d..e88552daf0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_92.plan
index a70c24e1ec..e3c7f092fb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_93.plan
index 8cd56df3af..d97cedcaad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_94.plan
index f1e46899c8..917a673b49 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_95.plan
index 5284f8172e..25c9fd57a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_96.plan
index 7f586daa9c..74579e80e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_97.plan
index 7753e7f669..c23d45c584 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_98.plan
index e6f8a6f1af..c02d4b1bc5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_99.plan
index 0ca679f2b1..70dac4d050 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_1.plan
index 8db39779c0..9559eb9d1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_10.plan
index 1594e1cb96..c47f58c799 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_100.plan
index 71985710b7..6d54fa4583 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_101.plan
index b613d05355..d500b8420a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_102.plan
index 0f189200a7..6957f79d73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_103.plan
index aff4a13fc9..135e00a882 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_104.plan
index 9122d1e123..c5f540e7ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_105.plan
index 0517e708f4..f1263853b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_106.plan
index 8f4171005e..7eb5c644b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_107.plan
index 05cd16d4fe..5e6460bc30 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_108.plan
index 028d9d451a..b7fa7d8c1b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_109.plan
index 08b5cf3240..e98d28d61f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_11.plan
index e421f1aaa8..26d4b7b79e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_110.plan
index 2350b3d5c6..d98a33b55a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_111.plan
index 39f764e9dd..ed753e8063 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_112.plan
index fb62984976..1cf978f5db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_113.plan
index 70b8969240..06d26faca3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_114.plan
index fb5f4dc7b8..9b5280c0d6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_115.plan
index 5a9ad9c088..31233edc7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_116.plan
index 1923acb492..cc3881535f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_117.plan
index a53e2fcec3..89c59605a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_118.plan
index 40735433f7..e6660cffe6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_119.plan
index de0a5cc695..38c9b01e36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_12.plan
index 651622f8e6..650a512529 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_120.plan
index 75f4b3dfae..3532006982 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_121.plan
index 99847b67ba..94125488ee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_122.plan
index 1585856f76..a2819e3fe7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0) Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0) Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_123.plan
index 1923acb492..cc3881535f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_125.plan
index 7c03823ea9..2c36346538 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_126.plan
index 04ec0aa0b8..5ae63e4c2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_127.plan
index 44402e02fc..30bb42b12f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And Exist(items1) And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And Exist(items1) And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_128.plan
index 888cd27f67..baf7da563f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_129.plan
index 7daf4afcb5..166683e37b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_13.plan
index 57c0d091c9..5ad5a63f8b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_130.plan
index d464a19201..21864c6ab8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_131.plan
index 8220633135..88d21b93c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_132.plan
index 532158d2fd..300e92615e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_133.plan
index c4b2b9bcc9..2107c2a790 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_135.plan
index f1e97e4579..88fff83dc5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_136.plan
index 0f209946e1..dc7f6a0550 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items4 \\u003E items2 Or items4 \\u003C items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items4 \\u003E items2 Or items4 \\u003C items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_137.plan
index 501e2daf66..ea29269c8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_138.plan
index 9b825ef3c2..ff30c21f3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_139.plan
index b9e42b2d09..0034add1d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_14.plan
index 35e34d0922..67b06e7ed7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_140.plan
index 1d2acc82f2..ae81d18081 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_141.plan
index b5076683fd..ef757ded7e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_142.plan
index 1198b609a7..438f729243 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items0 And items4 \\u003C items1 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items0 And items4 \\u003C items1 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_143.plan
index 0ac8261e3a..804b2a6440 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_144.plan
index e74bf2cdf7..0a4d9cf838 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_145.plan
index 1f0c66a34c..491156de7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_146.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_146.plan
index cd42a3b5db..562a70204f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_146.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_146.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_147.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_147.plan
index 4d669de3c8..739392e585 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_147.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_147.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_148.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_148.plan
index 04ec0aa0b8..5ae63e4c2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_148.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_148.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_149.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_149.plan
index 6c5d5fcd4f..c26bc05f06 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_149.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_149.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_15.plan
index 7e780d1156..474c43f367 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_150.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_150.plan
index fa25c32161..961f9c6931 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_150.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_150.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_151.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_151.plan
index c534cdbd24..48a0b20a10 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_151.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_151.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_152.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_152.plan
index dd1c7b864c..1322551dc2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_152.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_152.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_153.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_153.plan
index 1923acb492..cc3881535f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_153.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_153.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_154.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_154.plan
index 9eda78af0b..62d6026d2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_154.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_154.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_155.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_155.plan
index 7db9b1063a..9831ee7d94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_155.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_155.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_156.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_156.plan
index 53dbf6f57b..40c7d9d5f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_156.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_156.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_157.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_157.plan
index 2892527591..d8ea87c068 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_157.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_157.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_158.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_158.plan
index b4f7fe56dc..385968b2e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_158.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_158.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_16.plan
index 873b3c381e..8680e8aa8c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_17.plan
index 2ccdac60f7..3bf0936065 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_18.plan
index 159900da2c..ba79995cdd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_19.plan
index 3041da9f98..5648b5dbd7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_2.plan
index 39cd0284a3..85f650bc22 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_20.plan
index 25275af3c1..8964b50ff1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_21.plan
index 0d23bd4ac7..3b9f630bd7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_22.plan
index 90de8186bc..96907e23d7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_23.plan
index db29a4b7e2..a0eadb6098 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_25.plan
index aea439fd5f..6188a65b30 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_26.plan
index 689f5f03b8..eb6639d779 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_27.plan
index 3d20772514..19ffdb5964 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_28.plan
index 31f00bc152..754c1b6208 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_29.plan
index 308f4b2a85..c1e6f4a0d1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items3 \\u003E items4 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items3 \\u003E items4 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_3.plan
index dcc175c7fe..d31282e6f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_30.plan
index 8b07d7608b..37c9f3dd1d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_31.plan
index f82b8d54e4..90d4d16215 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_32.plan
index 2fabe31296..27b555673d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_34.plan
index 94c9788edd..00c9a5e3ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 != 0 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 != 0 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_35.plan
index 160ee4a4cb..138b429f56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_36.plan
index 83a9247b56..2314909901 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_37.plan
index 8b07d7608b..37c9f3dd1d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_38.plan
index eed49b8356..b659d03d3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_39.plan
index 1d911199fd..fb33c667e0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_4.plan
index ef63fac971..bbe9971456 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_40.plan
index 03b5cbe64c..6a58fde85f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_41.plan
index 0d813bdbe9..a649264f6b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 != 0 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 != 0 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_42.plan
index 72356bec83..9b2f743c24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_43.plan
index e0b87287be..9046a82a63 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_44.plan
index 9afa3550c8..494c9b2697 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_45.plan
index 60c5bee357..2ab4d042b3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_47.plan
index 1923acb492..cc3881535f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_49.plan
index d50ef78182..7e21d24815 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or Not Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or Not Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_50.plan
index 3d558b1f91..37149ae632 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or Not Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or Not Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_51.plan
index 07a0de37eb..fc4b20d62e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_53.plan
index c7ac3b3186..828a233016 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_54.plan
index f11d2ead9f..230b72c355 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_55.plan
index 163e857665..fc50afc9ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_56.plan
index 4fd5d6f5d5..4caaecc154 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_57.plan
index 24555f96aa..24352a0164 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_58.plan
index 389befe7a2..3c9e145613 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_59.plan
index ed75417893..b4a7f10bac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_6.plan
index f8dcda083e..8f92231696 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_60.plan
index 05910880be..c147ecfa65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_61.plan
index 4e677625b4..b26148ec94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_62.plan
index 41276aea2c..905ffd51d9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_63.plan
index 8deeb9bda1..6f1a8e77f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_64.plan
index 6fa43c1559..c576cc703e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_65.plan
index 285c122d7d..28325a18ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_66.plan
index d48b96312a..750555f212 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_67.plan
index 1e6b733e45..b542587ad9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_68.plan
index c4f411ab0d..38db453267 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_69.plan
index 614d1cdb6a..9db5eb1d06 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_7.plan
index abe2085ce1..41eaedbb3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_70.plan
index 2ff481e79f..5b1cc18f11 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_71.plan
index 8122da8a4d..72a77dfe41 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_73.plan
index 5f51f965b6..e3cc91b7d6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_74.plan
index 04f3b9363e..936841fa51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_75.plan
index 073aa84bba..97e83fb1b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_76.plan
index 98f390412a..c5028cb8e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_77.plan
index 4cee58c708..0ff7b7b556 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_78.plan
index fccba7ef8e..0a6e8f8a05 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_79.plan
index 1d2bcac62a..d35ffc4006 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_8.plan
index 89efa04584..b3c9a24a34 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_80.plan
index 39e2ea8e96..d08828c233 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_81.plan
index 23b3224b25..b492e5a813 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_82.plan
index 6fdb879a4f..9e9a9ee576 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_83.plan
index 1d2acc82f2..ae81d18081 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_85.plan
index 68251e3566..7b9599a424 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_86.plan
index 4a26e21905..58e8bb5852 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_87.plan
index a0b877027b..a6d95534c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_88.plan
index 8fc7767bc2..cd34ed5887 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_89.plan
index 4ef1834f67..63dc8e3e4d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_9.plan
index 8d91462928..9241a9541d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_90.plan
index faf117c4c1..1cbc18501d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_91.plan
index 54e92ba16b..1c8dab2faa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_92.plan
index 44f3c8cacb..9c105461f3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_93.plan
index 25e99af71e..ea118f26b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_94.plan
index 0844411b81..d767b16a24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_95.plan
index 1bb09c5037..437317e6ed 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items0 != 0 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items0 != 0 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_96.plan
index e4b466d96d..0d266c7848 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_97.plan
index c4df399327..e4a06278b8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_98.plan
index 2eaebee365..d478d8d1dc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_99.plan
index e397b390e9..30151e13ad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-2.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_1.plan
index 9c0467eadb..d1ab73bc51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_10.plan
index 0f23b0adf3..192feab1e0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_100.plan
index 88554c1079..ee530dd991 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_101.plan
index 66a1e00fab..9db0c53afb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_103.plan
index 85e5751c2c..0995ea8e7d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_104.plan
index 20aa3934b5..9dca5b17ee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_105.plan
index 4dcdd5b00d..8b6d53de01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan
index 16e77a067c..fe5f65c7cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_107.plan
index 87a4da8ea3..5945bfde27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_108.plan
index 8e33a768f5..34ae15dcfd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_11.plan
index 166c4cc75f..120e673d95 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_110.plan
index 460c2381b9..0e0db85374 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_111.plan
index 3c448441ed..aef04754c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_112.plan
index cb9cf0affd..afe28de0e2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_113.plan
index e998627f35..a9962b9b6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_114.plan
index 6b36c5c48a..86564ba3fb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_115.plan
index 867bda3903..73057a3740 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_116.plan
index 2d42aeef11..3d98bbb4e3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_117.plan
index c579b7c187..b701002ae2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_118.plan
index 900f2e1900..a26547780c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_119.plan
index 966533fd6d..a434840daf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And Exist(items1) And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And Exist(items1) And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_12.plan
index f9ecd2cf0b..07e90f8e62 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_120.plan
index df3f92767b..9211075362 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_121.plan
index a979893d6c..8c4e191e8a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_122.plan
index 0dea5a6a43..1089c828dc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_123.plan
index ffaa5ea3fe..0d0ef73fa5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_124.plan
index 1e80e2972e..e7ff9d92ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_125.plan
index 5fda58b2e5..be22c6e9e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_126.plan
index 96b024f28c..1b73137d51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_127.plan
index da4890556a..5ee09b723d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_128.plan
index 85dd16edf0..e37923b03e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_129.plan
index 183baddafd..be4d716ab2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_13.plan
index 24237edbae..95136bd7e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_130.plan
index 6d2313570c..8fbb9ed28e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_131.plan
index 2cfe565ea2..fd2ca74e2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_132.plan
index f1b65996f5..8e7f860392 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_133.plan
index fd8bf39b19..26ce77b5b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_134.plan
index 4156b5b3c3..9b1de5020f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_135.plan
index ea3a70af5d..f499f8a2c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_136.plan
index 0d1bb2b930..0d7582f0c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_137.plan
index 1dd2a01d01..c67101731b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_138.plan
index f9ae18f0d2..c9a0093222 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_139.plan
index eaa307fa70..139ea75d28 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_14.plan
index 546fa1153e..1d8d4f82eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_140.plan
index 5d5f452006..04072b2e21 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or Not Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or Not Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_141.plan
index 72ae360871..2db46c232a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_142.plan
index d6b7fc17f2..efa058bf1b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_143.plan
index 9d6292c410..f76d816044 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_144.plan
index 202147b329..5d7b118e25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_145.plan
index c1e9abf006..1b41ab4878 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_146.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_146.plan
index 88554c1079..ee530dd991 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_146.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_146.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_147.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_147.plan
index 5c108b433c..2bfa833e3c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_147.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_147.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_15.plan
index 1f14fe57a7..4be14a2d1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_16.plan
index 707ab4f30f..a73db936a6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_17.plan
index 4e75ee7bd0..60c4abce9e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_18.plan
index 5a8aaa4845..252ab6febf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_19.plan
index 2840c9b6a5..d47b1f408a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or Not Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or Not Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_2.plan
index 8a585405be..b31967215d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_20.plan
index c9fa206401..4b02e4fb40 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_21.plan
index cf7584f671..aea5410f1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_22.plan
index 455634acc3..234ff8bf4f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_23.plan
index 1ed1dc0e61..b38b497d83 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_24.plan
index a90fa0e848..9771bf795f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_25.plan
index ec04e425b1..e99f592828 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_26.plan
index 8dcedfb220..0f46b20686 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_27.plan
index 7391cb43df..1891b3ec23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_28.plan
index 8e3b6b1736..067368292d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_29.plan
index b7d7846577..ec71d0a908 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_3.plan
index ad47cd34f8..fc451d37bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_30.plan
index d2c4901e4c..345b17f033 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items0)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_31.plan
index d41f0a38a7..d4ca0543b4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_32.plan
index 2704ebec3f..882a51755e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_33.plan
index 37e3b614ab..0ba485e736 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_34.plan
index ad23a5042e..789c098af3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_35.plan
index ad47cd34f8..fc451d37bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_36.plan
index 4575283e9a..bbf8adeb7f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_37.plan
index 2225a8c904..49a57fa27e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_38.plan
index cbd948648d..3e2e0aa787 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_39.plan
index 41947ca189..278d345692 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_4.plan
index d56b5b3453..fa2c1859e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_40.plan
index 76cfc6808a..f588145c4f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_41.plan
index ddac5f8a74..523a29aa8c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_42.plan
index 76d6d91ec8..c7bf446700 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_43.plan
index 9255744c62..97f00204ec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_44.plan
index ffae9bf799..c5320bbd1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_45.plan
index 5e9609240a..b4396d7e39 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_47.plan
index 723eeebc72..290575761f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_48.plan
index 441864bf65..08ebb021c1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_49.plan
index 1148ccc07f..22e66704ed 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_5.plan
index 194a34b0c1..dff69e245f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_50.plan
index 12f4bc751b..84d59237a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_51.plan
index 935e0e2ff4..808132d0e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_52.plan
index 3a766894d4..691517c200 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_53.plan
index fe074b6c40..329ab3d8f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_54.plan
index dad07ce347..7faf5765d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_55.plan
index 1f17b95332..bc4ee5708d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_56.plan
index 8ff0aa93a2..7adf13cc45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_57.plan
index df795bcf0f..4cd6c0bbe7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_58.plan
index 642731f0b2..87f3216c68 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_59.plan
index 934fde0e1f..bf36d5b4cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_6.plan
index 5a39b15bb2..7f29f6f45b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_60.plan
index 01ed4d4206..c2e35c4d6d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_61.plan
index cb5f2b0364..9194448df6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_62.plan
index da453e5e5e..b70addeb47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_63.plan
index 0a3fdba2dc..be3df675f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_64.plan
index ce38d605eb..02a56b0a99 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_65.plan
index 91ed19a06f..ef84dc8044 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_66.plan
index 33eaf11f91..8fb150826f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_67.plan
index 6df0b18823..caaa3d0389 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_68.plan
index 36278f1da0..a1ee3e434f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_69.plan
index fe05cf80f3..d3eb478ee2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_7.plan
index 40d445215a..fc8dacfbdf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_70.plan
index 0e39664229..6f22ab8660 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_71.plan
index 33f2153b20..a9013d42ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_72.plan
index ea118dbe92..67b7666462 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_73.plan
index d038c66eab..9a8b1f5eef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_74.plan
index 403d145028..5b81c3825b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003C 110 Or items3 \\u003E 150 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And items3 \\u003C 110 Or items3 \\u003E 150 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_75.plan
index 183baddafd..be4d716ab2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_76.plan
index 158bf115a1..02ce2ad513 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_77.plan
index d6b7fc17f2..efa058bf1b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_78.plan
index 5ab41c8bfe..f14035ecfa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_79.plan
index 3a989361e5..77996e2247 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_8.plan
index ffa74e6c2f..06111909c7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_80.plan
index 12ebe8d454..2aa3766884 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_81.plan
index 8768faa205..fde3378b21 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003C 110 Or items0 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003C 110 Or items0 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_82.plan
index 068154e00f..63b83677a4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_83.plan
index 279362ef07..82e2185b4e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan
index 36c19711fc..1471089587 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_85.plan
index 158bf11526..514a154369 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_86.plan
index 41e1de215e..3c93eee36c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_87.plan
index 29b9d15827..b662b6b014 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_88.plan
index cdd5f29148..2a4473c958 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_89.plan
index 6801ef89ee..ffff10ba57 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_9.plan
index 93be213a5c..80fb68389d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_90.plan
index 12ebe8d454..2aa3766884 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_91.plan
index fddf39bc8c..bcff6c7979 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_92.plan
index d83137e779..026f835181 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_93.plan
index c53571932e..b0f59b708a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_94.plan
index ad47cd34f8..fc451d37bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_97.plan
index 2516bedeb1..284c638ed4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_98.plan
index df3f92767b..9211075362 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_99.plan
index 0dea5a6a43..1089c828dc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_1.plan
index f2cd407857..2e1a3434c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_10.plan
index aa53ed3dc2..2002b7150f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_100.plan
index 3a49c42522..8b0658a97b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"Scan\",\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableRangesScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableRangesScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRangesExpectedSize\":\"1\",\n \"ReadRangesKeys\":\n [\n \"a\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_101.plan
index b7178d3191..fe63af565b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_102.plan
index c12147c53a..80de7df7fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_103.plan
index 657a28fc6e..4dda17bd52 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_104.plan
index b5e220d415..e5a6aaaa7e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_105.plan
index b6dfada6b6..a04c337b2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_106.plan
index 913dd1d9a1..1849965104 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_107.plan
index 30b5fccc94..18accc160e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_108.plan
index adc572e4bb..3f8dde6f1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_109.plan
index a42d70e67a..b82d61b2d2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_11.plan
index e14c790602..8bb105721f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_110.plan
index c0b9269332..dab839d640 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_111.plan
index 49844616eb..03f04aa7e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_112.plan
index 7e26bbdb14..9d9fe79bf3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_113.plan
index ecc18c2e80..ac5910b490 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_114.plan
index 588f8a93e1..edee37f4a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or Not Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or Not Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_115.plan
index 0179b06076..a136f489c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_117.plan
index a2b8267675..fa7b8a2851 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan
index bb57bccbf8..e59b751e9a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_119.plan
index 89257f8bad..a79cef9fde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_12.plan
index 7434ff2625..92f12a0632 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_120.plan
index a797a51c53..21f31450aa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_121.plan
index d6471084e2..42ad0a6b47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_122.plan
index 6eaf848af6..996aeda76d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_123.plan
index 80321bc5d1..6c5d215f03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_124.plan
index 431ee69391..706a42ec5b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_125.plan
index 16c35391f1..61c1c39b18 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_126.plan
index fa742ed08e..982ec80b54 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_127.plan
index 431ee69391..706a42ec5b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_128.plan
index 12a450d641..6e06dcfb07 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_129.plan
index 705eedffed..45628d8628 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_13.plan
index d26be8c2e5..9bdd173537 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_131.plan
index cc0ac3d960..f348aeb26b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_133.plan
index a708c1c83a..bd44b2114e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_134.plan
index c3812dbef4..8702a7c3b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_135.plan
index daa7d37196..1bfd2a3ee7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_14.plan
index 0ddba48bd0..4bd7d56591 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_15.plan
index fbdfeaa2c1..57e56b13d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_16.plan
index 6ca5e10bb3..af36aa19dd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_17.plan
index e02d8f6624..97fb258a79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_18.plan
index c201f868a6..5b8a7a6c12 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_19.plan
index fb9f5c9060..fe3634aa78 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_2.plan
index 860dae21eb..e33e969449 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_20.plan
index d49c12f49f..4dc58f3c3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_22.plan
index 567847a1b4..9564d71c27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_23.plan
index 4a282c1c30..74cf067e06 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_24.plan
index 98a8fe365a..4f872b2ed8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_25.plan
index db930497bf..8ee3e33764 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_26.plan
index 149b15fb88..a19075a4f0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_27.plan
index 8de4c16b8e..56571c2e47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_28.plan
index ce701ee7be..7547ebbc9d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_29.plan
index 3cc12132ec..b559f5c701 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_3.plan
index 61f0e9cd85..e221e19348 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_30.plan
index 341475a93a..d8b5841cf9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_31.plan
index d2ddb6ad3e..86312f9e3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_32.plan
index 1c14e499fb..0d63a09511 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_33.plan
index 0a87ab9bd3..c4b5170496 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_34.plan
index 6890032587..439b20f88f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_35.plan
index d1c252f9c5..2120e7626a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_36.plan
index 8a19293ac5..101141e6f8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_37.plan
index 6d87823b4d..8368ddf1ac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_38.plan
index 6363878574..72b8e778a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_39.plan
index d65008f9a7..a1888deb8b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_4.plan
index 9e5f437059..ae33d8d2fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_40.plan
index a7f351efd8..d67210484a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_41.plan
index f10124f69c..f6348a001b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_42.plan
index e11cf33f09..a9732c69ad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_43.plan
index fad75beacc..ac9cba058b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_45.plan
index 06a00a196c..299afeeb3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_46.plan
index 31a9ab40a5..18dc6aef16 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_47.plan
index dc588cd5dc..2ba3051769 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_48.plan
index 73987cc249..1643ad6660 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_49.plan
index faf5ab5d65..5833aa9ca2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_5.plan
index 09514552be..b7b8c926e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_50.plan
index 2fd81af535..2f898a02e2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_51.plan
index 082ca3a398..727dbde6d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_52.plan
index 5412a0c628..349e29b2e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan
index 8c1e0078b8..435038c054 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_54.plan
index 2abe3ce8fc..96938044de 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_55.plan
index ea4068d93a..a8af07d555 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_56.plan
index 4130207d41..ba554dad81 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Not Or Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_57.plan
index 57f998255e..62a62e3981 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_58.plan
index bb71f511ea..5a556ae60e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_59.plan
index 729842b69b..404f23a71a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_6.plan
index 8a9c4491a1..b3a64b6007 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_60.plan
index 3565dc2a96..3e2499bb65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_61.plan
index 9c9c2a607a..c4d92b69d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_63.plan
index e08ca44cf8..d0c2b2626b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan
index abf032fb6e..88e29a9f2c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_65.plan
index d5a94b81fc..2f11c741dd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_66.plan
index e7953db27a..522700dd26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_67.plan
index 006af0cbf0..98206b9e7e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_68.plan
index f3551a7447..43f9377c12 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_69.plan
index 0e8993def1..0b2fe0ea0d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_7.plan
index 049401c9e5..3cb2bfb0fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_70.plan
index 9ac16829ec..038ef22ebb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1) And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_71.plan
index 7a82a481b0..0f5a242cf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_72.plan
index ac71801f29..39a22653cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_74.plan
index 28907f7fac..674c1a41e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_75.plan
index cc423ed038..eba99e49c0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_76.plan
index cdd731922c..aadfa3ff6b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_77.plan
index 0d1fd14e45..e9957fe09b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_78.plan
index 3913f32c71..a1c5e82649 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_8.plan
index ae61cb947f..4a0d7d0c01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_80.plan
index 7a85d60c44..1f7eb0921f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_81.plan
index af84efaf28..25d63f478e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_82.plan
index 5412a0c628..349e29b2e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_83.plan
index f507878027..f768416c88 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_84.plan
index 64b4088b7a..e76075640a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_85.plan
index 6b35776905..20193a9821 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_86.plan
index a243de135f..248955a734 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_88.plan
index c969071bd5..367db0bbb4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_89.plan
index 2b7e3b6088..52329ea4bb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_9.plan
index 89271bd16a..d71fb4f5d1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_90.plan
index 9ac0b26acf..4f7a3a540d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_91.plan
index 467c554d12..f01f923674 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_92.plan
index 64e5a34ca3..951953762d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_93.plan
index 43c8f53839..b0ea371797 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_94.plan
index 80321bc5d1..6c5d215f03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_95.plan
index aaf1a19091..db6af923a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_96.plan
index d028e9b82c..fb29ddee59 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n },\n {\n \"type\":\"Lookup\",\n \"lookup_by\":\n [\n \"a (n\\/a)\"\n ],\n \"scan_by\":\n [\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate-Filter-TablePointLookup\",\n \"Operators\":\n [\n {\n \"Inputs\":\n [\n 1,\n 2\n ],\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TablePointLookup\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (n\\/a)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":6,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Stage\",\n \"PlanNodeId\":5\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n },\n {\n \"Node Type\":\"Precompute_0_1\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_1\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_97.plan
index b2aa3853ab..88ae346a36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_98.plan
index 6f6c2bb603..f6a18fbc21 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_99.plan
index 8f05a4e6b2..488a3168b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_1.plan
index 02e7e46ea7..3186f0a007 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_2.plan
index 0ceb0aeafc..c1bfee6057 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 != 0\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_3.plan
index cb7c5aa940..bed57ec22b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_4.plan
index 762ddcd974..6ca7cdd82b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 != 0 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_5.plan
index e156d6a3bc..b9a1fdc984 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And Exist(items1)\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_6.plan
index c5ade19ff7..8005994010 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 != 0 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 != 0 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_7.plan
index 162e8cdee4..0ec8acae15 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_8.plan
index 746aa2f95c..1d9050d70f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_9.plan
index 8b4599c086..cb851f07be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-5.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select2-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or Not\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select2-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select2-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_1.plan
index 8524626e7e..3b418d2f27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_10.plan
index f76210a515..544f4e887a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_100.plan
index f3a5ed6ddb..5d1c3692be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_101.plan
index 946725ef72..3859dfbbb3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_102.plan
index d617ee4893..0849dc90b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_103.plan
index 5b8a82d80f..e1915c0681 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_104.plan
index 5b8a82d80f..e1915c0681 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_105.plan
index e11507f919..b3622b448c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_106.plan
index 69b274ce18..6b1d3a78ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_107.plan
index f256473bbb..4a06b5d189 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_108.plan
index 5a082acf82..6c3bed1827 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_109.plan
index 5dab9b541f..9b28e54fdd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_11.plan
index 633eebf6da..81a2e6f668 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_110.plan
index 5dab9b541f..9b28e54fdd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_111.plan
index c8108da473..31362edc1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_112.plan
index c8108da473..31362edc1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_113.plan
index 62037c631c..a231c9c4fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_114.plan
index 62037c631c..a231c9c4fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_115.plan
index 941788a2f7..0f3ae93844 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_116.plan
index 941788a2f7..0f3ae93844 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_117.plan
index c18414c7f4..63e1ca95a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_118.plan
index c18414c7f4..63e1ca95a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_119.plan
index e1625be343..7a4bc8be2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_12.plan
index ec535fcefe..ad18c09842 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_120.plan
index 42ee635e33..10bf092e56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_121.plan
index 80fffe96cc..48d6e78ae7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_122.plan
index 69862b6022..4f755faad2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_123.plan
index a50264ef51..b8b64d3461 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_124.plan
index f7ac189836..d58be5dd8a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_125.plan
index ee53d65bd7..c7459c6224 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_126.plan
index 0654b0e63d..e60885f487 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_127.plan
index f5ff73acb7..ce45d0549d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_128.plan
index e733b10632..e08380ccc3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_129.plan
index f256473bbb..4a06b5d189 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_13.plan
index 979055ce2c..0c3987d66f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_130.plan
index 8b4610f638..38f6fe6531 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_131.plan
index c851f586e3..f21284171d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_132.plan
index c851f586e3..f21284171d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_133.plan
index 916f6a2e91..357c03b1c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_134.plan
index 4c6b886839..74750a03ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_135.plan
index 905764ecbe..ea46c7f7ac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_136.plan
index 4a59e2a976..7e7a4da866 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_137.plan
index 643b1c9a16..0c8145a603 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_138.plan
index f1e1d81ad4..8ecc214b2b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_139.plan
index 671e02f3bf..35f6d5ea38 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_14.plan
index 07481afef6..058fea35a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_140.plan
index b38e39d575..c06b6f9d77 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_141.plan
index acb42863fe..2a5fcc92b3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_142.plan
index 5ac84d033b..6be27aec50 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_143.plan
index 8deba1a3ef..425c86cc78 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_144.plan
index 0118c7d25a..aa7332bb4f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_145.plan
index 9b854915ab..cfdf76c864 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_146.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_146.plan
index 9b854915ab..cfdf76c864 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_146.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_146.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_147.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_147.plan
index bfb97be3fa..ff4a1d141b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_147.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_147.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_15.plan
index 0b2ddd09ca..413e8c6899 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_16.plan
index 0b2ddd09ca..413e8c6899 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_17.plan
index 826777d558..b915235c85 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_18.plan
index c8f302cb9b..6bc5aa2747 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_19.plan
index f311c9d65f..b31bd61000 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_2.plan
index 8524626e7e..3b418d2f27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_20.plan
index 2547f07a2b..1a8704013f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_21.plan
index 9b854915ab..cfdf76c864 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_22.plan
index 9b854915ab..cfdf76c864 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_23.plan
index 6892cec1bc..42f777abf5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_24.plan
index 6892cec1bc..42f777abf5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_25.plan
index 16a7fb8362..cd5a7b588d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_26.plan
index 16a7fb8362..cd5a7b588d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_27.plan
index a978fd01e1..f08d4712e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_28.plan
index a978fd01e1..f08d4712e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_29.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_3.plan
index b1eb1fb361..3c590ffecd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_30.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_31.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_32.plan
index c2a37aa414..526bcae413 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_33.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_34.plan
index c2a37aa414..526bcae413 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_35.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_36.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_37.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_38.plan
index 0a6abf8b69..878b76bd72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_39.plan
index f363d0e654..f8d2ca4bb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_4.plan
index affa4e488e..2beffc76c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_40.plan
index 131349e7a6..d404308c00 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_41.plan
index 243ab7a709..93bc5b9093 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_42.plan
index 243ab7a709..93bc5b9093 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_43.plan
index be16a86ddf..72c369db97 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_44.plan
index be16a86ddf..72c369db97 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_45.plan
index fd2f0a74e3..dcd6a925fd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_46.plan
index 3ee8f0ce4b..94a821eeba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_47.plan
index 9e5e3c4080..802880a64c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_48.plan
index 3ded453e50..d171790aa6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_49.plan
index 54ade19863..b0f91eacee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_5.plan
index ed8a52d560..824945367a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_50.plan
index 7f4d2fae6c..bef579d78a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_51.plan
index bb1695f506..18d6a33fde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_52.plan
index 6fa38d0014..32ef8debc1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_53.plan
index c6c12fac73..a108bd8e2c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_54.plan
index c6c12fac73..a108bd8e2c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_55.plan
index 5b3dc585a8..3c48a66125 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_56.plan
index 499678dfaf..4093bbfc7d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_57.plan
index e599c26486..80ea8b81e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_58.plan
index e599c26486..80ea8b81e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_59.plan
index 66da717f3f..a9ab627b4d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_6.plan
index 8a15329cb6..109bc3316c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_60.plan
index 5b0afa8575..ca73d353a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_61.plan
index 00f3c04d66..c18cf8cd40 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_62.plan
index cc8bec2bc8..e0fcd48214 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_63.plan
index 78e85a40f2..0f333ab515 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_64.plan
index 9b68d482c4..81252f6d31 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_65.plan
index 79892d7275..b6f22864ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_66.plan
index ad2037d971..d4c7e12fba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_67.plan
index 96b7fac229..3c06c190b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_68.plan
index a8c9a918c2..b94fc5171a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_69.plan
index d8c713d026..79825153c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_7.plan
index e8a020f01d..5f052ba4b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_70.plan
index 41fbba684d..8daa42b358 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_71.plan
index 651a43917b..686c86cab8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_72.plan
index 7b62d253b6..839071ed51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_73.plan
index a33c778c71..1699b7477e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_74.plan
index 3b10e8c717..1c103d7bc3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_75.plan
index b9199c6d93..ed5af0aa95 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_76.plan
index 2a12d3d56c..398f8836c1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_77.plan
index ce675041bd..f0b8ceddaf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_78.plan
index ce675041bd..f0b8ceddaf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_79.plan
index 8e470c2437..79ad6a0277 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_8.plan
index 0a6abf8b69..878b76bd72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_80.plan
index b5aed42d71..413ace9941 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_81.plan
index ddd311cfd6..3b53a6f8cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_82.plan
index ddd311cfd6..3b53a6f8cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_83.plan
index cc044a4277..cdfae329ed 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_84.plan
index 94b7f16821..d1b942d02a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_85.plan
index c657cc6212..166070c1ee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_86.plan
index 745e7ab229..ae8fb66dcf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_87.plan
index cb5106b108..a1610313f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_88.plan
index cb5106b108..a1610313f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_89.plan
index 164104834f..558b988270 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_9.plan
index cda369e98b..c06ce6d1af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_90.plan
index 164104834f..558b988270 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_91.plan
index aee11e1400..ced9b56285 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_92.plan
index c9f1d495ff..a630c2a567 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_93.plan
index 1f52cd637c..3513d3b714 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_94.plan
index b6b80f718a..7a964d1cca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_95.plan
index fd05bf581a..7911942a2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_96.plan
index 0fad908f8d..f11cba0975 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_97.plan
index 8c304ed47a..aa71019de7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_98.plan
index 1269cac990..b44b657ad4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_99.plan
index ef3e96458e..c21329191a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-1.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-1.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-1.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-1.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_1.plan
index 62d89b7bed..0675abd3db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_10.plan
index 7cf36a8707..58437d4840 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_100.plan
index e90e19b19f..154e8bc83d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_101.plan
index 64af49d8fc..6b4d4a956c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_102.plan
index 125fcf3eeb..1ea9fdc589 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_103.plan
index 082742441e..e785018907 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_104.plan
index 6a22b5c3ac..0b85e1bbe2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_105.plan
index 6713fe7a3f..a7c82230ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_106.plan
index e6d308dde2..f23d671c2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_107.plan
index cb95fe072e..17d792fccc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_108.plan
index 72719b6e46..97b803bde2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_109.plan
index 040a11c6a5..ffaacb00a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_11.plan
index 0c25953bab..1f636287eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_110.plan
index c5e5a79463..9931974848 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_111.plan
index e1f915b860..87084f91d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_112.plan
index e1f915b860..87084f91d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_113.plan
index 3346e1a013..7915b4a460 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_114.plan
index 3346e1a013..7915b4a460 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_115.plan
index 6185aac722..bae0c83506 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_116.plan
index f2fc7418a6..ad0477d549 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_117.plan
index ee49186868..b7625f205c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_118.plan
index ee49186868..b7625f205c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_119.plan
index a96f3ff4bb..9d2ad6c014 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_12.plan
index be3c6d3cce..c47dab09ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_120.plan
index a96f3ff4bb..9d2ad6c014 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_121.plan
index 81a5afd19a..a556d49a5c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_122.plan
index 81a5afd19a..a556d49a5c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_123.plan
index 7352fdf74b..76345b6f03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_124.plan
index e7e5e99615..70ce3e6167 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_125.plan
index 0ab40e0dbd..e5d94eb10e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_126.plan
index d95ba899cb..276bc57cc5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_127.plan
index e8e2e368b0..89ee96a5f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_128.plan
index e8e2e368b0..89ee96a5f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_129.plan
index 97d6283d70..e326022d4d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_13.plan
index eb2b8d08ba..b2ca299d7e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_130.plan
index 82356c4823..7eb4735dba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_131.plan
index d6a6bf5d09..148e1c1779 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_132.plan
index 5ac156d429..a6f2939252 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_14.plan
index 4128e19ecf..f15473c5e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_15.plan
index 8b799f0a63..ca7da4e799 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_16.plan
index 8b799f0a63..ca7da4e799 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_17.plan
index d90b12a882..48886ad846 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_18.plan
index d90b12a882..48886ad846 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_19.plan
index 89d2446c1d..0c3687e579 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_2.plan
index be7e0aea7c..6dcdb8d5d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_20.plan
index 89d2446c1d..0c3687e579 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_21.plan
index d9bccf5951..53df4cec57 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_22.plan
index ea68f68a96..d676643d37 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_23.plan
index 3dabf19a89..24bc1418af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_24.plan
index 013a7fd4a0..124a820f92 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_25.plan
index dfc7c65c93..0a9c215fb2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_26.plan
index 06e9df6b24..d819481e11 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_27.plan
index d1ac21f775..acc36bd41d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_28.plan
index d1ac21f775..acc36bd41d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_29.plan
index 84acd753da..555c04a049 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_3.plan
index 52e9cf4431..7ed78c64d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_30.plan
index f68809a46c..508fec2136 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_31.plan
index 000844d5a1..c1652e35b4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_32.plan
index 8c64f45a4d..9441c91830 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_33.plan
index 9cbdcad467..679b7f6f75 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_34.plan
index 9cbdcad467..679b7f6f75 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_35.plan
index 01668a55d3..72003698e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_36.plan
index 01668a55d3..72003698e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_37.plan
index f1239adf05..d234f8fd07 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_38.plan
index 9ceb6db9de..e60a1fd4d9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_39.plan
index d9bccf5951..53df4cec57 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_4.plan
index 06b52372e1..23dd2c0e64 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_40.plan
index 1927727175..28b5f49f5a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_41.plan
index 93e06c26e7..397657c396 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_42.plan
index 937a81ca0d..b2bd8950a2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_43.plan
index e1e56059f6..adae9bb039 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_44.plan
index 253c848ee6..84639da1ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_45.plan
index 29ade22ec1..e5215e7660 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_46.plan
index 29ade22ec1..e5215e7660 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_47.plan
index 538dcf826a..9d109dcdb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_48.plan
index 538dcf826a..9d109dcdb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_49.plan
index 44b278aae8..22be6cdd61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_5.plan
index b8a4681e75..20e84aa686 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_50.plan
index 44b278aae8..22be6cdd61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_51.plan
index 2b2b4d44a5..71bf1e51a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_52.plan
index 2b2b4d44a5..71bf1e51a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_53.plan
index 973b4130b4..719747b199 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_54.plan
index 973b4130b4..719747b199 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_55.plan
index 20af8e9681..29e0eb3e07 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_56.plan
index 372a3552b9..9d4dc40076 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_57.plan
index 04c3228eb4..43be9ae115 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_58.plan
index 19594a4997..9ead2e45c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_59.plan
index c214a441bb..12bedda8d9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_6.plan
index b8082d356c..dde970f3a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_60.plan
index afde9d977b..1cebcf12b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_61.plan
index d38b088619..4792c1bd8a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_62.plan
index 57117ae1f4..d000f0667f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_63.plan
index 44b278aae8..22be6cdd61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_64.plan
index 44b278aae8..22be6cdd61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_65.plan
index f223491049..527ca2a7fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_66.plan
index 230a0e7868..631a7d5d9b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_67.plan
index e44e0ff8e3..e737b99281 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_68.plan
index 49ec5ac06e..d4de8a9355 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_69.plan
index 1afbc35032..a9eb9b3362 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_7.plan
index a252ab1f4d..e1acbdf027 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_70.plan
index f59bbc1449..614f72fe6a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_71.plan
index 146d55135c..e86545f92e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_72.plan
index 0fe224a1c3..fd114f0354 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_73.plan
index 04751a19b9..ece41ae816 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_74.plan
index e244ed8638..2234e3c010 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_75.plan
index 0eff864b2f..4f6ca3680d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_76.plan
index d238e01d0b..3dd9c364a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_77.plan
index 6185aac722..bae0c83506 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_78.plan
index 123d5193d9..ea7f562ede 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_79.plan
index 3dbe7c3c57..78557cef42 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_8.plan
index 9d1ed7a66f..3828c9ca38 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_80.plan
index 3dbe7c3c57..78557cef42 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_81.plan
index b76b70cf9f..89bf5bc45c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_82.plan
index 78fca10627..dc93caa294 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_83.plan
index bb2a6bf7fa..fb953b4b78 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_84.plan
index 64b376104f..450f93ea74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_85.plan
index 39bbe3514a..af8680922a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_86.plan
index 39bbe3514a..af8680922a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_87.plan
index b6322fe55a..e38c75835d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_88.plan
index b6322fe55a..e38c75835d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_89.plan
index 8a28198db1..6ec3156a90 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_9.plan
index 00e42ec004..c37e90530f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_90.plan
index 8a28198db1..6ec3156a90 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_91.plan
index b8d3d7122d..c7de556310 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_92.plan
index b8d3d7122d..c7de556310 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_93.plan
index 0d66e9a690..d4779b679a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_94.plan
index dd7141f261..46abc2b38a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_95.plan
index 0ab40e0dbd..e5d94eb10e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_96.plan
index 998bb00502..aaa4e0fcd1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_97.plan
index 251eb7b9ee..2fddb6f524 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_98.plan
index b73f793d44..edacd3eb47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_99.plan
index f493eb6850..e937df1127 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-10.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-10.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-10.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-10.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_1.plan
index ea0b0229bb..d5e2ca2718 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_10.plan
index acf77b8ff5..bfd0ead8ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_100.plan
index bd1dae601b..076e194b61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan
index d3c1385a7b..2eb65697af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan
index d3c1385a7b..2eb65697af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_103.plan
index 0a8599392b..745d6c4dab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_104.plan
index 0a8599392b..745d6c4dab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_105.plan
index 7e7eda1b55..d462655544 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_106.plan
index 7e7eda1b55..d462655544 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_11.plan
index dcb1886aab..45bcfef11c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_12.plan
index 72a44b2cfb..92264a9853 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_13.plan
index 6cdb403dda..bc2b319b43 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_14.plan
index 6cdb403dda..bc2b319b43 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_15.plan
index 557f777f3d..ed327aca31 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_16.plan
index ace43b675f..e0e158cd02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_17.plan
index c2dba512e6..f525a95bde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_18.plan
index 85f2f9962a..082202d8ec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_19.plan
index 55197f9434..ad3e46952c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_2.plan
index 1dde7fdec9..4823a49d1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_20.plan
index 55197f9434..ad3e46952c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_21.plan
index d576e38fab..418cb82e07 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_22.plan
index d576e38fab..418cb82e07 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_23.plan
index db5c62d1d2..6978868870 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_24.plan
index db5c62d1d2..6978868870 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_25.plan
index 9632db8b30..0c2ff84a3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_26.plan
index 9632db8b30..0c2ff84a3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_27.plan
index 7a48db8750..7b2f04e041 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_28.plan
index 7a48db8750..7b2f04e041 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_29.plan
index 3d98e16632..5f0b3e4baa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_3.plan
index 8026ecde47..71c705cfe5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_30.plan
index 3d98e16632..5f0b3e4baa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_31.plan
index 277ad91a95..3f63a9cc02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_32.plan
index 277ad91a95..3f63a9cc02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_33.plan
index fad9c08539..077965f7c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_34.plan
index b52942e16a..31e5ca2975 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_35.plan
index fad9c08539..077965f7c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_36.plan
index 6566441d30..de6540534e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_37.plan
index fad9c08539..077965f7c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_38.plan
index 272f032996..80caff456a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_39.plan
index eeae100474..c7d3eaf823 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_4.plan
index 5a3b42fe53..865bb99f26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_40.plan
index eeae100474..c7d3eaf823 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_41.plan
index c97d63a27e..d806445403 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_42.plan
index c97d63a27e..d806445403 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_43.plan
index dc8933232e..afa3a3ad97 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_44.plan
index 475c987377..2567e3d849 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_45.plan
index 494afe0649..5c497e2daf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_46.plan
index 494afe0649..5c497e2daf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_47.plan
index d9432a83af..f587f3c602 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_48.plan
index ee13477d86..27f2cc8093 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_49.plan
index 98eaa5610d..dc94d725fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_5.plan
index 43c86d0c63..ecf18359f3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_50.plan
index 6b4c99fa7f..71c4ee89ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_51.plan
index 6c9ab747ff..d4f4cf58d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_52.plan
index 24299005b9..aea0901870 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_53.plan
index f3201fc91f..03ebccdced 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_54.plan
index a60e1801b1..5b0960a09b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_55.plan
index c2c5d80c04..5781d403ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_56.plan
index 6268a18ec4..7d060e6b95 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_57.plan
index 9e790ee603..6023084aaa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_58.plan
index f6a5d2a838..5963e83034 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_59.plan
index c97d63a27e..d806445403 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_6.plan
index 62b6606763..94b72b7bf9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_60.plan
index c97d63a27e..d806445403 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_61.plan
index d686f1e27a..c68b2f9737 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_62.plan
index 2e5119112d..e4ca1d9691 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_63.plan
index 112368e544..b14a5ad7dd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_64.plan
index cc854de117..aa5fe79658 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_65.plan
index e233f72883..d4c9c3a6ad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_66.plan
index 296ae14058..4c638bc1e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_67.plan
index 0f00e5b38a..cf1947d188 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_68.plan
index bb20810953..b7aea6b513 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_69.plan
index 905a27ba8d..d81febbc4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_7.plan
index 56d074b5a7..b09a92d6b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_70.plan
index ce9e5150bb..b15aaff222 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_71.plan
index 7140181442..0a99f9f82f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_72.plan
index 7140181442..0a99f9f82f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_73.plan
index eeae100474..c7d3eaf823 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_74.plan
index 44e2f03ef2..c209e94d0c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_75.plan
index eeae100474..c7d3eaf823 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_76.plan
index 44e2f03ef2..c209e94d0c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_77.plan
index 1b7a7f4650..9a292e614e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_78.plan
index 9b6c0a7600..b6f9cde0c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_79.plan
index deb7ba6ef0..3829ab5460 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_8.plan
index 6d04c5058b..8dfc00ebdb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_80.plan
index e85be035fc..cb670437bb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_81.plan
index 677078cb7c..97f7369fea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_82.plan
index ab0c91c24c..61eaa466f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_83.plan
index 8eec18858c..9422b5d9cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_84.plan
index a3becee196..495913dafa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_85.plan
index dabacafea1..0cff8588af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_86.plan
index 50c399298e..c76b7af24b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_87.plan
index 6dd4550a77..73ae905996 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_88.plan
index 122436192e..90c941efb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_89.plan
index 925aa5aeb3..acea4b57c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_9.plan
index dcb1886aab..45bcfef11c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_90.plan
index b042c369d8..7662257494 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_91.plan
index e54237aade..5c9ead9d51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_92.plan
index 7d82453f2a..d51d9e54d6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_93.plan
index ed5d8c9571..cbd779657a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_94.plan
index bd1dae601b..076e194b61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_95.plan
index ed5d8c9571..cbd779657a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_96.plan
index 035dcb608b..76506327a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_97.plan
index ed5d8c9571..cbd779657a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_98.plan
index 035dcb608b..76506327a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_99.plan
index ed5d8c9571..cbd779657a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-11.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-11.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-11.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_1.plan
index dae43fc50d..555af0af94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_10.plan
index 01fe180989..954c2dbc7d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_100.plan
index eddd1e6d6e..c188a9892a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_101.plan
index b3140fef3c..010b0cf507 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_102.plan
index 06f507f518..69cb95ad5a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_103.plan
index ec66ac19ba..42eb3941de 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_104.plan
index 213a820678..23e3244ca9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_105.plan
index 8d6c54e5de..e65e28dcec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_106.plan
index 9805f2bff0..0a4e817392 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_107.plan
index 79cf382fcb..5ef02e31f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_108.plan
index 660fd9cd6b..0d54a7d35a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_109.plan
index cd18240541..3430483b5b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_11.plan
index 09697d1cd1..1a2fcaf2da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_110.plan
index 0c1e430410..e87fef9a8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_111.plan
index 66026956af..924800c96b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_112.plan
index 86863f66a8..5ee54b4d0a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_113.plan
index c73ac0dec3..427098e110 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_114.plan
index 6ab3b24780..4c3a5c0ca5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_115.plan
index 7269cbc57a..66bee35bd2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_116.plan
index 7269cbc57a..66bee35bd2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_117.plan
index 3bf4b3aa84..882104c54d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_118.plan
index 3bf4b3aa84..882104c54d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_119.plan
index 546737525d..71c5dd478d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_12.plan
index b36337e6f9..92581d0632 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_120.plan
index 546737525d..71c5dd478d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_121.plan
index 34c0c1d5fc..243a64b730 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_122.plan
index 64c83b24d5..b465de5cf4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_123.plan
index 44d0019e82..9fa776ffaa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_124.plan
index f7828dce79..933e6d5042 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_125.plan
index 6628eb1f27..be09c5b70f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_126.plan
index aa9d70f910..5f49dcbea4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_127.plan
index 75f9fe8c70..0315fa07a1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_128.plan
index 75f9fe8c70..0315fa07a1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_129.plan
index 5779c3466b..33a0c51505 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_13.plan
index 882f7bc50b..7e0db5a39f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_130.plan
index 5779c3466b..33a0c51505 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_131.plan
index e372e877ed..ad1b5af956 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_132.plan
index f9ea479b49..cc32060978 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_133.plan
index 9bc91b7a01..e9290e377f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_134.plan
index c898f7703c..0b24b9d1a0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_135.plan
index a6c5b51bca..a2c335f497 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_136.plan
index 450b287306..1cd5dc0f70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_137.plan
index 9b5bb4feb5..22b6356294 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_138.plan
index 8cbe6516e3..11ef3313b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_139.plan
index a4e1936132..7e03d2a3d7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_14.plan
index 882f7bc50b..7e0db5a39f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_140.plan
index 99cabbe008..ab018b24a2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_141.plan
index c320a7122a..a27afa2f0c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_142.plan
index 6c30dd09dc..31ab6dff61 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_143.plan
index f9b80318e7..b2b0f2b60f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_144.plan
index b8e50d699e..f96356e879 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_145.plan
index 85898938a2..4056204c81 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_146.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_146.plan
index 6214a8ab97..cf01d16da2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_146.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_146.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_147.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_147.plan
index 9fff245e47..8d4749fcb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_147.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_147.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_148.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_148.plan
index 9fff245e47..8d4749fcb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_148.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_148.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_149.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_149.plan
index 206d595f2e..8b862ffc6a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_149.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_149.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_15.plan
index 81f6b92a95..10d31f88d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_150.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_150.plan
index 206d595f2e..8b862ffc6a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_150.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_150.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_151.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_151.plan
index bf15a4f3b6..48f1c2d3be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_151.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_151.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_152.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_152.plan
index a309bedd25..1774109a4b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_152.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_152.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_153.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_153.plan
index 6bdfb95b7c..bbb47edb3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_153.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_153.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_16.plan
index 728f08e07a..d97880f0b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_17.plan
index 805efd8fb8..881da2504a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_18.plan
index ad2e95e0cb..263a378837 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_19.plan
index c73ac0dec3..427098e110 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_2.plan
index dae43fc50d..555af0af94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_20.plan
index 2ea7431470..e8c74b95ee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_21.plan
index c73ac0dec3..427098e110 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_22.plan
index 8221afd25f..9d4ee23d72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_23.plan
index c73ac0dec3..427098e110 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_24.plan
index 0ef3475a3b..2ceaf45641 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_25.plan
index c73ac0dec3..427098e110 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_26.plan
index c73ac0dec3..427098e110 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_27.plan
index 9d7c2da2d7..248891bcf0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_28.plan
index 9d7c2da2d7..248891bcf0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_29.plan
index 3971bb3fe3..b34bc23f01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_3.plan
index 1d616b52ed..20dc40ea2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_30.plan
index a364a29d02..04cf8d037c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_31.plan
index bbcea7a09d..d79731160e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_32.plan
index 91f8f192eb..2919d5613f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_33.plan
index 8d4f802800..9363d3c464 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_34.plan
index 8d4f802800..9363d3c464 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_35.plan
index b0e1c857b1..2dd3a687b2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_36.plan
index 6a226c9fcd..ff86c30dc2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_37.plan
index 0e96b9fda9..5a353d60ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_38.plan
index 4400cd3630..e6db8cabd9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_39.plan
index 285e8d7455..79efb0fe1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_4.plan
index 1d616b52ed..20dc40ea2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_40.plan
index 285e8d7455..79efb0fe1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_41.plan
index 8068a3cccd..1becb0d9eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_42.plan
index 8068a3cccd..1becb0d9eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_43.plan
index 9f0164fc8d..bf567c5d6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_44.plan
index 9f0164fc8d..bf567c5d6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_45.plan
index 09ce7d1333..1b73531477 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_46.plan
index 09ce7d1333..1b73531477 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_47.plan
index 6cddc75fd4..e25c1f8766 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_48.plan
index ccf907ae02..a0dd270402 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_49.plan
index 2975c6a592..fd2b98eb74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_5.plan
index 87c5efb4ce..80eb2d1b36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_50.plan
index 2975c6a592..fd2b98eb74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_51.plan
index c8d430f322..89c0720075 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_52.plan
index c1215c84e0..fd92a5d6ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_53.plan
index 4995efeeda..a089ff5e73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_54.plan
index 3d606e9fa2..6c5ec848b8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_55.plan
index 7a1c4f2eec..51b74bbae1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_56.plan
index 84b791235a..3c8445d603 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_57.plan
index ae937efc5b..ca395db888 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_58.plan
index 76d8842128..679cb83d5e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_59.plan
index 0d6308a210..c0b45a60e0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_6.plan
index 87c5efb4ce..80eb2d1b36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_60.plan
index 0d6308a210..c0b45a60e0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_61.plan
index 49f6178a30..339281de2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_62.plan
index 6053164181..101aea56d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_63.plan
index 8ba40059a3..843d91e0c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_64.plan
index 8ba40059a3..843d91e0c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_65.plan
index 7ea339315b..7c7d175492 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_66.plan
index 7ea339315b..7c7d175492 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_67.plan
index 700e32f781..a7494c34df 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_68.plan
index 5107ddf0ff..6a33e691a2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_69.plan
index e0dce61c96..3b1cf669e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_7.plan
index c4d406848f..5122d35874 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_70.plan
index 9da1ba376d..17e07ff7cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_71.plan
index a0d1114a8e..45af7e5bc7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_72.plan
index 29e2ee5d43..906a8a033e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_73.plan
index f2a8dfac1f..898d2b4252 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_74.plan
index fce4c822fe..f7e1c7d8dc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_75.plan
index bf15a4f3b6..48f1c2d3be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_76.plan
index 19174bef68..cc0e40f444 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_77.plan
index 082dcb23e3..1680b770d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_78.plan
index 082dcb23e3..1680b770d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_79.plan
index 84c0b79920..645b34c073 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_8.plan
index c4d406848f..5122d35874 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_80.plan
index 20c98ce6cf..44bea373a8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_81.plan
index d0e4927619..d0babd5205 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_82.plan
index 537ee11d09..d150d5daa5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_83.plan
index dddebee507..f3d09a2d03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_84.plan
index b66b4b918d..1108d68f1c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_85.plan
index 3659d8be60..3d825e0181 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_86.plan
index 9aeb068749..b7fbc62d48 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_87.plan
index dddebee507..f3d09a2d03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_88.plan
index 1db60eb51a..d291ee7d1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_89.plan
index a42f1c971d..184742873a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_9.plan
index 319827594f..390627af1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_90.plan
index a42f1c971d..184742873a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 And items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_91.plan
index 16545dc0be..8704a24e62 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_92.plan
index a5c9e21343..95d0d17f1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_93.plan
index f86f8dd581..9360bf0dab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_94.plan
index a42b4fa624..821dd53dea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_95.plan
index c7ed036a69..24510bd9bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_96.plan
index c7ed036a69..24510bd9bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_97.plan
index cd80a29dbc..064418df34 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_98.plan
index cd80a29dbc..064418df34 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_99.plan
index eddd1e6d6e..c188a9892a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-12.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-12.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-12.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-12.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_1.plan
index 2747d7e741..e5e7348da6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_10.plan
index c84f5b4ac7..2ec2bf7d6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_100.plan
index 1a16b48022..b004f6f889 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_101.plan
index b8fb301941..7e87019564 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_102.plan
index 0a9ee3bed0..7cae3db6cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_103.plan
index 0a9ee3bed0..7cae3db6cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_104.plan
index 23b5c5eecd..8d669f7928 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_105.plan
index dcd655b3df..2d03084f5a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_106.plan
index ff3730b671..fe9dafee58 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_11.plan
index c51c74da4a..cba7e6df2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_12.plan
index 77fbf28710..0525713b1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_13.plan
index 66d3679469..d858c3ad02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_14.plan
index 161a932df7..e46f299104 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_15.plan
index 55753a505e..581e360652 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_16.plan
index 94466a6a57..b54c5def82 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_17.plan
index ade5e5987e..69faac3408 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_18.plan
index e45fd8a836..c5ca8ca5fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_19.plan
index e45fd8a836..c5ca8ca5fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_2.plan
index 98c52a0236..e1fa5839da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_20.plan
index 1c505f8b64..8cf2bfad63 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_21.plan
index 65ea04d560..796827d3d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_22.plan
index 8424d1637a..ddc4f9f665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_23.plan
index 8424d1637a..ddc4f9f665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_24.plan
index fc945e7523..3dfa8ab0bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_25.plan
index 84746dbf62..8ae0ebe3c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_26.plan
index e8c559698d..29795b5cda 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_27.plan
index e8c559698d..29795b5cda 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_28.plan
index d33456ed66..a44beab2c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_29.plan
index d33456ed66..a44beab2c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_3.plan
index 3486b02286..4e5a051d87 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_30.plan
index 8424d1637a..ddc4f9f665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_31.plan
index 8424d1637a..ddc4f9f665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_32.plan
index 0bb45a86b9..779c2d3530 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_33.plan
index 0bb45a86b9..779c2d3530 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_34.plan
index 260aa57c70..69f689f46e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_35.plan
index 2935a62f83..42e77ca28a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_36.plan
index 30453479d6..15bff58822 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_37.plan
index eab260070e..7584586436 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_38.plan
index c6b381baf0..e667077276 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_39.plan
index 20e482fb58..28c0a97f3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_4.plan
index 6c63e7dc5d..cb42863b5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_40.plan
index 19b8396107..eaf6023660 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_41.plan
index 4ecd788bef..e0c1c8885d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_42.plan
index 9c400a6a5f..36c74fd861 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_43.plan
index 9c400a6a5f..36c74fd861 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_44.plan
index f851f521a1..9fd6943280 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_45.plan
index f851f521a1..9fd6943280 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_46.plan
index a1bd71eab1..72cdeecaf6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_47.plan
index 0eed625e17..e49e598999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_48.plan
index 2236238400..f8a3c0eb5a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_49.plan
index 3eb299b0b7..e8a3c10c70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_5.plan
index 4e2f814ad0..c6b2370551 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_50.plan
index 53883f9b5c..b09db7b86e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_51.plan
index 6ae0f5800c..9efe6d2a15 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_52.plan
index 1af8dd3dc0..258013b3b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_53.plan
index 394b43707b..d034bdbca3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_54.plan
index 652e4df1dc..b5d3801919 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_55.plan
index 78500afa19..032ee0d0f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_56.plan
index 32dc32a8e2..3cdd21c2cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_57.plan
index 237f627ed0..dfba0c074f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_58.plan
index 9d15e335f9..37c20ce656 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_59.plan
index 9d15e335f9..37c20ce656 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_6.plan
index 3d03ec248a..b78d9cc711 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_60.plan
index 38ed89d906..6e3f00fe53 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_61.plan
index 38ed89d906..6e3f00fe53 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_62.plan
index 2dc24f50e4..2479f879ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_63.plan
index 2dc24f50e4..2479f879ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_64.plan
index 467002390a..49a97960a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_65.plan
index 4dafd93cf3..1a0e0a7141 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_66.plan
index 92f54e23fa..be9d9fd3ca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_67.plan
index bbd5a6fd6c..721014b800 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_68.plan
index 16edc382b0..92f369a8a6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_69.plan
index 7b5332a673..a2102a0100 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_7.plan
index 2bb2709c37..0b3b3046bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_70.plan
index d90c6d33f2..f59e527cc5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_71.plan
index 87ae216f20..b0dab284a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_72.plan
index 19b8396107..eaf6023660 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_73.plan
index 5b34d68bba..3659d8ca1c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_74.plan
index 9a8cbf3a7c..4e56ba3177 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_75.plan
index 185b17ac1b..6318b7ec51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_76.plan
index 94c338d931..2ea2ec6a3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_77.plan
index fedcf7548a..9c53a2f22c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_78.plan
index 8a4ff2bfb5..c284e0c83b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_79.plan
index ceb8abda21..93cb92ad81 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_8.plan
index 1a2e0d7dab..2208d51b73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_80.plan
index 702ac6bd8c..11d3015b2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_81.plan
index b76729fb6b..5281182f6f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_82.plan
index 6d8b4db0ca..477f6c4bfd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_83.plan
index 53859614d0..ae1ae291fc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_84.plan
index f142e5b256..a4fa34f56c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_85.plan
index f142e5b256..a4fa34f56c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_86.plan
index 6c4101c06b..90704cf55d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_87.plan
index 6c4101c06b..90704cf55d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_88.plan
index 32dc32a8e2..3cdd21c2cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_89.plan
index 32dc32a8e2..3cdd21c2cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_9.plan
index 664df13217..2dcf9f7adc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_90.plan
index f4d04bbfac..8d6f8c991b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_91.plan
index 758758c078..edeb5183ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_92.plan
index b166fc751e..60079d0b5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_93.plan
index b166fc751e..60079d0b5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_94.plan
index 564b49e2b8..b92bdc3379 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_95.plan
index 632788a146..1584a1f3c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_96.plan
index a8696753bd..a8ca4d3576 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_97.plan
index a8696753bd..a8ca4d3576 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_98.plan
index c83347ed6b..f3d46767d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_99.plan
index 5d207e7929..047783545d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-13.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-13.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-13.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-13.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_1.plan
index 5fc1b9487d..517a301fd6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_10.plan
index f545ded7b3..ad361782c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_100.plan
index aeb7cd572c..5c62ce18cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_101.plan
index 5abf3f8404..65987f4799 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_102.plan
index 2b9efa6654..6e1fe38151 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_103.plan
index 733b499b3b..aecea4a8f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_104.plan
index 6d2baefc6b..88072af23c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_105.plan
index b3cff94bac..851b6e769c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_11.plan
index 483b59d423..1ecbe37189 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_12.plan
index de8e7901ff..efda5974b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_13.plan
index de8e7901ff..efda5974b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_14.plan
index 596de06aef..3fc873ceaf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_15.plan
index cb6406a0db..b332412c99 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_16.plan
index e50f0a74fa..928adf1193 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_17.plan
index f0bfd0217d..7c6b3e3c93 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_18.plan
index 9e38ba73f9..95f5e24a8a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_19.plan
index 87c251eda6..3c2cf8f72f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_2.plan
index bb003adc5a..3010cff178 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_20.plan
index 952f8b43da..47f785dced 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_21.plan
index ebd38629d8..734f074584 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_22.plan
index a89b8cf6e7..ad731b4c41 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_23.plan
index 1e4ffa116f..d7b985b266 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_24.plan
index 0ed5efd7ca..257f48186a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_25.plan
index 0ed5efd7ca..257f48186a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_26.plan
index 64aa2b57b0..1eb6b5d77c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_27.plan
index 431f138f36..93a0a1bb99 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_28.plan
index 8199e74a16..ab4c4cf3a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_29.plan
index b6c94ec537..66833b6898 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_3.plan
index bb003adc5a..3010cff178 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_30.plan
index b8842d165e..83f1c644f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_31.plan
index c334c83ccd..f3984a5543 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_32.plan
index edf6d01e50..1a386e813a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_33.plan
index edf6d01e50..1a386e813a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_34.plan
index 7a6f810279..9167d48698 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_35.plan
index f7c2fb7f63..023f106b1b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_36.plan
index d49c975e67..0179017778 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_37.plan
index d49c975e67..0179017778 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_38.plan
index 0881e44696..466a9da288 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_39.plan
index 6c433e0898..2ffde73823 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_4.plan
index 192d0953b8..f8301f23cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_40.plan
index 3ee7f37e8c..96b8eba673 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_41.plan
index 3ee7f37e8c..96b8eba673 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_42.plan
index bf812e034c..385114db51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_43.plan
index ff63ac87cf..5a198baedd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_44.plan
index 6942e38b97..5610845578 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_45.plan
index 6942e38b97..5610845578 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_46.plan
index 7bdfdc331b..96de8f5cf9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_47.plan
index 7bdfdc331b..96de8f5cf9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_48.plan
index a7207eaffb..a98d23adb8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_49.plan
index a7207eaffb..a98d23adb8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_5.plan
index 192d0953b8..f8301f23cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_50.plan
index ec1be597fd..15acc6b12d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_51.plan
index 11fc1d7954..8d3db50a24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_52.plan
index b75596d41d..15ac92369c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_53.plan
index 0d848c6066..93ccf17d9e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_54.plan
index fd9a1e7d46..944e9f8012 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_55.plan
index 75f1c72877..6d2a175fe1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_56.plan
index 71bfd41411..8915ce4d96 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_57.plan
index 2717476f24..4c005ec9bb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_58.plan
index 6b8e140ea0..7d3101d731 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_59.plan
index 537c409745..cfddedb79e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_6.plan
index 9c135f9a24..4530226368 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_60.plan
index 01a24307d4..db9f4104b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_61.plan
index f2abfd2051..c650a6c71f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_62.plan
index 970d106a14..11bdb7a704 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_63.plan
index 970d106a14..11bdb7a704 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_64.plan
index f4a0c771d9..88e5a109e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_65.plan
index f4a0c771d9..88e5a109e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_66.plan
index 896b809bc8..c3c8907525 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_67.plan
index 896b809bc8..c3c8907525 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_68.plan
index bb2e76b9b0..9ddfdefc63 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_69.plan
index 932fae03f2..f115368c36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_7.plan
index 9c135f9a24..4530226368 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_70.plan
index cb270a66f1..891ae62c50 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_71.plan
index 45146aa1f0..6cdf7adaaa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_72.plan
index 1e2baf228e..e1fad8fef2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_73.plan
index 12411cf5cd..6b829a5c26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_74.plan
index d09ba898d9..07c6ae3e1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_75.plan
index eac9d3c875..c1fb6f2fd3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_76.plan
index 1301d3bc89..36cf7ee428 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_77.plan
index 707dba8f08..ad907e24b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_78.plan
index dccffc90df..fd9067668a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_79.plan
index 936e03f0f9..bf678d4df0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_8.plan
index 02f1360a8f..905ae900ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_80.plan
index 3b592a850a..e3d3ace2af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_81.plan
index 2671827446..66a62e8c32 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_82.plan
index 1d12fd45c8..ede9e6a9be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_83.plan
index 1d12fd45c8..ede9e6a9be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_84.plan
index 5192204dc7..bfcd544eb3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_85.plan
index 5192204dc7..bfcd544eb3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_86.plan
index 87f2330c82..d81731fea5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_87.plan
index 84abe75eb4..58e6327135 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_88.plan
index ef428d4796..d608f34686 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_89.plan
index c1a5606afb..c14a569f3e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_9.plan
index 02f1360a8f..905ae900ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_90.plan
index a332f137d0..6da532a320 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_91.plan
index 6bd5e40b6c..9e248d6999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_92.plan
index deb73953d2..d72a399634 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_93.plan
index deb73953d2..d72a399634 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_94.plan
index cf87e30ed9..cba65fb55d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_95.plan
index cf87e30ed9..cba65fb55d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_96.plan
index 66a1802502..0749f921cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_97.plan
index 66a1802502..0749f921cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_98.plan
index 88c5bfddf7..1ec3cf08b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_99.plan
index 88c5bfddf7..1ec3cf08b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-14.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-14.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-14.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-14.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_1.plan
index acb6f24683..e8d63efce1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_10.plan
index cd7e4398aa..829b3774f2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_11.plan
index 86a022f9b1..5b520166e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_12.plan
index a825005a08..dce6e96944 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_13.plan
index 191a0da845..07a4ff3583 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_14.plan
index e6a548fc6c..de5f595556 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_15.plan
index e77b4c525f..9b96168c5b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_16.plan
index e77b4c525f..9b96168c5b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_17.plan
index 1c3227a986..07baa74d79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_18.plan
index 1c3227a986..07baa74d79 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_19.plan
index 6e27acd201..367dab88a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_2.plan
index 4acd0ebf63..54cd12b765 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_20.plan
index 6e27acd201..367dab88a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_21.plan
index b577a3ba30..1a14e925f4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_22.plan
index 343d2f95b8..2d7e20d967 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_23.plan
index bb9b91dbc9..f5cd77f2b2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_24.plan
index 2138b33d9d..c703f5f1e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_25.plan
index 3141709619..4dfec6e729 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_26.plan
index 0125ce6751..ba0622ee6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_27.plan
index 0c3c01421b..c07089d7ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_28.plan
index a316320b64..3ae547ce73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_29.plan
index 9fac328013..2e0c0dc776 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_3.plan
index 9b45eb07fd..792d184f48 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_30.plan
index 652402e334..9a6b542a72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_31.plan
index 5e04fb3b75..ad7ef59c20 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_32.plan
index 5e04fb3b75..ad7ef59c20 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_33.plan
index c40150da2a..42ebe420db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_34.plan
index c40150da2a..42ebe420db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_35.plan
index 58b1eb709b..9d4735479f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_36.plan
index 58b1eb709b..9d4735479f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_37.plan
index 7662b09332..b6e824df9f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_38.plan
index 7662b09332..b6e824df9f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_4.plan
index de7ed856f3..103a28c074 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_5.plan
index 8a89eb61aa..71b569a4c4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_6.plan
index 61e47863e4..f75cb992b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_7.plan
index b544cec841..88916c12ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_8.plan
index 7eadb42b71..55169ab80c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_9.plan
index 4419548ef6..a4375084d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-15.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-15.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-15.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-15.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_1.plan
index d47b3d863c..2d5f3934e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_10.plan
index 5ea58421f9..6616606d36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_100.plan
index ef89b67c76..cbb8f73e38 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_101.plan
index 944167cb7a..d21edbf34e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_102.plan
index d941a84135..94d76c4217 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_103.plan
index b1fedb737a..d20e255486 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_104.plan
index 68cf44edea..433514d0ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_105.plan
index 68cf44edea..433514d0ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_106.plan
index 8f15114206..9fbbf81de4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_107.plan
index 4fbfcd89b0..5d18d7d175 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_108.plan
index 84bc444b52..167dd2aaff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_109.plan
index 84bc444b52..167dd2aaff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_11.plan
index 5ea58421f9..6616606d36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_110.plan
index fbe80b26c2..e9424b4fdb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_111.plan
index fbe80b26c2..e9424b4fdb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_112.plan
index e080441192..231f7d1351 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_113.plan
index e080441192..231f7d1351 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_114.plan
index 5ea58421f9..6616606d36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_115.plan
index 5ea58421f9..6616606d36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_116.plan
index 1bc308a272..6581665a46 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_117.plan
index 1bc308a272..6581665a46 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_118.plan
index 5d387a0cc7..f0e63800b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_119.plan
index e46258dba1..e016ab3419 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_12.plan
index 78fd41f207..525e1595d7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_120.plan
index 3ffa191165..b1751ed50c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_121.plan
index d6ec58df1c..df6a566e65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_122.plan
index 9ec1946a97..2064458265 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_123.plan
index 7212e8930b..560fb2e86d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_124.plan
index c3d1fae9fa..82fe169268 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_125.plan
index c3d1fae9fa..82fe169268 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_126.plan
index 28572c5372..2d30359f12 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_127.plan
index 3bb739b34f..f782bb71d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_128.plan
index a0d074d73b..0b2cf0a24a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_129.plan
index b8237a77cb..19fe1332f0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_13.plan
index 15e075605d..c37b3bdc01 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_130.plan
index d07ca15e07..eee97b0ec4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_131.plan
index 336fef36ef..60c8bc9601 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_132.plan
index 39e1721952..7a88caf29f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_133.plan
index 804daed6fe..bf4fae84e5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_134.plan
index e1bb0ec3d0..4e079019f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_135.plan
index 676023bc0a..db00d47644 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_136.plan
index ba696d7fd3..77a8ad333d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_137.plan
index befde25196..9304c33766 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_138.plan
index 332c018537..38506daa62 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_139.plan
index bc7a68e0f0..72f0623f84 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_14.plan
index 0c9e499e9c..be97bc8a43 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_140.plan
index c841d0ce2c..384de7b35a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_141.plan
index c761f69251..e20bef037e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_142.plan
index b25ecb1aac..84c2dbfb46 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_143.plan
index b25ecb1aac..84c2dbfb46 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_144.plan
index 8dca07a556..4d512caf6c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_145.plan
index 2dc4459571..7aa3ff7338 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_15.plan
index 5c116ad707..9ebc2cf793 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_16.plan
index 238306fc64..af7e8fca72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_17.plan
index 0ad37cc6ee..8c6d1f01f4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_18.plan
index 01c040324c..83702d9c94 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_19.plan
index dd58df936b..b9624790cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_2.plan
index 5f014485c9..b2e4f3ea3e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_20.plan
index 91f4d9566e..102ae18d7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_21.plan
index dbc4233df2..ae6a2ff775 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_22.plan
index 8bc82b7603..a8a1cdfd4a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_23.plan
index 5faf50bbc5..bcca565d6a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_24.plan
index 3f0413ed2b..ae5be82862 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_25.plan
index a77cd6efde..a137a96ac8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_26.plan
index 81140db03a..f346c9b09a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_27.plan
index c28890c50f..e61ec137be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_28.plan
index 14011f7aac..e0d86c4b8e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_29.plan
index fd5640ce6d..253db86ef1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_3.plan
index f810d867d9..f17777a62a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_30.plan
index 94d0491a95..72c2bc5d2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_31.plan
index e87a6ab787..e87faa4cb5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_32.plan
index ea8453bc13..979d4a92c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_33.plan
index ea8453bc13..979d4a92c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_34.plan
index 10e15ec8c5..e067d6d610 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_35.plan
index c2aef849a2..f7c885034d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_36.plan
index 031fb840d5..0d8ddad760 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_37.plan
index b77eed622c..220883b9f4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_38.plan
index 669579f886..00785f35b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_39.plan
index 5a8a32baa6..037ca6cdd0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_4.plan
index 4690da669b..7038e548fc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_40.plan
index 3618560a8b..d4b95cca50 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_41.plan
index 3373923a49..1cb2b9b1cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_42.plan
index 91f4d9566e..102ae18d7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_43.plan
index 4a3c923ec2..1cfdb19162 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_44.plan
index 4f552e691b..81db101f21 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_45.plan
index 172b431ef3..d71a9bff43 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_46.plan
index bb6b2228ac..e1eb1ee194 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_47.plan
index 2aba293811..c89e059cad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_48.plan
index 966b365c34..c89510b65a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_49.plan
index e2b52de304..826fcc481b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_5.plan
index 04003816d5..eee37e03fc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_50.plan
index 8aaad758d6..d2c7039eda 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_51.plan
index e2bff864dd..272337cff3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_52.plan
index 91f4d9566e..102ae18d7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_53.plan
index f18f48a813..d7667bf6da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_54.plan
index 334bfee940..02845774d9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_55.plan
index 0cd5ac4162..b32976fd76 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_56.plan
index 66130a41dc..8e3cce20d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_57.plan
index 8b93b0c02d..6ef758f43c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_58.plan
index f915e23610..f0a5220566 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_59.plan
index e1851ea377..1e3b94ae29 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_6.plan
index 0bec9e6ace..5b4f294aee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_60.plan
index 7e96c9d182..7d07988996 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_61.plan
index c01008e78e..94d839ffb3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_62.plan
index d3a54ab0aa..f12d3184b3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_63.plan
index d3cfe0e3d8..34463116fd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_64.plan
index 6bd66e6cdc..f8124beacb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_65.plan
index 7535c1bb69..fcc79ddf00 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_66.plan
index 868ba07bfe..75e09cec80 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_67.plan
index 871711367d..1b81ca1761 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_68.plan
index 762ced77cb..a4d7172990 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_69.plan
index a2e238b74c..a4689add9c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_7.plan
index 0bec9e6ace..5b4f294aee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_70.plan
index b4ddfa219f..0b028bd5a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_71.plan
index 3dcdeed74a..ef9cf7a2be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_72.plan
index 060ec7a114..36998bed82 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_73.plan
index 74fe5a2c42..b8577b6bfe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_74.plan
index c56ecf9017..d18f5fbcc1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_75.plan
index c56ecf9017..d18f5fbcc1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_76.plan
index 762ced77cb..a4d7172990 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_77.plan
index 439c342ddd..37b3c5ca11 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_78.plan
index 8d7e208e08..6ae471ad14 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_79.plan
index 99cd22e813..9d8b1fd665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_8.plan
index 3376e9118b..5cf17b55b3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_80.plan
index 43f84dc4d3..42cf0913d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_81.plan
index 931dd5dba1..92a7f42d28 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_82.plan
index 2c35e693c2..1d674a300f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_83.plan
index 960fe698e8..9416a50ace 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_84.plan
index c3981f7562..b363eb2a04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_85.plan
index 076f2569e1..63a26bf135 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_86.plan
index 0a2971ff84..3290981d3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_87.plan
index 0a2971ff84..3290981d3b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_88.plan
index e468fa5a82..2d214758d1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_89.plan
index e468fa5a82..2d214758d1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_9.plan
index 3376e9118b..5cf17b55b3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_90.plan
index 1c7580643d..57303cb869 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_91.plan
index 1c7580643d..57303cb869 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_92.plan
index f2fb442882..d86823a37e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_93.plan
index a63f604073..bb723e6766 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_94.plan
index 3c614f4412..ee99945380 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_95.plan
index 648356728b..fb11e39294 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_96.plan
index 6d5d16271a..e2f51ee46d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_97.plan
index 6d5d16271a..e2f51ee46d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_98.plan
index 060ec7a114..36998bed82 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_99.plan
index bea275981f..728a5fff9b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-2.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-2.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-2.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-2.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_1.plan
index 272043e87a..88891135f6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_10.plan
index e97c8e61b9..d6872c6bb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_100.plan
index 8eef2fda0c..e158702380 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_101.plan
index a3bb49f7ac..fbfbd60cf2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_102.plan
index 9a56bfffa3..f572bd9af8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_103.plan
index 735b2deea5..7827e9fd87 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_104.plan
index 5312bd4aa7..301739adce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_105.plan
index bd4b4a4c99..bfc53fdc1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_106.plan
index b01767fc3c..994195e86e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_107.plan
index 4a61725601..b211777e34 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_108.plan
index 8188016256..fd4fb5c0b7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_109.plan
index f29fa27be6..94aa72fdda 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_11.plan
index 233671053e..f59c179217 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_110.plan
index 93b2993924..dec9b77450 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_111.plan
index 8e929dae89..12791ace5e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_112.plan
index fb8ff8f89d..9cbbf908a0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_113.plan
index 77f245fc54..e34de573c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_114.plan
index 501a038285..eadef9c6cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_115.plan
index 6e94db44e9..d0a2c1dc89 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_116.plan
index c539fed131..0df86a3656 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_117.plan
index bfb47e35ee..9029783703 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_118.plan
index bfb47e35ee..9029783703 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_119.plan
index 2680a4077e..d3c0466e45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_12.plan
index e9c8e0be5d..e50af10073 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_120.plan
index 8c9939fe32..ebc9c10e00 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_121.plan
index fb33000a1c..77b9b8b1af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_122.plan
index b4cb981cd1..7cc0e2be6a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_123.plan
index 841dac24ac..165bf201d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_124.plan
index 841dac24ac..165bf201d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_125.plan
index 3b7960a3e5..f1419cda28 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_126.plan
index b64075871f..b378e2f9cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_127.plan
index cb68f04488..4b692fea09 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_13.plan
index 52130160fa..5b8102edae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_14.plan
index 2d7c44fab9..e4d73eeec0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_15.plan
index 142b8012eb..f52bc475c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_16.plan
index 3b08bb0881..a6483410cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_17.plan
index 4f73da711b..f656d0e5f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_18.plan
index 4f73da711b..f656d0e5f9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_19.plan
index ccbaa9a53c..f6dbc304a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_2.plan
index 7a236d1f7f..2455acf756 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_20.plan
index 4cc0c679b8..dadc3c06df 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_21.plan
index 765227ca10..89395a28b8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_22.plan
index cd4f4e16d3..da0e27d7d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_23.plan
index 3f3a7d54ad..e4f8b5c100 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_24.plan
index 3f3a7d54ad..e4f8b5c100 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_25.plan
index f986355f1d..cdeb1b2538 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_26.plan
index f986355f1d..cdeb1b2538 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_27.plan
index 142b8012eb..f52bc475c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_28.plan
index 74bcafb5cf..2840f15ca4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_29.plan
index 1be22ad797..8df2c33211 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_3.plan
index f89f6a8247..4db81c8464 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_30.plan
index 69a45f559c..0bd86d2d8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_31.plan
index 1e495fbadb..ce813ebe29 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_32.plan
index 8e50b0d5dd..03dba12023 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_33.plan
index 8b1edcd71f..88b96d74d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_34.plan
index 4d870e556d..0815263455 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_35.plan
index a81856f456..f967d0bd78 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_36.plan
index a81856f456..f967d0bd78 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_37.plan
index 647493776a..def747a3e8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_38.plan
index bf72feb1c0..0f44c65d7d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_39.plan
index ae54b54a53..7919924d89 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_4.plan
index 445be99240..a3e9db625a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_40.plan
index 6e1243ac86..924626232f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_41.plan
index 6b866aab62..77ba311fb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_42.plan
index 6b866aab62..77ba311fb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_43.plan
index 1be22ad797..8df2c33211 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_44.plan
index 5a5a64ea0d..f2f87da20b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_45.plan
index 1be22ad797..8df2c33211 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_46.plan
index ec924ad65d..cad1380179 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_47.plan
index 5f622bca55..dd85dc0a7f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_48.plan
index d07cbb939f..807c273774 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_49.plan
index a383654e99..a94dbcd722 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_5.plan
index af4bddf887..b7c30e0fb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_50.plan
index 59505ed86e..0fe073ef1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_51.plan
index b143716436..4bd7fb1c24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_52.plan
index 05c2916261..cacfafe991 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_53.plan
index 253244ef88..49eaa9e6be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_54.plan
index 8698f4d008..87d25811ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_55.plan
index 12de6964d0..6424e3a55a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_56.plan
index 92a5b75455..15435603b3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_57.plan
index 9e78341f21..4d34a860da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_58.plan
index 9e78341f21..4d34a860da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_59.plan
index a7c1bd88be..5c54f85dd3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_6.plan
index 0800b1800b..4400ef6aa3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_60.plan
index a7c1bd88be..5c54f85dd3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_61.plan
index 3e5269b868..9a0be3104a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_62.plan
index 3e5269b868..9a0be3104a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_63.plan
index 00cd6f8da1..c53ae7c1cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_64.plan
index 00cd6f8da1..c53ae7c1cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_65.plan
index b6c4a71828..3d1a9d0cf4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_66.plan
index b6c4a71828..3d1a9d0cf4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_67.plan
index 453ed9d32f..fb8cc23935 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_68.plan
index 453ed9d32f..fb8cc23935 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_69.plan
index 4f4ee009e6..555522d4c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_7.plan
index dbd8059f92..fc53eb0eb2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_70.plan
index 4f4ee009e6..555522d4c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_71.plan
index 9407adbe0d..35891ffab3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_72.plan
index 9407adbe0d..35891ffab3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_73.plan
index 552e401771..8a4f3f7097 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_74.plan
index a5b2fd644f..f5bd1cfb7a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_75.plan
index 2520b1a7e1..19df68a3d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_76.plan
index 9d67732faa..22c4c42559 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_77.plan
index 7b933c75a2..93b85087da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_78.plan
index 4dee454def..fca8d718f0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_79.plan
index 138d75a000..4046efca5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_8.plan
index 1ea45e9048..eca10e7121 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_80.plan
index 2e74cae32f..a122661092 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_81.plan
index 40579e0991..f6f22d5aeb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_82.plan
index 20802f8a5d..9ab83685ec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_83.plan
index e02fd74bd0..6cee2130eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_84.plan
index 6538567164..1dc60f10cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_85.plan
index 0449c067ee..5e23d9c22a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_86.plan
index 0449c067ee..5e23d9c22a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_87.plan
index cc4fa47b8c..f14fcf6938 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_88.plan
index 2464b3272d..19757c0dd2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_89.plan
index 854480bc1a..8c9876ef74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_9.plan
index 6012f10b24..ff77837846 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_90.plan
index 2ab07272d9..9e87c16f3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_91.plan
index 428e58153f..5606247518 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_92.plan
index fb8e43ff2d..81abb5b509 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_93.plan
index 8c8438dd0e..a8003bee80 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_94.plan
index 81e7d0dfc9..3d7107b6a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_95.plan
index 6e94db44e9..d0a2c1dc89 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_96.plan
index 169a7e1a53..e8b9a5b410 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_97.plan
index 6fbe50670f..ce9a50491f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_98.plan
index e3ea745329..fa4a7fb3f4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_99.plan
index f96f674414..ae2421bd70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-3.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-3.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-3.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-3.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_1.plan
index db6e488fb5..1c8a2e7174 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_10.plan
index 3b9c17f522..ac1e55eaeb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_100.plan
index cf14af5d23..8f41b3abb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_101.plan
index f9872f8952..8810b96b1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_11.plan
index 3b9c17f522..ac1e55eaeb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_12.plan
index 30c14813fa..dc658c451e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_13.plan
index 30c14813fa..dc658c451e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_14.plan
index d3dcc40d7d..20721648cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_15.plan
index d881b5fa14..a8fd4127fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_16.plan
index e0bc9f2a84..75d8934102 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_17.plan
index 8b32e8ebb0..94c88036ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_18.plan
index d8de2244e5..4e478a34ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_19.plan
index d8de2244e5..4e478a34ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_2.plan
index fb8760adb4..9cfa940852 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_20.plan
index 3ff59e18b8..4ff97dc925 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_21.plan
index e9de8e2619..1827a2ca75 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_22.plan
index 0ff3995961..0a65230ffe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_23.plan
index c6857ea4f8..d2f7338e1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_24.plan
index 37854f75b1..05b6bfc546 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_25.plan
index eea1834a09..1049ca01db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_26.plan
index aece285427..cb5ba01a5c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_27.plan
index aece285427..cb5ba01a5c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_28.plan
index 806b25268f..df6649de1d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_29.plan
index bc73bbb000..62ba605da8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_3.plan
index fb8760adb4..9cfa940852 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_30.plan
index 620708ee7a..19b9855812 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_31.plan
index 620708ee7a..19b9855812 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_32.plan
index bb3bc28459..61ab7b792e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_33.plan
index bb3bc28459..61ab7b792e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_34.plan
index e395ad9467..82aa6ca373 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_35.plan
index cddfedcbee..7b7b42673e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_36.plan
index 5269f597aa..121297b832 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_37.plan
index c7c05b9002..31b9a1819f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_38.plan
index 8743fe61a0..ad7d11f92d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_39.plan
index 8743fe61a0..ad7d11f92d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_4.plan
index 0aadf7f390..70e045f3cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_40.plan
index 202978ee9e..784043fb25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_41.plan
index e7cd3dedde..8721b0c7c1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_42.plan
index 19e2631cb6..1c9dc12607 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_43.plan
index 19e2631cb6..1c9dc12607 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_44.plan
index e7572b7674..5576e9027a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_45.plan
index e4cffcf1b2..4c13692b3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_46.plan
index d133101a51..c63daf00a4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_47.plan
index a955844f06..1298f1db9a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_48.plan
index ac7dd15aff..ca630af07a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_49.plan
index ee3a098dbc..8a5182d3b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_5.plan
index 0aadf7f390..70e045f3cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_50.plan
index 7c2c75f81b..162e5e167f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_51.plan
index a881fb14a5..d5a62fe925 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_52.plan
index 48048b8e5b..139f685143 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_53.plan
index cfda0a688c..5ab95ec362 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items0 \\u003E items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_54.plan
index 252a102f65..968a2fd6a1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_55.plan
index 206d420f7f..8d272db076 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_56.plan
index 7823044c46..e812b79b93 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_57.plan
index 4235c6d385..4ac28f16d2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_58.plan
index 87fdf9690b..08b483bd4d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_59.plan
index 87fdf9690b..08b483bd4d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_6.plan
index ed3e60b437..b05a6dca1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_60.plan
index 06d1249d8c..5df0eef1eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_61.plan
index 6440b0766f..38871fd0b4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_62.plan
index cebf27ba08..1489cf1159 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_63.plan
index cebf27ba08..1489cf1159 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_64.plan
index 01b1465554..2b2ec40294 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_65.plan
index ca57b6f9ed..a311c1295b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_66.plan
index 52878336e9..91e47c8e2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_67.plan
index 24ecb58617..79f203b257 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_68.plan
index fa6d3884b2..70606a8cd0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_69.plan
index 21b3e9f769..0889bc5424 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_7.plan
index 60fa9d16ca..fab55b4418 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_70.plan
index 7ab0605652..af95798c0a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_71.plan
index 9a154dada6..5e71127f47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_72.plan
index 9933b14fa6..fd6ac36f6e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_73.plan
index 9933b14fa6..fd6ac36f6e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_74.plan
index 2d1a470107..a0fd87a5c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_75.plan
index 2d1a470107..a0fd87a5c5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_76.plan
index 5141d164b0..0f746f6f11 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_77.plan
index 5141d164b0..0f746f6f11 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_78.plan
index e2b189dfa7..98029c4523 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_79.plan
index 01adb361f9..d4aa60a853 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_8.plan
index d1bd89be00..e2276172d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_80.plan
index c4004a4914..2f0b8b45b6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_81.plan
index 56ccb1a63b..68be447a59 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_82.plan
index 4eaab15b8f..7282b0ec54 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_83.plan
index b72519fdf3..d35b41fc24 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_84.plan
index f78b0162aa..18ecc78433 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_85.plan
index feb2d1d149..5577bc0ca8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_86.plan
index cbca8c50e7..41b8f0e824 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_87.plan
index cbca8c50e7..41b8f0e824 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_88.plan
index 0e67fe116d..0d5f7cb167 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_89.plan
index 59d8efa096..2d14ca4c1c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_9.plan
index d1bd89be00..e2276172d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_90.plan
index 3711c60b96..7143ad915a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_91.plan
index 10b26197a7..c0ab438043 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_92.plan
index ac3128cb8c..f31151142e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_93.plan
index 8e6a77e423..70f0dffef3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_94.plan
index cf14af5d23..8f41b3abb0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_95.plan
index a1e3a20070..03af3bbdd7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_96.plan
index fe1a88f917..66ec33a683 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_97.plan
index 73a5e9acf4..49c42674fb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_98.plan
index 4c070e771d..65c437b5ad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_99.plan
index 433719b249..aa93971859 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-4.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-4.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-4.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-4.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_1.plan
index 83bf578cbc..01dd143b83 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_10.plan
index 7007ddab65..c256bd239d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_100.plan
index fd564a8239..ef3583faa8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_101.plan
index 87685367a0..30a3cfd9e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_102.plan
index 87685367a0..30a3cfd9e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_103.plan
index 01658a8376..a2733b6ff8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_104.plan
index aa30ca7bdc..1fef276048 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_105.plan
index d100af769d..ed8294102b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_106.plan
index 59b8d5b06c..bd2550fab7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_107.plan
index caee139b12..3e33e2a452 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_108.plan
index caee139b12..3e33e2a452 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_11.plan
index 33fc943c00..2f1141a792 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_12.plan
index 3a0d868369..9b6b611501 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_13.plan
index 487474ec15..3828644c7c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_14.plan
index 487474ec15..3828644c7c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_15.plan
index ac21441d59..b48a694baf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_16.plan
index ac21441d59..b48a694baf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_17.plan
index da371ffb9f..de58a9f006 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_18.plan
index da371ffb9f..de58a9f006 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_19.plan
index 917df6aa0a..24a1291533 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_2.plan
index 5fae302213..354306ed59 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_20.plan
index 465937dc88..d91ed2527d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_21.plan
index 8adbdbe9a1..f8f3c84f7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_22.plan
index 8adbdbe9a1..f8f3c84f7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_23.plan
index 7116ec72d7..84c7d80598 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_24.plan
index 01b8d20b80..edaf2f6338 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_25.plan
index 7116ec72d7..84c7d80598 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_26.plan
index 0ee25eb7a1..f8c971211b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_27.plan
index a1db1a4aae..d5003c1665 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_28.plan
index 85066a644a..2eeba253ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_29.plan
index 444b78a53c..30cc49ea0e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_3.plan
index 694a05c55f..f0ebed1e5e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_30.plan
index 3050e82400..20a485d3a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_31.plan
index a806496acb..24671e967f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_32.plan
index d574f72b6b..4b60e95746 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_33.plan
index 4d4be8fcab..00d56740ba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_34.plan
index 275d253b11..c11a063386 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_35.plan
index f7ea6d2e85..ad8e3e65d2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_36.plan
index 669084ba09..c2deb549d4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_37.plan
index d245762bca..e93b7bcc0a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_38.plan
index d245762bca..e93b7bcc0a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_39.plan
index e689e723ac..172f5d79a9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_4.plan
index d57d7ca9b5..a11cad40e6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_40.plan
index b9249a2043..9565187f71 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_41.plan
index 9cdc136b65..acc017fc73 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_42.plan
index 9310890b84..58c4b10cb5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_43.plan
index fc225a176c..92d05412c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_44.plan
index fc225a176c..92d05412c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_45.plan
index 8b3ce73a78..cbc3465d3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_46.plan
index 8b3ce73a78..cbc3465d3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_47.plan
index 6f9ee1cdb8..9a1ec95d70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_48.plan
index 71162d32a4..9dcfe53edb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_49.plan
index 8eb9bf3b61..d5df5ea7dd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_5.plan
index d6d05d4109..8f3c48fe3e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_50.plan
index 176e56266c..c3bac5071c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_51.plan
index 775b1637dd..cf91b08d3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_52.plan
index d2a495fa12..34beee3072 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_53.plan
index 694a05c55f..f0ebed1e5e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_54.plan
index 22d082206f..97f9ddcc03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_55.plan
index 093af7d5fe..9d8b9d7026 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_56.plan
index 093af7d5fe..9d8b9d7026 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_57.plan
index 8499f8f259..87511ae671 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_58.plan
index 8499f8f259..87511ae671 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_59.plan
index 0347f661d1..f1db0be6e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_6.plan
index 970d37b304..0e9ebf9521 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_60.plan
index 0347f661d1..f1db0be6e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_61.plan
index 756654d4de..b0906fc220 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_62.plan
index 756654d4de..b0906fc220 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_63.plan
index 86e7cac70b..b2b5a498b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_64.plan
index 86e7cac70b..b2b5a498b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_65.plan
index 2f563f9013..7f10c18d99 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_66.plan
index d48b308eb7..117b25bd7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_67.plan
index 8dc4460b8e..5514a9a51c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_68.plan
index 8dc4460b8e..5514a9a51c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_69.plan
index e18cd9feef..875fe8fbf8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_7.plan
index 3aa0da2e75..1eaff5da2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_70.plan
index dcdc1c4726..c0cd356a83 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_71.plan
index a8cbbc93b7..af364d002f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_72.plan
index 38117a5d8a..77c3934f7b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_73.plan
index 0fade55967..41e8c3a697 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_74.plan
index 71a25e1b37..b4660ffba0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_75.plan
index 9bfd2221fd..74724eba68 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_76.plan
index 2726cd6ae3..5365c02a3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan
index 572ffc6f42..a05c0b77eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan
index 4c3b6f0a82..9649f3222b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_79.plan
index 7116ec72d7..84c7d80598 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_8.plan
index 227f338fcf..173ff88b32 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_80.plan
index eef0d0c51a..f2fe58698d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_81.plan
index 5e4ad9a148..f13fa473bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_82.plan
index 5e4ad9a148..f13fa473bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_83.plan
index 04502fbf5a..a52094e62b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_84.plan
index 7e4f1e5b67..3d9f3d454c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_85.plan
index 877f4e7941..aa9ac13c2b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_86.plan
index 9567069814..181c3d9c43 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_87.plan
index 57bfa7655f..2ca41ef3ab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_88.plan
index 39391f7dc2..fdc6fa425f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_89.plan
index 86c3a3ba16..664e8200aa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_9.plan
index 7007ddab65..c256bd239d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_90.plan
index 4634e6fc24..c05e6882db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_91.plan
index 70733023a8..c9a67abaa6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_92.plan
index 96eaec281d..9b4a6eb382 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003E items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_93.plan
index 86b85fa170..cb380b4cf3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_94.plan
index 9534308fa4..c7ebed7cf5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_95.plan
index cf8fcd3562..50580f8fcb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_96.plan
index 8b0b2635eb..d658bb2c70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_97.plan
index 2a2f39fa87..93c17e1e65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_98.plan
index 2a2f39fa87..93c17e1e65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_99.plan
index fd564a8239..ef3583faa8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-5.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-5.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-5.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_1.plan
index d816da49d5..5f4744eff8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_10.plan
index c6f591df64..659c8cdeb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_100.plan
index 7ef6e045dc..485c3f8a45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_101.plan
index 7748c08dfd..2ee9a25ded 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_102.plan
index 197a3e5169..41c961b496 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_103.plan
index bc9859cb27..6d36fe9f53 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_104.plan
index 3153e48938..e7bcfc5a25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_105.plan
index 00cd551ff4..2a3652701b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_106.plan
index ba856def07..4a2b19fc13 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_107.plan
index 1c0395719a..b5e65db096 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_108.plan
index ae9bf893c0..0203639055 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_109.plan
index 22c3131bdc..007eeec10d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_11.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_110.plan
index 6900801198..499d87ca75 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_111.plan
index 011b9c4762..dc6e68d60b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_112.plan
index 025ed50d58..9002b6ae97 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_113.plan
index eb78191770..e4214cb949 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_114.plan
index 6421ff9324..241bc732e6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_115.plan
index 24dbc57e0d..1f68d2806e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_116.plan
index 7ceec3d96e..1fbb48137e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items3 \\u003E items0 And items3 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_117.plan
index 4879eeeb6c..cf9fc6da36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_118.plan
index 4879eeeb6c..cf9fc6da36 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items0 And items3 \\u003C items1 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_119.plan
index bf374eb934..c13d974e02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_12.plan
index c2f4ded02b..2418bf4817 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_120.plan
index bf374eb934..c13d974e02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_121.plan
index 6582cb2087..04d2549f8b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_122.plan
index 6582cb2087..04d2549f8b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_123.plan
index 96ac47c142..f2cf84832a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_124.plan
index 96ac47c142..f2cf84832a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_125.plan
index fc3d7ca5ea..2a2635f987 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_126.plan
index fc3d7ca5ea..2a2635f987 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_127.plan
index 0b78b71d32..4e6f716d70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_128.plan
index 0b78b71d32..4e6f716d70 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_129.plan
index 25fa13f7f0..3394b15c56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_13.plan
index d48a1f25f9..f9be9fe3e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_130.plan
index 25fa13f7f0..3394b15c56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_131.plan
index 9e49af9551..b4574461b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_132.plan
index ca63ffb244..7afc3783e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_133.plan
index 24bed7107a..e06eddbac6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_134.plan
index d9a897ce5b..bbed241d23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_135.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_136.plan
index f07feab826..864f25d463 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_14.plan
index d48a1f25f9..f9be9fe3e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_15.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_16.plan
index c2f4ded02b..2418bf4817 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_17.plan
index 38adbb18b0..6805b81c09 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_18.plan
index e47cb07c98..2f0b7d4257 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items2 \\u003E items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_19.plan
index 435234bdf2..d3eeb13aef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_2.plan
index 94f05f2f73..cd35e1b75f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_20.plan
index c79d9bafac..d5ec875548 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items1 \\u003E items2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_21.plan
index 4038538bee..8b137a2357 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_22.plan
index 5a8ee5dce2..ee638141cc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_23.plan
index 883a869b85..e42e61b869 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_24.plan
index a4e545015c..e0cb612eec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_25.plan
index 65995f4588..744e105835 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_26.plan
index f1379a9c3d..cb737cba8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_27.plan
index e54685beb4..68dd877b27 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_28.plan
index 77f483514e..7517b38c19 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_29.plan
index 78bc30a1fe..ddb4d1c7e1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_3.plan
index 27cf765757..a8300978a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_30.plan
index 5cfc7cd94a..37c6025356 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_31.plan
index 294d0aa14f..d2e9ecceb5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_32.plan
index 4d3d056f98..bd98feae33 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_33.plan
index 7c6ca39a10..261ddd66d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_34.plan
index 7c6ca39a10..261ddd66d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_35.plan
index bc14436409..dd33d9b389 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_36.plan
index bc14436409..dd33d9b389 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_37.plan
index 9dfa175e06..eb4858385f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_38.plan
index 5d8fc078cd..ca853a3fa8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_39.plan
index ac190f5383..863b28ae2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_4.plan
index 5f2781ea2d..4214240799 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_40.plan
index ac190f5383..863b28ae2d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_41.plan
index 3e68ac2bf1..057b3ec500 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_42.plan
index 0fd91f9ba0..97707ffa4f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_43.plan
index a1b4d0f0b8..a2eea8e536 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_44.plan
index a1b4d0f0b8..a2eea8e536 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_45.plan
index 8a113fe868..b3d8adef45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_46.plan
index 8d2d78b0c6..a993f52f97 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_47.plan
index 64c8129c94..66a538df74 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_48.plan
index cedbec8540..1ee0f3f9e2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_49.plan
index a7168cd871..269dbd1280 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_5.plan
index b036279b16..5092b2dd76 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_50.plan
index f12ba337e6..531b37fe1d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_51.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_52.plan
index c740b27c49..9c2138b6eb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_53.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_54.plan
index f5eeb1d420..65a76f28da 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_55.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_56.plan
index bbf71b9180..8fea70e045 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_57.plan
index dd19ab21db..ba75e20238 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_58.plan
index 04db738517..f3339811fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_59.plan
index ed34fd2748..6d1978cf1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_6.plan
index a43ae6f652..7b4ba48bd6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_60.plan
index ed34fd2748..6d1978cf1f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_61.plan
index 8f6b33ef45..99de138fec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_62.plan
index 8f6b33ef45..99de138fec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_63.plan
index 5b8fc75ed8..38ad5e2097 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_64.plan
index 5b8fc75ed8..38ad5e2097 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_65.plan
index 9324507c3b..5efb16ae18 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_66.plan
index 3eee720d65..07ec03fbde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_67.plan
index 734636b285..eea2d3ecf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_68.plan
index 734636b285..eea2d3ecf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_69.plan
index 6b7a8d1781..85f9bd117e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_7.plan
index 791f4d9bc2..d4a5ca8e48 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_70.plan
index 1602eb8935..7f5ea75d1e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_71.plan
index 29169e0401..e95bd82d8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_72.plan
index 4612272ada..cb395c8e65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_73.plan
index a62b530e77..680cefe22e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_74.plan
index a62b530e77..680cefe22e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_75.plan
index b69a4bb5f3..f0c032b283 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_76.plan
index b69a4bb5f3..f0c032b283 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_77.plan
index 101db2070f..de3379d32c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_78.plan
index e7a1d74461..5d4721f3ed 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_79.plan
index 75dc0154a7..18401f8a80 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_8.plan
index 791f4d9bc2..d4a5ca8e48 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_80.plan
index caee892f0b..f332637940 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_81.plan
index 934ce9c23e..db3f4d5e3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_82.plan
index f112ce2864..397e710132 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_83.plan
index 80dcec964e..96a63cfb0f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_84.plan
index fc17bb35e9..62abe4aa18 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_85.plan
index 3cdc42ef47..0502afb6c3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_86.plan
index a399b7030b..12512b3a7d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_87.plan
index 80d60505f5..b3108305d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_88.plan
index 80d60505f5..b3108305d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_89.plan
index 106c72a675..31953d82f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_9.plan
index 201b9ce63e..a772d32a62 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_90.plan
index ff33227e95..3f89d4953b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_91.plan
index 6c031c7c49..9b0941ac45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_92.plan
index 6c031c7c49..9b0941ac45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_93.plan
index d805030835..3afea4f21d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_94.plan
index d805030835..3afea4f21d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_95.plan
index f979bdb05f..30db255890 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_96.plan
index f979bdb05f..30db255890 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_97.plan
index ff0b72de6d..83477b0eb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_98.plan
index ff0b72de6d..83477b0eb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_99.plan
index f597a3a4dc..80f766cfef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-6.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-6.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-6.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-6.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_1.plan
index 3338f0289f..2673a3aef2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_10.plan
index 33e69a54fb..49c2db3467 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_100.plan
index 3f2a7bb0b8..d2fe2c7c7c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_101.plan
index d500ad4379..c390e83aa2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_102.plan
index 5a415c87ae..15ed310171 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E items3 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_103.plan
index 9413c65629..a1dac54999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_104.plan
index 661f9daea6..8f5ba1f38a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_105.plan
index 577dd58aed..3ad1364ba9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_106.plan
index e6b7b02d5a..af570c0a65 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_107.plan
index 40e5277e37..a67db3565a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_108.plan
index 349d3e9456..a3c0a2dde7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_109.plan
index 00517fb30b..b08fa031c0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_11.plan
index ef7d514470..cff0c4bc92 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_110.plan
index 7b44518f64..ef0471bc34 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_111.plan
index d1a74cf984..f289fea244 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_112.plan
index ada2cc1a43..b29150e153 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_113.plan
index 3c40b1102e..faa5043f89 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_114.plan
index 124fed08e5..e363913dba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_115.plan
index ba84e442f5..4bdcb6cff6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_116.plan
index b4356dd82b..62fc5dd07d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_117.plan
index 50b1e42122..14fe869a3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_118.plan
index d405a80411..c1986ac802 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_119.plan
index acbca67895..8a84f5ad14 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_12.plan
index f6f71d1664..a4580a7656 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_120.plan
index e0b7b7613f..fb0f7832d0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_121.plan
index 9e8fe79753..70c2254b0d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_122.plan
index d95a2af8b9..3a4e1c0090 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_123.plan
index 7a010ce0de..6ae7339abe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_13.plan
index d143fc914d..dc64d337d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_14.plan
index d143fc914d..dc64d337d8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_15.plan
index ee201d3141..e21d33c613 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_16.plan
index 03687ef00c..114a696000 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_17.plan
index f42880ad4c..7ef9263b34 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_18.plan
index 3527275240..3686b7e0ec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items0 \\u003E items1 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_19.plan
index 80cc8ef83c..f28f90af00 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_2.plan
index 8b166f8560..a9a8da5173 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_20.plan
index 954f08923b..ce750f8181 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_21.plan
index 602fb30421..81c498a5fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_22.plan
index 602fb30421..81c498a5fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items1 \\u003E= items0 - 2 And items1 \\u003C= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_23.plan
index 6dc6bf6d49..c6711703ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_24.plan
index 6dc6bf6d49..c6711703ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_25.plan
index 93c9e9d294..1101df8656 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_26.plan
index 7d6c0726eb..4cd059384c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_27.plan
index 8d6a57c88b..ad6fa3b717 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_28.plan
index 849c513321..b2ba2a7969 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items2 \\u003E items3 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_29.plan
index 3f156119b5..1ba705966f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_3.plan
index 28c23d17e7..d0b16b4714 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_30.plan
index 98f3eda157..451c4e751c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_31.plan
index 5957d7cdae..a68e03df03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_32.plan
index 5957d7cdae..a68e03df03 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_33.plan
index 25034e99d0..7ef0640b56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_34.plan
index 25034e99d0..7ef0640b56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_35.plan
index c11aa052ea..2933b372ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_36.plan
index c11aa052ea..2933b372ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_37.plan
index 34fdcabb81..0c1fd7b6cf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_38.plan
index 12aff7a487..9cfbddee5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_39.plan
index 8b41e911fa..a8aff44f4a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_4.plan
index cbc88fc19a..8328ae97e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_40.plan
index 215e749e11..4b18fe7a23 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_41.plan
index 3062ba5967..c9fc307f41 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_42.plan
index ea2a08fb96..3dc0fb7120 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_43.plan
index bd9509c954..0d5758612d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_44.plan
index 86784f7608..274cdb4faf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_45.plan
index 933f131f3b..1762c2969b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_46.plan
index 6739288ac9..bae8f085b0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_47.plan
index 2ac34e4659..1a0b55cd86 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_48.plan
index 5254766570..74b2250035 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_49.plan
index f67dfd48db..0a1dcbe07b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_5.plan
index 6d8e74cfb8..031f074dce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_50.plan
index ae42a1c501..5505522099 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_51.plan
index 929e957e8b..d4ec05e677 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_52.plan
index d91ed199bf..9e433305e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_53.plan
index 89bf0bfaf2..b2983d1cbd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_54.plan
index 57397d5f57..8e3f6be399 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan
index e7b85b06d4..253cee0a4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan
index e7b85b06d4..253cee0a4c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_57.plan
index 71d8369948..9d47609d62 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_58.plan
index 71d8369948..9d47609d62 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_59.plan
index 6f3db66820..420b556271 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_6.plan
index 6d8e74cfb8..031f074dce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_60.plan
index 6f3db66820..420b556271 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items1 \\u003E items2 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_61.plan
index 7d9a07eac7..40745f0781 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_62.plan
index 7d9a07eac7..40745f0781 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003E items3 Or items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_63.plan
index b925ac404f..ccb064efd9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_64.plan
index 26d2adbbf2..fc9577495e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_65.plan
index 98344b9c37..b421d575e3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_66.plan
index 583dc11aef..e18cb409df 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_67.plan
index a2bfd48556..f355818616 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_68.plan
index ad14e9f78c..e4a9f6d58b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_69.plan
index ff1b012e89..ac4d483ad3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_7.plan
index 9ffa7347b8..0240f707e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_70.plan
index ff1b012e89..ac4d483ad3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_71.plan
index 140a9811b8..ff2ac2a584 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_72.plan
index bdb442766d..43696bbf09 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_73.plan
index 4c5874d5ec..28bc80ce98 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_74.plan
index 8e0f3e5d72..cc04464c26 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_75.plan
index 8d2a147194..c33f5d3593 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_76.plan
index a19508a82b..e690356a47 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_77.plan
index e48ebacaac..a308bd624c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_78.plan
index e7f5b5cc43..7c1c2cdd08 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_79.plan
index bfe9f57eaa..ae914222a3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_8.plan
index 37bad0b9e4..5ee26996f1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_80.plan
index e606f98f7c..f341cb3ab3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_81.plan
index 64b3926207..58e68954f1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_82.plan
index 6899f6a3ee..911c410130 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_83.plan
index a496cb1789..91e988d5af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_84.plan
index b7de7265db..b9511cd1cb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003E items4 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_85.plan
index 2b07d93aea..16733b3535 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_86.plan
index 5e995c5e93..93521bea8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_87.plan
index d1a74cf984..f289fea244 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_88.plan
index 3af3f586fb..abffe2677d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_89.plan
index c309ce361d..a94aa9bbac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_9.plan
index 33e69a54fb..49c2db3467 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_90.plan
index 5852181ce2..4e0247a12b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_91.plan
index b310ced18d..ae45315a25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_92.plan
index b310ced18d..ae45315a25 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_93.plan
index 573975783e..63daefe904 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_94.plan
index 95ab7e3ddb..3a4a846518 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_95.plan
index d7d11b7ec8..dd0c05fd91 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_96.plan
index fb0990f156..64d7574b22 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_97.plan
index a441f852be..f3d9ede064 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_98.plan
index a441f852be..f3d9ede064 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_99.plan
index eb5fb8b5ba..1409874c81 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-7.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items4 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-7.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-7.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_1.plan
index 07a7d27c76..ee09af717c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_10.plan
index 9e40ce4179..197dea0315 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_100.plan
index 014c10d8ee..b82c24204f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_101.plan
index 014c10d8ee..b82c24204f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items0 Or items2 \\u003C items1 And items1 \\u003C 110 Or items1 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_102.plan
index 446a0b6c55..f2c31b2c1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_103.plan
index 446a0b6c55..f2c31b2c1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C 110 Or items1 \\u003E 150 And items2 \\u003E items0 Or items2 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_104.plan
index a19757474e..9e5d96f0bc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_105.plan
index 9c3c6c22a2..514fb8a163 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_106.plan
index 3ea6346cf1..77c06dc9c2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_107.plan
index 53a13b6c74..944a5771ca 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_108.plan
index 6995cc2d53..a2cad45564 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_109.plan
index d7428fdc51..5a3022c651 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_11.plan
index 9e40ce4179..197dea0315 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2 And items2 \\u003C 110 Or items2 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_110.plan
index 8a36b1a330..fdc11d57e7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_111.plan
index 5200e2e252..32d877362c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_112.plan
index a1a42938c5..e6ad5677d1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_113.plan
index 1b51a4a411..7786f8060a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_114.plan
index 360e9eec1a..cbfbbf8a04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_115.plan
index 1fb2124a31..0502679790 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_116.plan
index 84288b92fa..e3b015a2db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_117.plan
index ff0a262b8c..b94e1c4add 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_118.plan
index 83b6c84202..d5dc27ee8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_119.plan
index 83b6c84202..d5dc27ee8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_12.plan
index b4631bcb48..af0c7523f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_120.plan
index 02923f733e..0e36c1cbf0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_121.plan
index a357242e66..024127f3f5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_13.plan
index 19ad6eaebd..ddfe24cca7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_14.plan
index 22ba1f1ebc..afe7980a45 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_15.plan
index cc490005e9..c365b18d41 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_16.plan
index 2bcc0fe291..5447c1b4e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_17.plan
index f053cec99b..7b72c92700 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_18.plan
index 3ac9846f55..8cbfdccff3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_19.plan
index 6d382e13c5..fcdfd36500 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_2.plan
index c82749e7d1..648058ebb8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_20.plan
index 1717740218..f96a39c26f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_21.plan
index aa80048fc8..370ed758f3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_22.plan
index 6569ea3454..aa75a452e3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_23.plan
index e844fe7b7d..fe11d2d308 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_24.plan
index 38b1e73e40..f344fb5d4d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_25.plan
index 52e556a0b0..c56d664be6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_26.plan
index 24eec88ea9..da40afc379 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_27.plan
index 61b3dfa725..4e156e1c7f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_28.plan
index 5f15423619..75d1049bb1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_29.plan
index 353c2b4269..3e11020ce0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_3.plan
index 2e30967bc1..ce5536dc72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 \\u003E items0 And items4 \\u003C items1 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_30.plan
index 8c1982e036..f8aedf7075 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_31.plan
index 8c1982e036..f8aedf7075 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_32.plan
index 6359ce398c..8c8a4c60a2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_33.plan
index 6359ce398c..8c8a4c60a2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_34.plan
index 5953d6e864..e58f876e32 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_35.plan
index 5953d6e864..e58f876e32 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_36.plan
index 5358416749..7a52feea5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_37.plan
index 5358416749..7a52feea5f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_38.plan
index 5ed93e3a9c..f376e73250 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_39.plan
index 5ed93e3a9c..f376e73250 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_4.plan
index 8c1982e036..f8aedf7075 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_40.plan
index 6e22148618..6db890e829 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_41.plan
index 13b87beaa9..5dce6e1d0f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_42.plan
index 11c0a8c213..07bd7f528b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_43.plan
index 11c70446b4..570dff9ab1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_44.plan
index a4d0e24cab..262b72f991 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_45.plan
index 44f0ab32cc..67b43e366d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_46.plan
index fe9aaff13f..70256586a0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_47.plan
index a493c35c90..c81018e19b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_48.plan
index 7bb73088cd..2889046a9e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_49.plan
index 732dd83b3b..7be945f365 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_5.plan
index 8c1982e036..f8aedf7075 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_50.plan
index 805fa4251d..dd5f7c8516 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_51.plan
index daf769798e..3564cbd699 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_52.plan
index 2473da51d5..614354e195 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_53.plan
index 188d974565..c6149c9c50 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_54.plan
index 1d02a06033..e44a8ca063 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_55.plan
index 59e99e9dca..bcbf65e8e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_56.plan
index 5cd24de35a..903c54a85a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_57.plan
index cb155c4dca..8acad09e90 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_58.plan
index 32ccc04e9b..6549e9c382 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_59.plan
index 2513ff11aa..aea3b8676f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_6.plan
index cce8b332a3..9bf22dbc0b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_60.plan
index 68bc6380c3..6ac3ec5e4a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_61.plan
index 4cc02c04ee..da4cec2c8f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_62.plan
index 390f78fb04..4b8b1d89ad 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_63.plan
index 5b169b3ef5..3befb2e7ff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan
index e3df29e5f4..ea62dff96c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan
index 6c7e26c2f5..f55350ae40 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_66.plan
index 1717740218..f96a39c26f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_67.plan
index fbb028700c..7eb572f767 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_68.plan
index 9c832037a0..12513fcaec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_69.plan
index 116fbe43d9..7ee045d81e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_7.plan
index 1cbae5c066..7605155171 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_70.plan
index 25357c8d94..dc30ecb092 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_71.plan
index 25357c8d94..dc30ecb092 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_72.plan
index e1f3363690..01170e5d44 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_73.plan
index 5897ac83a0..4a8dec60db 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items1 \\u003E items2 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_74.plan
index 572b456374..a7d39d7ce2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_75.plan
index 3db2be7c0f..5d972a7546 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_76.plan
index fc416381e4..00333f3f21 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_77.plan
index ab21ea1197..eb80383058 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_78.plan
index 462d500595..ed764ae307 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_79.plan
index 985ad8959e..8c5f5ab59a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_8.plan
index f58967930b..857ce2f2ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_80.plan
index 3673adeda9..4cc2c99679 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_81.plan
index baef4d2957..e2818007d2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_82.plan
index f31fc0ded3..e2ca14d91e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_83.plan
index 8cdaaab360..bd64800afa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 \\u003E items0 And items4 \\u003C items1 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_84.plan
index 4b9215d89a..9f5cf8fefb 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_85.plan
index 5679d45379..9c5c32d397 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_86.plan
index 54f1714ad0..a3195ba21e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_87.plan
index 26b895ee02..7c50762d44 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_88.plan
index e62c4abab1..2e1a0ac230 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_89.plan
index e62c4abab1..2e1a0ac230 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 Or items3 \\u003E items1 Or items3 \\u003C items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_9.plan
index f58967930b..857ce2f2ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C 110 Or items2 \\u003E 150 And items1 \\u003C= items2 - 2 Or items1 \\u003E= items2 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_90.plan
index aff2563532..c4f97217cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_91.plan
index aff2563532..c4f97217cd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items1 Or items3 \\u003C items2 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_92.plan
index 1ca00ecd6c..5a4ee1e301 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_93.plan
index b1fca1d477..798b18fd2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_94.plan
index 716299212c..3ba29510f7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_95.plan
index a0e019cd18..e09139afba 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items2 \\u003E items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_96.plan
index 781d3a42ec..a2ad3582f0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_97.plan
index a25eeb5c40..3f159c2f2f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_98.plan
index 251c58510b..51235b51a7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_99.plan
index 961e645c38..700c653bcc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-8.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-8.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-8.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_1.plan
index a2c18c5606..796217bf09 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_10.plan
index 32943cd804..1062437ac5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_10.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_10.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_100.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_100.plan
index bfed1c00e5..22b8ca53d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_100.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_100.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_101.plan
index 09a9dc9864..00557c71e4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_101.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_101.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_102.plan
index 71e8b69eac..9105a49931 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_102.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_102.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan
index f2f7110e91..15e48049fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan
index f2f7110e91..15e48049fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_105.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_105.plan
index 7763ac16c1..74ceb18bde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_105.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_105.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_106.plan
index b752adc575..e10ffebb76 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_106.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_106.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items0 \\u003E items1 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col6 (Asc)\",\n \"col3 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_107.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_107.plan
index 220e45bd44..292aebe57d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_107.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_107.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_108.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_108.plan
index cea073c00d..5b52a3edc6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_108.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_108.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col7 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_109.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_109.plan
index efe3153309..0f7a88f8be 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_109.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_109.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_11.plan
index d85e4e7c53..e2897b6031 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_11.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_11.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_110.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_110.plan
index 1919dcf86c..efd5f55e51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_110.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_110.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items0 \\u003E items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_111.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_111.plan
index 6b8154dcb1..fe2ecf79f2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_111.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_111.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_112.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_112.plan
index 87ffbbe863..ed1427bd3d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_112.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_112.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_113.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_113.plan
index 6b8154dcb1..fe2ecf79f2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_113.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_113.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_114.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_114.plan
index 1b6eeb3b51..2dbadbff3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_114.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_114.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan
index 37d8e49355..0c89331158 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan
index 37d8e49355..0c89331158 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_117.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_117.plan
index d261e6df96..e58287aed4 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_117.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_117.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_118.plan
index 0c3e072829..ad6c1cea0f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_118.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_118.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_119.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_119.plan
index 779b8f49a8..64f7d94fd3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_119.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_119.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_12.plan
index d85e4e7c53..e2897b6031 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_12.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_12.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_120.plan
index 779b8f49a8..64f7d94fd3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_120.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_120.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_121.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_121.plan
index c6efbf90be..4edff64494 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_121.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_121.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_122.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_122.plan
index c6efbf90be..4edff64494 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_122.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_122.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_123.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_123.plan
index 2c0c6b662e..a894e94d41 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_123.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_123.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_124.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_124.plan
index 2c0c6b662e..a894e94d41 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_124.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_124.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_125.plan
index 8065782b4e..0d26e5323a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_125.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_125.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_126.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_126.plan
index 8065782b4e..0d26e5323a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_126.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_126.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items1 \\u003E items2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_127.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_127.plan
index d18b1cc416..d7f389e705 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_127.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_127.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_128.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_128.plan
index d8ab3041ed..8e999a877e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_128.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_128.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_129.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_129.plan
index 68997d19df..4b79a6a108 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_129.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_129.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_13.plan
index d76a9d6b95..440bfb298f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_13.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_13.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_130.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_130.plan
index d9a0661083..6bc4fa4b3a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_130.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_130.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_131.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_131.plan
index 3b4f10fe1a..f1f1b90ef3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_131.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_131.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_132.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_132.plan
index c365c5d06e..d5b1b67f3f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_132.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_132.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_133.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_133.plan
index 5507612431..e0762cca72 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_133.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_133.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_134.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_134.plan
index 6d5f074120..1c35d539c6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_134.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_134.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_135.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_135.plan
index 77e20b004c..5e06e5f387 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_135.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_135.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_136.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_136.plan
index 77e20b004c..5e06e5f387 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_136.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_136.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items0 And items4 \\u003C items1 Or items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_137.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_137.plan
index 42549a04a1..901d4e832a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_137.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_137.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_138.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_138.plan
index 42549a04a1..901d4e832a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_138.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_138.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 Or items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_139.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_139.plan
index 8342752f34..296c3b1999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_139.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_139.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_14.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_14.plan
index d76a9d6b95..440bfb298f 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_14.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_14.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_140.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_140.plan
index 11fd866498..fcf4f79c46 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_140.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_140.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_141.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_141.plan
index 966a1f8049..9e92500cf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_141.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_141.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_142.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_142.plan
index 966a1f8049..9e92500cf1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_142.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_142.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_143.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_143.plan
index e7bb383c0c..e5211fb099 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_143.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_143.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_144.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_144.plan
index a10a5657eb..8b83ed92ef 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_144.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_144.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 Or items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_145.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_145.plan
index 02c17c5b4d..d543b51392 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_145.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_145.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_146.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_146.plan
index 1df7ff2d2a..133614fede 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_146.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_146.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_147.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_147.plan
index b619b8c60d..b0a60cc8fa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_147.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_147.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_148.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_148.plan
index 7efa6e5ef0..4b01a1d76a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_148.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_148.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_149.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_149.plan
index 18edf16bb6..d37cdae56a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_149.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_149.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_15.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_15.plan
index a0278bf7e6..22cc079cc8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_15.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_15.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_150.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_150.plan
index 4d07b7a6ef..3cea8ad7a1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_150.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_150.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_16.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_16.plan
index a0278bf7e6..22cc079cc8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_16.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_16.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_17.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_17.plan
index b7420d29a3..934c4aa488 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_17.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_17.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_18.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_18.plan
index a51d774a5c..a214298981 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_18.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_18.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_19.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_19.plan
index 20226dcdb2..430e10151c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_19.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_19.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_2.plan
index c97b101bba..71396fb9d5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_2.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_2.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_20.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_20.plan
index 39eb06abc4..7f91e787e3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_20.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_20.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items3 \\u003E items4 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_21.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_21.plan
index 043e2d9f9e..ca3bbc2564 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_21.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_21.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_22.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_22.plan
index 65c79b6a77..f7fd2e6d8e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_22.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_22.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 Or items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col7 (Asc)\",\n \"col2 (Asc)\",\n \"col6 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_23.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_23.plan
index 838f318241..72572aa34a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_23.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_23.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_24.plan
index c6bfe14b49..60874e9ff6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_24.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_24.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 Or items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_25.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_25.plan
index c14715c936..39c79d5bc0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_25.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_25.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_26.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_26.plan
index 42798829ed..bff4ed366e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_26.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_26.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items4 \\u003E items0 And items4 \\u003C items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_27.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_27.plan
index b5e2ea3320..09709bf9fd 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_27.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_27.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_28.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_28.plan
index 64f399b562..36fe592956 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_28.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_28.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_29.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_29.plan
index a2210b5795..cbcd9830ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_29.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_29.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_3.plan
index 108871d101..4e1eeed2a0 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_3.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_3.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_30.plan
index c7fc89261f..3b23bb67d2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_30.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_30.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_31.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_31.plan
index ff00d926f0..f233295ed1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_31.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_31.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_32.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_32.plan
index a8d7888f9d..615ab647ea 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_32.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_32.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_33.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_33.plan
index 20683f9231..559184e362 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_33.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_33.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_34.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_34.plan
index 4057623d77..ded0df9467 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_34.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_34.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_35.plan
index fa0cf202e9..a262e6817a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_35.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_35.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_36.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_36.plan
index a4d3815afe..a1cf018608 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_36.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_36.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_37.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_37.plan
index e6393388fa..5b8874e33e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_37.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_37.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_38.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_38.plan
index c71bb13378..c29497ae1a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_38.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_38.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_39.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_39.plan
index 2dcdd427e5..d6935ca70c 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_39.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_39.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_4.plan
index 922df6c34d..19ef250020 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_4.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_4.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_40.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_40.plan
index f518ab170d..8d5517bc2e 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_40.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_40.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_41.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_41.plan
index 471eab76ef..9487e3c7bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_41.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_41.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_42.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_42.plan
index 471eab76ef..9487e3c7bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_42.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_42.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items3 \\u003C 110 Or items3 \\u003E 150\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_43.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_43.plan
index ec7bde3791..b5e58becfc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_43.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_43.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_44.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_44.plan
index ec7bde3791..b5e58becfc 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_44.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_44.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_45.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_45.plan
index 8342752f34..296c3b1999 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_45.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_45.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_46.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_46.plan
index baab84d5da..185cf152af 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_46.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_46.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col5 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_47.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_47.plan
index bb9ea3c3a4..d61aaa4aff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_47.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_47.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_48.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_48.plan
index bb9ea3c3a4..d61aaa4aff 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_48.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_48.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_49.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_49.plan
index d21b67b8c3..065209de56 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_49.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_49.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_5.plan
index 30ea59aaf4..95367acfcf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_5.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_5.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_50.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_50.plan
index c7c3c18c88..8ff2d506ee 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_50.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_50.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4 Or items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_51.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_51.plan
index c131567b5f..b2d7ac68aa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_51.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_51.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_52.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_52.plan
index c131567b5f..b2d7ac68aa 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_52.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_52.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items0 \\u003E items1 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_53.plan
index 30fc08d7b7..62c492a47a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_53.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_53.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_54.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_54.plan
index 104836545a..79aacd38b1 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_54.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_54.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_55.plan
index 3cc0828edd..bfdce3111b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_55.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_55.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_56.plan
index 3cc0828edd..bfdce3111b 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_56.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_56.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items1 \\u003E items2 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_57.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_57.plan
index ae9e9e40fd..0bc6d6a915 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_57.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_57.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_58.plan
index 7eceb04b58..785785b56a 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_58.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_58.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2 And items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_59.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_59.plan
index acb276bea6..8766c95fa6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_59.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_59.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_6.plan
index 30ea59aaf4..95367acfcf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_6.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_6.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_60.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_60.plan
index f4f18fadaf..9f04f608ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_60.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_60.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 And items0 \\u003E items1 - 2 And items0 \\u003C items1 + 2 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_61.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_61.plan
index b68de0cf24..7fc0c7671d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_61.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_61.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_62.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_62.plan
index 05081106e1..342904d0ac 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_62.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_62.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_63.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_63.plan
index c3cf3b339a..56a0d173bf 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_63.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_63.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_64.plan
index a913103b5d..4e72fbd191 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_64.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_64.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items4 \\u003E items2 Or items4 \\u003C items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_65.plan
index c2231474c0..806d04bced 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_65.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_65.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_66.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_66.plan
index 971d4890d1..d56a911e13 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_66.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_66.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 \\u003E items2 Or items4 \\u003C items3 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_67.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_67.plan
index a00e2a8e21..0ee6b96f93 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_67.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_67.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_68.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_68.plan
index 08d4df4f44..406aeafc8d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_68.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_68.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_69.plan
index e78480956b..2b976eb0c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_69.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_69.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_7.plan
index a2210b5795..cbcd9830ae 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_70.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_70.plan
index e78480956b..2b976eb0c8 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_70.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_70.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_71.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_71.plan
index 99f7197453..dffabcbd51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_71.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_71.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_72.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_72.plan
index 99f7197453..dffabcbd51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_72.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_72.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_73.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_73.plan
index e4f0fc97f1..a805ec1aa2 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_73.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_73.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_74.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_74.plan
index 38ae342e82..a1bb441871 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_74.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_74.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col7 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_75.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_75.plan
index b6e55d90b1..e996c345ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_75.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_75.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_76.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_76.plan
index b6e55d90b1..e996c345ce 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_76.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_76.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_77.plan
index f1e4b5f059..e14bdd35a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_77.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_77.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_78.plan
index f1e4b5f059..e14bdd35a5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_78.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_78.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items0 \\u003E items1 And items3 \\u003C 110 Or items3 \\u003E 150 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_79.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_79.plan
index 033dfe6e74..5db63407d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_79.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_79.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_8.plan
index 8e78d1cbd6..2babf204b9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_8.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_8.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_80.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_80.plan
index 033dfe6e74..5db63407d3 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_80.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_80.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"row.col1\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E items3 And items3 \\u003C 110 Or items3 \\u003E 150 And items0 \\u003E items1\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_81.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_81.plan
index b68de0cf24..7fc0c7671d 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_81.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_81.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col4 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_82.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_82.plan
index c8a4f6ee5f..0e0db72172 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_82.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_82.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_83.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_83.plan
index ffdbd2128a..fbe807f4e6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_83.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_83.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_84.plan
index ffdbd2128a..fbe807f4e6 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_84.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_84.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003C= items3 - 2 Or items2 \\u003E= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_85.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_85.plan
index 171a5590e6..30f20384ec 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_85.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_85.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_86.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_86.plan
index 01ebcbf5d5..8e49ce19b5 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_86.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_86.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_87.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_87.plan
index 3f04b9f112..f494eeac04 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_87.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_87.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_88.plan
index a1243d0c2c..b16f0eccc7 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_88.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_88.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col1 (Asc)\",\n \"col4 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_89.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_89.plan
index 9341c7fae4..045b6dde18 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_89.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_89.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_9.plan
index b2a3026e88..efecbabd51 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_9.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_9.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col7 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_90.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_90.plan
index af495206de..99dc72b5e9 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_90.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_90.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items4 + items3 \\u003E= items0 + items1 - 10 And items4 + items3 \\u003C= items2 + 130\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_91.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_91.plan
index a3804188ef..924b919f02 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_91.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_91.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_92.plan
index c227f74737..bd2ae06348 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_92.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_92.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col1 (Asc)\",\n \"col3 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_93.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_93.plan
index 33e0efb04e..9bffefcdde 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_93.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_93.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_94.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_94.plan
index b2ea6c7bf7..3c694bfb88 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_94.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_94.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_95.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_95.plan
index 335ae98ced..4b9927d914 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_95.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_95.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_96.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_96.plan
index cefcd1d6df..3f183bc343 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_96.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_96.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items3 \\u003E items4 Or items1 \\u003E items2\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col3 (Asc)\",\n \"col1 (Asc)\",\n \"col2 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_97.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_97.plan
index df1cd1794b..b211828801 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_97.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_97.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_98.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_98.plan
index df1cd1794b..b211828801 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_98.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_98.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items1 \\u003E items2 Or items3 \\u003E items4\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_99.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_99.plan
index 76e5cba5fe..5792518f19 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_99.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_99.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRanges\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.2\",\n \"type\":\"query\"\n },\n \"tables\":[\n {\n \"name\":\"\\/Root\\/sqllogictest_select3-9.test_plan\\/t1\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n },\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"columns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ]\n }\n ]\n }\n],\n \"Plan\":\n {\n \"Node Type\":\"Query\",\n \"PlanNodeType\":\"Query\",\n \"Plans\":\n [\n {\n \"Node Type\":\"ResultSet_1\",\n \"PlanNodeId\":13,\n \"PlanNodeType\":\"ResultSet\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Limit\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"Limit\"\n }\n ],\n \"PlanNodeId\":12,\n \"Plans\":\n [\n {\n \"Node Type\":\"Merge\",\n \"PlanNodeId\":11,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TopSort-Aggregate\",\n \"Operators\":\n [\n {\n \"Limit\":\"1001\",\n \"Name\":\"TopSort\",\n \"TopSortBy\":\"\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":10,\n \"Plans\":\n [\n {\n \"Node Type\":\"Map\",\n \"PlanNodeId\":9,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Filter-TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"Filter\",\n \"Predicate\":\"items2 \\u003E= items1 - 2 And items2 \\u003C= items3 + 2 And items2 \\u003E items3\"\n },\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":8,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Broadcast\",\n \"PlanNodeId\":7,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"CTE Name\":\"tx_result_binding_1_0\",\n \"Node Type\":\"ConstantExpr\",\n \"Operators\":\n [\n {\n \"Iterator\":\"%kqp%tx_result_binding_0_0\",\n \"Name\":\"Iterator\"\n }\n ],\n \"PlanNodeId\":6\n }\n ]\n }\n ]\n }\n ],\n \"SortColumns\":\n [\n \"col6 (Asc)\",\n \"col4 (Asc)\",\n \"col5 (Asc)\",\n \"col2 (Asc)\",\n \"col3 (Asc)\",\n \"col1 (Asc)\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"Node Type\":\"Precompute_0\",\n \"Parent Relationship\":\"InitPlan\",\n \"PlanNodeId\":4,\n \"PlanNodeType\":\"Materialize\",\n \"Plans\":\n [\n {\n \"Node Type\":\"Aggregate-Limit-Aggregate\",\n \"Operators\":\n [\n {\n \"Name\":\"Aggregate\"\n },\n {\n \"Limit\":\"1\",\n \"Name\":\"Limit\"\n },\n {\n \"Name\":\"Aggregate\"\n }\n ],\n \"PlanNodeId\":3,\n \"Plans\":\n [\n {\n \"Node Type\":\"UnionAll\",\n \"PlanNodeId\":2,\n \"PlanNodeType\":\"Connection\",\n \"Plans\":\n [\n {\n \"Node Type\":\"TableFullScan\",\n \"Operators\":\n [\n {\n \"Name\":\"TableFullScan\",\n \"ReadColumns\":\n [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\"\n ],\n \"ReadRange\":\n [\n \"a (-\u221e, +\u221e)\",\n \"b (-\u221e, +\u221e)\",\n \"c (-\u221e, +\u221e)\",\n \"d (-\u221e, +\u221e)\",\n \"e (-\u221e, +\u221e)\"\n ],\n \"Table\":\"sqllogictest_select3-9.test_plan\\/t1\"\n }\n ],\n \"PlanNodeId\":1,\n \"Tables\":\n [\n \"sqllogictest_select3-9.test_plan\\/t1\"\n ]\n }\n ]\n }\n ]\n }\n ],\n \"Subplan Name\":\"CTE tx_result_binding_0_0\"\n }\n ]\n }\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/test_base.py b/ydb/tests/functional/suite_tests/test_base.py
index e95c3d7dd5..f1e2a120e9 100644
--- a/ydb/tests/functional/suite_tests/test_base.py
+++ b/ydb/tests/functional/suite_tests/test_base.py
@@ -244,6 +244,8 @@ class BaseSuiteRunner(object):
KikimrConfigGenerator(
load_udfs=True,
use_in_memory_pdisks=True,
+ disable_iterator_reads=True,
+ disable_iterator_lookups=True,
# additional_log_configs={'KQP_YQL': 7}
)
)
diff --git a/ydb/tests/functional/tenants/test_dynamic_tenants.py b/ydb/tests/functional/tenants/test_dynamic_tenants.py
index cf5827ae39..147d0789ce 100644
--- a/ydb/tests/functional/tenants/test_dynamic_tenants.py
+++ b/ydb/tests/functional/tenants/test_dynamic_tenants.py
@@ -111,6 +111,25 @@ def test_drop_tenant_without_nodes_could_continue(ydb_cluster):
ydb_cluster.unregister_and_stop_slots(database_nodes)
+def test_drop_tenant_without_nodes_could_complete(ydb_cluster):
+ database = '/Root/users/database'
+ ydb_cluster.create_database(
+ database,
+ storage_pool_units_count={
+ 'hdd': 1
+ }
+ )
+ database_nodes = ydb_cluster.register_and_start_slots(database, count=1)
+ ydb_cluster.wait_tenant_up(database)
+ time.sleep(1)
+
+ logger.debug("stop database nodes")
+ ydb_cluster.unregister_and_stop_slots(database_nodes)
+
+ logger.debug("remove database")
+ ydb_cluster.remove_database(database)
+
+
def test_create_tenant_then_exec_yql_empty_database_header(ydb_cluster, ydb_endpoint):
database = '/Root/users/database'
diff --git a/ydb/tests/library/harness/daemon.py b/ydb/tests/library/harness/daemon.py
index c34c7ce927..1bff987f71 100644
--- a/ydb/tests/library/harness/daemon.py
+++ b/ydb/tests/library/harness/daemon.py
@@ -3,9 +3,8 @@ import abc
import logging
import os
import signal
-import tempfile
-import subprocess
import sys
+import subprocess
from yatest.common import process
import six
@@ -66,11 +65,10 @@ class Daemon(object):
self.__killed = False
self.__core_pattern = core_pattern
self.logger = logger.getChild(self.__class__.__name__)
- if stdout_file is None:
- self.__stdout_file = tempfile.NamedTemporaryFile(dir=self.__cwd, prefix="stdout_", delete=False)
- self.__stderr_file = tempfile.NamedTemporaryFile(dir=self.__cwd, prefix="stderr_", delete=False)
- self.__stdin_file = tempfile.NamedTemporaryFile(dir=self.__cwd, prefix="stdin_", delete=False)
- else:
+ self.__stdout_file = sys.stdout
+ self.__stdin_file = sys.stdin
+ self.__stderr_file = sys.stderr
+ if stdout_file is not None:
self.__stdout_file = open(stdout_file, mode='w+b')
self.__stdin_file = open(stdin_file, mode='w+b')
self.__stderr_file = open(stderr_file, mode='w+b')
@@ -81,15 +79,24 @@ class Daemon(object):
@property
def stdin_file_name(self):
- return os.path.abspath(self.__stdin_file.name)
+ if self.__stdin_file is not sys.stdin:
+ return os.path.abspath(self.__stdin_file.name)
+ else:
+ return None
@property
def stdout_file_name(self):
- return os.path.abspath(self.__stdout_file.name)
+ if self.__stdout_file is not sys.stdout:
+ return os.path.abspath(self.__stdout_file.name)
+ else:
+ return None
@property
def stderr_file_name(self):
- return os.path.abspath(self.__stderr_file.name)
+ if self.__stderr_file is not sys.stderr:
+ return os.path.abspath(self.__stderr_file.name)
+ else:
+ return None
def is_alive(self):
return self.__daemon is not None and self.__daemon.running
diff --git a/ydb/tests/library/harness/kikimr_config.py b/ydb/tests/library/harness/kikimr_config.py
index 08c560a3c5..b40fbe3e62 100644
--- a/ydb/tests/library/harness/kikimr_config.py
+++ b/ydb/tests/library/harness/kikimr_config.py
@@ -140,6 +140,8 @@ class KikimrConfigGenerator(object):
use_legacy_pq=False,
dc_mapping={},
enable_alter_database_create_hive_first=False,
+ disable_iterator_reads=False,
+ disable_iterator_lookups=False,
):
self._version = version
self.use_log_files = use_log_files
@@ -209,6 +211,19 @@ class KikimrConfigGenerator(object):
self.__bs_cache_file_path = bs_cache_file_path
self.yaml_config = load_default_yaml(self.__node_ids, self.domain_name, self.static_erasure, self.__additional_log_configs)
+
+ if disable_iterator_reads:
+ if "table_service_config" not in self.yaml_config:
+ self.yaml_config["table_service_config"] = {}
+ self.yaml_config["table_service_config"]["enable_kqp_scan_query_source_read"] = False
+ self.yaml_config["table_service_config"]["enable_kqp_data_query_source_read"] = False
+
+ if disable_iterator_lookups:
+ if "table_service_config" not in self.yaml_config:
+ self.yaml_config["table_service_config"] = {}
+ self.yaml_config["table_service_config"]["enable_kqp_scan_query_stream_lookup"] = False
+ self.yaml_config["table_service_config"]["enable_kqp_data_query_stream_lookup"] = False
+
self.yaml_config["feature_flags"]["enable_public_api_external_blobs"] = enable_public_api_external_blobs
self.yaml_config["feature_flags"]["enable_mvcc"] = "VALUE_FALSE" if disable_mvcc else "VALUE_TRUE"
if enable_alter_database_create_hive_first:
@@ -377,7 +392,11 @@ class KikimrConfigGenerator(object):
audit_file_path = os.path.join(cwd, 'audit.txt')
with open(audit_file_path, "w") as audit_file:
audit_file.write('')
- self.yaml_config['audit_config'] = {'audit_file_path': audit_file_path}
+ self.yaml_config['audit_config'] = dict(
+ file_backend=dict(
+ file_path=audit_file_path,
+ )
+ )
@property
def metering_file_path(self):
diff --git a/ydb/tests/library/harness/kikimr_runner.py b/ydb/tests/library/harness/kikimr_runner.py
index 73a708c9b1..0d0a1fd777 100644
--- a/ydb/tests/library/harness/kikimr_runner.py
+++ b/ydb/tests/library/harness/kikimr_runner.py
@@ -74,7 +74,12 @@ class KiKiMRNode(daemon.Daemon, kikimr_node_interface.NodeInterface):
self.__role = role
self.__node_broker_port = node_broker_port
- self.__log_file = tempfile.NamedTemporaryFile(dir=self.cwd, prefix="logfile_", suffix=".log", delete=False)
+
+ if configurator.use_log_files:
+ self.__log_file = tempfile.NamedTemporaryFile(dir=self.cwd, prefix="logfile_", suffix=".log", delete=False)
+ else:
+ self.__log_file = None
+
self.__cms_config_cache_file = tempfile.NamedTemporaryFile(
dir=self.cwd,
prefix="cms_config_cache_",
@@ -166,10 +171,14 @@ class KiKiMRNode(daemon.Daemon, kikimr_node_interface.NodeInterface):
"--node-kind=%s" % self.__configurator.node_kind
)
+ if self.__log_file is not None:
+ command.append(
+ "--log-file-name=%s" % self.__log_file.name,
+ )
+
command.extend(
[
"--yaml-config=%s" % join(self.__config_path, "config.yaml"),
- "--log-file-name=%s" % self.__log_file.name,
"--grpc-port=%s" % self.grpc_port,
"--mon-port=%d" % self.mon_port,
"--ic-port=%d" % self.ic_port,
diff --git a/ydb/tests/library/harness/resources/default_yaml.yml b/ydb/tests/library/harness/resources/default_yaml.yml
index 1901b1e2ed..c7e443b90b 100644
--- a/ydb/tests/library/harness/resources/default_yaml.yml
+++ b/ydb/tests/library/harness/resources/default_yaml.yml
@@ -150,6 +150,8 @@ grpc_config:
- "import"
- "yq"
- "keyvalue"
+ - "monitoring"
+ - "auth"
feature_flags:
enable_persistent_query_stats: true
enable_scheme_transactions_at_scheme_shard: true